Repository navigation
Expand file tree
/
Copy pathaoci.code.txt
More file actions
640 lines (571 loc) · 191 KB
/
Copy pathaoci.code.txt
File metadata and controls
640 lines (571 loc) · 191 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
#AOCI-CODE-VOLUME: 1
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/===
.gitattributes[CG3T]: F:Normalizes repository text line endings for deterministic hashes and cross-platform collaboration | R:- | A:- | S:autocrlf rewrites would mark the whole tree stale
.gitignore[CG5T]: F:Separates tracked cognition assets from ignored runtime, recovery, build, agent host integration, cached release binaries, and local configuration state | R:code:internal/hooks/installer.go,code:internal/hooks/claude.go | A:- | S:Never track the agent host configs listed here: their paths are machine-bound and installers early-return on a key-presence check, so a committed copy silently no-ops another machine's init
.goreleaser.yml[CG5T]: F:Defines six CGO-free trimmed aoci archives with legal documents, bilingual READMEs and logos, checksums, and per-archive SBOM generation | R:code:.github/workflows/release.yml,code:scripts/release/archive-smoke/main.go | A:GoReleaser v2 configuration | S:Remote publishing remains disabled; the signed workflow rebuilds SHA256SUMS after adding all six SBOMs
AGENTS.md[CG8S]: F:Defines repository integration plus AOCI cognition establishment, reuse, maintenance, task-closing, verification, and index-admission rules for agents | R:code:docs/contract-authority.md,code:docs/zh-cn-contract-authority.md,code:scripts/blackbox/README.md,code:Makefile | A:- | S:Live Guide, tool schema, Spec, and Validator remain authoritative over this integration block; historical memory never substitutes for a current repository-bound cognition receipt; a green make fast proves nothing about the make full-only gates; make verify is the one-shot closure command and never replaces the per-change table
CHANGELOG.md[CG3L]: F:Records public release history, an Unreleased section for changes not yet tagged, and per-version contract, governance, and Schema Evidence changes | R:- | A:- | S:Pointer tests read the top ## v heading as current
CODE_OF_CONDUCT.md[CG3T]: F:Sets public community behavior and reporting expectations | R:- | A:- | S:-
CONTRIBUTING.md[CG5T]: F:Explains contribution boundaries, verification gates, public contracts, and review requirements | R:code:Makefile | A:- | S:The go.mod version names the base Go install, not what go version prints, because GOTOOLCHAIN=auto re-executes a downloaded toolchain and hides an older base
LICENSE[CG5S]: F:Carries FSL-1.1-MIT terms and the 2026 Liu JinShi copyright notice, including Permitted Purpose limits and the future MIT grant | R:code:NOTICE,code:scripts/check-licenses.sh | A:FSL-1.1-MIT | S:The MIT grant begins on the second anniversary of the date each version is made available
Makefile[CG9M]: F:Defines host-native builds, toolchain preflight, formatting, tests, connector replay, licenses, full verification, golden regeneration, and release gates | R:code:scripts/check-opengauss-connector.sh,code:scripts/check-licenses.sh,code:scripts/release/manifest/main.go | A:make fast,make full,make verify,make release-check,make opengauss-connector,make update-goldens | S:Formatting covers the main module and only AOCI-owned connector patch files so the upstream mirror stays byte-identical; race allows 30 minutes: internal/cli under -race takes about 12 minutes on a shared CI runner and the tag release gate once timed out at 15, so the timeout only stops a hang; preflight checks the base toolchain; missing gates fail closed; verify runs full gates under -k and must invoke BUILD_BIN, whose suffix comes from go env GOEXE; update-goldens rewrites every text and digest golden under AOCI_UPDATE_GOLDEN=1, never from a failed assertion
NOTICE[CG3T]: F:Records AOCI-CODE v0.1.0-rc1 through v0.1.0-rc17 under FSL-1.1-MIT with Liu JinShi, copyright year 2026, and public availability dates | R:code:LICENSE,code:PATENTS,code:TRADEMARKS,code:THIRD-PARTY-NOTICES | A:- | S:Availability lines are appended, never rewritten
PATENTS[CG3T]: F:Provides Liu JinShi as Patent/IP contact while making no patent ownership, number, application, registration, or additional-rights claim | R:code:LICENSE | A:- | S:Authorized counsel must confirm extra disclosure
README.md[CG5L]: F:Introduces AOCI-CODE to English readers: what it does, a sample entry, quick start, how it works, index format, hosts, CLI, databases, releases, community | R:code:README.zh-CN.md,code:docs/database-evidence.md,code:docs/supply-chain.md,code:spec/public/aoci-database-evidence-v1.txt,code:textassets/en-US/templates/volume-root.txt.tmpl,code:textassets/en-US/templates/volume-meta.txt.tmpl | A:- | S:Tag links serve archives; the QR URL is absolute as archives omit it; openGauss: 6.0.5 A/PG nonpartitioned base tables; header blocks, audit paragraph, badge, version, suite counts, routing test-bound
README.zh-CN.md[CG5L]: F:Presents AOCI-CODE capabilities, usage, cognition, Volume-first layout, onboarding, governance, releases, openGauss Evidence, and a user group to Chinese users | R:code:README.md,code:docs/database-evidence.md,code:docs/supply-chain.md,code:spec/public/aoci-database-evidence-v1.txt,code:textassets/zh-CN/templates/volume-root.txt.tmpl,code:textassets/zh-CN/templates/volume-meta.txt.tmpl | A:- | S:Tag links serve archives; the QR URL is absolute because archives omit it; openGauss: 6.0.5 A/PG base tables only; header blocks test-bound; badge, version, suite counts, native build gated
SECURITY.md[CG5T]: F:Defines supported security reporting, sensitive-data boundaries, and coordinated disclosure expectations | R:- | A:- | S:-
THIRD-PARTY-NOTICES[CG3L]: F:Retains hashed license texts and the exact 22-module release-matrix inventory, including the patched openGauss Connector and transitives | R:code:go.mod,code:docs/supply-chain.md,code:scripts/check-licenses.sh,code:third_party/openGauss-connector-go-pq.PROVENANCE.md | A:- | S:Connector attribution must remain auditable
TRADEMARKS[CG3T]: F:Provides Liu JinShi as Trademark/IP contact while making no ownership or registration claim and limiting use to LICENSE identification | R:code:LICENSE | A:- | S:Final marks and brand policy require legal review
go.mod[CG8T]: F:Declares the canonical Go module, exact Go version, and pinned runtime graph, including the official openGauss Connector identity and reviewed local replacement | R:code:third_party/openGauss-connector-go-pq/go.mod,code:third_party/openGauss-connector-go-pq.PROVENANCE.md,code:THIRD-PARTY-NOTICES | A:Go module dependency graph | S:The exact local replace keeps builds off unpatched upstream; the go directive carries the full patch version because setup-go installs it via go-version-file and the GOTOOLCHAIN=local license gate rejects a toolchain switch. A bump changing cmd/aoci's module set breaks the license inventory (make licenses only); a first-party import must be a direct requirement, since CI tidies and diffs the marker
go.sum[CG3S]: F:Authenticates downloaded Go dependency content, including the openGauss Connector transitive graph used by builds | R:code:go.mod | A:- | S:Local replacement needs separate provenance proof
glama.json[CG3T]: F:Names the GitHub maintainers who may claim this repository's listing in the Glama MCP directory | R:- | A:- | S:Directory metadata only; nothing in AOCI reads it
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/.github/workflows/===
ci.yml[CG5S]: F:Runs the pull-request and branch CI matrix for formatting, tests, builds, contract checks, static analysis, the black-box suites, and harness regression tests | R:code:scripts/blackbox/README.md,code:internal/safety/files.go | A:- | S:Actions are SHA-pinned, carry a version comment, and must match every other workflow's pin; staticcheck matches full-confidence so verdicts cannot diverge; every job has a timeout
full-confidence.yml[CG5M]: F:Runs scheduled, manual, and main-branch gates for licensing, races, lifecycle, scale, upgrade axis, databases, native platforms, and coverage | R:code:Makefile,code:scripts/check-licenses.sh,code:scripts/blackbox/README.md,code:scripts/blackbox/mcp_upgrade.py | A:GitHub Actions workflow_dispatch | S:openGauss pins 6.0.5 with verify-full TLS; windows-scenarios needs native Windows; a scripts/blackbox edit must trigger this gate; linux-full needs 90 minutes as the upgrade axis grows per release
release-rehearsal.yml[CG5S]: F:Exercises non-publishing release packaging and artifact verification with read-only permissions | R:code:.github/workflows/release.yml,code:internal/safety/files.go | A:- | S:Its action pins must equal release.yml's, enforced by internal/safety: packaging with older tooling than the release it rehearses makes this gate pass on something the release never runs
release.yml[CG9L]: F:Builds, keyless-signs, attests, verifies, and conditionally publishes exact 16-asset GitHub releases with version-derived prerelease and latest state | R:code:.goreleaser.yml,code:scripts/release/manifest/main.go,code:scripts/release/manifest/signed_release.go,code:scripts/release/manifest/signed_bundle.go,code:docs/supply-chain.md | A:workflow_dispatch,push tags v* | S:Dry runs cannot publish; tag publication requires the peeled tag to equal remote main plus successful exact-SHA Fast, Full, Rehearsal, and signed dry-run gates; the dry run takes its version from the dispatch input, whose default is the previous release and must be supplied or it rebuilds an existing tag; binaries and manifest share the version, full commit, UTC commit date, and go.mod toolchain
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/cmd/aoci/===
main.go[CG8T]: F:Starts the aoci process, delegates to the CLI root command, and maps command errors to process exits | R:- | A:- | S:MCP stdio stdout is reserved for JSON-RPC; all process logging must remain on stderr
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/docs/===
agent-integrations.md[CG5M]: F:Documents safe Codex, Claude Code, Cursor, and OpenCode V1 integration, Codex compaction reload, host-config governance, and execution modes | R:code:internal/hooks/opencode.go,code:internal/hooks/codex.go,code:internal/cli/init_gitignore.go | A:aoci init --agent opencode | S:Refresh or reopen only when the session has not loaded the server; a hand-made host config must be ignored before the first scan; OpenCode is V1 only; Codex truncates results per model, Maintain too
cognition-refresh.md[CG5M]: F:Defines checkpoint reasons, delivery receipts, refresh generations, the session cognition line, the probe, compaction handoff limits, and post-change alignment | R:code:spec/public/aoci-cognition-refresh-v1.txt | A:- | S:A probe is valid only when no Host compaction is known; after a known compaction the handoff carries no Index semantics and only a fresh complete Overview can restore reliability
cognition-volumes.md[CG5M]: F:Explains Volume-first init, authoring batches, lifecycle routing, next_commands, terminal proof, optimization review order, and database governance | R:code:spec/public/aoci-cognition-volumes-v1.txt,code:spec/public/aoci-index-format-v1.txt,code:spec/public/aoci-database-evidence-v1.txt | A:Public Volumes and lifecycle guide | S:Relations never block or replan a batch; database authoring uses only accepted saved Evidence and never reconnects in Maintain or Apply; a C7+ Entry with S:- is a review signal, not a verdict
database-cognition-authoring.md[CG5M]: F:Documents evidence-bound model authoring and atomic application of Database Cognition entries for Volumes repositories | R:code:docs/cognition-volumes.md | A:aoci_maintain,aoci_update_entry | S:Database Cognition uses ordinary no-argument Maintain and the complete current machine batch; the 64 KiB byte gate is the operative page bound; status --deep and index score remain Legacy-only
database-evidence.md[CG5M]: F:Documents configuration, catalog-only collection, snapshots, Baselines, drift, and real-engine acceptance for PostgreSQL, MySQL, and openGauss | R:code:spec/public/aoci-database-evidence-v1.txt,code:internal/dbevidence/collector.go,code:internal/dbevidence/collector_opengauss.go,code:third_party/openGauss-connector-go-pq.PROVENANCE.md | A:Database Evidence developer guide | S:openGauss is exact 6.0.5 A/PG with strict remote verify-full TLS and fail-closed unsupported objects; failures never advance Evidence or Baseline
getting-started.md[CG5T]: F:Guides release installation, Fresh Code-only Volumes initialization, agent integration, model-authored first-index generation, and aligned verification | R:code:docs/install.md,code:docs/cognition-volumes.md | A:- | S:Fresh Volumes: scan, then live Guide, no-argument Maintain, complete batches, then Verify, Check, and Guide; without a Baseline the Guide is blocked with a scan stop; Legacy planning is not the path
install.md[CG5M]: F:Documents source builds and layered verification of exact signed 16-asset releases using checksums, identity, signatures, attestations, SBOMs, and manifest | R:code:docs/supply-chain.md,code:.github/workflows/release.yml,code:scripts/release/manifest/main.go | A:sha256sum -c,cosign verify-blob,gh attestation verify | S:No runtime dependency on gh, Cosign, or Go, but scanning a Git working tree requires host git and fails closed without it; gh bundle verify needs no API login but may need a supplied Sigstore root
localization.md[CG5T]: F:Defines locale authority, asset parity, migration, and runtime text consistency rules | R:- | A:- | S:-
managed-scope-and-budget.md[CG5M]: F:Explains scope roles, governed changes, activation, posture, onboarding, starter rules, files needing no Entry, budgets, S coverage, scale limits | R:code:spec/public/aoci-managed-scope-and-budget-v1.txt,code:internal/volumegovernance/facts.go | A:- | S:Budgets bound writes, not delivery; volatile files need a role change or same-text resubmit; non-Git roots read no .gitignore; curation_exclude keeps a path out of index; starter rules are init-only
overview-delivery.md[CG5S]: F:Documents Overview chunk transport, cursors, the per-tool result-size declaration, the Challenge pass share, split proof submission, and reliability states | R:code:internal/mcptools/tools_read.go | A:- | S:The result-size declaration is static and raises one tool's Host persist threshold; it is not capability detection, and an unrecognizing Host ignores it
rollback.md[CG5T]: F:Provides safe binary rollback, conditional MCP process refresh, and layout-appropriate post-rollback verification | R:code:docs/upgrading.md | A:- | S:A host-wide restart is unnecessary when its MCP integration can reload and prove the replacement process; Volumes close through Verify, Check, and Guide, while status --deep remains Legacy-only
safe-inventory-and-scope-refresh.md[CG5T]: F:Explains Safe Inventory exclusions, scope proposals, review, atomic refresh boundaries, and the approval artifact the Apply step reads | R:- | A:- | S:-
supply-chain.md[CG8M]: F:Defines release assets, signing, provenance, dependency auditing with a go.mod-checked driver table, and reproducible verification of the patched Connector | R:code:.github/workflows/release.yml,code:THIRD-PARTY-NOTICES,code:scripts/check-licenses.sh,code:scripts/check-opengauss-connector.sh,code:go.mod,code:internal/dbevidence/driver_pin_contract_test.go,code:third_party/openGauss-connector-go-pq.PROVENANCE.md | A:make release-check | S:go mod verify does not cover a local replace; the connector gate must verify origin and sums, replay the canonical patch, and byte-compare the complete tree; the driver audit table is a released declaration, so a row may change only when go.mod changes with it, never by hand
troubleshooting.md[CG5M]: F:Diagnoses MCP identity, host scope, slow authoring, spills, stdio, repair, receipts, held files, drift, scope changes, worktree roots, git visibility, status | R:code:docs/upgrading.md,code:docs/cognition-volumes.md,code:internal/ui/server.go,code:internal/index/parser.go,code:internal/cognitiontxn/transaction.go | A:- | S:Disk bytes do not prove active MCP identity; the server self-reports service_binary_replaced_on_disk, and the page reads that fact from outside the process
uninstall.md[CG5T]: F:Explains removal of the binary, host integration, and optional repository-local AOCI assets | R:- | A:- | S:-
upgrading.md[CG5T]: F:Defines safe binary upgrade, artifact verification, MCP refresh, runtime identity, Managed Scope path migration, in-flight approval limits, and rollback | R:code:docs/install.md,code:docs/rollback.md,code:spec/public/aoci-managed-scope-and-budget-v1.txt | A:- | S:An approval binds the preview envelope, not the plan, so finish or discard a pending pair before replacing the binary; rc13 and older read an rc14-created index but not its special names
windows-host-agent.md[CG5L]: F:Documents Windows host integration, runtime identity, Guide execution, PowerShell-safe workflows, and the no-staging-files rule for Volumes authoring batches | R:code:docs/cognition-volumes.md | A:- | S:The Stage pipeline sections are Legacy-only; Volume-first repositories use Guide plus no-argument Maintain, and the F-length-never-blocks rule does not apply to FRAS v2 objects
zh-cn-contract-authority.md[CG5T]: F:Defines the authority order for Chinese contracts, machine facts, Guide output, and runtime assets | R:- | A:- | S:-
contract-authority.md[CG5T]: F:Provides the English rendering of the contract-authority order and conflict handling for fact sources | R:code:docs/zh-cn-contract-authority.md | A:- | S:-
windows-host-agent.en.md[CG5M]: F:English rendering of the Windows host-agent and PowerShell 5 contract with pointers to the English authorities | R:code:docs/windows-host-agent.md,code:docs/cognition-volumes.md | A:- | S:The Chinese original stays normative and is byte-locked by cross-layer and CLI tests; edits land additively there first and this rendering follows without its own locks
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/examples/minimal-repository/===
README.md[CG5T]: F:Explains the isolated minimal Go example used to demonstrate AOCI repository integration | R:- | A:- | S:-
go.mod[CG5T]: F:Declares the independent minimal-example Go module | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/examples/minimal-repository/counter/===
counter.go[CG5T]: F:Implements the small counter behavior used by the standalone example module | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/authoringcontract/===
contract.go[CG8M]: F:Assembles Locale-bound Code and Database authoring guidance with starter-aware calibration from formal Meta and machine contracts | R:code:internal/index/dict.go,code:internal/index/quota.go,code:internal/cognition/authoring_example.go,code:internal/machinecontract/numeric.go,code:textassets/model_prompt_assets.go | A:CurrentMachineFacts,ParseMeta,Build,Assemble | S:Formal Meta bytes are never substituted; EG/EI calibration is selected only when exact official starter definitions match, while custom and legacy Meta retain deterministic dictionary-authoritative fallback; the transport instruction tells the model to author inline, mind token bands for CJK, and re-Maintain after context loss
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/baseline/===
baseline.go[CG9L]: F:Defines the versioned repository fingerprint baseline, its Managed Scope receipt, and deterministic serialization | R:- | A:- | S:Raw SHA-256 is authoritative; normalized line-ending and gofmt hashes are diagnostic, a missing Role means Legacy Index, and the receipt's authorization mode is the active governance posture that proves later mode transitions
detect.go[CG9M]: F:Snapshots repository fingerprints and classifies Index/Baseline drift, including optional line-ending equivalence | R:code:internal/baseline/hash.go,code:internal/baseline/baseline.go,code:internal/fs/walk.go,code:internal/index/types.go | A:Snapshot,SnapshotWithInventory,Detect,DetectWith,EquivalentFingerprints,IsStaleFileWith | S:Line-ending equivalence is opt-in and falls back to raw SHA-256 when either normalized digest is absent; per-file snapshot hash failures remain explicit warnings
hash.go[CG7M]: F:Computes raw, CRLF-normalized, and gofmt-derived identities for files and in-memory postimages | R:code:internal/baseline/baseline.go | A:HashFile,HashFileReusing,HashBytes,IsFormatOnlyChange | S:Raw SHA stays authoritative for CAS and staging; binary or over-4MiB input degrades to raw-only, and reuse needs raw, size, and normalized digests to agree first
scope_detect.go[CG7S]: F:Separates Index-role governance drift from Observe-only fingerprint drift against the active Managed Scope Baseline | R:code:internal/baseline/baseline.go,code:internal/index/types.go | A:DetectManagedScope | S:Callers must first prove desired and active policy identities match; direct policy edits are Scope Change, never permission to reinterpret Baseline roles
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/businesssource/===
manifest.go[CG8M]: F:Builds deterministic public-source manifests without reading excluded secrets or runtime data | R:code:internal/fs/git_command.go | A:ErrScopeChangeRequired | S:Managed manifests include Index and Observe, exclude formal cognition and Exclude paths, and omit GeneratedAt from aggregate identity; a scope-change refusal is a sentinel so a caller can recognise that cause without matching text and avoid reporting it a second time
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/capability/===
manifest.go[CG8S]: F:Builds the machine capability manifest for CLI, MCP, layouts, schemas, interactions, and PostgreSQL, MySQL, and openGauss Evidence | R:code:internal/machinecontract/capabilities.go,code:internal/cognition/loader.go | A:capability-manifest/v1 | S:openGauss Schema Evidence is an additive capability; the exact nine-tool MCP name identity and input schemas remain unchanged
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cli/===
check.go[CG8L]: F:Runs aggregate repository checks and reports structural, governance, scope, and recovery failures | R:- | A:- | S:In Legacy layout, RawMissing alone, Orphan, line-ending-only, S-quota, E-scale, and tagparse are informational; actionable debt, pending drafts, enforced budget, or Locale migration can block. Check also records a Ledger event using the same decision as report.ok; the S coverage line and its optimization hint are informational and never enter issues or the exit code
cognition_system.go[CG8S]: F:Exposes narrow system relation, lineage, impact, and evolution projections over cognition | R:- | A:- | S:-
init.go[CG8L]: F:Initializes Volume-first cognition, team configuration, baseline skeletons, host integration, line-ending normalization, and diagnosable initial-scope blocks | R:code:internal/hooks/installer.go,code:internal/managedscope/proposal.go,code:internal/cli/init_gitignore.go,code:internal/config/cognition.go | A:aoci init --agent opencode | S:Fresh repositories default to production Managed Scope and policy-bound auto only when machine approval is safe; existing config keeps legacy automation; init never overwrites maintainer files and writes the host-config ignore here, because roles freeze at the first scan; a fresh --agent claude init writes the wider transport defaults; the scope block picks its arm by the counter BuildProposal used
mcp.go[CG8T]: F:Runs the AOCI MCP stdio server with protocol output isolated on stdout | R:- | A:- | S:stdout is reserved exclusively for JSON-RPC; startup emits no banner or version and never performs an automatic scan
root.go[CG8L]: F:Constructs the aoci root command, global flags, version identity, locale, and command tree | R:code:internal/cognitiontxn/transaction.go | A:- | S:MCP stdout is an unbuffered JSON-RPC-only stream; ordinary --json emits at most one ASCII-safe JSON object on Windows, and commands that already wrote a business report return only the exit code; the recovery gate opens only what every pending receipt kind allows (read-only surfaces, remove-entry, and Legacy recover commands under MCP receipts); executeCLI resets subcommand flags and writers per in-process run
scan.go[CG8M]: F:Builds Safe Inventory fingerprints, refuses to baseline without the Volumes it governs, and establishes or refreshes the governed Baseline | R:code:internal/fs/git_ignore.go,code:internal/scopechange/authorization.go,code:internal/cli/scan_skipped.go | A:- | S:--force cannot advance an existing Managed Scope Baseline; use the formal Scope Change flow; --dry-run never writes but still refuses a scan that would omit a git-hidden formal asset, because publishing that Baseline is what makes the omission durable; announces the skipped sources that need no Entry and the first-build estimate, with the narrowing recipe only on a dry run
scope.go[CG8L]: F:Implements managed-scope policy, budget, review, authorization, Apply, activation, recovery, and Volumes-aware status commands | R:code:internal/scopechange/plan.go,code:internal/managedscope/evaluate.go,code:internal/baseline/scope_detect.go | A:aoci scope | S:Policy and budget edits only require governed Scope Change; under Volumes v1 the budget is measured over the whole declared asset set rather than the Root pointer alone, which reports a near-empty index; the approval prompt names only the destination posture, and --out-file is validated before the human is asked; brace globs are refused only at rule add or edit; persisted ones keep loading, so no repository is wedged
update_entry.go[CG8S]: F:Provides the human CLI for one previewed or committed Entry update through the shared atomic write and Baseline pipeline | R:code:internal/mcptools/tools_write_batch.go,code:internal/cli/stdin_limit.go | A:- | S:A real write requires the current raw source SHA; preview may omit it, repairable failures return scoped findings without starting formal writes, and stdin is bounded by the Entries request limit while --entry with --stdin is refused before any write
verify.go[CG8L]: F:Verifies structural validity, source alignment, governance, relations, budgets, and recovery state | R:- | A:- | S:Verify never advances formal Index or Baseline, but it may write Verify History and Ledger; raw Missing remains visible while exit status counts only unresolved actionable, pending, orphan, stale, and unbaselined debt; drift counts dedupe a path listed under both Missing and Unbaselined
ai.go[CG7L]: F:Implements AI status, team-or-local setup, endpoint probing, redacted cost audit, and shared failure guidance | R:code:internal/config/config.go,code:internal/llm/client.go,code:internal/ledger/ledger.go | A:- | S:Only configToLLMOptions reads the key environment variable; secrets never enter flags, output, errors, config, or Ledger, and team setup loads the base layer so local endpoint settings cannot leak
ai_probe_contract.go[CG7T]: F:Builds the shared localized minimal Completion request used by Doctor --net and aoci ai test | R:code:internal/llm/options.go,code:textassets/model_prompt_assets.go | A:- | S:Both probe paths use the same prompt and MaxTokens so connectivity behavior and estimated input accounting cannot drift
baseline_scope.go[CG7S]: F:Implements baseline scope refresh, approval, apply, recovery, and status CLI routing | R:code:internal/cli/cognition_plan.go | A:- | S:Approve mints the artifact Apply consumes, so without --out-file it only reaches stdout and the confirmation is lost when the redirect is forgotten
business_source.go[CG7T]: F:Exposes deterministic business-source manifest inspection through the CLI | R:- | A:- | S:generated_at defaults to the current UTC second; callers needing reproducible manifest bytes must provide --generated-at
capabilities.go[CG7T]: F:Prints the versioned machine capability manifest without network access | R:- | A:- | S:-
cli_help_contract.go[CG7M]: F:Registers localized command help while preserving machine schema and protocol authority | R:- | A:- | S:Help asset failures are surfaced for only the invoked command; they never panic or silently fall back to duplicated hardcoded text
cognition_bootstrap.go[CG8M]: F:Routes governed Cognition Bootstrap preparation, review approval, Apply, status, resume, and rollback commands | R:code:internal/bootstrapapply/prepare.go,code:internal/bootstrapapply/transaction.go | A:aoci cognition bootstrap | S:Review approval requires a human TTY digest phrase; policy-bound auto uses a separate authorization receipt and never permits model self-approval
cognition_layout.go[CG7T]: F:Enforces Legacy-only preconditions for CLI cognition and governance writes and for the read commands documented Legacy-only | R:code:internal/cognition/loader.go,code:internal/config/config.go,code:internal/cli/status.go | A:- | S:Missing cognition is allowed only for initialization; any Volumes v1 layout, even incomplete, fails before a Legacy write can mutate state, and the read guard resolves that same verdict, not a copy
cognition_migration.go[CG7L]: F:Implements governed Legacy-to-Volumes migration CLI workflows and recovery commands | R:- | A:- | S:-
cognition_onboard.go[CG8M]: F:Exposes persistent model-authored onboarding from session start and evidence batching through preview, preparation, Apply, resume, status, and abort | R:code:internal/onboarding/workflow.go,code:internal/bootstrapapply/prepare.go,code:internal/migrationapply/prepare.go | A:aoci cognition onboard | S:Review preparation emits a human TTY digest-confirmation boundary; policy-bound auto preparation does not make the model an approver
cognition_plan.go[CG7S]: F:Routes deterministic cognition bootstrap, migration, and candidate-validation planning commands and writes planner artifacts to operator-chosen paths | R:code:internal/fs/atomic.go | A:writePlannerArtifact,validatePlannerOutput | S:An artifact path is validated before any human is asked, because a spent confirmation cannot be reused; the file is created only when absent and is owner-readable while it can stand in for that human
command_localization.go[CG7M]: F:Applies localized command names, help text, and errors without changing machine tokens | R:- | A:- | S:A flag absent from localizedFlagNames silently renders its English usage under every locale, and two message values that are byte-identical make --help fail closed instead
config.go[CG7M]: F:Implements team configuration list, merged-value get, and governed base-layer set commands | R:code:internal/config/config.go,code:textassets/catalog.go | A:aoci config list,aoci config get,aoci config set | S:Set loads only team base configuration so local endpoint overrides cannot leak; locale changes create migration state and need an MCP restart; batch cap and transport budget are range-checked here
database.go[CG7M]: F:Registers database evidence commands and manages credential-free source declarations, readiness checks, and read-only catalog inspection | R:code:internal/dbevidence/config.go,code:internal/dbevidence/access.go,code:internal/dbevidence/collector.go | A:aoci database,aoci database source | S:Config stores only the credential environment-variable name, never a secret; source add/list are offline; missing-variable guidance requires Host-environment provisioning outside Agent inputs
database_cognition.go[CG7S]: F:Implements evidence-bound Database Cognition status and bootstrap workflows with a stable outer error and redacted failure diagnostics | R:code:internal/databasebootstrap/prepare.go,code:internal/dbcognition/state.go,code:internal/machinecontract/status.go | A:aoci database cognition status,aoci database cognition bootstrap,database_bootstrap_stopped,cause_code,safe_next_action | S:Stopped-bootstrap Details never include wrapped errors, source IDs, paths, endpoints, or credentials; unknown failures collapse to the generic stopped cause
database_evidence.go[CG7S]: F:Implements Database Evidence bundle access, independent baseline acceptance, and Code-context projection for table cognition | R:code:internal/dbevidence/store.go,code:internal/databasebootstrap/transaction.go,code:internal/cognition/impact.go | A:aoci database evidence,aoci database baseline accept | S:Evidence bundles expose catalog structure only and report business_data_read=false; baseline acceptance may auto-bootstrap missing Database Cognition only through its governed transaction
database_snapshot.go[CG7S]: F:Implements database catalog snapshot capture, cached inventory, and live drift verification commands | R:code:internal/dbevidence/collector.go,code:internal/dbevidence/store.go | A:aoci database snapshot,aoci database inventory,aoci database verify | S:Inventory is offline; snapshot and verify replace saved Evidence; every path reports business_data_read=false
doctor.go[CG7M]: F:Diagnoses repository and cognition assets, Agent integrations, AI configuration, data destination, and optional endpoint readiness | R:code:internal/config/config.go,code:internal/hooks/status.go,code:internal/llm/client.go | A:aoci doctor | S:Endpoint probing is opt-in via --net; diagnostics reveal only whether the configured secret environment variable is populated and never print its value
hook.go[CG7M]: F:Implements the hidden pretool and codex-compact hook runtimes that normalize host input and delegate pre-write governance checks | R:code:internal/hooks/pretool.go,code:internal/hooks/claude.go,code:internal/config/paths.go,code:internal/cli/stdin_limit.go | A:aoci hook pretool,aoci hook codex-compact | S:Hook failures, missing paths, and oversize stdin all fail open; Claude blocks via exit 2 with stderr, the generic code is 4, and codex-compact emits context only, so it bypasses the recovery gate
host_interaction.go[CG7T]: F:Defines host TTY, digest confirmation, and non-interactive interaction checks | R:- | A:- | S:The prompt goes to process stderr because the cobra writer stays buffered until the command exits; non-TTY returns a zero-write boundary with model_self_approval=false
index.go[CG7S]: F:Registers index inventory, Header, build, update, Entry, score, and Agent workflow commands | R:- | A:- | S:-
index_agent_apply_guard.go[CG7M]: F:Rebuilds the current Host-Agent Plan and validates generation, source, target-set, and reviewed-draft identities immediately before Apply | R:code:internal/cli/index_agent_plan.go,code:internal/draft/manifest_decode.go | A:- | S:The guard is read-only; damaged generation state requires restaging, while repository or Plan drift requires a fresh Guide, and Legacy or endpoint-native drafts keep compatibility behavior
index_agent_automation.go[CG7S]: F:Maps automation.mode to Host-Agent Guide, Stage, approval, and Apply-continuation policy | R:code:internal/config/automation.go,code:internal/cli/index_agent_stage_finalize.go | A:- | S:off forbids Stage; review and legacy stop before Apply; auto never relaxes safety, CAS, or recovery guards
index_agent_curation.go[CG7S]: F:Wires Host-Agent Curation stage, Diff, and Apply commands and resolves immutable draft snapshots by explicit or latest run ID | R:code:internal/cli/index_agent_curation_stage.go,code:internal/cli/index_agent_curation_diff.go,code:internal/cli/index_agent_curation_apply.go | A:aoci index agent curation | S:Apply authorization is bound to the current draft snapshot hash from the most recent Diff review; an older reviewed hash is rejected
index_agent_curation_apply.go[CG7M]: F:Commits a reviewed Curation draft under run, generation, content, and current-Curation guards, then records locale progress and audit | R:code:internal/curation/store.go,code:internal/draft/manifest_decode.go,code:internal/config/config.go | A:- | S:Curation is restored to its exact preimage if locale-migration advancement fails; no application record or success audit is emitted before both writes succeed
index_agent_curation_contract.go[CG7M]: F:Strictly validates raw Host-Agent Curation requests and maps their complete decision set to the current Plan batch | R:code:internal/cli/index_agent_curation_protocol.go,code:internal/jsonstrict/duplicate.go | A:- | S:Missing, null, duplicate, extra, or partial decisions fail closed; confidence must be an integer and every source SHA-256 must match the exact target
index_agent_curation_diff.go[CG7M]: F:Builds and renders deterministic Curation decision diffs and records their P-23 review audit | R:code:internal/curation/model.go,code:internal/draft/draft.go | A:aoci index agent curation diff | S:Agent, Model, and UpdatedAt are audit-only and excluded from change comparison; output succeeds only after Review append
index_agent_curation_guard.go[CG7M]: F:Revalidates Curation source, policy, candidate, and formal-asset guards before writes | R:- | A:- | S:Target order is not identity; the complete canonical path set, uniqueness, drafted status, and source SHA-256 must match the current Curation Plan before any write
index_agent_curation_guide.go[CG7S]: F:Produces stage-specific Curation Guide actions and approval stops | R:- | A:- | S:Paths, extensions, and physical profiles are evidence only; every decision, role, reason, and confidence value requires independent model investigation, while off mode issues no Stage request
index_agent_curation_protocol.go[CG7M]: F:Strictly decodes and validates host Curation stage requests and receipts | R:- | A:- | S:Requests are size-bounded, reject unknown or trailing JSON, and must cover the exact current Plan batch with matching source SHA; partial, duplicate, or drifted decisions fail closed
index_agent_curation_stage.go[CG7L]: F:Stages complete model-authored Curation decisions bound to the current Plan | R:- | A:- | S:-
index_agent_guide.go[CG8L]: F:Renders deterministic Legacy or Volumes governance state into host-executable Guide JSON with stage-scoped commands, bounded batch facts, and stop contracts | R:code:internal/cli/index_agent_host_contract.go,code:internal/mcptools/tools_maintain_volumes.go,code:internal/mcptools/tools_maintain_budget.go,code:internal/volumegovernance/facts.go,code:internal/machinecontract/lexical.go,code:internal/cognitiontxn/transaction.go,code:internal/ui/snapshot.go | A:aoci index agent guide | S:Guide is read-only; a blocked Guide carries its remediation: scan for baseline_missing, acknowledge for observed_pending, budget levers for cognition_budget_exceeded, receipt closure for recovery_pending; terminal proof is Verify, Check, Guide at remaining=0; buildVolumeAgentGuide is the one assembler; batch total is CodeAuthoringWorkFor, size PlanCodeBatchIncluded; executable_targets omits informational findings
index_agent_guide_stop_contract.go[CG7T]: F:Loads localized stable messages and ordered instructions for Index-drift and orphan-review Guide stop states | R:code:internal/cli/index_agent_guide.go,code:textassets/guide_assets.go | A:- | S:These text assets never determine blocked mode, approval, Plan stage, or allowed commands; index_agent_guide.go owns those machine decisions
index_agent_guide_workflow.go[CG8L]: F:Builds stage-specific Host-Agent Guide commands, request templates, batch projections, and completion messages from a selected Plan and automation policy | R:code:internal/cli/index_agent_plan.go,code:internal/cli/index_agent_text_assets.go | A:- | S:Auto Entries Stage owns Check, Diff, and Apply while review/legacy expose them separately; every Entry remains model-authored and a successful batch is not task completion until Guide reaches its terminal state
index_agent_header_stage.go[CG7L]: F:Stages a complete model-authored Header candidate against current source and Plan identities | R:- | A:- | S:Stage is draft-only and zero-network; off rejects before Run creation, review stops before Apply, and auto may continue only through the existing Diff and hard-gated Apply
index_agent_header_stage_protocol.go[CG7M]: F:Defines and validates the host protocol for Header stage requests and completion | R:- | A:- | S:-
index_agent_host_contract.go[CG7L]: F:Builds and injects absolute, shell-safe runtime command bindings for Legacy and Volumes host-Agent Guides | R:code:internal/cli/index_agent_guide.go | A:- | S:The bound field list is hand-kept, so a new Guide command ships unbound unless it is added; runtime finalization requires a validated absolute executable and never falls back to bare aoci
index_agent_manifest_guard.go[CG7S]: F:Validates Host-Agent draft Manifest kind, provider, audit identity, intent, and canonical digest fields before Apply | R:code:internal/draft/draft.go,code:internal/cli/index_agent_apply_guard.go | A:- | S:Only generation_source=host_agent uses this strict guard; Endpoint and historical drafts retain compatibility, and damaged audit state is distinct from a superseded Plan
index_agent_missing_view.go[CG7M]: F:Builds bounded evidence views for missing Entry authoring targets | R:- | A:- | S:Public JSON aliases preserve raw Missing and actionable/curation subsets without changing plan_id; PendingCuration is a subset of SkippedMissing, not a fourth partition
index_agent_plan.go[CG7L]: F:Builds a deterministic Legacy Host-Agent stage Plan from Baseline, Managed Scope, Curation, locale, and cognition-budget facts | R:code:internal/managedstate/state.go,code:internal/indexgen/missing.go,code:internal/cognitionbudget/report.go,code:internal/cognitiontxn/transaction.go | A:- | S:No model, network, draft, Baseline, or Ledger writes; tolerated line-ending drift keeps raw-byte SHA bindings; the Legacy Guide refuses over any pending receipt, naming the closure
index_agent_plan_helpers.go[CG7M]: F:Builds deterministic Host-Agent Plan evidence, raw-byte repository identities, ordered Entry targets, and Curation targets | R:code:internal/baseline/detect.go,code:internal/indexgen/missing.go,code:internal/curation/store.go | A:- | S:Plan and Stage bindings always use raw source SHA-256; normalized line-ending hashes may inform drift equivalence but never enter repository or target identity
index_agent_plan_types.go[CG7L]: F:Defines host-Agent Plan, evidence, target, budget, and authorization data structures | R:- | A:- | S:plan_id omits timestamps, repository root, and display-only ignore or exclude counts; public Missing aliases cannot change it
index_agent_request_contract.go[CG7S]: F:Provides shared strict JSON-field, SHA-256, audit-label, and diagnostic-hash validation for Host-Agent stage requests | R:code:internal/jsonstrict/duplicate.go | A:- | S:Missing, null, wrong-type, and empty values remain distinct errors; duplicate keys are rejected before stage decoding, and agent labels are audit metadata rather than authentication
index_agent_request_input.go[CG7M]: F:Reads stage JSON from stdin or a regular request file with bounded validation | R:- | A:- | S:Exactly one input mode is required; request-file is preferred where PowerShell may recode stdin, and only bounded regular UTF-8 bytes are accepted while an optional UTF-8 BOM is stripped
index_agent_stage.go[CG8L]: F:Validates and stages complete model-authored Entry batches for Legacy workflows | R:- | A:- | S:-
index_agent_stage_finalize.go[CG7M]: F:Finalizes staged Entry batches through checks, diffs, authorization, Apply, and receipts | R:- | A:- | S:-
index_agent_stage_protocol.go[CG7L]: F:Defines and validates Entry stage request and response protocol versions | R:- | A:- | S:Before staging, every unique canonical path and raw source SHA-256 must match the current Plan; invalid Entry semantics remain visible as warned drafts and are never silently rewritten
index_agent_text_assets.go[CG7S]: F:Renders localized Agent Guide, stage, and stop text from registered runtime assets | R:- | A:- | S:Only assets consumed by the selected Plan branch are prevalidated; load failure returns an ID-bound diagnostic without panic, hardcoded fallback, or failure expansion to unrelated stages
index_ai_helpers.go[CG7S]: F:Adapts loaded configuration into the optional LLM client, timeout, concurrency display, error guidance, and progress rendering | R:code:internal/config/config.go,code:internal/llm/options.go,code:internal/workflow/entries.go | A:- | S:This layer does not read repository evidence, create drafts, or modify Index or Baseline; the configured secret is read only by configToLLMOptions and never rendered
index_apply_observe.go[CG7M]: F:Observes formal assets, drafts, manifests, backups, and Application records around Header, Entry, and Curation Apply attempts | R:code:internal/cli/index_apply_report_build.go,code:internal/draft/draft.go | A:- | S:Observation is read-only and treats a new inode as replacement even when content SHA is unchanged
index_apply_report.go[CG7M]: F:Wraps Entries, Header, and Curation Apply commands with JSON-mode pre/post observations and machine outcome reporting | R:code:internal/cli/index_apply_observe.go,code:internal/cli/index_apply_report_build.go | A:- | S:Human-readable mode delegates the original Apply unchanged; JSON classifies any post-write failure separately and emits recovery guidance that must not trigger a blind re-Apply
index_apply_report_build.go[CG7M]: F:Builds stable Apply reports from transaction, recovery, and verification evidence | R:- | A:- | S:Outcome is derived from observed post-run asset, Baseline, manifest, and Application state rather than the returned error alone; an asset-written audit failure must recover without repeating the write
index_build.go[CG7M]: F:Selects actionable missing or explicit paths and runs the AI Entry-draft workflow with progress and token reporting | R:code:internal/indexgen/inventory.go,code:internal/workflow/entries.go | A:- | S:--missing and --paths are mutually exclusive; excluded, skipped, and pending Curation targets are resolved before creating the AI client and never enter drafting
index_diff_report.go[CG7T]: F:Defines stable JSON shapes for Header and Curation diff reports | R:code:internal/cli/index_header_review.go,code:internal/cli/index_agent_curation_diff.go | A:- | S:Human and JSON rendering must consume the same prebuilt report; this layer only encodes supplied values and must not reread drafts or recompute differences
index_entries.go[CG7M]: F:Registers Entry inventory, draft, stage, check, diff, apply, report, and recovery commands | R:- | A:- | S:Check, Diff, and Apply consume one immutable draft snapshot hash; once any Diff exists, only the latest same-content Diff authorizes Apply, while legacy no-review manifests retain compatibility
index_entries_apply.go[CG8L]: F:Applies approved Entry drafts with source, CAS, validation, baseline, and recovery guards | R:- | A:- | S:Only the formal Index replacement is batch-atomic; Baseline and audit effects occur afterward, so later failure is not rollback
index_entries_auto.go[CG7L]: F:Runs policy-bound automatic Entry validation and Apply without self-approving model semantics | R:- | A:- | S:Check or semantic repair failures preserve the draft Run without formal writes; post-write Baseline, audit, or cleanup failures retain recovery evidence and must not trigger a fresh Apply
index_entries_auto_recovery.go[CG7S]: F:Closes retained recovery for an already applied Entries Auto batch from bound Application, draft, and full-candidate evidence | R:code:internal/draft/manifest_decode.go,code:internal/mcptools/tools_write_batch.go | A:- | S:AppliedAt alone is not completion proof; retry may only validate the successful Application and remove its retained recovery receipt, never rerun the formal Apply
index_entries_check.go[CG7S]: F:Checks staged Entry candidates against source, dictionary, quota, relation, and scope contracts | R:- | A:- | S:Check is machine preflight and audit only, never Apply authorization; rejected or skipped items require repair, while a clean batch must proceed through complete Diff review
index_entries_check_core.go[CG7L]: F:Performs the core deterministic Entry validation and candidate-set completeness checks | R:- | A:- | S:Format, dictionary, and generated Tag parse failures reject; R, S-quota, and E-scale findings only warn and never block Auto Apply
index_entries_diff.go[CG7M]: F:Builds and renders one snapshot-bound line-level Entry review report and records its P-23 Diff audit | R:code:internal/draft/draft.go,code:internal/index/editor.go | A:aoci index entries diff | S:Only drafted or warned targets are reviewed; unchanged means exact full-Entry equality, and the Diff review is appended before output so Apply binds that snapshot hash
index_entries_recover.go[CG7L]: F:Closes failed Entries runs by proving zero-write, completing the original postimage, or recording later governance supersession | R:code:internal/cli/index_entries_apply.go,code:internal/draft/draft.go,code:internal/mcptools/tools_write_batch.go,code:internal/runmanifest/runmanifest.go | A:aoci index entries recover <run_id> | S:Recovery never replays an unproven write; a staged run whose Index a later governance transaction already advanced closes as zero-write only on a complete receipt chain, never on a changed Index alone
index_entries_report.go[CG7T]: F:Records unresolved Entry authoring work without modifying formal cognition | R:- | A:- | S:Check exposes Diff only after a pass; rejected Check omits next_command and requires re-Check, while Diff alone may expose Apply, and JSON and human views consume the same facts
index_header.go[CG7M]: F:Wires Header show, endpoint Draft, Diff, and Apply commands and resolves the latest or explicit Header draft Run | R:code:internal/cli/index_header_review.go,code:internal/cli/index_header_apply.go,code:internal/workflow/header.go | A:aoci index header | S:Endpoint Draft writes only the standard draft area; formal Index and Baseline changes are confined to Apply, whose Diff review hash is revalidated before write
index_header_apply.go[CG8L]: F:Applies an approved Header candidate through CAS, atomic write, baseline, and receipt steps | R:- | A:- | S:Apply is bound to the reviewed draft and current Generation Plan; recovery accepts only exact pre/postimages, and Baseline, manifest, locale migration, Ledger, and cleanup must finish before success
index_header_recovery.go[CG7T]: F:Persists, loads, validates, and removes Header Apply recovery intent bound to exact Index and Baseline pre/postimages | R:code:internal/cli/index_header_apply.go,code:internal/fs/atomic.go | A:- | S:Recovery state accepts only a regular receipt file and exact known pre/postimage hashes; unknown bytes fail closed rather than selecting resume or rollback
index_header_review.go[CG7L]: F:Binds Header diff review and implicit Apply to one draft snapshot | R:code:internal/draft/draft.go,code:internal/index/header.go,code:internal/ledger/ledger.go | A:aoci index header diff | S:Explicit Run IDs bypass the latest-review guard, but implicit Apply rejects a different reviewed Run; Apply also rejects draft bytes changed after Diff
index_score.go[CG7S]: F:Runs and renders the nine-dimension Index quality score or one selected diagnostic dimension | R:code:internal/indexgen/score.go,code:internal/indexgen/score_types.go | A:aoci index score | S:tagparse exposes existing nonparseable-tag Warnings without upgrading them to Check blockers; --dim removes sample truncation but preserves the full-Index judgment
index_update.go[CG7L]: F:Classifies Legacy Stale and actionable Missing files, then previews or orchestrates model-authored incremental Entry drafts | R:code:internal/baseline/detect.go,code:internal/indexgen/inventory.go,code:internal/workflow/entries.go,code:internal/cli/index_update_automation.go | A:aoci index update --dry-run | S:The Index's own Stale record is excluded from model targets; automation=off returns before client construction, and Pending Curation remains skipped until explicitly decided
index_update_automation.go[CG7M]: F:Coordinates automatic update authorization, Apply, verification, and result handling | R:- | A:- | S:Auto requires a complete generation with zero failed or skipped targets and applies the exact checked snapshot; partial Apply is forbidden
index_update_automation_review.go[CG7M]: F:Persists the Entries Auto Diff review and proves that clean Check, complete Diff coverage, and the current draft hash jointly authorize Apply | R:code:internal/cli/index_entries_auto.go,code:internal/draft/manifest_decode.go | A:- | S:The Diff must cover every manifest Entry with zero skipped items, and Apply rejects latest-review hash or count drift; Endpoint and Host-Agent paths differ only by Ledger source
index_update_render.go[CG7M]: F:Renders localized update plans, findings, diffs, and completion messages | R:- | A:- | S:-
init_gitignore.go[CG7M]: F:Creates the default-deny .aoci/.gitignore boundary, ignores the host configuration init wrote and its backups, and normalizes line endings for new repositories | R:code:internal/fs/atomic.go,code:internal/fs/git_command.go,code:internal/cli/init.go | A:- | S:Maintainer files are never rewritten, which outranks the line-ending protection; the host block must precede the first scan, since roles freeze there and later removal needs an approved Scope Change
init_messages.go[CG7S]: F:Renders deterministic localized initialization results and next steps | R:- | A:- | S:-
init_volumes.go[CG7S]: F:Creates parseable Root, Meta, and Code Volume skeletons for new repositories | R:- | A:- | S:Meta and empty Code are created before Root activation; retries accept only exact deterministic regular-file postimages, and init never authors Code Entries or Database semantics
json_ascii.go[CG7S]: F:Encodes stable machine JSON with ASCII-safe escaping where protocol compatibility requires it | R:- | A:- | S:-
json_error.go[CG7S]: F:Maps CLI failures to stable machine-readable error envelopes and exit codes | R:- | A:- | S:MachineCode overrides generic exit mapping; successful --json payloads remain unwrapped, and this envelope is emitted only before any business JSON was written
locale_migration.go[CG7L]: F:Prepares resumable Locale-migration receipts and validates that staged Header and Entry changes preserve formal topology and source-backed technical facts | R:code:internal/config/config.go,code:internal/index/parser.go,code:internal/hooks/installer.go | A:- | S:Preparation changes configuration only; ordinary Entries remain byte-identical until source-bound Entry stages, while legacy .aoci governance Entries are removed during Header reclassification
remove_entry.go[CG7T]: F:Registers the human CLI for previewing or removing one named cognition Entry through the shared guarded pipeline | R:code:internal/mcptools/tools_remove.go | A:aoci remove-entry | S:CLI deliberately passes orphanOnly=false, so a human may remove a live-file Entry and surface it as Missing; MCP removal remains orphan-only, and --preview performs no write
status.go[CG7L]: F:Reports compact cognition metadata or deep Managed Scope drift and budget diagnostics | R:code:internal/managedstate/state.go,code:internal/cognitionbudget/report.go,code:internal/cli/cognition_layout.go | A:aoci status | S:Default mode avoids repository rehashing; --deep is Legacy-only, and its layout guard must allow a missing index or the curated absent-index answer is shadowed by a raw error carrying a host path
verify_render.go[CG7M]: F:Renders stable localized human Verify output and workflow-priority hints from an already computed report | R:code:internal/cli/verify.go,code:textassets/catalog.go | A:- | S:Pending Curation hints remain subordinate to actionable Missing, Unbaselined, and Stale work and defer final phase selection to Guide; the S coverage line and hint print only on the Legacy branch
stdin_limit.go[CG7T]: F:Reads standard input under an explicit byte bound and reports oversize separately from a read failure | R:code:internal/cli/hook.go,code:internal/cli/update_entry.go,code:internal/machinecontract/numeric.go | A:readLimitedInput,hookInputMaxBytes | S:The bound reads maxBytes+1 because only that extra byte separates exactly-at-limit from oversize; hook input carries its own small bound and fails open while update-entry refuses
ui.go[CG7M]: F:Runs the local status page in the foreground, or with --detach as its own session that reports its URL and returns, and stops a registered page with --stop | R:code:internal/ui/server.go,code:internal/ui/detach.go,code:internal/ui/registry.go | A:aoci ui,aoci ui --detach,aoci ui --stop | S:Readiness goes to the process stdout, not the command writer, which stays buffered until exit, and this command exits only when the page stops
scope_activate.go[CG7T]: F:Activates the desired Managed Scope policy through the existing empty-candidate preview and Apply, pausing with a saved preview when a human must approve | R:code:internal/cli/scope.go,code:internal/scopechange/plan.go,code:internal/scopechange/transaction.go,code:internal/cli/host_interaction.go | A:aoci scope activate | S:Never prompts, approves, edits rules, or authors Entries; each pause saves its preview in a fresh activate-* directory, so one under review is never overwritten; commands bind this executable and repo
scan_skipped.go[CG5S]: F:Counts, at scan time, the index-role files no model can author from their bytes or that curation keeps out, and estimates the first build's rounds | R:code:internal/curation/classify.go,code:internal/cli/scan.go,code:internal/volumegovernance/facts.go,code:internal/mcptools/tools_maintain_budget.go | A:- | S:Same classification Verify reports as code_skipped and code_curation_excluded; described files (Root for Legacy) and formal assets are left out; the estimate runs the real batch cut over the repo Meta
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cognition/===
authoring_boundary.go[CG7T]: F:Enforces strict Volume authoring form only for newly created or genuinely changed Tag and R fields while preserving tolerant reads | R:code:internal/cognition/impact.go,code:internal/index/types.go | A:- | S:Unchanged dotted tags and bare legacy relations remain readable; any new or changed Tag must be compact and every changed R token must be an exact canonical code: or database identity
authoring_example.go[CG7T]: F:Validates one supplied Code or Database authoring example through formal Volume parsing and the scoped tag dictionary | R:code:internal/cognition/loader.go,code:internal/index/dict.go | A:ValidateVolumeAuthoringExample | S:The example is a machine-contract fixture with no repository Meta, so it is judged against machine-default quotas and performs no filesystem, network, or write action
identity.go[CG9T]: F:Computes typed, length-delimited SHA-256 identities for cognition assets, scopes, objects, and composite sets | R:code:internal/cognition/types.go | A:- | S:Every field is domain-separated and length-framed, so absent assets and concatenation boundaries cannot collide; identities derive from exact formal bytes and ordered descriptors
impact.go[CG8L]: F:Validates cognition candidates and derives the bounded Review, Write, and Guard sets for one atomic batch | R:code:internal/cognition/impact_graph.go,code:internal/cognition/impact_types.go | A:ResolveImpact | S:Candidate form, identity, and dictionary violations fail closed per candidate, but R never does: relations only widen Review and Guard, and no Entry is checked against another. Field limits resolve through the repository Meta declaration, so a candidate legal at Load is legal here
impact_graph.go[CG8S]: F:Projects model-authored R onto a read-only edge set that only widens the Review face | R:code:internal/cognition/impact.go | A:- | S:A token naming no managed object, or several, simply produces no edge; this projection has no diagnostic channel, so relations can never fail a write, and entry-to-entry meaning is built by the model reading the Whole-Index
impact_types.go[CG7S]: F:Defines public impact, lineage, evidence, and projection result structures | R:- | A:- | S:Candidates carry semantic or structural intent only; the relation graph has no issue channel because relations never fail a write
loader.go[CG9L]: F:Loads Legacy or Volumes cognition layouts and fails closed on invalid or mixed assets | R:code:internal/index/quota.go | A:- | S:Layout is selected solely by the exact first Root marker; a damaged recognized marker never falls back to Legacy. Root descriptors are validated before any declared path access, and Root, Meta, and object Volumes reject copied authority or dynamic state. Meta is assembled before any object Volume is judged, because the Root may declare them in any order and the Meta carries the quota every object is measured against
objects.go[CG9M]: F:Parses canonical Code and Database objects and validates object identity, compact tags, FRAS v2 order, and field limits | R:code:internal/index/parser.go,code:internal/index/quota.go,code:internal/cognition/registry.go | A:IsCanonicalDatabaseRef | S:Database identities are explicit database://source/namespace/table references; parsing never infers or generates semantics. The S limit resolves through index.LimitForC, which honours a Meta declaration only when it is looser than the machine default, so this error-level gate can never be tightened into refusing a Volume that already loads
ownership.go[CG7T]: F:Assigns formal assets and object identities to exactly one cognition owner | R:- | A:- | S:Canonical database URIs belong to Database, registered formal paths are case-insensitively Root, Meta, Code, or Database-owned, and every other repository path belongs to Code; detection never repairs
projected.go[CG9M]: F:Validates projected Volumes v1 Root descriptors, target paths, and candidate CognitionSet bytes without activating them | R:code:internal/cognition/loader.go,code:internal/index/quota.go | A:ParseProjectedRoot,ValidateProjectedTargetPaths,BuildProjectedSet | S:Projected six-field descriptors stay separate from the active five-field loader until explicit layout activation. This is the assembler a volume commit runs, so it must resolve Meta first exactly as Load does, or a candidate legal at Load is refused at commit
registry.go[CG8T]: F:Defines the supported cognition Volume registry, dependencies, formats, and namespaces | R:- | A:- | S:Volume kinds are explicitly registered rather than inferred from filenames; callers receive a deep-copied kind-sorted registry so mutation and map order cannot change the contract
repair_findings.go[CG7T]: F:Stably orders public Repair Findings by domain, path, field, rule code, and integer candidate position | R:code:internal/cognition/types.go | A:SortRepairFindings | S:CandidateIndex remains the caller's immutable 1-based position in the complete batch and is compared numerically, not lexically
system_projection.go[CG8L]: F:Builds narrow system relation, lineage, impact, and evolution views without inventing semantics | R:- | A:- | S:All outputs are derived, non-authoritative, and unpersisted; relations naming no managed object are skipped rather than reported, because R may legitimately point at unwritten, removed, or unmanaged things; snapshot comparison observes change without evolving cognition
types.go[CG7S]: F:Defines loaded cognition sets, volumes, entries, layout modes, and formal asset metadata | R:- | A:- | S:This model is read-only; generation, maintenance, Baseline, CAS, Apply, Ledger, and Recovery remain owned elsewhere, and recognized damaged Volumes fail closed rather than falling back to Legacy
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cognitionbaseline/===
build.go[CG8T]: F:Builds combined Code source and Database evidence baseline bindings for Volumes cognition | R:- | A:- | S:Build consumes only validated projected Volume bytes; Code bindings use source fingerprints while Database bindings use evidence identities, and exact Baseline serialization is shared by Bootstrap and Migration
verify.go[CG8T]: F:Verifies Volume objects against their current source or accepted database evidence bindings | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cognitionbudget/===
policy.go[CG7S]: F:Defines, defaults, normalizes, resolves, and hashes Whole-Index and per-C R/S token budget policies | R:code:internal/machinecontract/managed_scope.go | A:DefaultPolicy,LegacyPolicy,Normalize,LimitFor,Identity | S:LegacyPolicy is a frozen persisted preimage every repository without a cognition_budget block resolves, so changing its literals or shape forces a Scope Change on all of them; DefaultPolicy may move
report.go[CG8M]: F:Measures Header and Entry token budgets, largest fields, enforceable violations, and S coverage by C band | R:- | A:EstimateTokens,EstimateTokensOfSize,RebindWholeIndexTokens,NewSCoverageTally,HighImportanceSAbsentHint,SPresent | S:Token estimates are UTF-8 bytes/3 and never rewrite semantics; observe mode reports violations without blocking, while enforce mode rejects any Whole-Index or R/S hard-limit violation. Build measures one asset, so a Volumes v1 caller must rebind the total over the complete declared set; s_coverage follows the policy S bands and the hint rule lives here alone
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cognitiontxn/===
transaction.go[CG9L]: F:Provides shared intent, preimage, postimage, CAS, atomic commit, and recovery transactions | R:- | A:- | S:Only exact preimage or postimage states are actionable; staged and archived bytes are immutable, other pending operations block, and a terminal Ledger event is accepted only after read-back equality proves idempotent completion. Pending reads every receipt kind under .aoci/transactions (database-bootstrap, bootstrap, migration, reversal, scope, remove, entries, header) and any foreign .json as unknown; PendingLayout is the loader's narrower view; RejectOtherPending lets layout resumes proceed over MCP write receipts, OtherPending is the write tools' any-kind check (#74)
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/config/===
automation.go[CG7S]: F:Resolves legacy, off, review, and policy-bound auto authorization modes | R:- | A:- | S:Missing mode means legacy except proven Fresh Bootstrap, which defaults to auto; manual normalizes to absent legacy, and config.local.json cannot override team automation
cognition.go[CG7T]: F:Validates team-owned refresh, Overview chunking, Database Cognition batch limits, the Code batch cap, the Maintain transport budget, and host transport defaults | R:code:internal/machinecontract/numeric.go | A:SetOverviewChunkTokens,DatabaseCognitionBatchLimits,CodeCognitionBatchLimit,MaintainTransportBudget,SetMaintainTransportBudgetBytes,SetHostTransportDefaults | S:Local configuration cannot override these team-owned limits; zero values resolve to machine defaults; host defaults touch only fields still at their default, and only for claude
config.go[CG8L]: F:Loads, merges, validates, and atomically saves team and local AOCI configuration | R:- | A:- | S:Team-governed automation, line-ending tolerance, refresh threshold, Database sources, Managed Scope, authoring batch sizes, and the Maintain transport budget cannot be overridden locally; callers must never Save a merged Load result back to team config
curation.go[CG7T]: F:Normalizes and matches static team curation_exclude path or subtree selectors for Missing classification | R:code:internal/config/config.go,code:internal/indexgen/missing.go | A:CurationExcluded,CountCurationExcluded | S:This policy only suppresses automatic Missing dispatch; it does not rewrite the raw Missing fact, override explicit --paths, or exempt an existing stale Entry
paths.go[CG7S]: F:Locates the canonical repository root and resolves formal, configuration, audit, and recovery asset paths | R:code:internal/config/config.go,code:internal/fs/safe_path.go | A:FindRepoRoot,AOCIPaths | S:Without --repo, root discovery completes the full upward .git search before considering .aoci, so a nearer nested .aoci cannot override the canonical Git root
scope_budget.go[CG7M]: F:Normalizes, clones, defaults, and CAS-mutates Managed Scope, cognition budget, and exact high-risk inventory opt-in configuration | R:code:internal/managedscope/policy.go,code:internal/cognitionbudget/policy.go,code:internal/scopechange/transaction.go,code:internal/managedscope/starter.go | A:SetNewProjectGovernance,MutateManagedScope,MutateCognitionBudget,MutateSafeInventoryHighRiskOptIn | S:Mutations change desired team config only; active scope and budget identities stay in Baseline until Scope Change applies; new-project defaults and starter rules never reach an existing repository
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/dbevidence/===
access.go[CG8S]: F:Resolves runtime-only environment credential references and reports redacted database access readiness without connecting | R:code:internal/dbevidence/config.go | A:CredentialProvider,NewEnvironmentCredentialProvider,InspectAccess,DefaultCredentialEnv | S:Resolved credentials are never persisted or returned; v1 accepts only the environment provider
canonical.go[CG7L]: F:Canonicalizes PostgreSQL, MySQL, and openGauss identifiers, columns, constraints, indexes, tables, and snapshots | R:code:internal/dbevidence/types.go,code:internal/dbevidence/collector.go | A:CanonicalTable,BuildSnapshot | S:Rejects invalid UTF-8, non-base tables, duplicates, unresolved facts, and cross-source references; openGauss uses the unchanged Evidence v1 canonical shape
collector.go[CG8M]: F:Coordinates bounded catalog-only PostgreSQL, MySQL, and openGauss collection and redacted source-error mapping | R:code:internal/dbevidence/config.go,code:internal/dbevidence/queries.go,code:internal/dbevidence/collector_opengauss.go,code:third_party/openGauss-connector-go-pq/connector.go | A:Inspect,Snapshot | S:Each collection uses one connection and one repeatable-read read-only transaction whose options are chosen per engine, so an engine without a policy fails closed before connecting; openGauss opens only through the strict connector parser and no path reads business rows
collector_mysql.go[CG7M]: F:Collects MySQL catalog metadata through reviewed read-only information-schema queries | R:- | A:- | S:-
collector_postgresql.go[CG7M]: F:Collects PostgreSQL catalog metadata through reviewed read-only catalog queries | R:- | A:- | S:A mid-level table is both a partition and a parent, so child linking must merge into its existing partition facts; overwriting loses the method and makes evidence depend on child-name order
config.go[CG7M]: F:Validates and normalizes PostgreSQL, MySQL, and openGauss source selection, credential references, filters, and system namespaces | R:code:internal/dbevidence/types.go | A:NormalizeSources,NormalizeSource,Included | S:Credential references and timeouts do not participate in Evidence identity; include filters cannot re-admit engine-owned system namespaces
drift.go[CG7S]: F:Classifies Database Evidence source identity and per-table structural drift against the independent accepted Baseline | R:code:internal/dbevidence/store.go,code:internal/dbevidence/types.go | A:CompareSnapshot,BuildEvidenceBundle | S:Comparison never advances the Baseline; table changes name only canonical structural components, and Evidence bundles contain no model-generated semantics or business-row data
drivers.go[CG7T]: F:Registers the reviewed pure-Go PostgreSQL, MySQL, and openGauss database/sql drivers | R:code:go.mod | A:database/sql driver registration | S:-
queries.go[CG7M]: F:Defines fixed catalog-only SQL inventories for PostgreSQL, MySQL, and the dedicated openGauss 6.0.5 adapter | R:code:internal/dbevidence/collector.go,code:internal/dbevidence/collector_opengauss.go | A:- | S:Queries never interpolate user values or read business rows and have canonical ordering; openGauss does not alias PostgreSQL SQL and explicitly detects unsupported visible features
store.go[CG7L]: F:Persists and strictly reloads canonical Database Evidence snapshots and accepted Baselines for every supported engine | R:code:internal/dbevidence/canonical.go,code:internal/dbevidence/types.go,code:internal/fs/atomic.go | A:WriteSnapshot,LoadSnapshot,LoadTableEvidence,LoadBaseline,AcceptSnapshot | S:Evidence paths are content-addressed and Lstat-checked without following symlinks; Baseline acceptance requires the exact current saved Snapshot and never occurs during Snapshot write
types.go[CG7M]: F:Defines PostgreSQL, MySQL, and openGauss source, table, column, constraint, index, Evidence, Snapshot, and Baseline types | R:code:internal/dbevidence/config.go,code:internal/dbevidence/canonical.go | A:EnginePostgreSQL,EngineMySQL,EngineOpenGauss | S:-
collector_opengauss.go[CG9L]: F:Collects deterministic openGauss 6.0.5 A/PG table, column, key, constraint, and index facts and rejects unsupported visible semantics | R:code:internal/dbevidence/collector.go,code:internal/dbevidence/queries.go,code:internal/dbevidence/config.go,code:internal/dbevidence/canonical.go | A:collectOpenGauss | S:Requires OpenSourceCentralized 6.0.5 in A or PG mode and ordinary permanent nonpartitioned row tables; unrepresentable constraint or index states fail closed
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/fs/===
atomic.go[CG9L]: F:Implements durable replacement, no-replace create or move, and exchange-based CAS with crash recovery and conflict preservation | R:code:internal/fs/atomic_exchange_linux.go,code:internal/fs/atomic_create_linux.go,code:internal/fs/lock.go | A:AtomicWrite,AtomicCreateCAS,AtomicCreateCASMode,ValidateCreateTarget,AtomicMoveCAS,AtomicWriteCAS | S:CAS never silently overwrites unproven third-party bytes; only plain AtomicWrite has a non-atomic Windows fallback, and that fallback renames the target to a same-directory backup instead of deleting it, restores it when the retry fails, and keeps both files when even restoration fails
safe_inventory.go[CG9L]: F:Builds the deterministic Safe Inventory while excluding secrets, runtime data, generated assets, and unsafe paths | R:code:internal/fs/git_command.go | A:- | S:Excluded content is classified by path without being opened; Git tracked/ignore authority and non-Git traversal share the same hard safety boundary, and formal cognition assets never become business-source evidence. RequiredHumanReview counts every excluded tracked path and is audit visibility only; authorization must key on AutoBlockerCount, which counts only paths an opt-in will read; a non-Git root is walked directly and reads no .gitignore at any depth: only built-in names and project configuration keep a path out
atomic_create_darwin.go[CG5S]: F:Publishes a staged file into a name that must not already exist, using the Darwin no-replace primitive with an O_EXCL copy fallback | R:code:internal/fs/atomic.go | A:- | S:exFAT answers ENOTSUP, which on darwin is a different errno from EOPNOTSUPP; the copy fallback keeps the refusal but not atomic content, so callers must verify the published digest
atomic_create_linux.go[CG5T]: F:Publishes a staged file into a name that must not already exist, using the Linux no-replace primitive with a link-based fallback | R:code:internal/fs/atomic.go | A:- | S:RENAME_NOREPLACE is a filesystem capability, not a kernel one; DrvFs refuses it, and the link fallback carries the identical guarantee, so an over-broad unsupported check costs only a syscall
atomic_create_other.go[CG3T]: F:Refuses to publish where the platform has no atomic no-replace primitive, instead of degrading to a replacing rename | R:code:internal/fs/atomic.go | A:- | S:This refusal is the contract, not a stub
atomic_create_windows.go[CG3T]: F:Publishes a staged file with MoveFileEx and no replace flag, so an existing name, directory, or reparse point is a hard conflict | R:code:internal/fs/atomic.go | A:- | S:MOVEFILE_REPLACE_EXISTING would void the guarantee
atomic_exchange_darwin.go[CG3T]: F:Uses Darwin rename exchange support for exact atomic replacement where available | R:- | A:- | S:-
atomic_exchange_linux.go[CG3T]: F:Uses Linux renameat2 exchange support for exact atomic replacement where available | R:- | A:- | S:-
atomic_exchange_other.go[CG3T]: F:Reports unavailable atomic exchange on platforms without a safe primitive | R:- | A:- | S:-
atomic_exchange_windows.go[CG3T]: F:Implements Windows replacement behavior for guarded atomic writes | R:- | A:- | S:-
countlines.go[CG7T]: F:Counts file lines consistently for inventory and cognition scale evidence | R:- | A:- | S:Empty files count as zero, a terminal newline adds no empty line, and an unterminated final line adds one; this streaming helper deliberately performs no binary sniffing
lock.go[CG7L]: F:Provides repository write locking with owner identity, stale-lock detection, and safe release | R:- | A:- | S:Reclaim requires age, OS-dead owner identity, and same-inode proof; directory fallback locks cannot be CAS-reclaimed and fail closed, while Release token-checks prevent deleting a successor lock
lock_owner_open_other.go[CG3T]: F:Reads lock-owner state on non-Windows platforms without following unsafe paths | R:- | A:- | S:-
lock_owner_open_windows.go[CG3T]: F:Reads lock-owner state with Windows-compatible sharing semantics | R:- | A:- | S:-
process_identity_linux.go[CG3T]: F:Captures Linux process start identity to distinguish live owners from PID reuse | R:- | A:- | S:-
process_identity_other.go[CG3T]: F:Provides conservative process identity behavior on unsupported operating systems | R:- | A:- | S:-
process_identity_unix.go[CG3T]: F:Probes Unix process liveness for lock ownership checks | R:- | A:- | S:-
process_identity_windows.go[CG3T]: F:Captures Windows process identity and liveness for lock ownership checks | R:- | A:- | S:-
safe_inventory_platform_other.go[CG3T]: F:Supplies platform-specific inventory exclusions outside Windows | R:- | A:- | S:-
safe_inventory_platform_windows.go[CG3T]: F:Handles Windows reparse points and filesystem hazards during Safe Inventory | R:- | A:- | S:-
safe_path.go[CG7T]: F:Normalizes agent-supplied repository-relative path syntax and rejects absolute, drive, UNC, empty, or parent-escape forms | R:code:internal/fs/walk.go,code:internal/fs/atomic.go | A:NormalizeRelPath | S:This is lexical normalization only; callers remain responsible for repository-root binding, symlink safety, file type, and actual filesystem access
walk.go[CG7T]: F:Walks governed repository files with configured exclusions and deterministic ordering | R:- | A:- | S:WalkRepo returns Safe Inventory managed candidates only; .git/.aoci, symlink escapes, runtime/generated/sensitive objects remain hard excluded even when ignored candidates are requested
git_command.go[CG8T]: F:Builds every read-only git invocation against an untrusted target repository with repository-controlled execution disabled and no child console window | R:code:internal/fs/safe_inventory.go,code:internal/businesssource/manifest.go,code:internal/fs/git_command_windows.go | A:UntrustedRepositoryGitCommand | S:A scanned repository's own .git/config can name core.fsmonitor and git executes it while walking the tree; command-line -c outranks repository config, so every git call must route through here; under a console-less host each git.exe would otherwise open a visible window, so the constructor calls hideChildConsole
git_ignore.go[CG7T]: F:Answers whether a path is hidden by Git's ignore authority and which rule source hides it | R:code:internal/fs/git_command.go,code:internal/cli/scan.go | A:PathIgnoredByGit | S:One check-ignore call covers .gitignore, .git/info/exclude and core.excludesFile, so the answer must come from Git; --no-index is never passed because it reports tracked files as ignored
git_command_other.go[CG3T]: F:Provides the no-op console suppression for git children on non-Windows platforms | R:code:internal/fs/git_command.go | A:- | S:-
git_command_windows.go[CG5T]: F:Hides the console window of git.exe children with HideWindow and CREATE_NO_WINDOW so a console-less MCP host never flashes a window per probe | R:code:internal/fs/git_command.go,code:internal/ui/detach_windows.go | A:- | S:CREATE_NO_WINDOW only suppresses console allocation and leaves stdio handle inheritance untouched, so host pipes and terminal output behave as before
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/index/===
dict.go[CG7L]: F:Parses Header and Meta tag dictionaries, validates canonical compact tag components, and exposes exact symbol definitions for semantic calibration | R:code:internal/authoringcontract/contract.go | A:ExtractTagDict,ExtractScopedTagDict,CheckTagsAgainstDict,DimensionNameNearMiss,AcceptedDimensionSpellingsForLocale,DisplayDimensionSpelling | S:Accepted spellings are exact and a near miss is only reported; a diagnostic must carry only text its Locale accepts, including the operator's own spelling, or the runtime discards it whole
editor.go[CG7L]: F:Edits or inserts one Entry while preserving section structure and unrelated index bytes | R:- | A:- | S:Transforms stay in memory; planNewSection is the one decision for writer and probe: a new index starts with its root section, sections continue the resolved root, one resolving elsewhere is refused
editor_remove.go[CG7S]: F:Removes one exact Entry preimage and prunes only directory Sections left semantically empty | R:code:internal/index/editor.go,code:internal/index/parser.go | A:RemoveEntry,RemoveEntryForPath,PruneEmptySections | S:Zero or duplicate matches fail; path-aware removal disambiguates identical lines; line endings and independent formal content are preserved; an empty root section stays while it anchors other sections
escale.go[CG7M]: F:Derives and validates the scale tag from governed source line-count evidence and slices one profile's dictionary text out of a Meta | R:- | A:- | S:E-scale drift is Warning-only and dictionary thresholds rule; missing, unparsable, overlapping, or gapped ranges are never guessed; CheckEScaleDetail is the one decision, CheckEScale renders it
escale_path.go[CG7T]: F:Resolves source paths safely for scale validation without escaping the repository | R:- | A:- | S:Only repository-root .aoci/** and root aoci.txt are excluded to prevent governance-history and self-referential scale churn; similarly named nested or prefix paths remain checked
header.go[CG7M]: F:Provides pure Header extraction, validation, replacement, and diff primitives | R:code:internal/index/parser.go,code:internal/index/editor.go | A:ExtractHeader,ValidateHeaderText,ReplaceHeader,RenderHeaderDiff | S:The first === line is the Header boundary; new nonblank lines must start with # and cannot contain section syntax, while replacement preserves Entry bytes and line endings and strips a leading BOM
locale.go[CG7T]: F:Detects and constructs the canonical explicit Locale marker for an AOCI Index | R:code:textassets/catalog.go | A:DetectLocale,LocaleMarker | S:An Index without a marker deterministically uses the legacy zh-CN locale; empty, duplicate, or unsupported explicit markers fail
parser.go[CG8L]: F:Parses Legacy and Volume Entry sections and F/R/A/S fields into deterministic records | R:- | A:- | S:Section roots are historical coordinates judged from text before the runtime root, so origin and clones agree: the old writer's shape (first section full, rest under the truncated root) reads as written; 2+ sections rooted below the runtime root (nested worktree) relocate whole, a lone one stays direct; else direct matches, then only the unmatched subset relocates by a shared prefix, never a guessed path
query.go[CG7M]: F:Parses and evaluates keyword/tag Entry searches and renders localized session runtime rules with machine cognition limits | R:code:internal/index/parser.go,code:textassets/catalog.go,code:internal/machinecontract/numeric.go | A:ParseTagFilter,Search,BuildRuntimeRules | S:Only C accepts >= filters; runtime rules come from the active Locale asset and append validated refresh/chunk limits, never model-generated repository semantics
quota.go[CG7M]: F:Extracts effective per-C S-field rune quotas from Meta and reports violations with machine-default gap filling | R:code:internal/index/dict.go,code:internal/machinecontract/numeric.go | A:ExtractSQuotaThresholds,EffectiveSQuotaContract,CheckSQuotaWith,LimitForC | S:CheckSQuotaWith is warning-level and honours a declaration both ways; LimitForC serves error-level gates and honours only a looser one, so narrowing a header cannot make a persisted Volume unloadable
relations.go[CG5S]: F:Reports single-line form problems in a candidate R field without touching the filesystem | R:code:internal/index/validator.go | A:ValidateEntryRelations | S:Every result is a Warning that never blocks, and targets are never resolved, so R may name anything the model means
types.go[CG7S]: F:Defines Header, Entry, tag, field, section, and validation data structures | R:- | A:- | S:FullLine, not parsed fields, is canonical for comparison and replacement; malformed tags degrade to an empty map; LegacyAbsPath keeps the original header reading so truncated roots still resolve
validator.go[CG8M]: F:Validates Entry syntax, required fields, tags, field limits, and semantic structure | R:- | A:- | S:Multiline, filename mismatch, missing FRAS, or duplicate F/R/A are hard errors; unparseable tags, evolution narrative, and S quota are warnings, and validation never silently repairs candidate bytes
validator_tagparse.go[CG7T]: F:Classifies existing validator warnings into the tagparse reporting dimension without implementing a second tag parser | R:code:internal/index/validator.go,code:internal/index/parser.go | A:HasTagParseWarning | S:Only Warning-level violations with the stable tag-parse prefix qualify; parsing authority remains ValidateEntryLineWith and ParseTags
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/machinecontract/===
capabilities.go[CG9T]: F:Defines canonical AOCI-CODE product, repository, module, binary, MCP, and capability identities | R:- | A:- | S:-
cognition_planner.go[CG9S]: F:Defines cognition planner, candidate, preview, provenance, and lifecycle version tokens | R:- | A:- | S:-
lexical.go[CG7T]: F:Defines shared machine-owned lexical tokens and the remediation command suffixes used across validators, runtime text, Guide, and MCP next_commands | R:code:internal/cli/index_agent_guide.go,code:internal/mcptools/tools_next_commands.go | A:- | S:Command suffixes live only here so the CLI Guide and MCP next_commands can never spell one command two ways; {agent}, {tokens}, {source} are host-filled placeholders
managed_scope.go[CG8S]: F:Defines managed-scope roles, structured decision bases, profiles, policy, evaluation, approval, and transaction tokens | R:- | A:- | S:-
numeric.go[CG9S]: F:Owns cross-layer numeric limits for FRAS, batching, budgets, refresh, and delivery | R:- | A:- | S:Cross-layer numeric limits live only here: the Code batch cap default (50) sits below the wire ceiling (200) it is validated against, the Maintain transport budget defaults to 24 KiB within 16 to 192 KiB with a 40 KiB Claude Code init value, the transport list limit is 20, and the Database Evidence byte gate defaults to 64 KiB; HighImportanceMinC (7) and the 25 percent S-absent hint threshold are read by the coverage report, the hint, and the optimization selector alike
status.go[CG9M]: F:Defines stable machine status, error, recovery, and next-action vocabularies | R:code:internal/cli/index_agent_guide.go,code:internal/dbcognition/state.go,code:internal/databasebootstrap/prepare.go | A:ActionCallNoArgumentMaintainForCurrentMachineBatch,DatabaseCognitionActionMaintain | S:Database Cognition maintenance aliases the exact no-argument Maintain action used by Guide; no database-specific write path is introduced
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/managedscope/===
evaluate.go[CG8M]: F:Evaluates Safe Inventory objects against profile, project, Curation, Git, and safety rules | R:code:internal/managedscope/policy.go | A:- | S:Exclude paths are never content-read; path matching uses exact Git semantics on every host, so the applied identity never depends on the filesystem that computed it; the identity preimage keeps its case-sensitive form, and high-risk opt-ins remain approval-gated before Snapshot
policy.go[CG8M]: F:Normalizes, validates, canonically identifies, and matches Managed Scope policies, rules, patterns, and exceptions | R:code:internal/machinecontract/managed_scope.go | A:Normalize,Identity,NormalizePattern,Match | S:User policy cannot claim safety-rule authority; matching is exact and case-sensitive on every host; paths must be normalized repository-relative values, file and directory patterns compare bytes and may hold '[', glob syntax is restricted, and rule precedence is deterministic. The compiled-pattern memo is keyed on the exact pattern bytes, so it stays bounded by policy size and never by repository size
proposal.go[CG7S]: F:Builds reviewable scope proposals and role-count evidence without applying changes | R:code:internal/fs/safe_inventory.go | A:- | S:Approval keys on AutoBlockerCount, never on every excluded tracked path: an excluded path is never read, and keying on it refused init for any repository tracking a vendored directory
snapshot.go[CG7T]: F:Hashes only Managed Scope Index and Observe paths into role-aware Baseline fingerprints | R:code:internal/managedscope/evaluate.go,code:internal/baseline/hash.go | A:Snapshot,SnapshotReusing | S:Exclude content is never opened; high-risk content is read only with explicit approved state, and a supplied prior only spares a reparse, never changing a digest
types.go[CG5T]: F:Defines managed-scope rules with decision bases, evaluations, path roles, proposals, and summaries | R:code:internal/managedscope/evaluate.go | A:- | S:-
starter.go[CG7T]: F:Defines the seven starter observe rules that init persists for vendored static assets and generated bundles under the production profile | R:code:internal/managedscope/policy.go,code:internal/config/scope_budget.go | A:StarterRules,StarterRuleIDPrefix,StarterRuleCreatedBy | S:Source builtin: profile rules outrank, any user rule overrides; persisted at init, not built in, since built-in rules sit outside the policy identity and would flip roles in old repositories
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/managedstate/===
state.go[CG9S]: F:Loads the active Legacy or Managed Scope snapshot and detects Code drift only when policy and budget receipts align | R:code:internal/baseline/scope_detect.go,code:internal/managedscope/evaluate.go | A:Load,Detect,CurationExclusions | S:Direct policy edits fail closed as scope_change_required; a receipt recorded under the historical case-insensitive semantics is never adopted and migrates through Scope Change; empty budget identity is accepted only for early receipt compatibility. The loaded Baseline is passed to the snapshot for digest reuse, which changes no value
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/mcptools/===
cognition.go[CG8M]: F:Defines Legacy and Volumes cognition receipts, refresh projection, and host-model reliability assessment | R:code:internal/mcptools/tools_read.go,code:internal/mcptools/tools_read_volumes.go,code:internal/mcptools/overview_delivery_v1.go | A:- | S:Receipt identity can invalidate cognition but cannot declare model reliability; only host-model valid state with matching repository, service, scope, and cognition identity can suppress full recall, and write paths cache their proven aligned identity for the read-tool line
overview_attestation_v1.go[CG9L]: F:Builds and verifies identity-bound Whole-Index challenge attestations and receipts | R:- | A:- | S:The challenge samples deterministic strata of the exact formal Entry sequence; pass needs the current Index, sequence, count, digest, ordered answers with at least 80% fully correct and at most one identity miss, core F judged by normalized token similarity with CJK bigrams, and complete delivery claims; fail is only a foreign envelope or zero correct, otherwise partial
overview_delivery_v1.go[CG9L]: F:Chunks complete formal cognition deterministically and validates continuation cursors and host receipts | R:- | A:- | S:The first full request must omit host confirmation and model attestation; either field selects attestation-only without retransmitting the body, while cursors bind snapshot, chunk budget, ordinal, and previous chunk; the session remembers each proof half per body so both may arrive in separate calls in either order, an explicit half supersedes memory, and a fresh complete delivery resets it
server.go[CG8M]: F:Registers the public AOCI MCP server and nine tools while carrying Code batch plans through structured failure handling | R:code:internal/cognitiontxn/transaction.go | A:- | S:Tool names and count are fixed at nine; every call reloads repository state with no process cache, stdout stays JSON-RPC-only, and panics become structured MCP errors; startup records the service binary's disk identity; repoCtx.dict carries the dictionary text (empty means Legacy); the loader stops only on layout transactions, since MCP write receipts are closed by the tools that wrote them
tools_maintain.go[CG9L]: F:Implements the primary Maintain tool and routes Legacy or Volumes alignment workflows | R:- | A:- | S:-
tools_maintain_volumes.go[CG9L]: F:Builds bounded Code and Database authoring batches, review closures, candidate bindings, and model-authoring contracts from shared governance facts | R:code:internal/codebatch/receipt.go,code:internal/dbcognition/receipt.go,code:internal/volumegovernance/facts.go,code:internal/mcptools/tools_next_commands.go,code:internal/mcptools/tools_maintain_budget.go | A:- | S:One current machine batch cut by the transport budget under the team cap; remaining needs a new Maintain preimage; candidates are model-only and source/Evidence bound; Root/Meta are guards; with candidates, governance lists and the review and write sets are five-item samples with counts and code_plan carries no candidates; blocked or evidence_required results carry next_commands; candidates and total_targets come from one CodeAuthoringWorkFor value, so held sources are never candidates; a response naming candidates carries authoring_meta; an unspellable directory withholds the batch
tools_read.go[CG8L]: F:Registers and serves MCP Rules, Overview, Entry retrieval, and Search across Legacy and Volume cognition layouts | R:code:internal/mcptools/overview_attestation_v1.go,code:internal/mcptools/overview_volume_governance.go,code:docs/overview-delivery.md | A:aoci_rules,aoci_overview,aoci_get_entries,aoci_search | S:Ordinary Overview delivers the complete requested dependency-closed cognition bytes, chunked only as transport; pending Recovery or snapshot drift fails closed; the aoci_overview _meta result-size declaration is static, raising only that tool's Host persist threshold, never a capability probe
tools_write.go[CG8L]: F:Plans, validates, CAS-writes, and baselines a single Legacy-index Entry update under the shared Index lock | R:code:internal/mcptools/tools_write_api.go,code:internal/baseline/baseline.go,code:internal/cognitiontxn/transaction.go | A:- | S:The Index postimage precedes Baseline save; if Baseline persistence fails, retry the same candidate. Per-field budget rejections carry findings bound to candidate indexes; a dictionary refusal quotes the rejected spelling in a form the active Locale accepts or is discarded whole; threshold checks read the context's dictionary text (Meta under Volumes v1, index header under Legacy); refuses on any pending receipt
tools_write_batch.go[CG9L]: F:Validates and applies one complete semantic candidate batch across affected Volumes | R:- | A:- | S:All candidates plan against one preimage and fail as a unit before writes; apply uses one locked CAS transaction, source/guard rechecks, postimage confirmation, Baseline advancement, and retained recovery so partial post-write failure remains recoverable rather than rolled back
overview_cognition_level.go[CG7T]: F:Derives additive cognition delivery and verification levels without conflating governance | R:- | A:- | S:-
overview_cognition_state_v2.go[CG8S]: F:Projects independent delivery, usability, attestation, governance, and reliability cognition state | R:- | A:- | S:-
overview_volume_governance.go[CG7S]: F:Calculates scope-specific Volume alignment and reliability for Overview responses | R:code:internal/volumegovernance/facts.go | A:- | S:Refresh identity excludes BusinessSource and Exclude counts but binds Baseline bytes; a new Baseline cannot reuse an older delivered body; blocker count omits informational findings
tools_auto_alignment.go[CG7M]: F:Re-evaluates post-Apply Legacy or Volumes governance and returns alignment, remaining findings, and the current cognition receipt | R:code:internal/managedstate/state.go,code:internal/curation/classify.go,code:internal/mcptools/tools_write_api.go,code:internal/volumegovernance/facts.go | A:- | S:Volumes Code drift uses the Managed Scope snapshot with formal assets removed and the same ClassifyCodeDrift Verify uses, so Observe, Exclude, and held sources never become Entry debt
tools_auto_audit.go[CG7T]: F:Builds a compact deterministic P-23 audit summary from an update batch and optional AtomicBatch outcome | R:code:internal/mcptools/tools_write_api.go,code:internal/mcptools/tools_write_batch.go | A:- | S:The summary hashes the exact submitted items, but its presence is audit evidence rather than governance or formal-write proof
tools_auto_result.go[CG8M]: F:Defines and serializes compact applied, repair, stopped, audit, governance, plan, optimization, and terminal-action MCP results | R:code:internal/mcptools/tools_write_api.go,code:internal/mcptools/tools_cognition_optimization.go,code:internal/codebatch/types.go,code:textassets/maintain_assets.go | A:autoResult,renderAutoResult,autoApplyNextAction | S:Idempotent duplicates report Applied=0; the final ordinary Volumes Apply selects a dedicated proof action and carries next_commands with its runnable spellings, while paged, Legacy, and Optimization flows retain their own continuations
tools_contract_assets.go[CG9L]: F:Loads localized MCP contract assets and constructs closed JSON Schemas for the nine public tool inputs | R:code:internal/mcptools/tools_write_api.go,code:internal/mcptools/tools_maintain_database.go,code:textassets/catalog.go | A:loadMCPInputSchemas,localizedMCPSchema | S:Nullable inputs use anyOf with an explicit null branch because function-declaration hosts such as Gemini reject JSON Schema type arrays; Maintain intent and object_refs remain additive optional inputs limited to cognition_optimization, aoci_update_entry remains a complete-Entry schema, unknown fields fail, Code batches keep code_batch_id top-level with candidate and source bindings per item, and probe plus probe_answers are additive check_only-only Overview inputs
tools_format_only.go[CG7S]: F:Advances Baseline for proven format-only or line-ending-only changes without semantic rewrites | R:- | A:- | S:This path never changes cognition bytes; it advances every proven target in one locked Baseline save and fails if any source or Baseline fingerprint changes before or after that save
tools_header.go[CG7T]: F:Implements the MCP Header dictionary reader for Legacy and Volumes layouts | R:- | A:- | S:Volumes mode returns exact Meta bytes with Root/Meta identities plus the session cognition line; pending delivery fails closed and each read appends header_show to the Ledger
tools_maintain_curation_state.go[CG7T]: F:Projects Curation Missing classification into pending authoring targets and non-pending technical skips for Maintain | R:code:internal/curation/classify.go,code:internal/mcptools/tools_maintain.go | A:- | S:A skipped path that is also pending remains pending and is never duplicated as a technical skip
tools_maintain_database.go[CG8M]: F:Parses Maintain inputs and dispatches Legacy, ordinary Volumes, explicit Database, and aligned-entry optimization requests to their evidence-bound workflows | R:code:internal/mcptools/tools_maintain.go,code:internal/mcptools/tools_maintain_volumes.go,code:internal/mcptools/tools_cognition_optimization.go,code:internal/dbcognition/receipt.go | A:- | S:Ordinary Volumes requests with omitted scope or explicit code/all must use shared Volume governance and never fall through Legacy loading; cognition_optimization accepts only Volumes v1 Code and object_refs require that intent, while explicit database remains offline over saved Evidence
tools_read_refresh.go[CG7L]: F:Computes cognition checkpoint reasons, generations, refresh guidance, the session cognition line for reads, and per-body delivery evidence memory | R:- | A:- | S:Session facts only, zero scans; invalid is reserved for identity breaks, so a reliable receipt under a pending refresh reads uncertain; the proof halves latch across calls in any order
tools_read_search.go[CG7S]: F:Searches Legacy or Volume cognition while preserving canonical object identities | R:- | A:- | S:-
tools_read_snapshot.go[CG7T]: F:Enumerates active formal cognition assets and revalidates their exact bytes after rendering to prevent mixed delivery | R:code:internal/mcptools/tools_read.go,code:internal/mcptools/transaction_guard.go | A:- | S:A changed byte, unsafe file type, or unreadable participant invalidates the entire delivery snapshot; this layer does not merge or repair images
tools_read_volumes.go[CG7S]: F:Delivers scoped Volumes Overview bodies, receipts, chunking, attestation targets, refresh accounting, and governance snapshot checks | R:code:internal/mcptools/tools_read.go,code:internal/mcptools/overview_attestation_v1.go,code:internal/mcptools/overview_volume_governance.go | A:aoci_overview | S:Pending recovery or a changed cognition or governance snapshot fails closed; every explicit Overview re-delivers the complete available scope, and chunk ordinals share the formal Entry sequence
tools_remove.go[CG7L]: F:Implements MCP orphan Entry removal and routes layout-specific guarded pipelines | R:code:internal/mcptools/tools_remove_volumes.go,code:internal/cognitiontxn/transaction.go | A:- | S:MCP removal is orphan-only; the human CLI may remove a live Entry. Both recheck under lock, use CAS, fail closed on guard drift; a stale receipt is discarded last, after every admission check
tools_remove_volumes.go[CG7L]: F:Plans, proves, commits, and recovers explicit Code or Database Volume Entry removal with Baseline and evidence guards | R:code:internal/volumegovernance/facts.go,code:internal/cognitiontxn/transaction.go | A:- | S:Removal needs a proven orphan; ownership repair tolerates its own receipt. A receipt the Volume passed is judged in the commit: absent closes it superseded, unchanged discards it, changed refuses
tools_report.go[CG7S]: F:Records bounded follow-up reports when evidence cannot support reliable semantic authoring | R:- | A:- | S:-
tools_write_api.go[CG9L]: F:Registers Entry-write MCP tools and maps requests into atomic execution, recovery, governance, optimization, precise repair, and terminal outcomes | R:code:internal/mcptools/tools_contract_assets.go,code:internal/mcptools/tools_auto_result.go,code:internal/mcptools/tools_cognition_optimization.go,code:internal/mcptools/tools_auto_alignment.go,code:internal/mcptools/tools_write_batch.go,code:internal/mcptools/tools_write_batch_recovery.go,code:internal/mcptools/tools_write_repair_findings.go | A:aoci_update_entry,aoci_report | S:Optimization no_change and replacement recovery retain their dedicated contracts; binding repair is zero-formal-write and complete-batch scoped; the final ordinary Volumes Apply requires Verify then Aggregate Check then Guide and attaches their runnable next_commands, while Ledger remains audit only; an optimization stop names the alignment findings it saw; a failure's code_plan is projected off the wire
tools_write_batch_recovery.go[CG9M]: F:Persists, validates, resumes, completes, and rolls back evidence-bound atomic Entries recovery receipts | R:code:internal/mcptools/tools_write_volume_commit.go,code:internal/mcptools/tools_write_batch.go | A:UpdateEntriesAtomicRecoveryPending,CompleteUpdateEntriesAtomicRecovery,RollbackUpdateEntriesAtomicRecovery | S:Resume or rollback requires exact participant pre/post hashes, guarded Root and Meta, unchanged Baseline preimage, and the identical candidate batch; unknown bytes fail closed
tools_write_governance_receipt.go[CG7L]: F:Persists completed Entries governance transitions, proves supersession and zero-write chains, and archives their recovery receipts | R:code:internal/mcptools/tools_write_batch_recovery.go,code:internal/runmanifest/runmanifest.go,code:internal/cognitiontxn/transaction.go | A:ProveEntriesGovernanceSupersession,ProveEntriesZeroWriteGovernance,ArchiveEntriesAtomicRecovery | S:Receipts never authorize replay or replace alignment checks; the zero-write chain must be unique, gap-free, time-ordered, and start off the staged batch; other pending receipts: cognitiontxn.Pending
tools_write_impact.go[CG7M]: F:Computes bounded relation and downstream impact for a proposed complete Entry batch | R:- | A:- | S:The envelope derives only after complete model candidates; at most two Volumes are written while Root, Meta, and unwritten Volumes stay byte guards; Code context reads only Meta's code dictionary
tools_write_repair_findings.go[CG7M]: F:Localizes, orders, and scopes deterministic candidate repair findings without generating replacement semantics | R:code:internal/cognition/repair_findings.go,code:internal/mcptools/tools_write_api.go | A:localizeRepairFindings,repairRetryScope | S:Repairs name only the reported field; relation content is never repairable because it is never rejected; code_batch_id and a Database batch_id are top-level repairs excluded from object retry_scope
tools_write_volume_commit.go[CG9L]: F:Plans and commits receipt-bound Code and Database batches through identity checks, projection, guarded CAS, Baseline binding, and recovery | R:code:internal/codebatch/receipt.go,code:internal/mcptools/tools_write_batch.go,code:internal/mcptools/tools_write_batch_recovery.go,code:internal/cognition/impact.go | A:- | S:Nothing here reads the R the model just authored, so a batch is never replanned or stopped over relations; a cross-volume partial write is judged per volume so the same batch can roll forward; enforce-mode budget violations return per-candidate findings; the batch size comes from team configuration; a binding defect answers a Repair Finding naming the field in its domain's vocabulary before any write; every repairable candidate is reported in one repair_required, not just the first; Baseline fingerprints keep their index role under Managed Scope
transaction_guard.go[CG7T]: F:Blocks cognition delivery or Entry writes while pending recovery or AtomicWrite state makes the formal snapshot incoherent | R:code:internal/mcptools/tools_read_snapshot.go,code:internal/mcptools/tools_write.go,code:internal/cognitiontxn/transaction.go | A:- | S:Every pending receipt (cognitiontxn.Pending, shared with Verify and the CLI gate) blocks ordinary cognition delivery; unfinished Header transactions also block other governance writes
tools_cognition_optimization.go[CG9L]: F:Implements explicit aligned Code cognition optimization planning, deterministic candidate transport, checkpoint progression, and replay-safe Update integration | R:code:internal/cognitionoptimization/checkpoint.go,code:internal/cognitionoptimization/selector.go,code:internal/codebatch/receipt.go,code:internal/mcptools/tools_maintain_volumes.go,code:internal/mcptools/tools_write_api.go,code:internal/volumegovernance/facts.go | A:- | S:Only aligned Volumes v1 Code without budget violations is eligible; it transports current Entries but never authors semantics; the transport budget cuts the selector's order before the plan, so the issued batch is its leading prefix and the checkpoint keeps the cut references; progress advances only after Update/Baseline/Recovery closure and an altered completed-batch replay fails before Apply; a batch-less item never counts, as a completed checkpoint keeps an empty current id; a C7+ Entry with S:- carries selection_reason s_absent_high_importance and may return unchanged
service_binary.go[CG5T]: F:Watches the service's own on-disk binary and reports replacement as an advisory governance fact | R:code:internal/mcptools/server.go | A:RecordServiceBinaryIdentity | S:Detection is size and mtime only and purely advisory: it never blocks a tool, probe failure silently disables it, and replacement means restart the host MCP integration
overview_probe_v1.go[CG7S]: F:Issues and grades the deterministic two-question cognition probe that turns model self-report into machine measurement | R:code:internal/mcptools/overview_attestation_v1.go,code:internal/mcptools/tools_read_volumes.go | A:- | S:Purely a measurement: it never advances the generation, records a reason, or touches a receipt; a pass licenses reuse instead of re-delivery, and a stale result is not evidence of loss
tools_next_commands.go[CG8S]: F:Composes runnable next_commands for terminal, blocked, and evidence-required MCP results from the shared remediation suffixes and the server's own executable | R:code:internal/machinecontract/lexical.go,code:internal/mcptools/tools_maintain_volumes.go,code:internal/mcptools/tools_write_api.go | A:- | S:The prefix is the running server's absolute quoted path because aoci is whatever the host MCP config names and need not be on PATH; an unresolvable executable omits the field, since an absent advisory beats a wrong command; recovery_pending points at the Guide, plus scope status for a scope receipt
overview_plan_export.go[CG5T]: F:Exports the exact Overview chunk planner and the complete Overview body so a status surface reports what delivery would do | R:code:internal/mcptools/overview_delivery_v1.go,code:internal/ui/snapshot.go | A:PlanOverviewChunks,OverviewChunkPlan,OverviewBody | S:Both run the delivery path's own builder and touch no session, Ledger, or receipt; a second concatenation of the Volumes would drift from what an agent receives
tools_maintain_budget.go[CG8S]: F:Sizes one Maintain response: reserves fixed and sampled parts, measures each candidate on the wire, cuts the batch to the transport budget, projects the plan | R:code:internal/codebatch/receipt.go,code:internal/mcptools/tools_maintain_volumes.go,code:internal/cli/scan_skipped.go,code:internal/cli/index_agent_guide.go | A:PlanCodeBatchIncluded,EstimateCodeAuthoringRounds | S:The base reservation covers only path-free parts; Meta and instruction bytes are measured on the repository and the five-item review, write, findings, and missing samples on the candidates, so a custom Meta or a deep tree never overflows a constant; optimization candidates count 320 extra bytes
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/scopechange/===
authorization.go[CG8L]: F:Builds and verifies managed-scope authorization and partitions every auto blocker into reasons independent review may ratify and safety boundaries it may not | R:code:internal/scopechange/plan.go,code:internal/scopechange/transaction.go | A:EffectiveApplyAuthorizationMode | S:Scope Change and first Baseline establishment must resolve the effective mode through one function so the receipted and authorizing postures cannot diverge; Resume and idempotent re-apply select the same branch as Apply; an unclassified blocker fails the build. One unratifiable blocker denies the reviewer route entirely, because a transport constraint only ever accompanies a ratifiable one
plan.go[CG9L]: F:Builds scope-change envelopes, authoring debt, coverage and posture risks, formal cognition guards, and governed postimages | R:code:internal/managedscope/snapshot.go,code:internal/baseline/baseline.go,code:internal/cognition/loader.go,code:internal/scopechange/authorization.go | A:Build,FormalCognitionBaselineGuards | S:Source equivalence uses EquivalentFingerprints; candidate source, Entry preimage, and Root reconstruction stay raw-SHA; a weaker mode than the receipted one is a relaxation; the envelope carries plan-time Curation exclusions the postimage Baseline cannot reproduce; auto interaction_required derives from the blocker set; an observe removal also needs the vanished set; an absent path is bookkeeping; Volumes takes policy-only candidate sets, since the Root holds no Entries, and retains a changed source's old fingerprint for Maintain instead of blocking; Legacy still fails closed
transaction.go[CG8L]: F:Applies scope policy, Entry, Baseline, Observe, Curation, Ledger, and recovery changes atomically | R:code:internal/scopechange/authorization.go | A:- | S:Apply selects exactly one live team authorization, replays Preview and formal cognition guards under the global lock, publishes Baseline last, and permits Resume or Rollback only across exact frozen states; verification after publication must replay plan-time Curation exclusions instead of recomputing them from the new Baseline; an auto plan demanding interaction authorizes through the review branch
types.go[CG5M]: F:Defines scope candidates, coverage-reduction, line-ending, stale-retention, and posture evidence, risk, Plan, Preview, authorization, and result types | R:code:internal/scopechange/plan.go | A:- | S:SourceLineEndingOnly and SourceStaleRetained are omitempty because planIdentity hashes the whole Plan, so serializing either empty would change every existing plan_id and strand in-flight approvals
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/volumegovernance/===
facts.go[CG9L]: F:Computes one deterministic governance fact set shared by Verify, Check, Guide, Maintain, and Overview | R:code:internal/baseline/detect.go,code:internal/businesssource/manifest.go,code:internal/curation/classify.go,code:internal/cognitiontxn/transaction.go | A:ClassifyCodeDrift | S:Verify, Check, and Guide consume the complete fact set; BoundListsForTransport projects the Maintain copy with samples plus counts, bounds budget violations, and drops current database items; finalize treats an unclassified finding as blocked and Informational names the codes it ignores; ClassifyCodeDrift classifies raw Missing once for Assess and the post-Apply inspector: held sources become code_skipped or code_curation_excluded, so CodeAuthoringWorkFor plans what Verify counts; every pending receipt is its own recovery_pending finding; BudgetFacts tallies S coverage over Code objects only
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/scripts/blackbox/longrun-refresh/===
README.md[CG5T]: F:Documents the long-running refresh black-box scenarios and required final alignment evidence | R:- | A:- | S:-
main.go[CG5L]: F:Runs deterministic long-lived cognition refresh scenarios and emits identity-bound evidence reports | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/scripts/===
check-deps.sh[CG5S]: F:Enforces core and AI dependency directions, the exact direct-module set, and the reviewed local openGauss Connector replacement | R:code:go.mod,code:third_party/openGauss-connector-go-pq/go.mod | A:- | S:A version-only require is insufficient: a missing exact local replace could restore unsafe upstream behavior; the direct-module list is a contract changed with go.mod for any first-party import
check-licenses.sh[CG5M]: F:Checks FSL metadata and the exact 22-module six-platform license inventory, including provenance-bound local openGauss license handling | R:code:.goreleaser.yml,code:THIRD-PARTY-NOTICES,code:scripts/check-opengauss-connector.sh | A:make licenses | S:Inventories run offline after prefetch; GOROOT is bound to the GO_BIN toolchain; the connector exception accepts only its exact module, version, path, MIT result, and license hash
check-public-text.sh[CG5T]: F:Runs the public-text safety scanner over release-facing source and assets | R:- | A:- | S:-
check-opengauss-connector.sh[CG8S]: F:Verifies local connector identity or downloads exact v1.0.8, authenticates origin and sums, replays the patch, and compares the complete tree | R:code:go.mod,code:third_party/openGauss-connector-go-pq.PROVENANCE.md,code:third_party/patches/openGauss-connector-go-pq-v1.0.8-aoci.patch,code:third_party/openGauss-connector-go-pq/go.mod | A:make opengauss-connector,--local-only | S:Local-only proves checked-in hashes and replacement; the full gate additionally downloads the pinned tag and requires byte-for-byte patch reproduction
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/scripts/release/archive-smoke/===
main.go[CG5M]: F:Rejects release archives unless they contain only the binary, bilingual READMEs and logos, changelog, and all five legal assets, then executes Linux amd64 | R:code:.goreleaser.yml | A:go run ./scripts/release/archive-smoke --dist <dir> | S:Every entry must be regular, and exactly one Linux amd64 archive must report an aoci version
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/scripts/release/===
clean-room-smoke.sh[CG8S]: F:Builds and exercises aoci in an isolated repository and verifies the bounded current-machine Volume Guide contract | R:- | A:- | S:The fixture preserves the production-role split: ordinary source enters Index, counter_test.go enters Observe, tests/fixtures remains Exclude, and the MCP surface stays at nine tools; the Guide assertion pins the machine default cap of 50 over EXPECTED_AUTHORING_TARGETS, which counts business sources plus every governed file init generates, so changing either breaks here
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/scripts/release/manifest/===
main.go[CG8L]: F:Generates and offline-verifies release manifest v2-v4 identities, tool contracts, artifact hashes, and signed-release descriptors | R:code:scripts/release/manifest/signed_release.go,code:scripts/release/manifest/signed_bundle.go,code:Makefile,code:internal/machinecontract/capabilities.go,code:internal/machinecontract/managed_scope.go | A:go run ./scripts/release/manifest,go run ./scripts/release/manifest --verify <manifest> | S:Generation rejects dirty source and commit mismatch; signed v4 is fail-closed while legacy v2 and v3 remain verify-compatible
signed_bundle.go[CG8M]: F:Validates Sigstore signature and GitHub provenance bundle structure against exact certificates, digests, subjects, workflow, ref, and commit | R:code:scripts/release/manifest/signed_release.go,code:scripts/release/manifest/main.go,code:.github/workflows/release.yml | A:- | S:Structural bundle validation does not replace the workflow's Cosign and gh cryptographic verification; certificate material must contain exactly one leaf
signed_release.go[CG9L]: F:Defines and verifies manifest v4 with six archive-SBOM pairs, 12 checksum subjects, 14 provenance subjects, and exactly 16 release assets | R:code:scripts/release/manifest/main.go,code:scripts/release/manifest/signed_bundle.go,code:.github/workflows/release.yml,code:scripts/release/archive-smoke/main.go | A:--signed-release,--publisher-repository,--publisher-workflow,--publisher-ref | S:Signature and provenance bundles cannot self-reference; only the canonical repository and workflow with exact main dry-run or version-matched Tag refs are admitted
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/spec/public/===
README.md[CG8T]: F:Maps the public runtime contract set and explicitly excludes private design and commercial material | R:- | A:- | S:-
aoci-code-cli-runtime-v1.txt[CG8S]: F:Specifies stable CLI identity, global flags, command behavior, bounded standard input, layout-scoped reads, exit status, and side-effect boundaries | R:- | A:- | S:aoci ui is loopback-only, read-only, and not an MCP transport: aoci mcp opens no socket, and the page's JSON routes are an implementation detail of the same binary rather than a public contract; scope activate composes preview and Apply, so exit 2 with a saved preview means approval is required, not that the change failed
aoci-cognition-refresh-v1.txt[CG8M]: F:Specifies cognition checkpoint reasons, refresh decisions, receipts, generation semantics, the session line, the probe, and compaction handoff limits | R:code:docs/cognition-refresh.md | A:- | S:-
aoci-cognition-state-v2.txt[CG8S]: F:Specifies independent delivery, usability, attestation, governance, and reliability cognition states | R:- | A:- | S:-
aoci-cognition-volumes-v1.txt[CG8L]: F:Specifies Volumes layout, starter dictionaries, batch plans, atomicity, domain identities, repair boundaries, next_commands, and aligned-entry optimization | R:code:spec/public/aoci-object-fras-v2.txt,code:spec/public/aoci-index-format-v1.txt | A:cognition-volumes/v1 | S:Starter expansion applies only to new Volume-first init and existing Meta is never migrated or retagged; copied-binding repair needs an unambiguous current receipt without source, Scope, CAS, or Recovery drift; a batch is cut by the transport budget, one candidate at least; next_commands is additive and Host-filled, omitted when unresolvable; s_absent_high_importance is a review fact, never a verdict
aoci-config-runtime-v1.txt[CG8T]: F:Specifies public configuration files, precedence, safe fields, and local-secret separation | R:- | A:- | S:Authoring batch sizes and the Maintain transport budget are team-owned like every governance field: the local layer cannot change them
aoci-database-cognition-authoring-v1.txt[CG8M]: F:Specifies evidence-bound Database Entry authoring, Bootstrap, validation, repair, and atomic Apply | R:code:spec/public/aoci-cognition-volumes-v1.txt,code:spec/public/aoci-database-evidence-v1.txt | A:Public Database Cognition Authoring v1 contract | S:Bootstrap advances a Root Baseline binding only when already managed and exact-preimage bound, never enrolls an absent Root, and permits later reconciliation solely for the exact canonical pre-fix state
aoci-database-evidence-v1.txt[CG8M]: F:Specifies catalog-only PostgreSQL, MySQL, and openGauss Evidence identity, collection, snapshots, Baselines, drift, acceptance, and compatibility | R:code:spec/public/aoci-database-table-fras-v1.txt,code:docs/database-evidence.md,code:internal/dbevidence/collector_opengauss.go | A:Database Evidence v1 | S:openGauss is additive exact 6.0.5 A/PG support with strict connection and fail-closed catalog limits; Evidence JSON identity and the nine-tool MCP surface remain unchanged
aoci-database-table-fras-v1.txt[CG8T]: F:Specifies model-authored table F/R/A/S and canonical object references over accepted PostgreSQL, MySQL, or openGauss Evidence | R:code:spec/public/aoci-database-evidence-v1.txt,code:spec/public/aoci-database-cognition-authoring-v1.txt | A:Database Table FRAS v1 | S:Automatic table cognition generation and formal Database Volume creation remain outside this contract
aoci-host-capability-and-interaction-v1.txt[CG8S]: F:Specifies capability discovery, host interaction, TTY approval, and machine identity contracts | R:- | A:- | S:The human interaction contract requires an actual character-device TTY and exact digest phrase; --yes, piped model approval, and approval reuse are forbidden, while Fresh policy-bound auto remains a distinct non-human mechanism
aoci-host-cognition-messaging-v2.txt[CG8S]: F:Specifies concise user-facing messaging for cognition delivery and verification outcomes | R:- | A:- | S:-
aoci-index-format-v1.txt[CG8S]: F:Defines the public text interoperability contract for Cognition assets, Entries, Volume layout, directory roots, and validation compatibility | R:code:spec/public/aoci-cognition-volumes-v1.txt,code:spec/public/aoci-code-cli-runtime-v1.txt,code:internal/index/parser.go,code:internal/index/editor.go,code:internal/cognition/objects.go | A:AOCI Public Cognition Format v1 | S:Code section absolute roots are historical structural coordinates, never runtime access paths or semantic identities; readers use the invocation root to derive repository-relative CanonicalRefs, preserve formal bytes on clone, distinguish #Volume path=, and fail closed on unsafe mapping; names are never escaped: a header reads to its final slash and a bracketed file name to the tag before ': F:'
aoci-managed-scope-and-budget-v1.txt[CG8M]: F:Specifies governed roles, authoring debt, coverage-reduction protection, ratifiable blockers, host-independent paths, posture, transactions, and budgets | R:code:internal/scopechange/authorization.go,code:internal/managedscope/evaluate.go | A:- | S:Refusing auto is only half the contract: every blocker independent review may ratify also sets interaction_required, while safety boundaries carry no reviewer and must be resolved instead; under Volumes the candidate set carries policy only and a changed Index source is retained under source_stale_retained, not blocked
aoci-mcp-runtime-v1.txt[CG8T]: F:Specifies MCP server identity, stdio JSON-RPC behavior, and the stable nine-tool surface | R:- | A:- | S:-
aoci-object-fras-v2.txt[CG8T]: F:Specifies canonical object identities, expanded starter dictionaries, compact tags, and FRAS v2 field limits | R:code:spec/public/aoci-cognition-volumes-v1.txt | A:repository-cognition-object/v2,compact A+B+C+[D]+E | S:Starter G means cross-domain and Z requires understood evidence with no named fit; insufficient evidence is never Z or an S constraint, and existing formal Meta remains authoritative
aoci-overview-delivery-v1.txt[CG8M]: F:Specifies Overview chunking, receipts, challenge ordinals, the pass share with semantic core F matching, split proof submission, and delivery failure handling | R:- | A:- | S:Concrete localized outcome sentences live in the locale text assets, not this contract
aoci-safe-inventory-and-scope-refresh-v1.txt[CG8S]: F:Specifies safe filesystem inventory and atomic managed-scope refresh behavior | R:- | A:- | S:-
aoci-system-cognition-runtime-v1.txt[CG8T]: F:Specifies narrow relation, lineage, impact, and evolution projections over governed cognition | R:- | A:- | S:All projections are deterministic, sorted, derived, and read-only: they create no Apply, CAS, Recovery, Baseline, Ledger, approval, or persistence lifecycle and never invent missing relations
s-field-discipline.txt[CG8S]: F:Defines the admission rule and quota discipline for non-inferable safety facts in S fields | R:code:internal/index/quota.go | A:- | S:The two machine gates differ on purpose: the warning-level curation check honours a declaration both ways, while the error-level object gate honours only a looser one; the C6+ look at where behaviour is decided is writing discipline the machine never judges
s-field-discipline.en.txt[CG8S]: F:English rendering of the S-field and Entry writing discipline | R:code:spec/public/s-field-discipline.txt | A:- | S:The Chinese file is the normative original scanned by cross-layer quota tests; this rendering carries no machine-scanned declarations and must not fork rule authority
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/textassets/===
README.txt[CG5S]: F:Explains generated public runtime text ownership, locale layout, manifests, and embedding rules | R:- | A:- | S:-
agents_assets.go[CG5T]: F:Defines stable IDs for locale-specific AGENTS, Codex MCP, and Codex compaction prompt and reload-hook templates | R:code:internal/hooks/codex.go,code:textassets/manifests/agents.json | A:TemplateAgentsMD,TemplateCodexMCPConfig,TemplateCodexCompactPrompt,TemplateCodexCompactHook | S:-
ai_probe_assets.go[CG5T]: F:Embeds the localized prompts used only for explicit AI endpoint connectivity probes | R:- | A:- | S:-
catalog.go[CG5L]: F:Loads the generated asset catalog and provides strict locale and manifest lookups | R:- | A:- | S:-
cli_help_final_assets.go[CG5T]: F:Embeds finalized localized CLI help contracts registered by the command layer | R:- | A:- | S:-
guide_assets.go[CG5S]: F:Embeds localized Guide instructions and messages for governed workflow stages | R:- | A:- | S:-
help_assets.go[CG5T]: F:Maps localized command help assets to runtime consumers | R:- | A:- | S:-
host_assets.go[CG5T]: F:Embeds host-agent protocol help and runtime instruction assets | R:- | A:- | S:-
init_assets.go[CG5T]: F:Embeds initialization messages, templates, and automation-mode explanations | R:- | A:- | S:-
maintain_assets.go[CG5T]: F:Embeds localized Maintain descriptions, failure guidance, and final or duplicate Volumes proof actions | R:code:internal/mcptools/tools_auto_result.go,code:textassets/manifests/maintain.json | A:ContractMaintainActionApplyFinalProof,ContractMaintainActionApplyDuplicateFinalProof | S:Terminal actions forbid another formal cognition write but still require audit-capable Verify, Aggregate Check, and Guide before completion
manifest.json[CG5L]: F:Defines the top-level generated runtime asset manifest consumed by catalog validation | R:- | A:- | S:-
mcp_assets.go[CG5T]: F:Embeds MCP descriptions, input-schema text, and Overview attestation prompts | R:- | A:- | S:-
model_prompt_assets.go[CG5T]: F:Embeds model authoring prompts selected by locale and authoring stage | R:- | A:- | S:-
numeric.go[CG5T]: F:Renders machine-owned numeric limits into localized runtime text without duplicating constants | R:- | A:- | S:-
render.go[CG5T]: F:Renders strict text templates with validated variables and deterministic output | R:- | A:- | S:-
ui.go[CG5M]: F:Loads localized user-visible messages through the generated catalog | R:- | A:- | S:-
validate.go[CG5L]: F:Validates locale parity, manifests, variables, protocol tokens, and duplicate fact sources | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/textassets/manifests/===
agents.json[CG5S]: F:Enumerates AGENTS, Codex MCP, and Codex compaction templates and host integration assets across supported locales | R:code:textassets/agents_assets.go | A:- | S:-
ai-probe.json[CG5T]: F:Enumerates localized AI probe prompt assets | R:- | A:- | S:-
cli-help-final.json[CG5S]: F:Enumerates finalized CLI help assets whose presence and symbols are release contracts | R:- | A:- | S:-
cli-help.json[CG5S]: F:Enumerates the broader localized CLI help asset set | R:- | A:- | S:-
guide-stop.json[CG5T]: F:Enumerates localized Guide stop-state instruction and message assets | R:- | A:- | S:-
host-agent.json[CG5M]: F:Enumerates host-agent help and runtime protocol assets | R:- | A:- | S:-
init.json[CG5S]: F:Enumerates localized initialization templates and status messages while locking the expanded starter Meta protocol tokens | R:- | A:- | S:-
maintain.json[CG5T]: F:Enumerates localized Maintain descriptions, actions, Optimization anchors, batch contracts, and final Volumes proof requirements | R:code:textassets/catalog.go,code:textassets/maintain_assets.go | A:Maintain text-asset manifest | S:-
mcp-tools.json[CG5T]: F:Enumerates localized nine-tool descriptions and input-schema assets plus additive Maintain optimization and existing Code batch identity anchors | R:code:textassets/catalog.go | A:- | S:-
model-prompts.json[CG5M]: F:Enumerates model-authoring prompts and their protocol and locale anchors, including starter dictionary classification discipline | R:code:textassets/model_prompt_assets.go | A:- | S:-
read-observation.json[CG5T]: F:Enumerates read-operation observation and audit disclosure assets | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/bootstrapapply/===
approval.go[CG7M]: F:Creates and validates digest-bound human or policy-bound-auto Bootstrap approval records and rejects ineligible repositories | R:code:internal/bootstrapapply/transaction.go,code:internal/bootstrapapply/prepare.go,code:internal/bootstrapapply/eligibility.go,code:internal/config/automation.go | A:RecordApproval,RecordPolicyBoundAutoApproval,ValidateApproval,EvaluateAutoEligibility | S:Approval is an audit binding, not authentication; automation=off forbids Apply, and policy-bound auto is limited to new projects with no mature governance history
codec.go[CG7S]: F:Strictly encodes and decodes bootstrap preview, approval, intent, and receipt artifacts | R:- | A:- | S:Decoders reject duplicate or unknown fields, trailing JSON, and unsupported contract versions; Encode emits indented newline-terminated JSON
eligibility.go[CG7M]: F:Evaluates whether a bootstrap envelope qualifies for policy-bound automatic authorization | R:- | A:- | S:Eligibility is read-only audit evidence; AutoReady requires verified host-model provenance and zero blockers
prepare.go[CG7M]: F:Freezes bootstrap postimages, guards, risks, digests, and recovery direction before formal writes | R:- | A:- | S:Prepare performs no filesystem write and rejects any existing Baseline; it orders enabled Volume postimages before Root and places Baseline after Root
rollback.go[CG7S]: F:Restores an incomplete bootstrap to its proven absent or exact preimage | R:- | A:- | S:Only an incomplete active Bootstrap can roll back; third-party guard drift fails closed, exact preimages are restored, and absent preimages move to recovered quarantine rather than being deleted
status.go[CG7S]: F:Derives Bootstrap recovery and terminal transaction status from exact formal, staging, intent, and receipt bytes | R:code:internal/cognitiontxn/transaction.go,code:internal/bootstrapapply/transaction.go | A:Pending,Status | S:No saved mutable phase is trusted; a postimage followed by a preimage, missing or wrong staging, unknown bytes, or an unsafe file type is a recovery conflict
transaction.go[CG8L]: F:Executes and idempotently resumes digest-bound Cognition Bootstrap publication through staged atomic postimages and internal verification | R:code:internal/cognitionplan/plan.go,code:internal/cognitiontxn/transaction.go,code:internal/cognitionbaseline/verify.go,code:internal/fs/atomic.go | A:Apply,Resume | S:The immutable intent binds the exact envelope and approval; any preimage, staging, or postimage ambiguity fails closed, and completion, Ledger, and archive occur only after all formal assets and Baseline verify
types.go[CG7S]: F:Defines bootstrap envelopes, approvals, transaction intents, receipts, and status structures | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/codebatch/===
receipt.go[CG9L]: F:Builds and validates deterministic receipt-bound Code plans and unambiguous submission-binding diagnostics | R:code:internal/codebatch/types.go,code:internal/mcptools/tools_write_volume_commit.go | A:BuildPlan,BuildPlanWithBudget,SelectWithBudget,PrefixWithinBudget,ValidateSubmission,LoadReceipt | S:A batch is a deterministic ordered prefix of the plan, chosen by Select for BuildPlan and for any pre-issue judge alike, and never consults Entry semantics, so no relation can reorder or block it; the byte Budget cuts that prefix before the candidate that would exceed it, always keeping one, and changes the batch but never the plan identity, which hashes every target; binding repair is allowed only while receipt sources remain current, and stale, ambiguous, incomplete, or unprovable state stays stopped
types.go[CG8T]: F:Defines machine-visible Code authoring targets, receipts, plans, candidates, and binding-mismatch evidence | R:code:internal/codebatch/receipt.go | A:Target,Receipt,Plan,Submission,SubmissionIssue,SubmissionError | S:SubmissionError carries only pre-write machine binding facts; the receipt keeps one decode-only legacy field so plans issued while relations were still a machine constraint stay loadable across the upgrade instead of wedging in flight; a Plan's Candidates leave the wire (omitempty) so a response never repeats an Entry, and TransportBudgetBytes reports the team budget that cut the batch
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cognitionplan/===
codec.go[CG7T]: F:Strictly decodes and version-checks cognition Plans, layout Candidates, and Previews | R:code:internal/cognitionplan/types.go | A:DecodePlan,DecodeCandidate,DecodePreview | S:-
facts.go[CG7L]: F:Captures immutable filesystem, source, configuration, and evidence facts for cognition planning | R:code:internal/cognitiontxn/transaction.go | A:- | S:Snapshots formal assets before and after, rejects pending recovery (cognitiontxn.Pending, shared by every consumer) or concurrent formal changes, keeps formal objects out of Managed Scope inventory
identity.go[CG7T]: F:Provides length-framed domain-separated hashing and canonical JSON helpers for cognition identities | R:code:internal/cognitionplan/plan.go,code:internal/cognitionplan/provenance.go | A:- | S:Field kind, order, and exact bytes are identity inputs; canonical JSON appends one LF
mapping.go[CG7S]: F:Maps every Legacy header atom, section, Entry, and unparsed semantic line into a byte-reversible model-review mapping | R:code:internal/cognitionplan/types.go,code:internal/index/parser.go | A:- | S:No Entry is automatically preserved: every Legacy Entry starts model_regeneration_required, the Legacy self-Entry is Root-owned, and ambiguity remains explicit coverage debt
plan.go[CG8M]: F:Discovers uninitialized, Legacy, or Volumes layouts and builds deterministic bootstrap or migration plans | R:- | A:- | S:Plans and candidate frameworks are read-only authoring requests; MODEL_AUTHORING_REQUIRED placeholders are neither semantics nor approval, and Migration planning has no Apply path
provenance.go[CG8S]: F:Binds host-model semantic authoring provenance to Plan, Evidence, and complete Candidate bytes | R:- | A:- | S:The Host supplies the authoring run, origin, and final receipt; deterministic code may validate and bind them but never manufactures semantic provenance or makes Candidate identity self-referential
replay.go[CG7S]: F:Compares approved migration Preview content while excluding append-only runtime Ledger growth from replay identity | R:code:internal/cognitionplan/plan.go,code:internal/cognitionplan/types.go | A:PreviewReplayMismatches | S:Only content identities may replay: candidate, physical/logical diff, mapping, and approval mismatches are exposed as digests and counts without candidate or evidence bodies
types.go[CG7M]: F:Defines cognition Plan, authoring task, candidate, mapping, preview, and evidence structures | R:- | A:- | S:-
validate.go[CG8L]: F:Validates complete candidate layouts, mappings, source guards, budgets, and approval digests | R:- | A:- | S:Validation is read-only and cannot accept approval or Apply; preview_ready requires zero risks and a fully valid projected CognitionSet, and a dangling or ambiguous R is never a risk
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/curation/===
classify.go[CG7M]: F:Classifies special files for semantic inclusion, exclusion, review, or technical skip | R:- | A:- | S:Precedence is config exclusion, a source-SHA-current decision, then profile; stale decisions are ignored, and Pending stays within Skipped so the Missing three-way partition is conserved
decode.go[CG7T]: F:Strictly decodes and normalizes one Curation document for draft or formal use | R:code:internal/curation/model.go,code:internal/jsonstrict/duplicate.go | A:DecodeDocument | S:Stage may omit audit fields only when requireAudit=false; duplicate or unknown keys, multiple top-level values, trailing JSON, and invalid Decisions always fail
model.go[CG7S]: F:Defines Curation decisions, evidence, confidence, review, and document identity | R:- | A:- | S:A decision is valid only for its source SHA; config curation_exclude has precedence, and Pending Curation remains a subset of Skipped Missing so the three-way Missing partition stays conserved
profile.go[CG7S]: F:Provides stable Curation profiles and rules for common repository object classes | R:- | A:- | S:Profiles hash every target before classifying: empty is zero bytes, oversize exceeds 1 MiB, binary has NUL in the first 8000 bytes, and per-file errors remain explicit unreadable results
store.go[CG7M]: F:Loads and atomically stores reviewed Curation decisions | R:- | A:- | S:Persistent decisions require audit fields and exact source SHA; Save backs up before atomic write, Merge keeps one path-current decision, and output is path-sorted for stable diffs
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/databasebootstrap/===
prepare.go[CG7M]: F:Builds guarded Database Cognition Bootstrap previews and redacted diagnostics from aligned Code governance and accepted catalog Evidence | R:code:internal/dbevidence/store.go,code:internal/volumegovernance/facts.go,code:internal/databasebootstrap/transaction.go,code:internal/baseline/baseline.go | A:Prepare,Diagnose | S:An existing Root Baseline binding advances only from its exact raw preimage and keeps its role; an absent binding is not enrolled, and preparation performs no network, business-row, or DDL/DML access
rollback.go[CG7S]: F:Restores an interrupted Database Volume bootstrap to exact preimages | R:- | A:- | S:Rollback accepts only exact preimage/postimage states; unknown bytes stop, and a created Database Volume is moved into the transaction's recovered directory instead of being deleted in place
transaction.go[CG7L]: F:Executes and idempotently resumes staged Database Bootstrap across Database, Root, and Baseline postimages with evidence guards and verification | R:code:internal/cognitiontxn/transaction.go,code:internal/dbevidence/store.go,code:internal/baseline/baseline.go | A:Apply,Resume,Pending | S:Writes stay Database→Root→Baseline; new previews verify Database and managed-Root bindings, while pre-fix pending v1 recovery honors its exact frozen Baseline postimage without reinterpretation
types.go[CG7T]: F:Defines Database bootstrap evidence, preview, recovery, result, and redacted Diagnostic wire types | R:code:internal/cognitiontxn/transaction.go,code:internal/machinecontract/cognition_planner.go | A:EvidenceSource,Preview,RecoveryIntent,Result,Diagnostic | S:Diagnostic carries only allowlisted stable cause_code and safe_next_action tokens; these structures never generate table FRAS or read database content
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/dbcognition/===
receipt.go[CG7M]: F:Selects evidence-bounded Database cognition candidates and persists or validates their deterministic complete-batch receipt | R:code:internal/dbcognition/state.go,code:internal/dbevidence/store.go | A:BuildPlan,ValidateSubmission,SaveReceipt,LoadReceipt | S:Candidate identity binds the Database Volume SHA and exact table Evidence; every target must be submitted, while unrelated table drift does not invalidate a target-bound batch
state.go[CG7M]: F:Derives Database cognition alignment from Volume, evidence, and binding state | R:- | A:- | S:Evidence counts only when source selection matches its manifest and each binding matches source, evidence version, table digest, and Entry digest; zero configured sources is current with no action
types.go[CG7T]: F:Defines Database cognition assessments, evidence-bound receipts and candidates, batch plans, bindings, and submission identities | R:code:internal/dbcognition/state.go,code:internal/dbcognition/receipt.go | A:Assessment,Receipt,Candidate,Plan,Submission | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/draft/===
draft.go[CG7L]: F:Manages isolated Header, Entries, and Curation draft files plus append-only review, application, zero-write, and terminal run state | R:code:internal/runmanifest/runmanifest.go,code:internal/fs/lock.go,code:internal/cli/index_entries_recover.go | A:NewRun,ReadFilesSnapshot,SaveManifest,AppendReview,AppendApplication,StoredZeroWriteRunClosed | S:Generation facts remain immutable history; manifest changes are lock-protected atomic rewrites, and a stored zero-write or terminal closure is trusted only while its recovery bytes still validate
manifest_decode.go[CG7T]: F:Delegates draft Manifest loading to the shared strict runmanifest decoder so Draft, Check, Guide, and Maintain use one interpretation | R:code:internal/runmanifest/runmanifest.go | A:LoadManifest | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/hooks/===
claude.go[CG7S]: F:Installs and idempotently merges project-scoped AOCI MCP and Claude PreToolUse hook configuration | R:code:internal/hooks/status.go,code:textassets/catalog.go | A:InstallClaudeMCP,InstallClaudeHook | S:Writes merge into existing .mcp.json and settings with backups instead of overwriting; MCP uses explicit binary and repository paths, and hook detection shares the exact status predicate
codex.go[CG7M]: F:Installs the idempotent repository-local Codex MCP configuration table and the AOCI-managed Codex compaction prompt and reload hook | R:code:internal/hooks/installer.go,code:textassets/agents_assets.go,code:internal/cli/hook.go | A:InstallCodexMCP,InstallCodexCompaction,ValidateCodexCompactionInstall | S:Existing bytes are preserved and only missing AOCI-managed tables are appended; project trust remains a user action
installer.go[CG7M]: F:Installs or updates supported host integration files, including the Codex compaction assets, without overwriting unrelated configuration | R:code:internal/hooks/opencode.go,code:internal/hooks/codex.go | A:Detect,Install | S:Only the marked AGENTS block may be replaced; Windows paths are slash-normalized before TOML or JSON rendering to prevent escape corruption
pretool.go[CG7S]: F:Injects the target Entry and drift warning before Agent writes, with optional strict stale blocking | R:code:internal/baseline/baseline.go,code:internal/index/parser.go,code:internal/config/config.go,code:internal/cognition/loader.go | A:HandlePreTool | S:Fails open on bad paths or missing config, Index, or Baseline; under Volumes v1 it reads the Code Volume, not aoci.txt; only true semantic stale plus hook_strict blocks, never line-ending drift alone
status.go[CG7T]: F:Inspects installed host integration state and reports drift or missing assets | R:code:internal/hooks/opencode.go | A:- | S:All read or parse failures return false rather than installed, and each predicate reuses the same marker or parser as its installer to prevent status/write drift
opencode.go[CG7M]: F:Validates and atomically installs the project-root OpenCode V1 mcp.aoci local server bound to absolute AOCI binary and repository paths | R:code:internal/hooks/installer.go,code:internal/hooks/status.go,code:internal/fs/atomic.go,code:internal/jsonstrict/duplicate.go | A:ValidateOpenCodeMCPInstall,InstallOpenCodeMCP | S:Duplicate-key JSON, JSONC, V2 mcp.servers, alternate paths, conflicts, and unsafe targets fail closed; exact configuration is a byte-level no-op, and creation or merge is CAS-bound
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/indexgen/===
inventory.go[CG7M]: F:Builds deterministic index inventory views from Safe Inventory and parsed cognition | R:- | A:- | S:With Managed Scope, only Index-role files form the missing-candidate universe; Observe and Exclude are counted but never emitted as Items, while Legacy falls back to WalkRepo
missing.go[CG7S]: F:Computes actionable missing and orphan Entry sets under current scope and Curation | R:- | A:- | S:Actionable, CurationExcluded, and Skipped exactly partition raw Missing; Included is a subset of Actionable and Pending a subset of Skipped, never additional totals
score.go[CG7L]: F:Calculates cognition coverage, structural quality, and bounded diagnostic scores | R:- | A:- | S:Coverage counts only actionable Missing, while freshness adds unresolved Pending, Orphan, Stale, Unbaselined, and policy-required Observe drift; line-ending-only changes never add debt
score_types.go[CG7S]: F:Defines score categories, findings, inventories, and machine-readable result structures | R:code:internal/index/quota.go | A:- | S:A quota declaration whose dimension name the parser rejects is reported as present and unreadable, never as absent, and every quoted spelling must survive the active Locale
ui.go[CG7T]: F:Formats Locale-bound index-generation messages and exposes text-asset lookup failures inline | R:code:textassets/catalog.go | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/jsonstrict/===
duplicate.go[CG7S]: F:Rejects duplicate JSON object keys before decoding governance or protocol artifacts | R:- | A:- | S:This scanner reports duplicate keys only; malformed syntax, types, unknown fields, and trailing JSON remain the caller's strict decoder responsibility, preventing a second parser contract
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/ledger/===
ledger.go[CG7M]: F:Best-effort appends versioned local JSONL audit and measurement events and reads recent valid history | R:- | A:Append,Recent,EstimateTokens,EndpointHash | S:Ledger is non-authoritative: disabled or failed writes never block callers, corrupt lines are skipped and counted, and secrets, source, prompts, and conversation bodies must never be recorded
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/llm/===
client.go[CG7M]: F:Calls an explicitly configured OpenAI-compatible endpoint for bounded optional authoring tasks | R:- | A:- | S:-
errors.go[CG7S]: F:Classifies endpoint, HTTP, schema, timeout, and response failures for safe caller handling | R:- | A:- | S:-
options.go[CG7S]: F:Defines validated options and defaults for constructing the optional OpenAI-compatible endpoint client | R:code:internal/llm/client.go,code:internal/llm/errors.go | A:Options,Client,NewClient,Client.Model,DefaultTimeout,DefaultChatCompletionsPath | S:Timeout and MaxInputTokens are metadata; caller context and workflow own deadlines and truncation, the default HTTP client prevents endless waits, and the package never reads or persists secrets
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/migrationapply/===
approval.go[CG7T]: F:Creates and validates human-confirmed digest-bound Legacy migration approval audit records | R:code:internal/migrationapply/transaction.go,code:internal/cognitiontxn/transaction.go | A:RecordApproval,ValidateApproval | S:Approval is an audit binding, not cryptographic authentication; exact envelope, mapping, write set, recovery policy, actor, and UTC timestamp are revalidated under Apply
codec.go[CG7S]: F:Canonicalizes and strictly version-decodes Migration snapshots, mappings, apply, recovery, receipt, and reversal artifacts | R:code:internal/migrationapply/types.go,code:internal/machinecontract/cognition_planner.go | A:Encode,DecodeLegacySnapshot,DecodeMapping,DecodeApplyEnvelope,DecodeRecovery,DecodeReceipt | S:Decoders reject duplicate or unknown fields and trailing JSON; Legacy Snapshot remains v1 while current Migration, Recovery, Receipt, and Reversal artifacts require v2
mapping.go[CG7L]: F:Builds model-review migration mapping tasks and validates byte/field preservation, regeneration groups, coverage, and canonical identity | R:code:internal/migrationapply/snapshot.go,code:internal/migrationapply/prepare.go,code:internal/cognitionplan/mapping.go,code:internal/cognition/loader.go | A:BuildMappingTemplate,ValidateMapping,VerifyMapping | S:Templates supply coordinates only; semantic roles, destinations, split/merge, and review remain model-owned. Apply grade requires full coverage with no duplicate, ambiguous, or unexplained target
prepare.go[CG7M]: F:Freezes migration postimages, mapping, guards, risks, and recovery direction | R:- | A:- | S:Prepare is zero-write and requires exact Snapshot, Plan, Candidate, guards, and Ledger; targets must be absent or match runtime-boundary bytes, and the final write order keeps Root then Baseline last
replay.go[CG7T]: F:Emits digest-only diagnostics for migration envelope and approval replay mismatches | R:code:internal/migrationapply/transaction.go,code:internal/cognitionplan/validate.go | A:ReplayMismatchItem,ReplayMismatchReport,ReplayMismatchError | S:Diagnostics never expose source, FRAS, Snapshot, Evidence, credential, or database bodies and always report formal_writes_started=false; residual deep inequality becomes a runtime-metadata mismatch
reversal.go[CG7L]: F:Plans, approves, applies, resumes, and audits exact Legacy restoration for a completed cognition migration | R:code:internal/migrationapply/transaction.go,code:internal/cognitiontxn/transaction.go,code:internal/ledger/ledger.go | A:PrepareReversal,RecordReversalApproval,ApplyReversal,ResumeReversal,ReversalStatus | S:Reversal requires exact migration postimages and external guards plus Ledger proof of no later cognition write; Root and Baseline CAS precede no-replace archival of Volume files
rollback.go[CG7S]: F:Restores incomplete migration writes to their proven Legacy preimages | R:- | A:- | S:Rollback never operates on an archived completed transaction, rejects other pending or guard drift, and moves postimage Volumes into recovery only after exact Legacy/Baseline restoration
schema.go[CG7T]: F:Derives closed JSON Schema documentation and test artifacts for versioned migration contracts from Go types | R:code:internal/migrationapply/types.go | A:JSONSchemas | S:The strict decoder and typed validators, not these derived schemas, remain executable authority; required fields follow omitempty and each schema const-binds its contract version
snapshot.go[CG7L]: F:Captures immutable Legacy index, baseline, configuration, and source evidence before migration | R:- | A:- | S:Capture is read-only and fails closed on mixed layout, recovery, drift, or unsafe sources; exact Legacy/Baseline bytes and lexical ranges are identity-bound for reversible Apply mapping
status.go[CG7S]: F:Derives migration transaction and recovery status from disk identities | R:- | A:- | S:Status trusts current file bytes and immutable receipts, never a saved phase; active staging and write order are checked, and archived transactions require a terminal receipt or rollback result
transaction.go[CG7L]: F:Applies and idempotently resumes approved Legacy-to-Volumes postimages through staged CAS, verification, receipts, Ledger, and recovery archival | R:code:internal/cognitiontxn/transaction.go,code:internal/cognitionbaseline/verify.go,code:internal/fs/atomic.go | A:Apply,Resume | S:Volume files are published dormant before Root activates the layout; immutable staging and intent precede formal writes, Baseline is last, and unknown or third-party bytes fail closed
types.go[CG7M]: F:Defines migration snapshots, mappings, envelopes, approvals, intents, receipts, and results | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/onboarding/===
store.go[CG7S]: F:Persists onboarding sessions and immutable plan, evidence, candidate, and receipt artifacts | R:- | A:- | S:Session JSON rejects duplicate, unknown, and trailing fields; artifacts are immutable, updates use CAS, targets stay sorted, and security counters must remain zero for network, rows, and DDL/DML
types.go[CG7S]: F:Defines persistent onboarding sessions, batches, completion receipts, and status results | R:- | A:- | S:Session automation policy is immutable: pre-policy sessions remain legacy even if config changes; these structures persist Host progress and bindings but never generate or judge model semantics
workflow.go[CG7L]: F:Runs context-budgeted Bootstrap or Migration onboarding, safe auto continuation, and evidence-based PostgreSQL, MySQL, or openGauss source proposals | R:- | A:- | S:Policy-bound Auto is Fresh-Bootstrap-only after zero-blocker eligibility; Migration and non-auto modes require human digest confirmation
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/prompt/===
entry.go[CG7M]: F:Builds localized model prompts for evidence-bound Entry generation and updates | R:- | A:- | S:Ordinary mode requires nonempty source and Header evidence; source may be absent only with a fully bound Curation context, audit metadata is excluded from FRAS, and OldEntry activates update rules
header.go[CG7S]: F:Deterministically compiles Locale-bound Header-authoring system and user messages from formal prompt assets and injected repository facts | R:code:textassets/model_prompt_assets.go,code:textassets/render.go | A:BuildHeaderMessages,HeaderInput | S:It performs no file or network I/O, preserves caller-provided directory, extension, and sample order, and cannot support factual claims beyond injected input
template_helpers.go[CG7T]: F:Loads localized prompt assets through the shared text catalog and preserves prompt newline boundaries | R:code:textassets/catalog.go,code:internal/prompt/entry.go,code:internal/prompt/header.go | A:- | S:Asset loading neither caches nor falls back; errors propagate to the prompt path that requested the fragment
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/runmanifest/===
runmanifest.go[CG7L]: F:Strictly decodes draft-run Manifests and proves whether Entries runs remain pending or have valid zero-write or post-write terminal closure | R:code:internal/cognitiontxn/transaction.go,code:internal/jsonstrict/duplicate.go | A:Load,Decode,LatestPending,ZeroWriteClosed,StoredZeroWriteClosed,StoredTerminalResolution | S:Closure requires exact stored recovery bytes and is revalidated on every later pending check, so a deleted or tampered receipt reopens the run rather than leaving a Manifest flag trusted
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/safety/===
files.go[CG7S]: F:Selects release-facing files and forbidden content patterns for the public text scan | R:- | A:- | S:Default scanning excludes backups and spec/private, skips missing or nonregular explicit paths, and adds public text extensions, top-level MCP Go sources, and the embedded page
safety.go[CG7T]: F:Scans public text for centrally defined prohibited claims and renders bounded, source-labeled findings | R:code:internal/machinecontract/lexical.go | A:CheckForbiddenClaims,FormatHits | S:Phrase terms use case-insensitive substring matching, short names use case-sensitive word boundaries, and excerpt truncation is rune-safe to avoid false matches and broken UTF-8
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/safetycmd/===
main.go[CG7T]: F:Provides the standalone safety scanner entry point used by release scripts | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/scoperefresh/===
apply.go[CG7M]: F:Applies accepted Safe Inventory scope proposals and baseline role state | R:- | A:- | S:Only the Baseline is written: source drift, replay mismatch, or third-party bytes stop before mutation; ordinary removals require digest-bound approval, and recovery uses immutable intent plus CAS
plan.go[CG7M]: F:Builds deterministic scope-refresh proposals from inventory, configuration, and current Baseline | R:- | A:- | S:Planning is read-only; it excludes formal cognition assets from business-source selection and preserves existing Baseline, Database bindings, and Managed Scope receipt as immutable preimage evidence
types.go[CG7S]: F:Defines scope refresh plans, approvals, role changes, and application results | R:- | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/workflow/===
entries.go[CG7M]: F:Coordinates model Entry generation workers, validation, staging, and cancellation | R:- | A:- | S:Workers may run concurrently, but outcomes and manifest status remain target-ordered; a nonempty Header, current Curation, and injected model client are required before any draft run is created
entries_curation.go[CG7S]: F:Profiles and SHA-binds source text and valid Curation context before Entry authoring | R:code:internal/curation/profile.go,code:internal/prompt/entry.go | A:- | S:Empty, binary, or oversize files require an include decision and contribute Curation context without raw body; excluded or stale decisions are skipped, and ordinary files are rehashed after read
entries_worker.go[CG7M]: F:Prepares, prompts, validates, and persists one model-authored Entry draft with token accounting and an optional prompt snapshot | R:code:internal/workflow/entries.go,code:internal/prompt/entry.go,code:internal/draft/draft.go | A:- | S:Validation warnings do not block draft persistence; default redacted snapshots replace only the source body with its hash and length, while full mode retains source bytes
header.go[CG7M]: F:Orchestrates evidence-bounded model Header drafts, audit snapshots, manifests, and usage ledger | R:code:internal/prompt/header.go,code:internal/indexgen/inventory.go,code:internal/draft/draft.go | A:RunHeaderDraft,HeaderDraftResult | S:The injected LLM client is the only network path and receives inventory-derived facts; writes stay in draft, manifest, and ledger assets, while structural violations remain warnings until Apply
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/cognitionoptimization/===
checkpoint.go[CG8M]: F:Persists the lightweight CAS-bound active progress checkpoint for aligned Code cognition optimization batches | R:code:internal/cognitionoptimization/selector.go,code:internal/mcptools/tools_cognition_optimization.go,code:internal/fs/atomic.go,code:internal/jsonstrict/duplicate.go | A:Create,Load,BindBatch,RebindBatch,Advance,RestartCompleted | S:The checkpoint is disposable draft progress, never formal cognition or recovery proof; replacement batches advance only after the reused Update transaction and Managed Scope governance succeed, while all-no-change batches advance after read-only binding and governance with zero Index/Baseline writes; the last submission digest rejects altered replay
selector.go[CG8M]: F:Measures and deterministically ranks aligned Code Entries for explicitly requested cognition optimization without changing their semantics | R:code:internal/cognitionbudget/policy.go,code:internal/cognitionbudget/report.go,code:internal/index/parser.go,code:internal/mcptools/tools_cognition_optimization.go | A:AlignedEntry,EntryCost,Candidate,SelectOptions,Selection,Select | S:C and byte/3 budget costs only choose review order; explicit object_refs choose membership but not priority, and selection never creates, truncates, retags, or rewrites F/R/A/S; a C>=HighImportanceMinC Entry with S:- ranks after budget pressure and before C order as a fact, not a verdict
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/===
openGauss-connector-go-pq.PROVENANCE.md[CG8T]: F:Binds the official connector tag, commit, module sums, license, upstream tree, canonical patch, and complete patched-tree identities | R:code:scripts/check-opengauss-connector.sh,code:third_party/patches/openGauss-connector-go-pq-v1.0.8-aoci.patch,code:third_party/openGauss-connector-go-pq/AOCI-PATCHES.md,code:go.mod | A:Connector patch provenance record | S:go mod verify cannot authenticate files behind the local replacement, so full proof requires exact upstream acquisition, canonical patch replay, and complete-tree comparison
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/===
.gitignore[CG1T]: F:Ignores editor and operating-system metadata within the carried connector source tree | R:- | A:- | S:-
AOCI-PATCHES.md[CG8T]: F:Records AOCI's production-hardening delta over official connector v1.0.8 for strict configuration, bounded I/O, cancellation, authentication, and stderr logging | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/conn_go18.go,code:third_party/openGauss-connector-go-pq/logger.go,code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:The upstream module path and legacy ParseConfig behavior remain intact; LICENSE.md stays authoritative
LICENSE.md[CG5T]: F:Carries the MIT license terms governing the included openGauss connector source | R:code:THIRD-PARTY-NOTICES,code:third_party/openGauss-connector-go-pq.PROVENANCE.md | A:MIT | S:The copyright and permission notice must accompany copies or substantial portions
Makefile[CG3T]: F:Provides connector-local formatting and self-documenting help targets | R:- | A:make fmt,make help | S:-
README.cn.md[CG3S]: F:Documents in Chinese the upstream connector installation, openGauss authentication, multi-host behavior, SSL features, and database/sql example | R:code:third_party/openGauss-connector-go-pq/README.en.md,code:third_party/openGauss-connector-go-pq/AOCI-PATCHES.md | A:- | S:AOCI uses strict parsing, not legacy examples
README.en.md[CG3S]: F:Documents in English the upstream connector installation, openGauss authentication, multi-host behavior, SSL features, and database/sql example | R:code:third_party/openGauss-connector-go-pq/README.cn.md,code:third_party/openGauss-connector-go-pq/AOCI-PATCHES.md | A:- | S:AOCI uses strict parsing, not legacy examples
README.md[CG3S]: F:Presents the inherited connector overview, supported openGauss authentication and transport features, multi-host syntax, and usage example | R:code:third_party/openGauss-connector-go-pq/README.en.md,code:third_party/openGauss-connector-go-pq/AOCI-PATCHES.md | A:- | S:The gitee import is historical upstream text
TESTS.cn.MD[CG3T]: F:Explains in Chinese how to run connector tests and benchmarks against a live openGauss instance or disposable container | R:code:third_party/openGauss-connector-go-pq/TESTS.md | A:go test,go test -bench | S:Live tests need an explicitly prepared database
TESTS.md[CG3T]: F:Explains how to run connector tests and benchmarks against a live openGauss instance or disposable container | R:code:third_party/openGauss-connector-go-pq/TESTS.cn.MD | A:go test,go test -bench | S:Live tests need an explicitly prepared database
array.go[CG5L]: F:Implements database/sql array Scanner and Valuer adapters for typed slices and reflection-backed generic arrays | R:code:third_party/openGauss-connector-go-pq/encode.go | A:Array,ArrayDelimiter,GenericArray | S:Scanning supports only one-dimensional arrays whose lower bound is one; backend array whitespace and NULL spelling remain significant
buf.go[CG8T]: F:Provides mutable big-endian read and write buffers for openGauss wire-protocol fields, strings, message types, and length framing | R:code:third_party/openGauss-connector-go-pq/conn.go | A:- | S:Helpers consume or extend buffers in place and assume callers already proved the protocol frame has sufficient bytes
config.go[CG9L]: F:Parses legacy libpq-compatible or AOCI strict connection strings into Config, network targets, runtime parameters, TLS settings, and fallback policy | R:code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/openGauss-connector-go-pq/ssl.go,code:third_party/openGauss-connector-go-pq/defaults.go,code:third_party/openGauss-connector-go-pq/pgpassfile/pgpass.go,code:third_party/openGauss-connector-go-pq/pgservicefile/pgservicefile.go | A:Config,ParseConfig,ParseConfigStrict,ParseURLToMap,NetworkAddress | S:ParseConfigStrict ignores ambient environment, home, service, passfile, and logger state; non-loopback TCP requires verify-full, only numeric loopback or Unix sockets may disable TLS, and no multi-host fallback is created
conn.go[CG9L]: F:Implements the openGauss wire connection, startup and authentication state machines, transactions, prepared statements, queries, and protocol responses | R:code:third_party/openGauss-connector-go-pq/buf.go,code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/openGauss-connector-go-pq/conn_go18.go,code:third_party/openGauss-connector-go-pq/encode.go,code:third_party/openGauss-connector-go-pq/rows.go,code:third_party/openGauss-connector-go-pq/rfcdigest.go | A:ErrNotSupported,ErrInFailedTransaction,QuoteIdentifier,QuoteLiteral | S:SHA256, MD5-SHA256, and SM3 challenges must be length-checked before slicing; server PBKDF2 counts outside 1..1,000,000 are rejected before derivation
conn_go18.go[CG9M]: F:Implements context-aware database/sql operations, transaction options, ping, and deadline-bounded query cancellation for connections and statements | R:code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/ssl.go | A:driver.QueryerContext,driver.ExecerContext,driver.ConnBeginTx,driver.Pinger | S:Cancellation uses a fresh deadline-bound socket and performs any TLS negotiation on that socket rather than upgrading the main transport; connection-level cancellation marks the main connection bad
conn_validate.go[CG5S]: F:Validates target_session_attrs by querying transaction read-only state or recovery state before accepting a connected server | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/openGauss-connector-go-pq/rows.go | A:ValidateConnectTargetSessionAttrsReadWrite,ValidateConnectTargetSessionAttrsReadOnly,ValidateConnectTargetSessionAttrsPrimary,ValidateConnectTargetSessionAttrsStandby | S:Validation runs only after authentication; a role mismatch rejects that connection candidate so fallback selection can continue
connector.go[CG9M]: F:Registers openGauss drivers and establishes database/sql connections through configuration, DNS, dialing, TLS, authentication, startup, and fallback selection | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/conn_go18.go,code:third_party/openGauss-connector-go-pq/ssl.go | A:Driver,Connector,NewConnector,NewConnectorConfig,Open,DialOpen | S:Caller context and ConnectTimeout cover DNS, dial, TLS, authentication, and startup; deadlines clear only after complete success, while incomplete attempts close the transport
copy.go[CG5M]: F:Implements buffered asynchronous text COPY FROM imports, response handling, raw CopyData, and schema-qualified statement construction | R:code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/encode.go | A:CopyIn,CopyInSchema | S:COPY is allowed only inside an explicit transaction and only in text FROM mode; callers must execute with no values or close to flush pending data and surface deferred errors
defaults.go[CG3T]: F:Supplies Unix legacy-parser defaults for socket host discovery, OS user, pgpass and service files, port, target role, and buffer sizes | R:code:third_party/openGauss-connector-go-pq/config.go | A:- | S:ParseConfigStrict bypasses all defaults here
defaults_windows.go[CG3T]: F:Supplies Windows legacy-parser defaults for localhost, normalized OS user, APPDATA pgpass, home service file, port, target role, and buffers | R:code:third_party/openGauss-connector-go-pq/config.go | A:- | S:ParseConfigStrict bypasses all defaults here
doc.go[CG3M]: F:Documents the pq package's connection strings, query parameters, result types, errors, COPY imports, notifications, and optional Kerberos support | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/connector.go | A:package pq | S:Legacy docs do not override ParseConfigStrict
encode.go[CG7L]: F:Encodes and decodes query and COPY values across scalar, temporal, bytea, blob, UUID, character-set, infinity, and openGauss B-mode representations | R:code:third_party/openGauss-connector-go-pq/oid/types.go,code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/copy.go,code:third_party/openGauss-connector-go-pq/uuid.go | A:EnableInfinityTs,ParseTimestamp,FormatTimestamp,NullTime | S:EnableInfinityTs is process-global, one-shot, and must run before connections; text decoding treats openGauss B-mode value 1 as true and preserves server-offset semantics
error.go[CG8L]: F:Parses backend errors and SQLSTATE, converts protocol panics, wraps connection failures, and redacts passwords in configuration diagnostics | R:code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/config.go | A:Error,ErrorCode,ErrorClass,PGError | S:Configuration errors must preserve password redaction; bad-connection classification is retained so database/sql cannot reuse a transport after qualifying runtime or network failures
go.mod[CG8T]: F:Declares the carried official connector module identity, Go language level, and pinned crypto, text, test, and error dependencies | R:code:go.mod,code:third_party/openGauss-connector-go-pq.PROVENANCE.md | A:module gitcode.com/opengauss/openGauss-connector-go-pq | S:The root module consumes this exact local source through replace; identity and dependency pins must remain aligned with provenance and replay checks
go.sum[CG5T]: F:Authenticates the exact dependency module contents recorded by the carried connector module | R:code:third_party/openGauss-connector-go-pq/go.mod,code:third_party/openGauss-connector-go-pq.PROVENANCE.md | A:- | S:-
krb.go[CG3T]: F:Defines the optional package-level GSSAPI provider extension used by connector authentication | R:code:third_party/openGauss-connector-go-pq/conn.go | A:RegisterGSSProvider,GSS | S:Register before concurrent connections
logger.go[CG8S]: F:Defines log levels, query-argument formatting and truncation, the connector Logger interface, and the patched stderr printf logger | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/patches/openGauss-connector-go-pq-v1.0.8-aoci.patch | A:Logger,LogLevel,NewPrintfLogger | S:The AOCI patch sends printf logging to stderr because MCP stdout is JSON-RPC-only; ParseConfigStrict also rejects ambient logger settings
notice.go[CG3T]: F:Wraps connectors and live driver connections with synchronous server-notice callbacks | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/conn.go | A:NoticeHandler,SetNoticeHandler,ConnectorWithNoticeHandler | S:Handlers are synchronous; non-pq access panics
notify.go[CG5L]: F:Implements LISTEN/NOTIFY handlers, a serialized listener connection, reconnecting subscriptions, and event delivery | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/connector.go | A:Notification,Listener,NewListener,Listener.Listen,Listener.Unlisten,Listener.Close | S:Handlers execute synchronously, and a nil notification after reconnect signals that notifications may have been lost
parallel.go[CG3M]: F:Runs batches of parameterized vector SELECT queries across a caller-sized connection pool and returns results in input order | R:code:third_party/openGauss-connector-go-pq/doc.go | A:ExecuteMultiSearch | S:Trusted inputs only; invalid input calls log.Fatal
rfcdigest.go[CG8M]: F:Implements openGauss SHA-256 and SM3 PBKDF2/HMAC challenge responses plus the legacy MD5-SHA256 derivation | R:code:third_party/openGauss-connector-go-pq/conn.go | A:RFC5802Algorithm,Md5Sha256encode | S:These helpers trust challenge lengths and serverIteration; conn.go must retain its size checks and 1..1,000,000 PBKDF2 bound before calling them
rows.go[CG8M]: F:Decodes result protocol messages, exposes database/sql row metadata, and advances across command and result-set boundaries | R:code:third_party/openGauss-connector-go-pq/conn.go,code:third_party/openGauss-connector-go-pq/encode.go,code:third_party/openGauss-connector-go-pq/oid/types.go | A:database/sql/driver Rows interfaces | S:Close drains messages through ReadyForQuery rather than merely closing the cursor so the underlying connection remains protocol-synchronized
ssl.go[CG9L]: F:Constructs legacy and strict TLS configurations, loads CA and client certificates, manages custom TLS entries, and verifies peers | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/connector.go,code:third_party/openGauss-connector-go-pq/ssl_permissions.go,code:third_party/openGauss-connector-go-pq/ssl_windows.go | A:RegisterTLSConfig,DeregisterTLSConfig | S:Strict mode disables home certificate discovery, enforces TLS 1.2+, and returns certificate errors without stdout output; ParseConfigStrict separately enforces verify-full or loopback-only disable
ssl_permissions.go[CG7T]: F:Enforces ownership-sensitive Unix client-key permissions, allowing at most 0600 normally or 0640 for root-owned keys | R:code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Unknown ownership metadata fails closed instead of permitting a key whose confidentiality cannot be established
ssl_windows.go[CG5T]: F:Provides the Windows-specific no-op client private-key mode check matching libpq behavior | R:code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Windows key confidentiality depends on Windows ACLs and explicit provisioning because this path performs no Unix-style mode validation
url.go[CG5T]: F:Converts legacy postgres and postgresql URLs into deterministically ordered libpq-style key-value connection strings | R:code:third_party/openGauss-connector-go-pq/config.go | A:ParseURL | S:ParseURL is compatibility parsing only; strict protocol and parameter allowlisting is enforced separately by ParseConfigStrict
user_other.go[CG1T]: F:Returns explicit username-detection failure on JS, Android, Hurd, and z/OS builds | R:code:third_party/openGauss-connector-go-pq/error.go | A:- | S:-
user_posix.go[CG3T]: F:Resolves the current username on supported POSIX targets through os/user with USER as a fallback | R:code:third_party/openGauss-connector-go-pq/error.go | A:- | S:-
user_windows.go[CG3T]: F:Resolves a Windows NameSamCompatible identity and strips its domain component to match libpq username behavior | R:code:third_party/openGauss-connector-go-pq/error.go | A:- | S:-
uuid.go[CG5T]: F:Validates and converts an exact 16-byte binary UUID into canonical hyphenated lowercase text | R:code:third_party/openGauss-connector-go-pq/encode.go | A:- | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/certs/===
README[CG3T]: F:Declares the bundled connector certificate material as fixtures for SSL-related tests | R:code:third_party/openGauss-connector-go-pq/certs/root.crt,code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Test-only; never seed production trust
bogus_root.crt[CG3T]: F:Provides an intentionally unrelated CA certificate for negative connector TLS trust tests | R:code:third_party/openGauss-connector-go-pq/certs/README,code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Expired negative fixture; never a production root
postgresql.crt[CG3T]: F:Provides a pq test-CA-signed client certificate for connector mutual-TLS fixture coverage | R:code:third_party/openGauss-connector-go-pq/certs/README,code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Expired fixture; never a production client cert
root.crt[CG3T]: F:Provides the pq fixture certificate authority used to validate bundled client and server test certificates | R:code:third_party/openGauss-connector-go-pq/certs/README,code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Expired fixture; never a production trust anchor
server.crt[CG3T]: F:Provides the pq test-CA-signed server certificate used by connector SSL fixtures | R:code:third_party/openGauss-connector-go-pq/certs/README,code:third_party/openGauss-connector-go-pq/ssl.go | A:- | S:Expired fixture; never a production server cert
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/example/listen/===
doc.go[CG1T]: F:Carries an inherited godoc LISTEN/NOTIFY worker example showing reconnect-aware notifications, periodic checks, and work polling | R:code:third_party/openGauss-connector-go-pq/notify.go | A:- | S:Upstream postgres example is not AOCI acceptance
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/example/===
main.go[CG1T]: F:Demonstrates a basic database/sql connection through the openGauss driver and scans the server current date | R:code:third_party/openGauss-connector-go-pq/doc.go | A:- | S:Demo password and sslmode=prefer are not for AOCI
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/example/multi_ip/===
multi_ip.go[CG1T]: F:Demonstrates a legacy multi-host database/sql connection and periodically probes cluster recovery state from an environment DSN | R:code:third_party/openGauss-connector-go-pq/config.go,code:third_party/openGauss-connector-go-pq/doc.go | A:- | S:AOCI strict mode rejects multi-host fallback
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/hstore/===
hstore.go[CG3S]: F:Implements database/sql Scanner and driver Valuer conversion between hstore wire text and nullable string maps | R:- | A:hstore.Hstore,hstore.Hstore.Scan,hstore.Hstore.Value | S:Value encoding order is nondeterministic
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/oid/===
conv.go[CG3T]: F:Converts ordered wire type OIDs to comma-separated diagnostic names using the generated type table | R:code:third_party/openGauss-connector-go-pq/oid/types.go,code:third_party/openGauss-connector-go-pq/conn.go | A:oid.ConvertOidsToString | S:-
doc.go[CG5T]: F:Defines the uint32 Oid type shared by connector wire decoding and catalog type mapping | R:code:third_party/openGauss-connector-go-pq/oid/types.go,code:third_party/openGauss-connector-go-pq/rows.go | A:oid.Oid | S:-
gen.go[CG3T]: F:Generates OID constants and type-name mappings from a live server pg_type catalog | R:code:third_party/openGauss-connector-go-pq/oid/doc.go,code:third_party/openGauss-connector-go-pq/oid/types.go | A:go run gen.go | S:Manual generator overwrites types.go from live DB
types.go[CG7L]: F:Carries generated openGauss and PostgreSQL OID constants plus the canonical uppercase type-name map used in decoding and diagnostics | R:code:third_party/openGauss-connector-go-pq/oid/gen.go,code:third_party/openGauss-connector-go-pq/rows.go,code:third_party/openGauss-connector-go-pq/encode.go | A:oid.TypeName,oid.T_* | S:-
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/pgpassfile/===
pgpass.go[CG3S]: F:Parses PostgreSQL passfiles with escaped delimiters and resolves the first wildcard-capable credential match | R:code:third_party/openGauss-connector-go-pq/config.go | A:ReadPassfile,ParsePassfile,Passfile.FindPassword | S:ParseConfigStrict never reads passfiles
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/pgservicefile/===
pgservicefile.go[CG3T]: F:Parses PostgreSQL service-file sections and provides named connection-setting lookup | R:code:third_party/openGauss-connector-go-pq/config.go | A:ReadServiceFile,ParseServiceFile,ServiceFile.GetService | S:ParseConfigStrict never reads service files
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/openGauss-connector-go-pq/scram/===
scram.go[CG3M]: F:Implements a generic three-step RFC 5802 SCRAM client with nonce, proof, and server-signature verification | R:- | A:scram.NewClient,scram.Client.Step,scram.Client.Out,scram.Client.Err | S:This package is not used by active openGauss auth
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/third_party/patches/===
openGauss-connector-go-pq-v1.0.8-aoci.patch[CG9L]: F:Records the canonical AOCI hardening delta for official connector v1.0.8: strict config, bounded I/O and auth, safe TLS cancel, and stderr logging | R:code:third_party/openGauss-connector-go-pq.PROVENANCE.md,code:scripts/check-opengauss-connector.sh,code:third_party/openGauss-connector-go-pq/AOCI-PATCHES.md | A:- | S:It must apply to upstream commit 1b2ca1e407de54157316fcb4a808d8a87e007dac and reproduce patched-tree SHA-256 3861dab91648e1accdf57a0c7b0bfe53177c76e735700ffc1d986c761fc0a436
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/scripts/blackbox/===
README.md[CG5S]: F:Documents the four black-box verification suites, their dependency ladder, commands, result reading, and platform notes | R:code:scripts/blackbox/generate_repo_c.py,code:scripts/blackbox/mcp_upgrade.py,code:README.md,code:README.zh-CN.md | A:- | S:Conformance, scenarios, and the upgrade axis all fail when the counts published here disagree with an actual run; the lifecycle suite fails when a committed fixture is not named
generate_repo_c.py[CG5M]: F:Generates the frozen 453-file layered fixture that lets the scale suite reach the real batch limit with realistic cross-batch relations | R:- | A:python3 scripts/blackbox/generate_repo_c.py | S:Regenerating changes the fixture identity the scale suite asserts; generated names must avoid the built-in sensitive and runtime patterns, and a NUL byte makes Curation silently skip the file
mcp_conformance.py[CG8L]: F:Drives the built binary as a real MCP stdio client and checks the wire surface: handshake, nine-tool registry, input schemas, response shapes, malformed input | R:code:scripts/blackbox/README.md,code:README.md,code:README.zh-CN.md,code:internal/mcptools/server.go,code:scripts/blackbox/stdio_deadline.py,code:scripts/blackbox/stdio_capture.py | A:python3 scripts/blackbox/mcp_conformance.py,AOCI_REPO,AOCI_BIN,AOCI_EXPECT_VERSION | S:Read-only: it expects zero formal writes and the host repository must already be established with a multi-chunk Overview; the 48 KiB host window is measured on a real host, not assumed; the published check count is a suite property and the run fails when any document disagrees; the Overview reader follows the exact cursor chain to the declared chunk count; rules and malformed-input checks are locale-independent
mcp_lifecycle.py[CG8L]: F:Runs complete init-to-realignment lifecycles over three frozen fixture projects and an optional model track driving a real AI agent | R:code:scripts/blackbox/README.md,code:scripts/blackbox/generate_repo_c.py,code:scripts/blackbox/mcp_scenarios.py,code:internal/cli/init.go | A:python3 scripts/blackbox/mcp_lifecycle.py,--suites,--model,--compare | S:repo-a/b cover drift and re-alignment, repo-c multi-batch authoring at the raised limit, which raises the transport budget to its maximum too; the database suite needs Docker; committed fixtures must be named where advertised; governance walks the pending-policy path (#47) and the held-source probes to aligned, reading causes from verify; bringup plants a vendored static file the starter rules must observe
mcp_scenarios.py[CG8L]: F:Drives hostile handling of fixtures: cursors, write rejection, crashes, races, Scope Change, activation, held sources, batches, next commands, page | R:code:scripts/blackbox/README.md,code:README.md,code:README.zh-CN.md,code:internal/mcptools/tools_next_commands.go,code:internal/mcptools/tools_maintain_budget.go,code:internal/ui/server.go | A:python3 scripts/blackbox/mcp_scenarios.py,AOCI_SCENARIO_WORK,AOCI_SCENARIO_KEEP | S:A writing scenario builds its own fixture; the host repository stays read-only; transport budget, Guide batch, and next-command group are measured; past 50 per batch the budget is raised too; tty needs a real pty; paths are slash-normalized on Windows; Scope Change over a changed source: Volumes retains, Legacy blocks; O2 pins only the head of the optimization order; B4 wants the mismatch finding self-sufficient
mcp_upgrade.py[CG8L]: F:Proves the upgrade axis: a repository built and authored by a previously released binary stays governable by the binary under test | R:code:scripts/blackbox/README.md,code:internal/cognitionbudget/policy.go,code:internal/config/scope_budget.go,code:.github/workflows/full-confidence.yml,code:scripts/blackbox/stdio_deadline.py,code:scripts/blackbox/stdio_capture.py,code:internal/index/parser.go | A:python3 scripts/blackbox/mcp_upgrade.py,--versions,--allow-offline,AOCI_UPGRADE_CACHE | S:Only nobudget, stripped before scan, reaches LegacyPolicy; spacedroot and cutsegment carry the truncated roots releases up to rc13 wrote; worktree authors in .worktrees/wt and reads from the primary checkout; inflight: the released binary leaves an unsubmitted batch and the binary under test plans and applies over it through MCP; a fetch failure fails the run; only the newest CHANGELOG entry may 404
stdio_deadline.py[CG5T]: F:Wraps MCP RPC I/O in a wall-clock watchdog that kills and reaps the server on expiry and includes captured stderr in its method-specific TimeoutError | R:code:scripts/blackbox/mcp_conformance.py,code:scripts/blackbox/mcp_scenarios.py,code:scripts/blackbox/mcp_upgrade.py | A:rpc_deadline | S:A clock check around readline cannot interrupt a silent or partial line and select does not cover Windows pipes, so expiry kills the server; an expired session is unusable by design
stdio_capture.py[CG5T]: F:Drains an MCP test server's stderr on a daemon thread, retains a bounded 16 KiB tail, and appends it to early-EOF diagnostics | R:code:scripts/blackbox/mcp_conformance.py,code:scripts/blackbox/mcp_scenarios.py,code:scripts/blackbox/mcp_upgrade.py | A:BoundedStderr,stderr_failure | S:An unread stderr pipe fills the OS buffer and blocks both sides; failure joins briefly and tolerates a session without a collector so bare test construction stays valid
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/.github/===
PULL_REQUEST_TEMPLATE.md[CG3T]: F:Puts the contribution change-evidence checklist in front of reviewers at pull-request time | R:code:CONTRIBUTING.md | A:- | S:-
dependabot.yml[CG3T]: F:Proposes weekly Go module and GitHub Action updates without merging them | R:code:scripts/check-deps.sh | A:- | S:Connector bumps belong to its supply-chain gate
===/home/alkor2000/aoci-code-public-staging-phase1/public-candidate/internal/ui/===
cache.go[CG5S]: F:Caches repository snapshots behind fast fingerprints, bounded rechecks, and per-root rebuild locks; reuses unchanged results with ETags and filters entries | R:code:internal/ui/snapshot.go,code:internal/ui/server.go | A:EntryView | S:Fingerprints miss indexed source edits, so recheck after 2 s or refresh=1; byte-equal rebuilds keep the ETag; one root serializes while different roots build concurrently
discover.go[CG5T]: F:Recognises an aoci mcp command line and extracts the repository root it declares | R:code:internal/ui/discover_linux.go,code:internal/ui/server.go | A:Instance,parseServerCommandLine | S:Only argv naming an aoci binary and running mcp is a server; the base name splits on both path separators; a relative --repo stays as declared; resolving here would bind it to the page's cwd
discover_linux.go[CG5T]: F:Lists the current user's running aoci mcp processes from /proc with each one's repository, executable, and start time | R:code:internal/ui/discover.go | A:discoverRunningServers,discoverRunningServersFrom | S:Ownership must match os.Geteuid before cmdline is read; missing metadata skips it. exe (deleted) reports replacement; relative roots use /proc cwd; deleted or unreadable cwd skips
discover_other.go[CG3T]: F:Reports no running servers where no portable, permission-safe process scan exists | R:code:internal/ui/discover.go | A:- | S:Only named repositories are shown
embed.go[CG3T]: F:Embeds the status page into the binary so it needs no external file or network resource | R:code:internal/ui/page.html | A:- | S:The page must stay offline and self-contained
page.html[CG5L]: F:Renders the status page: a verbatim index pane with an All tab on the left; recommended input, status, and environment in a self-scrolling right column | R:code:internal/ui/server.go | A:- | S:All is the Overview body; bad answers keep prior data and polling; raw failures never cache or copy; views bind to root, order, and cache generation; filtering tracks section and banner in one pass
server.go[CG5M]: F:Serves the loopback-only read-only routes: page, repositories, state with ETag, entries, every formal asset verbatim, and the Overview body | R:code:internal/ui/cache.go,code:internal/ui/snapshot.go,code:internal/ui/discover.go,code:internal/ui/registry.go | A:Serve,Options,ErrNotLoopback,ErrNoRepository | S:Host must equal the listener address; non-loopback binds fail before listening; GET/HEAD only; refresh=1 rechecks; raw Volumes serve the snapshot's validated bytes; registrations stay outside the repo
snapshot.go[CG5M]: F:Builds one repository's read-only picture: governance facts, chunk plan, source coverage, per-locale suggestions, the Guide, and host integrations | R:code:internal/volumegovernance/facts.go,code:internal/cli/ui.go,code:internal/mcptools/overview_plan_export.go,code:internal/fs/countlines.go | A:Snapshot,Coverage,Suggestion,GuideFunc | S:Assess is called directly because check and verify append Ledger events; coverage counts unreadable source files instead of guessing; Overview text and validated Volume bytes stay outside JSON
detach.go[CG5T]: F:Starts the page as its own session detached from the calling shell and waits for its readiness line before returning its URL and PID | R:code:internal/ui/registry.go,code:internal/cli/ui.go | A:Detach,DetachResult | S:The child is the same binary running the same command, so a detached page behaves exactly like a foreground one; a child that exits or stays silent past the deadline is killed and reported
detach_unix.go[CG3T]: F:Puts the page in its own session on Unix and asks it to stop with SIGTERM so it unregisters itself | R:code:internal/ui/detach.go | A:- | S:-
detach_windows.go[CG3T]: F:Starts the page without a console in its own process group on Windows and ends it with Kill, which has no graceful form | R:code:internal/ui/detach.go | A:- | S:-
registry.go[CG5S]: F:Registers a running page in the user cache directory so a later detach reuses it and stop can end it, proving liveness through the page | R:code:internal/ui/server.go,code:internal/ui/detach.go,code:internal/cli/ui.go,code:internal/fs/lock.go | A:RegistryDir,Register,Registered,Live,Stop,LogPath | S:Liveness is the page answering for the root, never the PID, which a process that must not be signalled may reuse; Register and Unregister share a cache-dir lock; Stop removes only its captured PID