forgecraft-mcp 1.7.0 → 1.8.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 (52) hide show
  1. package/README.md +79 -0
  2. package/dist/registry/remote-gates.d.ts +16 -0
  3. package/dist/registry/remote-gates.d.ts.map +1 -1
  4. package/dist/registry/remote-gates.js +56 -0
  5. package/dist/registry/remote-gates.js.map +1 -1
  6. package/dist/registry/sentinel-domain-map.d.ts.map +1 -1
  7. package/dist/registry/sentinel-domain-map.js +16 -9
  8. package/dist/registry/sentinel-domain-map.js.map +1 -1
  9. package/dist/registry/sentinel-renderer.d.ts +13 -8
  10. package/dist/registry/sentinel-renderer.d.ts.map +1 -1
  11. package/dist/registry/sentinel-renderer.js +440 -162
  12. package/dist/registry/sentinel-renderer.js.map +1 -1
  13. package/dist/shared/harness-budget.d.ts +49 -0
  14. package/dist/shared/harness-budget.d.ts.map +1 -0
  15. package/dist/shared/harness-budget.js +123 -0
  16. package/dist/shared/harness-budget.js.map +1 -0
  17. package/dist/shared/hook-installer.d.ts.map +1 -1
  18. package/dist/shared/hook-installer.js +2 -1
  19. package/dist/shared/hook-installer.js.map +1 -1
  20. package/dist/tools/close-cycle-helpers.d.ts +9 -0
  21. package/dist/tools/close-cycle-helpers.d.ts.map +1 -1
  22. package/dist/tools/close-cycle-helpers.js.map +1 -1
  23. package/dist/tools/close-cycle.d.ts.map +1 -1
  24. package/dist/tools/close-cycle.js +29 -0
  25. package/dist/tools/close-cycle.js.map +1 -1
  26. package/dist/tools/contribute-gate.d.ts +30 -4
  27. package/dist/tools/contribute-gate.d.ts.map +1 -1
  28. package/dist/tools/contribute-gate.js +180 -66
  29. package/dist/tools/contribute-gate.js.map +1 -1
  30. package/dist/tools/gate-genesis.d.ts +47 -0
  31. package/dist/tools/gate-genesis.d.ts.map +1 -0
  32. package/dist/tools/gate-genesis.js +241 -0
  33. package/dist/tools/gate-genesis.js.map +1 -0
  34. package/dist/tools/learning-graph.d.ts +31 -0
  35. package/dist/tools/learning-graph.d.ts.map +1 -0
  36. package/dist/tools/learning-graph.js +266 -0
  37. package/dist/tools/learning-graph.js.map +1 -0
  38. package/dist/tools/setup-artifact-writers.d.ts +15 -3
  39. package/dist/tools/setup-artifact-writers.d.ts.map +1 -1
  40. package/dist/tools/setup-artifact-writers.js +149 -13
  41. package/dist/tools/setup-artifact-writers.js.map +1 -1
  42. package/dist/tools/setup-phase2.d.ts +9 -0
  43. package/dist/tools/setup-phase2.d.ts.map +1 -1
  44. package/dist/tools/setup-phase2.js +13 -0
  45. package/dist/tools/setup-phase2.js.map +1 -1
  46. package/dist/tools/setup-project.d.ts +6 -0
  47. package/dist/tools/setup-project.d.ts.map +1 -1
  48. package/dist/tools/setup-project.js +21 -4
  49. package/dist/tools/setup-project.js.map +1 -1
  50. package/package.json +99 -98
  51. package/templates/api/instructions.yaml +50 -188
  52. package/templates/universal/instructions.yaml +194 -1003
