Skip to content

Commit 432c753

Browse files
update project memory for semantic index pipeline
1 parent 63a1bee commit 432c753

1 file changed

Lines changed: 35 additions & 44 deletions

File tree

project-local-template/AGENTS.md

Lines changed: 35 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,57 @@
11
<!-- COMMANDCODE-DOCGEN:START -->
2-
# Documentation Engineering System
2+
# DocGen 2 Documentation Engineering
33

4-
This repository contains an evidence-grounded documentation workflow under `.docgen/**` with published Markdown under `docs/**`.
4+
This repository uses a token-efficient, evidence-grounded documentation pipeline. Repository source is indexed once into `.docgen/index/semantic.db`; provider runs receive bounded `.docgen/context/**` packs rather than broad source access.
55

6-
## Authority Order
6+
## Authority order
77

8-
When documentation claims conflict, use this authority order:
8+
1. application source and executable behavior;
9+
2. configuration, API/message contracts, schemas, migrations, and deployment manifests;
10+
3. deterministic facts/source chunks in the semantic index;
11+
4. typed `.docgen/model/**` items;
12+
5. generated documentation.
913

10-
1. application source code and executable behavior
11-
2. configuration, contracts, schemas, migrations, and deployment manifests
12-
3. generated evidence artifacts in `.docgen/evidence/**`
13-
4. normalized models in `.docgen/model/**`
14-
5. existing documentation
14+
Existing prose is not authoritative over contradictory source evidence.
1515

16-
Existing prose is never authoritative over contradictory source evidence.
16+
## Epistemic rules
1717

18-
## Epistemic Rules
18+
Material statements are `FACT`, `INFERENCE`, or `UNKNOWN`.
1919

20-
Important technical statements must be treated as one of:
20+
- `FACT` requires direct repository-relative evidence present in the canonical source inventory.
21+
- `INFERENCE` must identify supporting facts/model items.
22+
- `UNKNOWN` preserves missing or disputed information without guessing.
2123

22-
- `FACT`: directly supported by source evidence
23-
- `INFERENCE`: derived from multiple facts; the supporting evidence must be recorded
24-
- `UNKNOWN`: insufficient evidence; do not invent a conclusion
24+
Never invent endpoints, rules, states, integrations, ownership, security behavior, retry behavior, failure semantics, or operational guarantees.
2525

26-
Never invent endpoints, business rules, state transitions, integrations, data ownership, security behavior, retry behavior, failure semantics, or operational guarantees.
27-
28-
## Documentation Workflow
29-
30-
Use this order:
26+
## Workflow
3127

3228
```text
33-
discover -> analyze -> plan -> generate -> audit -> fix as needed
29+
index -> model -> plan -> generate -> audit -> publish
3430
```
3531

36-
Do not skip directly from source code to broad user-facing documentation for non-trivial systems.
37-
38-
## Artifact Boundaries
32+
Use `docgen all` or `docgen resume` for the complete content-hash-resumable pipeline. For a v1 project, run `docgen migrate` first.
3933

40-
- evidence: `.docgen/evidence/**`
41-
- architecture/workflow model: `.docgen/model/**`
42-
- documentation plan: `.docgen/plan/**`
43-
- audit findings: `.docgen/audit/**`
44-
- generated documentation: `docs/**`
34+
## Token boundary
4535

46-
DocGen workflows must not modify application source, build files, migrations, infrastructure, or tests.
36+
- source inventory: `.docgen/index/inventory.json` and `.docgen/index/source-files.txt`;
37+
- semantic index: `.docgen/index/semantic.db`;
38+
- bounded provider inputs: `.docgen/context/**`;
39+
- provider telemetry/budget: `.docgen/telemetry/**` and `.docgen/budget/report.json`;
40+
- typed models: `.docgen/model/**`;
41+
- page plan: `.docgen/plan/manifest.json`;
42+
- traceability: `.docgen/traceability/**`;
43+
- audit results: `.docgen/audit/**`;
44+
- published documentation: `docs/**`.
4745

48-
## Writing Standard
46+
Provider runs are context-only: they must not read repository source, the SQLite database, broad model directories, unrelated pages, agents, or skills. Deterministic index/render/audit code owns those boundaries.
4947

50-
Write for engineers who do not yet know the codebase. Prefer purpose, mental model, responsibilities, boundaries, interactions, workflows, state transitions, failure behavior, and actionable guides. Avoid file-by-file or class-by-class narration.
51-
52-
Use standard Markdown and Mermaid. Keep claims precise and traceable to evidence. Mark genuine uncertainty instead of smoothing it over.
53-
<!-- COMMANDCODE-DOCGEN:END -->
48+
## Writing standard
5449

50+
Write for engineers who do not yet know the codebase. Prefer purpose, mental models, boundaries, interactions, lifecycles, branches, failure behavior, and actionable guidance over file-by-file narration. Use standard Markdown and Mermaid only. Keep claims precise and traceable.
5551

56-
## Source Inventory and Ignore Boundary
52+
## Enterprise and workspace depth
5753

58-
During DocGen workflows, repository source access must follow `.docgen/state/source-files.txt`. Do not read, search, cite, fingerprint, or use as FACT evidence any file excluded by `.gitignore`, `.docgenignore`, DocGen hard exclusions, or project `config.exclude`. Use explicit included paths or `docgen source-grep` instead of broad wildcard reads.
54+
When evidence supports it, model security, operations, testing, data governance, decisions, configuration, change impact, and ownership. Multi-repository workspace analysis consumes validated repository models and must preserve unresolved edges rather than inventing cross-service links.
5955

60-
## P1 Enterprise Depth
61-
62-
When supported by evidence, build typed models for security, operations, testing, data governance, decisions, configuration, change impact, and ownership. Keep policy, business semantics, implementation behavior, operational guarantees, and inferred rationale epistemically distinct. Do not invent SLOs, permissions, owners, retention periods, recovery guarantees, or architectural rationale.
63-
64-
## P3 system-of-systems workspace
65-
66-
For multi-repository documentation, use `docgen workspace ...` from a parent workspace. Workspace analysis must consume validated `.docgen/model/**` artifacts from member repositories rather than bypassing repository ignore, binary, traceability, and contract boundaries. Cross-repository relationships require explicit contract/dependency evidence. All system diagrams use Mermaid.
56+
DocGen workflows may write only under `.docgen/**` and `docs/**`; they must not modify application source, build files, migrations, infrastructure, or tests.
57+
<!-- COMMANDCODE-DOCGEN:END -->

0 commit comments

Comments
 (0)