agent-doc-system 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +402 -0
  2. package/README.md +38 -0
  3. package/adapters/ansible.mjs +1 -1
  4. package/adapters/cache.mjs +9 -2
  5. package/adapters/contract-consumers.mjs +1 -1
  6. package/adapters/database.mjs +19 -4
  7. package/adapters/deploy-config.mjs +3 -2
  8. package/adapters/dockerfile.mjs +3 -2
  9. package/adapters/events.mjs +1 -1
  10. package/adapters/generic.mjs +2 -1
  11. package/adapters/github-actions.mjs +245 -85
  12. package/adapters/go.mjs +5 -4
  13. package/adapters/index.mjs +3 -1
  14. package/adapters/node.mjs +3 -2
  15. package/adapters/object-store.mjs +2 -2
  16. package/adapters/python.mjs +1142 -0
  17. package/adapters/resource-client.mjs +1 -1
  18. package/adapters/rust.mjs +990 -0
  19. package/adapters/turborepo.mjs +3 -2
  20. package/adapters/typescript.mjs +7 -5
  21. package/adapters/wrangler.mjs +3 -2
  22. package/bin/agentdoc.mjs +11 -4
  23. package/bin/usage.txt +2 -0
  24. package/core/audit.mjs +12 -8
  25. package/core/codes.mjs +4 -0
  26. package/core/compile.mjs +131 -16
  27. package/core/dependents.mjs +42 -0
  28. package/core/derive.mjs +4 -3
  29. package/core/descriptors.mjs +3 -2
  30. package/core/discover.mjs +61 -9
  31. package/core/fsx.mjs +185 -36
  32. package/core/graph.mjs +1 -1
  33. package/core/impact.mjs +66 -48
  34. package/core/paths.mjs +71 -0
  35. package/core/query.mjs +76 -31
  36. package/core/scaffold.mjs +216 -44
  37. package/core/sourcescan.mjs +14 -2
  38. package/core/toml.mjs +463 -140
  39. package/docs/ADAPTERS.md +196 -6
  40. package/docs/BENCHMARK.md +130 -0
  41. package/docs/CI.md +7 -1
  42. package/docs/EVALS.md +239 -16
  43. package/docs/MIGRATION.md +26 -6
  44. package/docs/PROVENANCE.md +6 -0
  45. package/docs/QUERY.md +78 -7
  46. package/docs/SPEC.md +69 -2
  47. package/docs/ci/github-actions.yml +1 -1
  48. package/evals/baseline-search.mjs +272 -0
  49. package/evals/facts.mjs +28 -0
  50. package/evals/harness.mjs +149 -119
  51. package/evals/scenarios/fixture-b-03-change-shared-lib.json +8 -1
  52. package/evals/scenarios/fixture-c-03-shared-vocabulary.json +7 -1
  53. package/evals/scenarios/fixture-e-01-change-shared-lib.json +14 -0
  54. package/evals/scenarios/fixture-e-02-change-manifest.json +9 -0
  55. package/evals/scenarios/fixture-e-03-local-module.json +9 -0
  56. package/evals/scenarios/fixture-e-04-ambiguous-crate.json +14 -0
  57. package/evals/scenarios/fixture-f-01-change-shared-lib.json +9 -0
  58. package/evals/scenarios/fixture-f-02-change-manifest.json +9 -0
  59. package/evals/scenarios/fixture-f-03-shadowed-import.json +9 -0
  60. package/evals/scenarios/fixture-f-04-nested-workspace.json +9 -0
  61. package/evals/scenarios/fixture-f-05-alembic-database.json +9 -0
  62. package/evals/scenarios/fixture-f-06-unittest-job.json +9 -0
  63. package/package.json +5 -2
  64. package/skills/agent-doc-system/SKILL.md +2 -1
  65. package/skills/agent-doc-system/references/cli.md +6 -1
  66. package/skills/agent-doc-system/references/create-migrate.md +21 -5
  67. package/templates/ci.yml +1 -1
@@ -33,16 +33,32 @@ agentdoc validate && agentdoc compile && agentdoc check
33
33
 
34
34
  `init` writes `agentdoc/agentdoc.config.yaml`, the central descriptor files
35
35
  (`domains.yaml`, `systems.yaml`, `apis.yaml`, `resources.yaml`),
36
- `agentdoc/journeys.yaml`, the documentation hierarchy under `docs/`, the
37
- observations README, and a CI workflow. It writes **project data only** — it
36
+ `agentdoc/journeys.yaml`, the documentation hierarchy, the observations
37
+ README, and a CI workflow. The documentation hierarchy goes to the configured
38
+ `docs.product`, `docs.architecture`, `docs.constraints` and `docs.adrDir` when
39
+ a configuration already exists, and to `agentdoc/docs/` when none does
40
+ (authored AgentDoc material lives in `agentdoc/`, generated output in
41
+ `.agentdoc/`; `docs/` stays the product's own documentation). To keep the
42
+ skeleton in `docs/`, declare `docs.*` in `agentdoc/agentdoc.config.yaml`
43
+ first. It writes **project data only** — it
38
44
  never copies the agentdoc implementation into the repository.
39
45
 
40
46
  In `agentdoc.config.yaml`:
41
47
 
42
48
  - Set `namespace`, fix `discovery.componentDescriptors` to match the real
43
- layout, and enable the adapters for the technologies present. `adapters: []`
44
- is a valid but useless starting point: with no adapter, a component
45
- descriptor is an unsupported claim and compilation fails on purpose.
49
+ layout, and enable the adapters for the technologies present. `init`
50
+ pre-selects the language and deployment adapters whose manifests it finds:
51
+ `node`, `go`, `rust` and `python`, plus `dockerfile` and `wrangler`. It also
52
+ adds `database`, `openapi`, `events` and `github-actions`. Add the rest
53
+ (`pnpm`, `turborepo`, `typescript`, `protobuf`, `graphql`, `ansible`, …) when
54
+ the repository uses them. `adapters: []` is a valid but useless starting
55
+ point: with no adapter, a component descriptor is an unsupported claim and
56
+ compilation fails on purpose.
57
+ - An existing catalog does not gain new adapters on upgrade. After upgrading
58
+ the CLI, compare `adapters:` with the technologies present, for example a
59
+ repository with `Cargo.toml` or `pyproject.toml` units and no `rust` /
60
+ `python` entry. Then run `agentdoc audit`: newly visible units appear as
61
+ `AGENTDOC_COVERAGE_ZERO` until they have a descriptor.
46
62
  - Three example authority rules are written **commented out**. Uncomment only
47
63
  the ones you can justify, with the rationale in your own words. An authority
48
64
  rule is a governance decision; the scaffolder does not make it for you.
package/templates/ci.yml CHANGED
@@ -17,7 +17,7 @@ jobs:
17
17
  with: { node-version: '24' }
18
18
  - name: Install the agentdoc CLI
19
19
  # Unpinned tracks main. For CI reproducibility pin a tag or commit:
20
- # github:lbframe/agent-doc-system#v1.1.0
20
+ # github:lbframe/agent-doc-system#v1.3.0
21
21
  # A compiler upgrade intentionally invalidates committed graphs.
22
22
  run: npm install -g github:lbframe/agent-doc-system
23
23
  - name: Validate and compile