package/README.md CHANGED
@@ -429,6 +429,85 @@ Industry context: the Spec-Driven Development convergence (ThoughtWorks Tech Rad
429
429
 
430
430
  ---
431
431
 
432
+ ## The GS harness — a primer for AI assistants
433
+
434
+ ForgeCraft implements **Generative Specification (GS)**. This section is written for AI assistants reading this file: it explains what GS is, what a properly scaffolded harness looks like, and what to check.
435
+
436
+ ### The binding constraint — stateless reader
437
+
438
+ Every AI session starts with no memory of prior sessions, no shared context, no accumulated conventions, and no ability to ask clarifying questions. Everything not in the artifacts is absent.
439
+
440
+ GS treats this as a design constraint, not a flaw. **Derivability** — what a fresh AI instance can correctly determine from the artifacts alone — is the standard a specification must satisfy. If a stateless reader cannot derive the correct output from the artifacts, the specification is incomplete, not the AI.
441
+
442
+ ### The sentinel system
443
+
444
+ The architectural constitution (`CLAUDE.md`, `.cursor/rules/`, `.github/copilot-instructions.md`, `.windsurfrules`) is the entry point for every AI session. It must collectively contain five mandatory categories:
445
+
446
+ | Category | What it covers |
447
+ |---|---|
448
+ | **Architectural identity** | What the system is, its scope boundary, ADR index |
449
+ | **Standards** | Naming, commit discipline, quality gate thresholds |
450
+ | **Constraints and prohibitions** | What must not happen; layer violations the AI must refuse |
451
+ | **Tool sequencing** | When to use which tool in what order — not "these tools exist" but "use X before Y when C" |
452
+ | **Routing** | What each child spec file covers and when to descend into it |
453
+
454
+ **Tool sequencing is the most commonly absent category and the most consequential gap.** A spec that lists tools without stating when to prefer one over another forces unreliable inference every session.
455
+
456
+ The sentinel is a **navigational tree**: the root is always loaded; each child node declares its own scope and routing condition; the AI descends only the branch relevant to the current task. Joining all leaves yields the complete specification — it is lossless. This design prevents context bloat and the accuracy degradation that comes from loading irrelevant content.
457
+
458
+ ### The bridge — structural disciplines as navigation policy
459
+
460
+ SOLID, hexagonal architecture, and TDD are not only engineering disciplines — in a GS project they become active **navigation policies**:
461
+
462
+ - **Read interfaces before implementations.** When a port/adapter boundary is clean, the interface is the contract. The implementation is skipped unless the contract is insufficient.
463
+ - **Trust green tests.** When TDD is enforced, a passing test suite is evidence of correct behavior. No implementation read is needed to verify it.
464
+ - **ADRs are the why.** When every non-obvious decision is recorded, the AI reads the record instead of inferring intent from code.
465
+
466
+ This bridge converts the passive structural benefits of prior disciplines into a measurable reduction in token usage and context consumption.
467
+
468
+ ### Token sanitation
469
+
470
+ Context window size and positional placement both degrade AI accuracy (Liu et al., 2023). GS minimizes unnecessary token consumption by design:
471
+
472
+ - **The sentinel tree is lazy.** Only the relevant branch is loaded per task — never the full specification at once.
473
+ - **Contracts over implementations.** Interfaces, schema definitions, and test assertions are read first. Implementation files are read only when contracts are insufficient to derive the answer.
474
+ - **The constitution leads every session.** The most important content occupies the leading position in context — where positional accuracy is highest.
475
+ - **MCP tool surface is bounded.** Each declared MCP tool is read by the model on every turn whether invoked or not. The ForgeCraft sentinel exposes one tool (~200 tokens) rather than a full command surface (~1,500 tokens). The tool practices the methodology it writes into your project.
476
+
477
+ ### Document taxonomy — what a complete GS project contains
478
+
479
+ A scaffolded project contains these artifact types. If any are missing, the harness is incomplete:
480
+
481
+ | Artifact | Canonical path | Role |
482
+ |---|---|---|
483
+ | Architectural constitution | `CLAUDE.md` · `.cursor/rules/` · `.windsurfrules` · `.github/copilot-instructions.md` | Governing rules loaded at the start of every AI session |
484
+ | Document manifest | `docs/manifest.yaml` | Declares what artifact types exist and where — the taxonomy contract |
485
+ | Session continuity | `docs/status.md` | Current state, in-progress work, recent decisions — updated each session |
486
+ | Functional specification | `docs/PRD.md` | User-facing behavior, domain model, system boundaries |
487
+ | Architecture document | `docs/TechSpec.md` | Layer structure, module boundaries, integration surfaces (with C4 diagrams) |
488
+ | Decision records | `docs/adrs/NNNN-slug.md` | One per non-obvious architectural choice, MADR format |
489
+ | Use cases | `docs/use-cases/` | Behavioral contracts — simultaneously test specifications |
490
+ | Schemas | `docs/specs/` | Data model, API contracts, event schemas with formal constraints |
491
+ | Project config | `forgecraft.yaml` | Tags, tier, targets — the ForgeCraft entry point |
492
+
493
+ **The initialization cascade**: specifications are produced in sequence — each is an output of what precedes it and a production rule for what follows. Functional spec → architecture → constitution → ADRs → use cases. The cascade is complete when a stateless agent given all five artifact sets can derive any valid implementation state without further human direction.
494
+
495
+ ### The 7 attributes — what to verify
496
+
497
+ A properly scaffolded GS project satisfies all seven. These are the properties the `verify` command scores:
498
+
499
+ | Attribute | What it verifies |
500
+ |---|---|
501
+ | **Self-Describing** | The codebase explains its own architecture, decisions, and conventions from its own artifacts — no external knowledge required |
502
+ | **Bounded** | Every unit has explicit scope and seams; business logic does not leak across layer boundaries |
503
+ | **Verifiable** | Correctness can be checked without human judgment — types, tests, coverage gates, schema contracts |
504
+ | **Defended** | Destructive operations are structurally prevented, not merely discouraged — commit hooks, branch protection, format enforcement |
505
+ | **Auditable** | Current state and history are fully recoverable from artifacts alone — conventional commits, ADRs |
506
+ | **Composable** | Units combine and extend without unexpected coupling — dependency inversion, pure function models |
507
+ | **Executable** | Output satisfies behavioral contracts when exercised against a real execution environment, not merely when it compiles |
508
+
509
+ ---
510
+
432
511
  ## Configuration
433
512
 
434
513
  ### Fine-tune what your AI assistant sees
@@ -40,4 +40,20 @@ export declare function fetchRemoteGates(projectRoot: string, registryUrl?: stri
40
40
  * @returns Filtered array of remote gates.
41
41
  */
42
42
  export declare function filterGatesByTags(index: RemoteGatesIndex, tags: string[]): readonly RemoteGate[];
43
+ /**
44
+ * Install tag-matching approved registry gates into the project as YAML files.
45
+ *
46
+ * Gates land in `.forgecraft/gates/registry/<category>/<id>.yaml` — the
47
+ * community-suggestion area. The dev/AI reviews and promotes relevant gates
48
+ * to `.forgecraft/gates/active/` (human-judgment step — registry gates are
49
+ * never auto-activated).
50
+ *
51
+ * Idempotent: existing files are never overwritten. Quarantined gates are skipped.
52
+ *
53
+ * @param projectRoot - Target project root
54
+ * @param index - The fetched remote gates index
55
+ * @param tags - Active project tags to filter by
56
+ * @returns Relative paths of gate files written
57
+ */
58
+ export declare function installRemoteGates(projectRoot: string, index: RemoteGatesIndex, tags: string[]): string[];
43
59
  //# sourceMappingURL=remote-gates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-gates.d.ts","sourceRoot":"","sources":["../../src/registry/remote-gates.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,CAAC,gBAAgB,CAAC,EAA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AI,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC;IAC3C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC;CAC9B;AAYD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAqB3B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,MAAM,EAAE,GACb,SAAS,UAAU,EAAE,CAQvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,MAAM,EAAE,GACb,MAAM,EAAE,CA6CV"}
@@ -1,5 +1,6 @@
1
1
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
2
2
  import { join } from "path";
3
+ import { dump as yamlDump } from "js-yaml";
3
4
  const DEFAULT_REGISTRY_URL = "https://raw.githubusercontent.com/jghiringhelli/quality-gates/master/index.json";
4
5
  const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
5
6
  /**
@@ -48,6 +49,61 @@ export function filterGatesByTags(index, tags) {
48
49
  g.tags.length === 0 ||
49
50
  g.tags.some((t) => tags.includes(t.toUpperCase())));
50
51
  }
52
+ /**
53
+ * Install tag-matching approved registry gates into the project as YAML files.
54
+ *
55
+ * Gates land in `.forgecraft/gates/registry/<category>/<id>.yaml` — the
56
+ * community-suggestion area. The dev/AI reviews and promotes relevant gates
57
+ * to `.forgecraft/gates/active/` (human-judgment step — registry gates are
58
+ * never auto-activated).
59
+ *
60
+ * Idempotent: existing files are never overwritten. Quarantined gates are skipped.
61
+ *
62
+ * @param projectRoot - Target project root
63
+ * @param index - The fetched remote gates index
64
+ * @param tags - Active project tags to filter by
65
+ * @returns Relative paths of gate files written
66
+ */
67
+ export function installRemoteGates(projectRoot, index, tags) {
68
+ const written = [];
69
+ const matching = filterGatesByTags(index, tags).filter((g) => g.status === "approved");
70
+ for (const gate of matching) {
71
+ const category = sanitizePathSegment(gate.category || "general");
72
+ const id = sanitizePathSegment(gate.id);
73
+ if (!id)
74
+ continue;
75
+ const dir = join(projectRoot, ".forgecraft", "gates", "registry", category);
76
+ const filePath = join(dir, `${id}.yaml`);
77
+ if (existsSync(filePath))
78
+ continue;
79
+ try {
80
+ mkdirSync(dir, { recursive: true });
81
+ writeFileSync(filePath, yamlDump({
82
+ id: gate.id,
83
+ title: gate.title,
84
+ description: gate.description,
85
+ domain: gate.category,
86
+ gsProperty: gate.gsProperty,
87
+ phase: gate.phase,
88
+ hook: gate.hook,
89
+ check: gate.check,
90
+ passCriterion: gate.passCriterion,
91
+ tags: gate.tags ?? [],
92
+ ...(gate.evidence ? { evidence: gate.evidence } : {}),
93
+ source: "community-registry",
94
+ }, { lineWidth: 100, noRefs: true }), "utf-8");
95
+ written.push(`.forgecraft/gates/registry/${category}/${id}.yaml`);
96
+ }
97
+ catch {
98
+ // Single gate write failure is non-fatal — continue with the rest
99
+ }
100
+ }
101
+ return written;
102
+ }
103
+ /** Strip path-traversal characters from a gate-supplied path segment. */
104
+ function sanitizePathSegment(segment) {
105
+ return segment.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/^-+|-+$/g, "");
106
+ }
51
107
  function readCache(cachePath) {
52
108
  if (!existsSync(cachePath))
53
109
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"remote-gates.js","sourceRoot":"","sources":["../../src/registry/remote-gates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AA2B5B,MAAM,oBAAoB,GACxB,iFAAiF,CAAC;AAEpF,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AAOrD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,WAAmB,EACnB,WAAoB;IAEpB,MAAM,GAAG,GAAG,WAAW,IAAI,oBAAoB,CAAC;IAChD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC;IAE/B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,mBAAmB;YACtD,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;SACxC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,OAAO,UAAU,EAAE,CAAC;QAEtC,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAqB,CAAC;QACzD,UAAU,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;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I,EAAE,CAAC;QACxE,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAAC,MAAM,CAAC;QACP,mCAAmC;IACrC,CAAC;AACH,CAAC;AAED,SAAS,UAAU;IACjB,OAAO;QACL,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACrC,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,CAAC;QACZ,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;KACV,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sentinel-domain-map.d.ts","sourceRoot":"","sources":["../../src/registry/sentinel-domain-map.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmJ7D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBhE,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAgBzC,CAAC"}
1
+ {"version":3,"file":"sentinel-domain-map.d.ts","sourceRoot":"","sources":["../../src/registry/sentinel-domain-map.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2J7D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBhE,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAgBzC,CAAC"}
@@ -26,17 +26,23 @@ export const BLOCK_DOMAIN_MAP = {
26
26
  "twelve-factor-ops": "cicd",
27
27
  "commit-protocol": "cicd",
28
28
  "dev-environment-hygiene": "cicd",
29
- // ── Spec / GS ──
30
- "artifact-grammar": "spec",
31
- "naming-as-grammar": "spec",
29
+ // ── Spec (operational, project-binding rules only) ──
32
30
  "adr-protocol": "spec",
33
31
  "use-case-triple-derivation": "spec",
34
32
  "release-phase-gate": "spec",
35
- "gs-five-memory-types": "spec",
36
- "gs-status-format": "spec",
37
- "living-documentation": "spec",
38
- "agentic-self-refinement": "spec",
39
- "wrong-specification-risk": "spec",
33
+ // ── Reference (GS theory — NEVER session-loaded) ──
34
+ // These teach the methodology rather than bind this project. Their
35
+ // operational content lives in the CNT branches (lifecycle.md Memory Map,
36
+ // session loop, doc obligation table, corrections.md). Loading theory in
37
+ // sessions is the context-degradation source — it displaces the task.
38
+ "artifact-grammar": "reference",
39
+ "naming-as-grammar": "reference",
40
+ "gs-five-memory-types": "reference",
41
+ "gs-status-format": "reference",
42
+ "living-documentation": "reference",
43
+ "agentic-self-refinement": "reference",
44
+ "wrong-specification-risk": "reference",
45
+ "spec-meta-query": "reference",
40
46
  // ── Protocols (on-demand workflow rules) ──
41
47
  "clarification-protocol": "protocols",
42
48
  "feature-completion-protocol": "protocols",
@@ -44,7 +50,8 @@ export const BLOCK_DOMAIN_MAP = {
44
50
  "engineering-preferences": "protocols",
45
51
  "code-generation-verification": "protocols",
46
52
  "known-pitfalls": "protocols",
47
- "corrections-log": "protocols",
53
+ // corrections-log → covered by the .claude/corrections.md CNT branch
54
+ "corrections-log": "reference",
48
55
  "dependency-registry": "protocols",
49
56
  // ── API ──
50
57
  "api-standards": "api",
@@ -1 +1 @@
1
- {"version":3,"file":"sentinel-domain-map.js","sourceRoot":"","sources":["../../src/registry/sentinel-domain-map.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uDAAuD;AACvD,MAAM,CAAC,MAAM,gBAAgB,GAAqC;IAChE,qBAAqB;IACrB,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SAAS,EACP,6EAA6E;IAC/E,QAAQ,EAAE,iEAAiE;IAC3E,IAAI,EAAE,yEAAyE;IAC/E,IAAI,EAAE,mEAAmE;CAC1E,CAAC;AAEF,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,cAAc;IACd,SAAS;IACT,MAAM;IACN,KAAK;IACL,UAAU;IACV,UAAU;IACV,MAAM;IACN,WAAW;IACX,IAAI;IACJ,eAAe;IACf,MAAM;IACN,WAAW;IACX,UAAU;IACV,MAAM;IACN,MAAM;CACP,CAAC"}
1
+ {"version":3,"file":"sentinel-domain-map.js","sourceRoot":"","sources":["../../src/registry/sentinel-domain-map.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uDAAuD;AACvD,MAAM,CAAC,MAAM,gBAAgB,GAAqC;IAChE,qBAAqB;IACrB,kBAAkB,EAAE,cAAc;IAClC,gBAAgB,EAAE,cAAc;IAChC,2BAA2B,EAAE,cAAc;IAC3C,sBAAsB,EAAE,cAAc;IACtC,uBAAuB,EAAE,cAAc;IACvC,4BAA4B,EAAE,cAAc;IAE5C,gBAAgB;IAChB,iBAAiB,EAAE,SAAS;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,SAAS;IAC/B,qBAAqB,EAAE,SAAS;IAChC,iBAAiB,EAAE,SAAS;IAE5B,cAAc;IACd,iBAAiB,EAAE,MAAM;IACzB,mBAAmB,EAAE,MAAM;IAC3B,iBAAiB,EAAE,MAAM;IACzB,yBAAyB,EAAE,MAAM;IAEjC,uDAAuD;IACvD,cAAc,EAAE,MAAM;IACtB,4BAA4B,EAAE,MAAM;IACpC,oBAAoB,EAAE,MAAM;IAE5B,qDAAqD;IACrD,mEAAmE;IACnE,0EAA0E;IAC1E,yEAAyE;IACzE,sEAAsE;IACtE,kBAAkB,EAAE,WAAW;IAC/B,mBAAmB,EAAE,WAAW;IAChC,sB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AE,MAAM;IAC1B,iBAAiB,EAAE,MAAM;IACzB,kBAAkB,EAAE,MAAM;IAC1B,kBAAkB,EAAE,MAAM;IAC1B,wBAAwB,EAAE,MAAM;IAChC,cAAc,EAAE,MAAM;IACtB,oBAAoB,EAAE,MAAM;IAC5B,sBAAsB,EAAE,MAAM;IAC9B,eAAe,EAAE,MAAM;IACvB,cAAc,EAAE,MAAM;IACtB,qBAAqB,EAAE,MAAM;CAC9B,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAqC;IACnE,YAAY,EACV,mFAAmF;IACrF,OAAO,EACL,sEAAsE;IACxE,IAAI,EAAE,4EAA4E;IAClF,GAAG,EAAE,oEAAoE;IACzE,QAAQ,EACN,wEAAwE;IAC1E,QAAQ,EAAE,8DAA8D;IACxE,IAAI,EAAE,kFAAkF;IACxF,SAAS,EAAE,wDAAwD;IACnE,EAAE,EAAE,+EAA+E;IACnF,aAAa,EACX,kEAAkE;IACpE,IAAI,EAAE,2EAA2E;IACjF,SAAS,EACP,6EAA6E;IAC/E,QAAQ,EAAE,iEAAiE;IAC3E,IAAI,EAAE,yEAAyE;IAC/E,IAAI,EAAE,mEAAmE;CAC1E,CAAC;AAEF,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,cAAc;IACd,SAAS;IACT,MAAM;IACN,KAAK;IACL,UAAU;IACV,UAAU;IACV,MAAM;IACN,WAAW;IACX,IAAI;IACJ,eAAe;IACf,MAAM;IACN,WAAW;IACX,UAAU;IACV,MAAM;IACN,MAAM;CACP,CAAC"}
@@ -1,16 +1,21 @@
1
1
  /**
2
2
  * Sentinel tree renderer.
3
3
  *
4
- * Instead of one large instruction file, renders a 3-level lazy tree:
5
- * Level 0: CLAUDE.md (~50 lines) — project identity + critical rules + wayfinding
6
- * Level 1: .claude/standards/{domain}.md — full block content per domain
4
+ * Generates a multi-file Contextual Navigation Tree (CNT):
7
5
  *
8
- * The AI loads only what the current task requires.
9
- * Typical task: CLAUDE.md (~50 lines) + 1-2 domain files (50-100 lines each).
10
- * vs monolithic: 800-2000+ lines loaded regardless of task.
6
+ * CLAUDE.md — root (≤80 lines): project identity + routing only
7
+ * .claude/constitution.md non-negotiables: SOLID, invariants, prohibited ops
8
+ * .claude/lifecycle.md — GS cascade, feature estimation, tool sequencing, session loop
9
+ * .claude/routes/code.md — where code lives: folder map, naming, module protocol
10
+ * .claude/routes/docs.md — where docs live: nav mode, doc map, reading order
11
+ * .claude/corrections.md — corrections log stub (read before acting)
12
+ * .claude/standards/{domain} — full domain standards (loaded only when relevant)
11
13
  *
12
- * Only applies to the "claude" target other AI assistants receive the full file
13
- * since they do not support multi-file on-demand loading the same way.
14
+ * The root CLAUDE.md is the routing layer. It loads the always-load files and tells
15
+ * the AI exactly which branch to load for each task type. No branch is loaded unless
16
+ * relevant — this is how the CNT prevents context window degradation.
17
+ *
18
+ * Only applies to the "claude" target — other AI assistants receive the full file.
14
19
  */
15
20
  import type { InstructionBlock } from "../shared/types.js";
16
21
  import type { RenderContext } from "./renderer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"sentinel-renderer.d.ts","sourceRoot":"","sources":["../../src/registry/sentinel-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AASnD,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EAAE,EAC1B,OAAO,EAAE,aAAa,GACrB,YAAY,EAAE,CA+BhB"}
1
+ {"version":3,"file":"sentinel-renderer.d.ts","sourceRoot":"","sources":["../../src/registry/sentinel-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AASnD,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EAAE,EAC1B,OAAO,EAAE,aAAa,GACrB,YAAY,EAAE,CAgEhB"}