agent-doc-system 1.5.0 → 1.5.2

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.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,25 @@ refused by the next with `AGENTDOC_COMPILER_MISMATCH` until it is recompiled.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [1.5.2] - 2026-11-14
13
+
14
+ ### Fixed
15
+
16
+ - Explicit context documents now have content provenance, allowing task-context delivery to verify linked files outside conventional document locations.
17
+ - Component, System and Resource context lists now accept more than twelve documentation, constraint or runbook references. Projects no longer need to omit applicable decisions or reclassify them to satisfy schema validation. Markdown display budgets remain adjustable and report truncation; task context delivery uses token budgets and continuation.
18
+ - Agent guidance distinguishes document-path navigation from content delivery and documents the current component-level applicability boundary.
19
+
20
+ Recompile committed graphs after upgrading, as the compiler version is now 1.5.2 and the schema input hash changes.
21
+
22
+ ## [1.5.1] - 2026-11-13
23
+
24
+ ### Fixed
25
+
26
+ - Evaluation and optimization entrypoints now execute when invoked through a symbolic link, including installed paths under macOS temporary-directory aliases. Previously they could exit successfully without producing output.
27
+ - CI now exercises agent evaluation and package installation on macOS in addition to the Node 22/24/26 Linux matrix.
28
+
29
+ Recompile committed graphs after upgrading, as the compiler version is now 1.5.1.
30
+
12
31
  ## [1.5.0] - 2026-11-13
13
32
 
14
33
  ### Added
@@ -440,7 +459,9 @@ First public release.
440
459
  for project health.
441
460
  - An Agent Skill under `skills/agent-doc-system/`.
442
461
 
443
- [Unreleased]: https://github.com/lbframe/agent-doc-system/compare/v1.5.0...HEAD
462
+ [Unreleased]: https://github.com/lbframe/agent-doc-system/compare/v1.5.2...HEAD
463
+ [1.5.2]: https://github.com/lbframe/agent-doc-system/compare/v1.5.1...v1.5.2
464
+ [1.5.1]: https://github.com/lbframe/agent-doc-system/compare/v1.5.0...v1.5.1
444
465
  [1.5.0]: https://github.com/lbframe/agent-doc-system/compare/v1.4.0...v1.5.0
445
466
  [1.4.0]: https://github.com/lbframe/agent-doc-system/compare/v1.3.0...v1.4.0
446
467
  [1.3.0]: https://github.com/lbframe/agent-doc-system/compare/v1.2.0...v1.3.0
package/core/compile.mjs CHANGED
@@ -527,6 +527,16 @@ function compileOnce(root, opts = {}) {
527
527
  prov.add("declared", e.file, "descriptor-reader", subjects);
528
528
  }
529
529
 
530
+ // Pin linked document contents as well as the descriptor that declares the
531
+ // link. Task-context delivery verifies these bytes against graph provenance.
532
+ for (const e of sources.entities) {
533
+ for (const [kind, paths] of Object.entries(e.doc.spec?.context || {})) {
534
+ for (const p of paths) {
535
+ prov.add("observed", p, "context-document-reader", ["entf:" + e.ref + ":/spec/context/" + kind]);
536
+ }
537
+ }
538
+ }
539
+
530
540
  // ── contract adapters run once, after every unit is known ───────────────
531
541
  const contractOut = [];
