@nurix/etna 0.3.6 → 0.10.1
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/data/harnesses/code/CLAUDE.md +7 -7
- package/data/harnesses/code/agents/boundary-mapper.md +1 -1
- package/data/harnesses/code/agents/harness-manager.md +144 -0
- package/data/harnesses/code/skills/documentation/SKILL.md +5 -119
- package/data/harnesses/code/skills/documentation/references/templates.md +7 -2
- package/data/harnesses/kb-agi/CLAUDE.md +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code
|
|
3
|
-
description: Canonical Nurix code-project harness (spec
|
|
4
|
-
version: 0.
|
|
3
|
+
description: Canonical Nurix code-project harness (spec v10) — three peer authoring modes (Brainstorming / Spec / Plan), modules as bounded contexts, typed application boundaries, a self-migrating harness-manager, ownership rules. The reference CLAUDE.md every Nurix codebase starts with.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
keywords:
|
|
6
6
|
- harness
|
|
7
7
|
- code
|
|
@@ -20,9 +20,9 @@ This file defines how AI agents (Claude, GPT, etc.) should work on this project.
|
|
|
20
20
|
|
|
21
21
|
## Bootstrap
|
|
22
22
|
|
|
23
|
-
> If `docs/structure.md` is missing
|
|
23
|
+
> If `docs/structure.md` is missing — or its `harness-version` frontmatter is behind the installed harness — invoke the **`harness-manager`** agent (`"baseline this repo"` / `"reconcile the harness"`). It reconciles `docs/` to the installed version (baseline is just reconcile-from-nothing), calling the `documentation` skill for each template, then runs `boundary-mapper` to populate `docs/boundaries/` and proposes modules from the boundaries it finds. Pillars are module-local (`docs/modules/{m}/pillars/`), created lazily through Brainstorming Mode — not scaffolded up front. Re-trigger `harness-manager` any time.
|
|
24
24
|
|
|
25
|
-
This bootstrap is the only step that runs **before** the harness exists. Everything else below assumes a
|
|
25
|
+
This bootstrap is the only step that runs **before** the harness exists. Everything else below assumes a reconciled repo.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
@@ -60,7 +60,7 @@ Before modifying code in an unfamiliar area:
|
|
|
60
60
|
2. If **[`docs/OWNERSHIP_INDEX.md`](docs/OWNERSHIP_INDEX.md)** exists, check it for the owning feature doc (rolled up to its module) and read it before changes. Else glob `docs/{features,modules/*/features}/**/*.md` and check `owns` frontmatter.
|
|
61
61
|
3. **Check [`docs/boundaries/`](docs/boundaries/)** — if your change touches a documented boundary (entity model, schema, API, auth, channels, …), read that boundary file first. A `CRITICAL`/`HIGH` boundary warrants the `introspect` skill before you start.
|
|
62
62
|
4. If a `docs/memory/` file exists for the domain you're working in, read it for domain knowledge and failure modes
|
|
63
|
-
5. In a
|
|
63
|
+
5. In a declared module, its `docs/modules/{m}/CLAUDE.md` auto-loads in that subtree — follow it.
|
|
64
64
|
|
|
65
65
|
For the protocol on *writing* to memory (which file, what belongs there, what doesn't), see **Project Memory** below.
|
|
66
66
|
|
|
@@ -94,7 +94,7 @@ When implementing a plan, if you discover work that is important but outside the
|
|
|
94
94
|
|
|
95
95
|
## Doc Ownership
|
|
96
96
|
|
|
97
|
-
Feature docs (in `docs/modules/{m}/features/`, or flat `docs/features/` if
|
|
97
|
+
Feature docs (in `docs/modules/{m}/features/`, or flat `docs/features/` if the module isn't declared) must include YAML frontmatter with `owns`, `touches`, and `depends_on` fields. Architecture docs describe cross-cutting patterns and don't own specific files; boundary docs own cross-cutting shapes, not file paths; operations docs describe procedures. Only feature docs need frontmatter.
|
|
98
98
|
|
|
99
99
|
The spec-mode agent checks for ownership conflicts during research. If conflicts are found, address them in the spec before proceeding.
|
|
100
100
|
|
|
@@ -150,4 +150,4 @@ Maintenance triggers (act on these without re-reading `structure.md`):
|
|
|
150
150
|
|
|
151
151
|
- After plan completion: add a `docs/history/changelog/` entry + update `docs/history/CHANGELOG.md` (no confirmation; include `Commits:` if multi-commit). Non-plan changes (refactors, fixes, API changes): prompt first.
|
|
152
152
|
- When you add, move, or delete a doc: update `docs/routing.md` and `docs/README.md` to match. When you move or rename source files: fix the `owns`/`touches` frontmatter in the owning doc; new docs that own code need `owns`/`touches`/`depends_on`.
|
|
153
|
-
- Before creating changelogs, feature docs, or plans: ensure
|
|
153
|
+
- Before creating changelogs, feature docs, or plans: ensure the repo is reconciled (`docs/structure.md` exists with a current `harness-version`); if not, invoke `harness-manager` first.
|
|
@@ -104,7 +104,7 @@ Write `docs/boundaries/README.md` as the index: list every boundary, its type, s
|
|
|
104
104
|
## Rules
|
|
105
105
|
|
|
106
106
|
- **One file per boundary.** Don't bundle unrelated boundaries.
|
|
107
|
-
- **Name the bounding
|
|
107
|
+
- **Name the bounding code units** in every file (paths / package names) — boundaries are the *edges* between module *nodes*. When those units are declared as modules, the boundary graph and the module graph coincide; until a module is declared the names are descriptive, not a broken link. The distinct vertices you name across all `Bounds` lines are the **module-discovery feed** `harness-manager` reads to propose modules — so name them precisely.
|
|
108
108
|
- **Severity is load-bearing.** It feeds `introspect`'s review depth. Default CRITICAL for the IA model, DB schema, wire contracts, auth, tenancy; HIGH for API surface, Redux store, workflow signatures, env parity; MED for realtime channels. Adjust from the scale + project memory.
|
|
109
109
|
- **Don't invent boundaries the repo doesn't have.** Only instantiate types the detected stack/IA actually exhibits. `log()` what you skipped and why.
|
|
110
110
|
- **Read-only on production code.** You write only under `docs/boundaries/` and `docs/memory/boundary-mapper.md`.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness-manager
|
|
3
|
+
description: The harness's own migrator and structural-health auditor. Reconciles a repo's docs/ governance tree to the installed harness version — baseline is just reconcile-from-nothing; upgrade is reconcile-across-a-version-gap. Declarative (converge to the current shape, not an ordered migration ladder), idempotent, driven by the harness-version marker in docs/structure.md. Owns the Bootstrap. On demand, audits structural conformance to the harness spec. Triggers on "baseline this repo", "reconcile the harness", "upgrade the harness", "harness health", "is this repo on the current harness", "/harness-manager".
|
|
4
|
+
tools: Read, Glob, Grep, Bash, Write, Edit
|
|
5
|
+
model: inherit
|
|
6
|
+
plugins: [nurix-harness]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Harness-Manager Agent
|
|
10
|
+
|
|
11
|
+
You bring a repo's `docs/` governance tree into conformance with the **installed** harness version, and you audit that conformance on demand. You are the harness's migrator — the single owner of an operation it performs forever.
|
|
12
|
+
|
|
13
|
+
The keystone: **baseline and upgrade are the same operation.** A repo's docs are always at *some* harness shape (none, pre-v8, v9, v10, …); the installed plugin is at some shape; your job is to **reconcile the repo to the installed shape**. Baseline is the degenerate case (reconcile from nothing). Upgrade is reconcile across a version gap. Same agent, same convergence.
|
|
14
|
+
|
|
15
|
+
Reconcile is **declarative, not a migration ladder.** You converge to the *current* shape — "make this tree match v10" — idempotent, detecting old-shape artifacts to know what to *move* versus *create*. You do **not** maintain or replay an ordered `v8→v9→v10` chain, and you never reconstruct a past version. (Same philosophy the stack already applies to the database: drop & push to a declared schema, not stacked migration files.)
|
|
16
|
+
|
|
17
|
+
## The two version layers (don't confuse them)
|
|
18
|
+
|
|
19
|
+
- The **CLI** (`npx @nurix/etna nurix-harness`) refreshes the *engine* — `CLAUDE.md` + `.claude/{agents,skills,rules,scripts}/`. That is not your job; the install does it.
|
|
20
|
+
- **You** reconcile the *repo's authored data* — the `docs/` tree — to match that engine.
|
|
21
|
+
|
|
22
|
+
The upgrade story is the two run back-to-back: install refreshes the engine → you reconcile the docs to it.
|
|
23
|
+
|
|
24
|
+
## Modes
|
|
25
|
+
|
|
26
|
+
- **Reconcile** (incl. **baseline**) — read the repo's `harness-version`; if absent or behind the installed version, converge `docs/` to the installed shape and stamp the new version. The Bootstrap invokes this.
|
|
27
|
+
- **Health** (on demand) — audit structural conformance to the installed spec. Report only; do not edit docs for content accuracy.
|
|
28
|
+
|
|
29
|
+
## The seam vs the `maintenance` agent
|
|
30
|
+
|
|
31
|
+
These are different axes — keep them clean:
|
|
32
|
+
|
|
33
|
+
- **`maintenance` audits docs-vs-code *fidelity*** — is the documented behavior *true* of the code? (stale docs, broken `owns` globs, routing drift, a boundary file drifted from its source). It edits docs for content accuracy.
|
|
34
|
+
- **You audit repo-vs-spec *conformance*** — is the governance *structure* shaped to the installed harness version? (version marker present and current, mandated scaffolds present, no lingering dissolved-version artifacts, modules declared where the boundary graph implies them).
|
|
35
|
+
|
|
36
|
+
You never edit a doc for content fidelity (that is `maintenance`); `maintenance` never reshapes the structure to a new version (that is you).
|
|
37
|
+
|
|
38
|
+
## Before starting
|
|
39
|
+
|
|
40
|
+
1. Resolve the **installed harness version** — the design epoch this plugin ships (currently `10`). It is the target.
|
|
41
|
+
2. Read the repo's **current version** — the `harness-version` field in `docs/structure.md` frontmatter. Absent ⇒ the repo is unharnessed ⇒ baseline (reconcile from nothing). Equal to installed ⇒ nothing to do (report and stop, unless Health was asked). Behind ⇒ reconcile forward.
|
|
42
|
+
3. If `docs/memory/harness-manager.md` exists, read it for project-specific reconcile exceptions and prior decisions.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Reconcile workflow
|
|
47
|
+
|
|
48
|
+
The target is the canonical structure below; converge the repo to it. For a fresh repo this is a scaffold; for a behind-version repo it is a reshape. Both are the same convergence.
|
|
49
|
+
|
|
50
|
+
### Target structure (the installed shape)
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
docs/
|
|
54
|
+
├── README.md # Documentation root — quick links, section index
|
|
55
|
+
├── structure.md # Authority map + frontmatter `harness-version` (you own this field)
|
|
56
|
+
├── routing.md # File-pattern → module / doc / agent map
|
|
57
|
+
├── OWNERSHIP_INDEX.md # Generated: code path → owning feature doc
|
|
58
|
+
├── architecture/ # Cross-module design + steering layer
|
|
59
|
+
│ │ # domain-model, glossary, non-goals, references, open-questions
|
|
60
|
+
│ └── adr/ # Architecture Decision Records (numbered, immutable)
|
|
61
|
+
├── features/ # Flat default — feature specs with ownership frontmatter
|
|
62
|
+
│ └── {feature}/ # subfolder for deep features
|
|
63
|
+
├── modules/ # Declared bounded contexts — NOT scaffolded empty; appear by declaration
|
|
64
|
+
│ └── {module}/ # CLAUDE.md + features/ + pillars/ (module-local doctrine, lazy)
|
|
65
|
+
├── boundaries/ # Typed application boundaries — generated by boundary-mapper
|
|
66
|
+
├── operations/ # Setup, development, deployment, CI/CD
|
|
67
|
+
├── history/
|
|
68
|
+
│ ├── CHANGELOG.md # Master changelog index
|
|
69
|
+
│ ├── changelog/ # Individual entries
|
|
70
|
+
│ ├── plans/ # Implementation plans (Status field required)
|
|
71
|
+
│ └── backlog.md # Tracked work items by priority (P0-P3)
|
|
72
|
+
├── memory/ # Agent memory files
|
|
73
|
+
└── tests/ # Optional, author-maintained — create only if test docs exist
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 1 — Inventory and classify
|
|
77
|
+
|
|
78
|
+
Glob every markdown file. Classify each: Architecture, Features, Operations, Plans, Changelogs, Backlog, Stale/Deprecated (delete), Root docs (stay). For each topic keep the most complete version as canonical; extract unique content from the rest before deleting. **No redirect stubs** — when you move a file, delete the original and fix every reference (routing, ownership index, memory, frontmatter `depends_on`, cross-doc links).
|
|
79
|
+
|
|
80
|
+
### Step 2 — Detect dissolved-version artifacts (the reshape)
|
|
81
|
+
|
|
82
|
+
This is what makes reconcile more than a fresh scaffold. Detect old-shape artifacts and fold them forward:
|
|
83
|
+
|
|
84
|
+
| If you find (old shape) | Fold to (current shape) |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `docs/operations/guardrails.md` | one file per boundary under `docs/boundaries/` (then run `boundary-mapper`) |
|
|
87
|
+
| repo-wide `docs/pillars/` | module-local `docs/modules/{m}/pillars/`; cross-module doctrine → `docs/architecture/` |
|
|
88
|
+
| `docs/architecture/overview.md` | split into `domain-model.md` / `glossary.md` / `non-goals.md` / `references.md` / `open-questions.md` |
|
|
89
|
+
| flat feature docs that belong to a declared module | `docs/modules/{m}/features/` |
|
|
90
|
+
| no `harness-version` in `structure.md` | stamp it (Step 5) |
|
|
91
|
+
|
|
92
|
+
Only fold what is present. `log()` what you skipped and why.
|
|
93
|
+
|
|
94
|
+
### Step 3 — Present the reconcile plan
|
|
95
|
+
|
|
96
|
+
Table: `| File | Action | From | To | Reason |` (actions: `Move`, `Merge into {target}`, `Delete`, `Keep`, `Create`, `Fold`). For a fresh baseline this is mostly `Create`; for an upgrade it is mostly `Fold`/`Move`. Ask once: "Approve this reconcile?" — you own this interaction (the documentation skill is a library and has none).
|
|
97
|
+
|
|
98
|
+
### Step 4 — Execute
|
|
99
|
+
|
|
100
|
+
Create the folder structure; move/fold/merge/delete per the plan; add `Status:` to plan files; add ownership frontmatter to feature docs (call the `documentation` skill's **frontmatter derivation** for `owns`/`touches`/`depends_on`); merge scattered backlogs into `docs/history/backlog.md`; fix links broken by moves. Scaffold missing mandated files **by calling the `documentation` skill for each template** — you orchestrate, the skill supplies templates:
|
|
101
|
+
|
|
102
|
+
- `docs/README.md`, `docs/structure.md` (with `harness-version`), `docs/history/CHANGELOG.md`, `docs/history/backlog.md`, `docs/memory/index.md`, `docs/memory/main.md`, `docs/OWNERSHIP_INDEX.md`, and the repo-root `README.md` (filled from the real lockfile/scripts/layout — **never overwrite an existing root README**).
|
|
103
|
+
|
|
104
|
+
### Step 5 — Stamp the version
|
|
105
|
+
|
|
106
|
+
Write `harness-version: <installed epoch>` into `docs/structure.md` frontmatter. This single field is the repo's baseline-and-version sentinel — there is no second marker.
|
|
107
|
+
|
|
108
|
+
### Step 6 — Seed modules from boundaries, then run boundary-mapper
|
|
109
|
+
|
|
110
|
+
Invoke **`boundary-mapper`** to populate `docs/boundaries/` (it detects the stack + IA). Then **propose modules from the boundaries** — modules are *declared*, never inferred from physical layout:
|
|
111
|
+
|
|
112
|
+
- Read the distinct vertices named across every `docs/boundaries/*` **Bounds** line (e.g. `apps/api`, `@acme/contracts`). These are the repo's bounded contexts, already enumerated.
|
|
113
|
+
- Propose them as candidate modules. For each, partition existing flat feature docs by `owns`-glob overlap.
|
|
114
|
+
- **Propose — don't force.** Declaration is opt-in: a single-context app stays flat; declare `docs/modules/{m}/` only when the author accepts a context as a module. A module is tied to code by its `owns` globs, **layout-blind** — a workspace is not a module (one workspace may hold several contexts; one context may span workspaces).
|
|
115
|
+
|
|
116
|
+
### Step 7 — Verify
|
|
117
|
+
|
|
118
|
+
Confirm all mandated files exist; `structure.md` carries the current `harness-version`; no dead links in `docs/README.md`; every plan has a `Status:`; feature docs have ownership frontmatter; `OWNERSHIP_INDEX.md` rows match frontmatter on disk; no dissolved-version artifacts remain; no docs outside the canonical structure.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Health audit (on demand)
|
|
123
|
+
|
|
124
|
+
Conformance, not fidelity. Report a table; fix nothing destructively without asking.
|
|
125
|
+
|
|
126
|
+
- **Version currency** — `harness-version` present in `structure.md` and equal to installed? If behind/absent → recommend Reconcile.
|
|
127
|
+
- **Scaffold completeness** — every mandated file present.
|
|
128
|
+
- **Dissolved-version residue** — any `operations/guardrails.md`, repo-wide `docs/pillars/`, `architecture/overview.md`, or other old-shape artifact lingering.
|
|
129
|
+
- **Module declaration coverage** — do the boundary `Bounds` vertices have declared module homes where the author intended them? (Surface gaps; never auto-declare.)
|
|
130
|
+
- **`docs/tests/` ownership** — present-with-content, or absent. An empty/orphan `docs/tests/` is a finding (it is author-maintained; no scaffold owns it).
|
|
131
|
+
|
|
132
|
+
## Rules
|
|
133
|
+
|
|
134
|
+
- **Declarative, idempotent.** Re-running on a current repo is a no-op. Converge to current shape; never replay a version ladder; never reconstruct a past shape.
|
|
135
|
+
- **One sentinel.** `docs/structure.md` `harness-version` is the only baseline/version marker. Do not reintroduce a `docs/memory/index.md` "is-baselined" check.
|
|
136
|
+
- **Modules are declared, layout-blind.** Seed from boundary vertices + `owns` globs; never from `pnpm-workspace.yaml`/workspace walls. Propose, don't force.
|
|
137
|
+
- **You orchestrate; the `documentation` skill supplies templates.** It is a library — you never expect it to baseline.
|
|
138
|
+
- **Never overwrite an existing root `README.md`.** It is human-authored.
|
|
139
|
+
- **Stay in `docs/` (+ root `README.md` scaffold) and `docs/memory/harness-manager.md`.** You do not edit `CLAUDE.md` (the CLI ships it) or production code.
|
|
140
|
+
- **Health reports; it does not remediate content.** Content fidelity is `maintenance`'s job.
|
|
141
|
+
|
|
142
|
+
## Strategy memory
|
|
143
|
+
|
|
144
|
+
After a run you may append to `docs/memory/harness-manager.md` (git-tracked): project-specific reconcile exceptions, which old-shape artifacts this repo carried, modules the author declined to declare and why, recurring residue. Never user preferences (those are `~/.claude/`); never a transcription of doc content. Date each entry `## YYYY-MM-DD — {topic}`.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: documentation
|
|
3
|
-
description:
|
|
3
|
+
description: Template & generator library for technical docs — the skill agents call to produce a doc from a template. Use to (1) document a feature or module, (2) create or update a changelog entry, (3) document data flows or Redux state, (4) add to protected files, (5) provide the generic boundary-file template (typed-boundary *generation* is the `boundary-mapper` agent), (6) record an architecture decision (ADR), (7) create or update the project root README, (8) create or update a plan, (9) derive ownership frontmatter (`owns`/`touches`/`depends_on`) from code, (10) scaffold a standard doc (README, structure.md, CHANGELOG, backlog, memory, OWNERSHIP_INDEX) from its template, or (11) co-author any technical doc. Baselining / reconciling a repo's docs to the installed harness version is the **`harness-manager` agent** (which calls this skill for each template) — this skill does not orchestrate baseline. Triggers on "document this", "create docs", "update changelog", "add to protected files", "ADR", "architecture decision", "root README", "plan", "feature doc".
|
|
4
4
|
plugins: [nurix-harness]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Technical Documentation Skill
|
|
8
8
|
|
|
9
|
+
**This skill is a template & generator library, not an orchestrator.** It supplies the templates, the frontmatter-derivation generator, and the co-authoring workflow that *agents* call to produce individual docs. It does **not** baseline, audit, or reconcile a repo's doc tree — that is the **`harness-manager` agent**, which calls this skill for each template it scaffolds. Reach here to generate *one* doc from a template; reach for `harness-manager` to bring a whole repo into shape.
|
|
10
|
+
|
|
9
11
|
Document contracts and architecture, not implementation details. Show function signatures and API shapes — never paste full implementations (they rot fast). Use ASCII diagrams over prose for flows. Only document state at persistence boundaries (Redux persistence, DB schemas, API shapes), not component-level or transient state. Mark deprecated fields with `// UNUSED:` comments. Breaking changes belong in changelogs only, not module docs.
|
|
10
12
|
|
|
11
13
|
**No redirect docs.** When moving a doc to a new location, delete the old file entirely. Update all references (routing, ownership index, memory files, frontmatter `depends_on`, cross-doc links) to point to the new path. Never leave a stub file that says "Moved to X" — redirect docs rot, clutter the repo, and create false search hits.
|
|
@@ -17,7 +19,7 @@ Document contracts and architecture, not implementation details. Show function s
|
|
|
17
19
|
```
|
|
18
20
|
User request
|
|
19
21
|
│
|
|
20
|
-
├─ "Baseline/
|
|
22
|
+
├─ "Baseline/reconcile docs" ──────▶ harness-manager agent (it calls this skill per template)
|
|
21
23
|
│
|
|
22
24
|
├─ "Document feature/module" ──────▶ Module Template
|
|
23
25
|
│
|
|
@@ -44,123 +46,7 @@ User request
|
|
|
44
46
|
|
|
45
47
|
---
|
|
46
48
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
When asked to "baseline", "audit", or "review" docs, enforce the canonical v9 documentation structure. This is an opinionated reorganization — the target structure is non-negotiable.
|
|
50
|
-
|
|
51
|
-
### Target Structure
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
docs/
|
|
55
|
-
├── README.md # Documentation root — quick links table, section index
|
|
56
|
-
├── structure.md # Authority map, folder rules, health log
|
|
57
|
-
├── routing.md # File-pattern → module/doc/agent map (scaled — see CLAUDE.md)
|
|
58
|
-
├── OWNERSHIP_INDEX.md # Generated: code path → owning feature doc
|
|
59
|
-
├── architecture/ # Cross-module design + the steering layer
|
|
60
|
-
│ │ # domain-model, glossary, non-goals, references, open-questions
|
|
61
|
-
│ └── adr/ # Architecture Decision Records (numbered, immutable)
|
|
62
|
-
├── features/ # Flat default — feature specs with ownership frontmatter
|
|
63
|
-
│ └── {feature}/ # Subfolder for deep features (e.g., editor/)
|
|
64
|
-
├── modules/ # Graduation (≥2 bounded contexts) — NOT scaffolded at baseline
|
|
65
|
-
│ └── {module}/ # CLAUDE.md + features/ + pillars/ (module-local doctrine, lazy)
|
|
66
|
-
├── boundaries/ # Typed application boundaries — generated by boundary-mapper
|
|
67
|
-
├── operations/ # Setup, development, deployment, CI/CD
|
|
68
|
-
├── history/ # Frozen/append-only records
|
|
69
|
-
│ ├── CHANGELOG.md # Master changelog index
|
|
70
|
-
│ ├── changelog/ # Individual changelog entries
|
|
71
|
-
│ ├── plans/ # Historical implementation plans (Status field required)
|
|
72
|
-
│ └── backlog.md # Tracked work items by priority (P0-P3)
|
|
73
|
-
├── memory/ # Agent memory files (index.md = baseline record)
|
|
74
|
-
└── tests/ # Test plans and automation docs (optional)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
There is **no repo-wide `docs/pillars/`** (dissolved in v9 — pillars are module-local). `docs/boundaries/` is populated by the `boundary-mapper` agent (which the bootstrap runs immediately after this baseline), and `docs/modules/` appears only when the repo graduates to ≥2 bounded contexts — neither is scaffolded here. `docs/tests/` is optional and **author-maintained**: no agent, skill, or script owns it — create it only if test-plan or test-automation docs already exist, and never scaffold it empty.
|
|
78
|
-
|
|
79
|
-
### Workflow
|
|
80
|
-
|
|
81
|
-
**Step 1: Inventory existing docs**
|
|
82
|
-
|
|
83
|
-
Glob all markdown files in the repo. Categorize each file:
|
|
84
|
-
|
|
85
|
-
| Category | Matches | Target |
|
|
86
|
-
|----------|---------|--------|
|
|
87
|
-
| Architecture | System design, patterns, config, API specs, tech decisions | `docs/architecture/` |
|
|
88
|
-
| Features | How a feature works, user-facing behavior, data models | `docs/features/` |
|
|
89
|
-
| Operations | Setup, dev workflow, deployment, CI/CD, runbooks | `docs/operations/` |
|
|
90
|
-
| Plans | Implementation plans, proposals, RFCs | `docs/history/plans/` |
|
|
91
|
-
| Changelogs | Change records, release notes | `docs/history/changelog/` |
|
|
92
|
-
| Backlogs/Tasks | Work items, TODOs, tech debt | Merge into `docs/history/backlog.md` |
|
|
93
|
-
| Stale/Deprecated | Self-marked deprecated, fully superseded, empty docs | Delete |
|
|
94
|
-
| Root docs | `README.md`, `CLAUDE.md`, `AGENTS.md` | Stay in root |
|
|
95
|
-
|
|
96
|
-
**Step 2: Detect duplicates and overlaps**
|
|
97
|
-
|
|
98
|
-
For each topic, identify all files covering it. Keep the most complete version as canonical. Extract unique content from others before deleting.
|
|
99
|
-
|
|
100
|
-
**Step 3: Present reorganization plan**
|
|
101
|
-
|
|
102
|
-
Present a table to the user:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
| File | Action | From | To | Reason |
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Actions: `Move`, `Merge into {target}`, `Delete`, `Keep`, `Create`
|
|
109
|
-
|
|
110
|
-
Ask: "Approve this plan? I'll execute all moves, merges, and deletions."
|
|
111
|
-
|
|
112
|
-
**Step 4: Execute reorganization**
|
|
113
|
-
|
|
114
|
-
After approval:
|
|
115
|
-
|
|
116
|
-
1. Create the full folder structure:
|
|
117
|
-
- `docs/architecture/`
|
|
118
|
-
- `docs/features/`
|
|
119
|
-
- `docs/operations/`
|
|
120
|
-
- `docs/history/plans/`
|
|
121
|
-
- `docs/history/changelog/`
|
|
122
|
-
- `docs/memory/`
|
|
123
|
-
- `docs/tests/` (if test docs exist)
|
|
124
|
-
2. Move files per the plan
|
|
125
|
-
3. Merge content where specified (extract unique content, append to target)
|
|
126
|
-
4. Delete stale/superseded files
|
|
127
|
-
5. Add `Status: Complete | In Progress | Draft | Abandoned` to all plan files
|
|
128
|
-
6. Add YAML frontmatter to feature docs (see Frontmatter Derivation below)
|
|
129
|
-
7. Merge scattered backlog/task files into `docs/history/backlog.md`
|
|
130
|
-
8. Scaffold standard files if missing:
|
|
131
|
-
- `docs/README.md` — from template (see `references/templates.md`)
|
|
132
|
-
- `docs/structure.md` — from template (see `references/templates.md`)
|
|
133
|
-
- `docs/history/CHANGELOG.md` — master changelog index (header + table linking to entries)
|
|
134
|
-
- `docs/history/backlog.md` — work items by priority (P0-P3 sections, empty if nothing to merge)
|
|
135
|
-
- `docs/memory/index.md` — agent memory index (empty scaffold with section headers)
|
|
136
|
-
- `docs/memory/main.md` — main agent project memory (empty header + date marker)
|
|
137
|
-
- `docs/OWNERSHIP_INDEX.md` — generated table of feature doc ownership. Build it now from the frontmatter you derived in Step 6 (same shape the maintenance agent regenerates each run — see `references/templates.md`)
|
|
138
|
-
- `README.md` (repo root) — from §11 in `references/templates.md`, filled with concrete details from the repo (real package manager from the lockfile, real scripts, real layout). **Never overwrite an existing root README** — if one is present, leave it untouched.
|
|
139
|
-
9. Fix all internal links broken by moves
|
|
140
|
-
10. Record baseline in `docs/memory/index.md` with today's date (see template)
|
|
141
|
-
|
|
142
|
-
**Step 5: Verify**
|
|
143
|
-
|
|
144
|
-
1. Confirm all standard files exist: `docs/README.md`, `docs/structure.md`, `docs/history/CHANGELOG.md`, `docs/history/backlog.md`, `docs/memory/index.md`, `docs/memory/main.md`, `docs/OWNERSHIP_INDEX.md`, `README.md` (repo root — must exist; either pre-existing untouched or freshly scaffolded). `docs/boundaries/` is the `boundary-mapper` agent's responsibility (the bootstrap runs it right after this baseline), not a scaffold target here.
|
|
145
|
-
2. Confirm no dead links in `docs/README.md`
|
|
146
|
-
3. Confirm every plan file has a `Status:` field
|
|
147
|
-
4. Confirm feature docs have ownership frontmatter
|
|
148
|
-
5. Confirm `docs/OWNERSHIP_INDEX.md` rows match the frontmatter on disk (no orphans, no missing entries)
|
|
149
|
-
6. Confirm no docs remain outside the v9 structure (except the docs-root files `README.md`, `structure.md`, `routing.md`, `OWNERSHIP_INDEX.md`)
|
|
150
|
-
7. Confirm duplicates are eliminated — each topic has one canonical source
|
|
151
|
-
|
|
152
|
-
### Rules
|
|
153
|
-
|
|
154
|
-
- The v9 structure is mandatory. No `docs/guides/`, `docs/core/`, `docs/editor/`, `docs/pt/`, no repo-wide `docs/pillars/` (dissolved in v9 — pillars are module-local under `docs/modules/{m}/pillars/`), or any other top-level folder beyond the v9 set
|
|
155
|
-
- Guides about how-to-run → `operations/`. Guides about a feature → `features/`
|
|
156
|
-
- A genuine bounded context graduates to `docs/modules/{m}/` (owning `features/` + `pillars/`); ungraduated feature docs stay flat under `docs/features/` (deep features may nest, e.g. `docs/features/editor/`)
|
|
157
|
-
- Only `CLAUDE.md`, `AGENTS.md`, and `README.md` are allowed in the repository root (not inside `docs/`)
|
|
158
|
-
- Root-level `README.md` is for humans. `docs/README.md` is the agent/doc entry point
|
|
159
|
-
- One canonical source per topic — link, don't copy
|
|
160
|
-
- **No redirect docs** — when moving a file, delete the original and fix all references. Never leave a "Moved to X" stub.
|
|
161
|
-
- For 10+ files, use parallel sub-agents (5-8 files each)
|
|
162
|
-
|
|
163
|
-
### Naming & Lifecycle
|
|
49
|
+
## Naming & Lifecycle
|
|
164
50
|
|
|
165
51
|
- Features: `kebab-case.md` — living reference, status `Active`
|
|
166
52
|
- Plans: `YYYY-MM-DD-kebab-case.md` — frozen after `Complete` or `Abandoned`
|
|
@@ -76,9 +76,14 @@ See [CLAUDE.md](../CLAUDE.md) for documentation guidelines.
|
|
|
76
76
|
Use for: defining which folder owns which topic and how docs are maintained.
|
|
77
77
|
|
|
78
78
|
```
|
|
79
|
+
---
|
|
80
|
+
harness-version: 10
|
|
81
|
+
---
|
|
82
|
+
|
|
79
83
|
# Documentation Structure
|
|
80
84
|
|
|
81
85
|
> This file is the entry point for understanding the docs folder.
|
|
86
|
+
> `harness-version` above is the repo's single baseline/version sentinel — the `harness-manager` agent owns it and stamps the installed design epoch on every reconcile.
|
|
82
87
|
|
|
83
88
|
## Authority Map
|
|
84
89
|
|
|
@@ -89,7 +94,7 @@ Each topic has one canonical location. Read from here, not from plans or changel
|
|
|
89
94
|
| System architecture + steering | `docs/architecture/` | domain-model, glossary, non-goals, references, adr/ |
|
|
90
95
|
| Feature behavior | `docs/features/` (or `docs/modules/{m}/features/`) | {key files} |
|
|
91
96
|
| Cross-module contracts | `docs/boundaries/` | one file per boundary (maintained by `boundary-mapper`) |
|
|
92
|
-
|
|
|
97
|
+
| Declared modules (bounded contexts) | `docs/modules/{m}/` | `features/` + `pillars/` |
|
|
93
98
|
| Setup & development | `docs/operations/` | {key files} |
|
|
94
99
|
| Historical plans | `docs/history/plans/` | YYYY-MM-DD-name.md |
|
|
95
100
|
| Change records | `docs/history/changelog/` | Individual entries |
|
|
@@ -108,7 +113,7 @@ Plan (Status: Draft) → Implementation → Feature Doc or Architecture Update
|
|
|
108
113
|
- `docs/features/`: Living reference for implemented features. Each spec includes YAML frontmatter with `owns`, `touches`, `depends_on` fields declaring code ownership.
|
|
109
114
|
- `docs/architecture/`: System-wide patterns and the cross-module steering layer (domain model, glossary, non-goals, references, ADRs). Update when cross-cutting concerns change.
|
|
110
115
|
- `docs/boundaries/`: Horizontal typed application boundaries — one file per cross-module contract. Generated/maintained by the `boundary-mapper` agent; read before touching a shape it defines.
|
|
111
|
-
- `docs/modules/{m}/`: Vertical bounded contexts (
|
|
116
|
+
- `docs/modules/{m}/`: Vertical bounded contexts, **declared** (not inferred from layout) and tied to code by their `owns` globs. Each owns `features/` + module-local `pillars/` (doctrine, lazy). There is no repo-wide `docs/pillars/`. Worth declaring at ≥2 genuine bounded contexts; a single-context app stays flat under `docs/features/`.
|
|
112
117
|
- `docs/operations/`: How-to procedures for setup, development, and deployment. Update when workflows change.
|
|
113
118
|
- `docs/history/plans/`: Historical. Must have `Status:` field. Never modify after completion.
|
|
114
119
|
- `docs/history/changelog/`: Historical. Append-only.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kb-agi
|
|
3
3
|
description: Self-improving knowledge-base harness — a CLAUDE.md router (interview → ask/contribute) over a flat Obsidian note-vault, with single-intent upkeep agents that keep the vault trustworthy and grow it from its own query logs.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
keywords:
|
|
6
6
|
- harness
|
|
7
7
|
- knowledge-base
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nurix/etna",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Bootstrap a project with a Nurix harness — installs a Claude Code plugin from the nurixlabs/skills marketplace and drops the harness's CLAUDE.md at the project root.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|