532
542
  ctx.addContract = (rec) => {
package/core/graph.mjs CHANGED
@@ -9,7 +9,7 @@ import { assertDeterministic, structuralProjection } from "./determinism.mjs";
9
9
  import { sha256Hex } from "./fsx.mjs";
10
10
 
11
11
  export const COMPILER_NAME = "agentdoc-compiler";
12
- export const COMPILER_VERSION = "1.5.0";
12
+ export const COMPILER_VERSION = "1.5.2";
13
13
  export const GRAPH_SCHEMA_VERSION = "agentdoc.dev/graph/v1";
14
14
 
15
15
  // Resolve symbolic provenance subjects to RFC 6901 pointers into the graph.
package/docs/CI.md CHANGED
@@ -20,7 +20,7 @@ jobs:
20
20
  with: { fetch-depth: 0 }
21
21
  - uses: actions/setup-node@v4
22
22
  with: { node-version: '24' }
23
- # Pin a tag for reproducibility, e.g. github:lbframe/agent-doc-system#v1.5.0 —
23
+ # Pin a tag for reproducibility, e.g. github:lbframe/agent-doc-system#v1.5.2 —
24
24
  # a compiler upgrade intentionally invalidates every committed graph.
25
25
  - run: npm install -g github:lbframe/agent-doc-system
26
26
  - run: agentdoc validate
package/docs/CONTEXT.md CHANGED
@@ -8,6 +8,12 @@ printf '%s\n' '{"task":"Change the engine API","paths":["crates/engine"],"intent
8
8
 
9
9
  Intents are `implement` (default), `change-contract`, `debug-runtime` and `review`. The first implementation conservatively retains the same obligation closure across intents. The packet contains typed, versioned records, evidence references, selected checks, analysis limitations and stale runtime observation IDs. It does not infer that unsupported or dynamic dependencies are absent.
10
10
 
11
+ Document selection currently follows component ownership and impact, rather
12
+ than file-specific document filters. All declared references remain eligible,
13
+ including lists longer than twelve entries; the token budget governs delivery,
14
+ not what the repository may declare. Constraints are critical obligations;
15
+ ordinary documentation and runbooks remain available through continuation.
16
+
11
17
  ## Budget and continuation
12
18
 
13
19
  The exact serialized output, including its final newline, metadata and continuation, is counted using pinned `js-tiktoken@1.0.21`. Select `o200k_base` or `cl100k_base` explicitly to match the encoding used by your model; AgentDoc does not guess model tokenization. The supported budget is 256–1,000,000 tokens. A budget too small for the envelope or next indivisible record fails with `AGENTDOC_CONTEXT_BUDGET` and must be increased.
package/docs/QUERY.md CHANGED
@@ -170,6 +170,19 @@ documentation, constraints and runbooks appear under `docs`, `CONSTRAINTS` and
170
170
  `runbooks`, respectively. Components also include conventional files discovered
171
171
  in their source root. API and Domain schemas do not allow `context`.
172
172
 
173
+ Authored `context.docs`, `context.constraints` and `context.runbooks` have no
174
+ item-count cap. Declare every applicable reference; do not move a document to
175
+ another category or split a component to fit a display budget. Choose the
176
+ category by its role: supporting documentation, active obligations, or operating
177
+ procedures. An ADR may be the source of an active obligation.
178
+
179
+ These links are component-level context, not file-specific applicability.
180
+ Linking a document to one component does not establish coverage of every other
181
+ component that needs it. `query` returns document paths; use `prepare` and
182
+ `expand` when the consumer needs their contents with a token budget and explicit
183
+ continuation (see [CONTEXT.md](CONTEXT.md)). Neither delivery nor a link proves
184
+ that an obligation has been understood or implemented.
185
+
173
186
  Markdown docs and runbooks default to 12 paths each. Constraints are uncapped by
174
187
  default so critical routing context is preserved. Set an explicit cap with, for
175
188
  example, `--budget docs=1,constraints=5,runbooks=1`. A shortened line ends with
@@ -21,7 +21,7 @@ jobs:
21
21
  with: { node-version: '24' }
22
22
  - name: Install the agentdoc CLI
23
23
  # Unpinned tracks main. For CI reproducibility pin a tag or commit:
24
- # github:lbframe/agent-doc-system#v1.5.0
24
+ # github:lbframe/agent-doc-system#v1.5.2
25
25
  # A compiler upgrade intentionally invalidates committed graphs.
26
26
  run: npm install -g github:lbframe/agent-doc-system
27
27
  - name: Validate and compile
@@ -43,6 +43,6 @@ export async function optimize(config){
43
43
  const decision=validation.stopped?{adopt:false,reason:validation.stopped}:selectCandidate(validation.attempts.filter(x=>x.condition==='reference'),validation.attempts.filter(x=>x.condition===candidate),config.criteria);
44
44
  return {schemaVersion:'agentdoc.eval.optimization/v1',status:decision.adopt?'candidate-selected':'inconclusive',candidate,decision,spent,development,validation,publication:'not-performed',finalTest:'required-on-independent-tasks-before-production-performance-claims'};
45
45
  }
46
- if(process.argv[1]&&path.resolve(process.argv[1])===fileURLToPath(import.meta.url)){
46
+ if(process.argv[1]&&fs.existsSync(process.argv[1])&&fs.realpathSync(process.argv[1])===fs.realpathSync(fileURLToPath(import.meta.url))){
47
47
  try{const config=JSON.parse(fs.readFileSync(process.argv[2],'utf8'));const report=await optimize(config);const text=JSON.stringify(report,null,2)+'\n';if(process.argv[3])fs.writeFileSync(process.argv[3],text);else process.stdout.write(text);if(report.status!=='candidate-selected')process.exitCode=1;}catch(e){console.error(e.message);process.exitCode=2;}
48
48
  }
@@ -150,7 +150,7 @@ export async function campaign(config){
150
150
  return {schemaVersion:'agentdoc.eval.campaign/v1',runtime:{node:process.version,runnerHash:RUNNER_HASH,corpusHash:createHash('sha256').update(JSON.stringify(tasks.map(t=>({id:t.id,pin:t.fixtureHash,cases:t.cases})))).digest('hex'),driverFiles:Object.fromEntries(config.driver.filter(p=>path.isAbsolute(p)&&fs.existsSync(p)&&fs.statSync(p).isFile()).map(p=>[p,createHash('sha256').update(fs.readFileSync(p)).digest('hex')]))},config,attempts,summary:summarize(attempts),conditions:Object.fromEntries(Object.keys(conditions).map(k=>[k,summarize(attempts.filter(x=>x.condition===k))]))};
151
151
  }
152
152
 
153
- if(process.argv[1]&&path.resolve(process.argv[1])===fileURLToPath(import.meta.url)){
153
+ if(process.argv[1]&&fs.existsSync(process.argv[1])&&fs.realpathSync(process.argv[1])===fs.realpathSync(fileURLToPath(import.meta.url))){
154
154
  try{
155
155
  if(process.argv.includes('--list'))process.stdout.write(JSON.stringify(tasks.map(t=>({...publicTask(t),family:t.family,split:t.split})),null,2)+'\n');
156
156
  else{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-doc-system",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "type": "module",
5
5
  "description": "Portable documentation and software-catalog system with an explicit authority model, for AI coding agents",
6
6
  "keywords": [
@@ -125,15 +125,15 @@
125
125
  "additionalProperties": false,
126
126
  "properties": {
127
127
  "docs": {
128
- "type": "array", "minItems": 1, "maxItems": 12, "uniqueItems": true,
128
+ "type": "array", "minItems": 1, "uniqueItems": true,
129
129
  "items": { "$ref": "#/$defs/repoPath" }
130
130
  },
131
131
  "constraints": {
132
- "type": "array", "minItems": 1, "maxItems": 12, "uniqueItems": true,
132
+ "type": "array", "minItems": 1, "uniqueItems": true,
133
133
  "items": { "$ref": "#/$defs/repoPath" }
134
134
  },
135
135
  "runbooks": {
136
- "type": "array", "minItems": 1, "maxItems": 12, "uniqueItems": true,
136
+ "type": "array", "minItems": 1, "uniqueItems": true,
137
137
  "items": { "$ref": "#/$defs/repoPath" }
138
138
  }
139
139
  }
@@ -59,13 +59,20 @@ another. If the graph reports a conflict or an unresolved fact, say so.
59
59
  | CREATE | no `agentdoc/` config exists | `agentdoc init`, then `scaffold --write` |
60
60
  | MIGRATE | established repo, scattered or stale docs | `agentdoc audit`, then work the report |
61
61
  | VALIDATE | before committing, in CI | `agentdoc validate` → `compile` → `check` |
62
- | QUERY | before and during a change | `agentdoc query <path-or-ref>` |
62
+ | QUERY | navigate a path or entity | `agentdoc query <path-or-ref>` |
63
+ | TASK CONTEXT | receive document contents for a change | `agentdoc prepare` → `expand` → `refresh` |
63
64
  | MAINTAIN | after a change | `agentdoc impact <paths>` |
64
65
 
65
66
  CREATE versus MIGRATE is not about size: a repository whose existing docs make
66
67
  *claims* is a migration, because those claims must be verified. Details:
67
68
  [references/create-migrate.md](references/create-migrate.md).
68
69
 
70
+ `query` returns document paths, not their contents. Open the applicable files
71
+ and resolve any reported truncation, or use the task context protocol below to
72
+ receive their contents under a token budget. Context lists have no declaration
73
+ count cap: preserve every applicable reference and classify by role, never by
74
+ remaining capacity. A link or a delivered record is not proof of implementation.
75
+
69
76
  ## The normal loop
70
77
 
71
78
  ```bash
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.5.0
20
+ # github:lbframe/agent-doc-system#v1.5.2
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