@nurix/etna 0.15.2 → 0.15.4

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 (45) hide show
  1. package/README.md +16 -13
  2. package/bin/etna.js +8 -20
  3. package/data/harness-index.json +3 -1
  4. package/data/harnesses/code/CLAUDE.md +3 -17
  5. package/data/harnesses/code/agents/brainstorm.md +0 -1
  6. package/data/harnesses/code/agents/change-review.md +0 -1
  7. package/data/harnesses/code/agents/harness-manager.md +2 -3
  8. package/data/harnesses/code/agents/maintenance.md +0 -1
  9. package/data/harnesses/code/agents/performance-review.md +0 -1
  10. package/data/harnesses/code/agents/spec-mode.md +1 -2
  11. package/data/harnesses/code/harness.json +2 -2
  12. package/data/harnesses/code/rules/general.md +0 -1
  13. package/data/harnesses/code/rules/nomenclature.md +0 -1
  14. package/data/harnesses/code/skills/boundary/SKILL.md +0 -1
  15. package/data/harnesses/code/skills/brainstorm/SKILL.md +0 -1
  16. package/data/harnesses/code/skills/distiller/SKILL.md +0 -1
  17. package/data/harnesses/code/skills/documentation/SKILL.md +0 -1
  18. package/data/harnesses/code/skills/workflow-mapper/SKILL.md +0 -1
  19. package/data/harnesses/kb-agi/CLAUDE.md +0 -15
  20. package/data/harnesses/kb-agi/agents/kb-agi-init.md +0 -1
  21. package/data/harnesses/kb-agi/agents/kb-catch-stale.md +0 -1
  22. package/data/harnesses/kb-agi/agents/kb-find-gaps.md +0 -1
  23. package/data/harnesses/kb-agi/agents/kb-fix-links.md +0 -1
  24. package/data/harnesses/kb-agi/agents/kb-refresh-frontdoor.md +0 -1
  25. package/data/harnesses/kb-agi/agents/kb-refresh-summaries.md +0 -1
  26. package/data/harnesses/kb-agi/agents/kb-sync-metadata.md +0 -1
  27. package/data/harnesses/kb-agi/harness.json +2 -2
  28. package/data/harnesses/kb-agi/rules/kb.md +0 -4
  29. package/data/harnesses/re/CLAUDE.md +139 -0
  30. package/data/harnesses/re/agents/api.md +52 -0
  31. package/data/harnesses/re/agents/codebase.md +63 -0
  32. package/data/harnesses/re/agents/community.md +47 -0
  33. package/data/harnesses/re/agents/deployed-client-bundle.md +94 -0
  34. package/data/harnesses/re/agents/distribution-artifacts.md +97 -0
  35. package/data/harnesses/re/agents/docs.md +49 -0
  36. package/data/harnesses/re/agents/infra-backend-fingerprint.md +97 -0
  37. package/data/harnesses/re/agents/packages.md +48 -0
  38. package/data/harnesses/re/agents/session.md +57 -0
  39. package/data/harnesses/re/agents/website.md +50 -0
  40. package/data/harnesses/re/agents/wire-capture.md +93 -0
  41. package/data/harnesses/re/harness.json +6 -0
  42. package/data/harnesses/re/rules/re-discovery.md +266 -0
  43. package/data/harnesses/re/rules/re-evaluation.md +100 -0
  44. package/data/harnesses/re/rules/re-ingestion.md +266 -0
  45. package/package.json +2 -2
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @nurix/etna
2
2
 
3
- CLI to bootstrap a project with a Nurix harness. Copies the harness's `CLAUDE.md`, skills, agents, rules, and scripts into the project so they live with the code — version-controllable, editable per project, and visible without leaving the repo.
3
+ CLI to bootstrap a project with a Nurix harness. Copies the harness's `CLAUDE.md`, skills, agents, rules, and hooks (plus scripts, if the harness ships any) into the project so they live with the code — version-controllable, editable per project, and visible without leaving the repo.
4
4
 
5
- A second install path also exists and is fully supported: `/plugin install <plugin>@nurixlabs` from inside Claude Code, which installs the harness as a plugin from the `nurixlabs/skills` marketplace. The two paths are first-class equals — pick the one that matches how you want to manage the harness. See [`docs/architecture/harness-install-model.md`](../../docs/architecture/harness-install-model.md) for the comparison.
5
+ A second install path also exists and is fully supported: `/plugin install <plugin>@nurixlabs` from inside Claude Code, which installs the harness as a plugin from the `nurixlabs/skills` marketplace. The two paths are first-class equals — pick the one that matches how you want to manage the harness. See [`docs/architecture/harness/install-model.md`](../../docs/architecture/harness/install-model.md) for the comparison.
6
6
 
7
7
  ## Usage
8
8
 
@@ -61,28 +61,31 @@ Listed by `npx @nurix/etna` (no args) using the bundled `data/harness-index.json
61
61
 
62
62
  | Plugin name | Source in etna | What it ships |
63
63
  |---|---|---|
64
- | `code` | [`plugins/code.md`](../../plugins/code.md) → top-level catalogs | Governance agents, baseline workflow skills, ownership/drift scripts |
65
- | `kb-agi` | [`plugins/kb-agi.md`](../../plugins/kb-agi.md) → top-level catalogs | Knowledge-vault scaffolding |
64
+ | `code` | [`plugins/code/`](../../plugins/code/) | Governance + session agents, baseline workflow skills, knowledge-ledger hooks |
65
+ | `kb-agi` | [`plugins/kb-agi/`](../../plugins/kb-agi/) | Knowledge-vault scaffolding |
66
66
 
67
67
  ## How it works
68
68
 
69
- Each harness has a folder under `etna/harness/<name>/` with:
70
- - `CLAUDE.md` — the project-root policy file
71
- - `index.md` — symlinked to `../../plugins/<plugin>.md` (the manifest)
69
+ Each harness has two halves in the etna repo:
70
+ - `plugins/<name>/` — the **plugin** (what a Claude Code plugin natively bundles): `definition.md` (manifest — identity + `skills:`/`rules:` lists), `agents/`, `hooks/`.
71
+ - `harness/<name>/` — the **policy**: `CLAUDE.md` (pure policy, no frontmatter — installed as a verbatim copy) plus `index.md`, whose `plugin:` key names the plugin this harness pairs with. All harness-folder frontmatter lives in `index.md` alone.
72
72
 
73
- The plugin manifest's YAML frontmatter declares which top-level `agents/`, `skills/`, `rules/`, and `scripts/` belong to that plugin:
73
+ Two kinds of membership:
74
+
75
+ - **Shared, listed** — skills and rules live in the flat top-level `skills/`/`rules/` catalogs, reusable across plugins. The manifest names the ones it pulls in:
74
76
 
75
77
  ```yaml
78
+ # plugins/code/definition.md
76
79
  ---
77
80
  name: code
78
- skills: [documentation, introspect, workflow-mapper]
79
- agents: [spec-mode, maintenance, contract-monitor, …]
80
- scripts: [build-ownership-index, check-doc-drift]
81
- rules: [general, nomenclature]
81
+ skills: [boundary, brainstorm, distiller, documentation, workflow-mapper]
82
+ rules: [general, nomenclature]
82
83
  ---
83
84
  ```
84
85
 
85
- `scripts/build-data.js` (run by `prepack`) resolves each manifest against the catalogs and bundles the result into `data/harnesses/<folder>/`. The installer (`bin/etna.js`) reads from that bundle at install time. No GitHub fetch at runtime — the published npm package contains everything.
86
+ - **Owned, by location** — agents and hooks live inside the plugin (`plugins/<name>/{agents,hooks}/`). No list — membership is presence in the folder, exactly how a Claude Code plugin ships them.
87
+
88
+ `scripts/build-data.js` (run by `prepack`) resolves the listed skills/rules from the catalogs and copies the plugin's `agents/` + `hooks/` wholesale into `data/harnesses/<folder>/`; a listed skill/rule that doesn't exist is a hard error. The marketplace channel (`.github/scripts/publish.mjs`) reads the same plugin folder, so both channels resolve identical membership — and both ship the plugin's hooks. The installer (`bin/etna.js`) reads from the bundle at install time; no GitHub fetch at runtime.
86
89
 
87
90
  ## Building / contributing
88
91
 
package/bin/etna.js CHANGED
@@ -70,18 +70,6 @@ function backupIfExists(path) {
70
70
  return backup;
71
71
  }
72
72
 
73
- // Split a CLAUDE.md into its YAML frontmatter (authoring metadata: name, version,
74
- // plugin, keywords) and its body. The frontmatter is meaningful in the harness
75
- // source and the bundle, but a consuming project's root CLAUDE.md is a plain
76
- // router — it must not carry it. Returns { body, version } with leading blank
77
- // lines after the stripped block removed so the body opens on its first heading.
78
- function stripFrontmatter(text) {
79
- const m = text.match(/^---\n([\s\S]*?)\n---\n?/);
80
- if (!m) return { body: text, version: null };
81
- const version = (m[1].match(/^version:\s*(\S+)/m) || [])[1] || null;
82
- return { body: text.slice(m[0].length).replace(/^\n+/, ''), version };
83
- }
84
-
85
73
  function readJson(path) {
86
74
  if (!existsSync(path)) return {};
87
75
  try {
@@ -203,11 +191,10 @@ async function main(args) {
203
191
  const claudeBackup = backupIfExists(claudeMdDest);
204
192
  if (claudeBackup) console.log(` backed up existing CLAUDE.md → ${claudeBackup}`);
205
193
 
206
- const { body: claudeMdBody, version } = stripFrontmatter(readFileSync(bundledClaudeMd, 'utf8'));
207
- writeFileSync(claudeMdDest, claudeMdBody);
208
- console.log(
209
- ` installed CLAUDE.md → ${claudeMdDest}${version ? ` (harness v${version})` : ''}`,
210
- );
194
+ // CLAUDE.md ships frontmatter-free (the harness's metadata lives in its index.md and the
195
+ // plugin's definition.md), so it installs as a verbatim copy — no stripping.
196
+ cpSync(bundledClaudeMd, claudeMdDest, { force: true });
197
+ console.log(` installed CLAUDE.md → ${claudeMdDest}`);
211
198
 
212
199
  for (const sub of PLUGIN_SUBDIRS) {
213
200
  const count = copyHarnessSubdir(
@@ -224,9 +211,10 @@ async function main(args) {
224
211
  mkdirSync(dirname(harnessJsonDest), { recursive: true });
225
212
  cpSync(bundledHarnessJson, harnessJsonDest, { force: true });
226
213
  const meta = readJson(harnessJsonDest);
227
- console.log(
228
- ` installed harness.json → ${harnessJsonDest}${meta.epoch ? ` (epoch ${meta.epoch})` : ''}`,
229
- );
214
+ const tag = [meta.version && `v${meta.version}`, meta.epoch && `epoch ${meta.epoch}`]
215
+ .filter(Boolean)
216
+ .join(', ');
217
+ console.log(` installed harness.json → ${harnessJsonDest}${tag ? ` (${tag})` : ''}`);
230
218
  }
231
219
 
232
220
  // Merge the bundle's hooks.json into the project's settings.json (idempotent).
@@ -1,6 +1,8 @@
1
1
  {
2
+ "fingerprint": "be67d356d0f6",
2
3
  "plugins": {
3
4
  "code": "code",
4
- "kb-agi": "kb-agi"
5
+ "kb-agi": "kb-agi",
6
+ "re": "re"
5
7
  }
6
8
  }
@@ -1,17 +1,3 @@
1
- ---
2
- name: code
3
- description: Canonical Nurix code-project harness (spec v12) — three peer authoring modes (Brainstorming / Spec / Plan), modules as bounded contexts, typed application boundaries via the unified `boundary` skill, a self-migrating harness-manager, ownership rules. The reference CLAUDE.md every Nurix codebase starts with.
4
- version: 0.15.2
5
- keywords:
6
- - harness
7
- - code
8
- - workflow
9
- - documentation
10
- - boundaries
11
- - nurix
12
- plugin: code
13
- ---
14
-
15
1
  # Agent Instructions
16
2
 
17
3
  This file defines how AI agents (Claude, GPT, etc.) should work on this project. **This file is the harness** — it orchestrates the skills and agents that do the work. There is no separate "harness skill."
@@ -34,7 +20,7 @@ This is the only step that runs **before** the harness exists; everything below
34
20
 
35
21
  ## Getting Started
36
22
 
37
- - Read **[`docs/README.md`](docs/README.md)** for documentation root (architecture, features, operations)
23
+ - Read **[`docs/structure.md`](docs/structure.md)** for the documentation map and folder authority (architecture, features, operations)
38
24
  - Read **[`docs/memory/`](docs/memory/)** for agent memory files (one per agent)
39
25
  - Ignore **[`README.md`](README.md)** – it's for human reference only
40
26
  - Check **[`package.json`](package.json)** for available scripts. Detect the package manager from the lockfile (`pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, `package-lock.json` → npm) and use the matching command. Don't hardcode a specific manager.
@@ -148,9 +134,9 @@ Unless explicitly requested:
148
134
 
149
135
  ## Documentation
150
136
 
151
- `docs/structure.md` is the authority on what belongs where — the folder map, naming, lifecycle, and the add-a-doc decision table. Read it before adding or moving a doc; don't restate it here. Start from `docs/README.md`. One canonical source per topic — link, don't copy. Only `CLAUDE.md`, `AGENTS.md`, and `README.md` live at the repo root.
137
+ `docs/structure.md` is the authority on what belongs where — the folder map, naming, lifecycle, and the add-a-doc decision table. Read it before adding or moving a doc; don't restate it here. One canonical source per topic — link, don't copy. Only `CLAUDE.md`, `AGENTS.md`, and `README.md` live at the repo root.
152
138
 
153
139
  Maintenance triggers (act on these without re-reading `structure.md`):
154
140
 
155
141
  - 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.
156
- - 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`.
142
+ - When you add, move, or delete a doc: update `docs/routing.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`.
@@ -3,7 +3,6 @@ name: brainstorm
3
3
  description: Brainstorming-mode facilitator — a thin orchestrator over the self-contained `brainstorm` skill, which owns every session mechanic (the constant distill→abstract→sync→record loop, the four modes, the basis entry gate, the background sync reconciler, the complexity-scaled pillar surface, harvest). Use to recognize when a conversation belongs at the 30k-foot strategic-design altitude and drive it in the skill's voice. Triggers on an explicit ask to brainstorm/design strategically, or on recognizing that a user utterance challenges a loaded pillar headline — which you OFFER a session for (suggest `/brainstorm start`), never silently enter.
4
4
  tools: Read, Glob, Grep, AskUserQuestion, Write
5
5
  model: inherit
6
- plugins: [code]
7
6
  ---
8
7
 
9
8
  # Brainstorm Agent
@@ -3,7 +3,6 @@ name: change-review
3
3
  description: Velocity + change-risk analysis. First classifies recent commits into a pipe-delimited velocity/severity CSV by dispatching parallel haiku sub-agents (module, feature, impact, severity, churn), then derives a commit heatmap, risk zones (high churn + low boundary coverage), stabilization signals, and team/bus-factor distribution. Self-contained — produces its own CSV, no separate git-history step. Use when planning where to invest in better boundaries or rules.
4
4
  tools: Bash, Read, Write, Glob, Grep, Task
5
5
  model: inherit
6
- plugins: [code]
7
6
  ---
8
7
 
9
8
  # Change-Review Agent
@@ -3,7 +3,6 @@ name: harness-manager
3
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
4
  tools: Read, Glob, Grep, Bash, Write, Edit
5
5
  model: inherit
6
- plugins: [code]
7
6
  ---
8
7
 
9
8
  # Harness-Manager Agent
@@ -105,7 +104,7 @@ Table: `| File | Action | From | To | Reason |` (actions: `Move`, `Merge into {t
105
104
 
106
105
  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:
107
106
 
108
- - `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/memory/facts/.digest-state.md` (placeholder, "no entries digested yet"), and the repo-root `README.md` (filled from the real lockfile/scripts/layout — **never overwrite an existing root README**).
107
+ - `docs/structure.md` (with `harness-version`), `docs/history/CHANGELOG.md`, `docs/history/backlog.md`, `docs/memory/index.md`, `docs/memory/main.md`, `docs/memory/facts/.digest-state.md` (placeholder, "no entries digested yet"), and the repo-root `README.md` (filled from the real lockfile/scripts/layout — **never overwrite an existing root README**).
109
108
 
110
109
  Scaffold `docs/memory/facts/` so the distilled tier has a home from day one: hooks write the raw ledger to `docs/memory/ledger/` (not a scaffold — created mechanically on first event), and the `distiller` digests it down into fact-cards under `docs/memory/facts/`. Without the facts dir + its `.digest-state.md` high-water mark, a freshly-baselined consumer accrues a ledger firehose the distiller has nowhere to land — so seed the empty distilled tier alongside the hook-written ledger tier.
111
110
 
@@ -161,7 +160,7 @@ If the user **declines** the advisory rather than running the follow-up, record
161
160
 
162
161
  ### Step 7 — Verify
163
162
 
164
- 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; no dissolved-version artifacts remain; no docs outside the canonical structure.
163
+ Confirm all mandated files exist; `structure.md` carries the current `harness-version`; no dead links in `docs/structure.md`; every plan has a `Status:`; feature docs have ownership frontmatter; no dissolved-version artifacts remain; no docs outside the canonical structure.
165
164
 
166
165
  ---
167
166
 
@@ -3,7 +3,6 @@ name: maintenance
3
3
  description: Docs-vs-code coherence audit. Detects and fixes docs drifting from code — stale docs, broken ownership, routing table drift, unowned source paths. Run weekly or after major changes. Contract violations (code drifting from docs) are handled by the `boundary` skill (`init` mode); pre-implementation impact checks by its `check` mode.
4
4
  tools: Read, Glob, Grep, Edit, Write, Bash
5
5
  model: inherit
6
- plugins: [code]
7
6
  ---
8
7
 
9
8
  # Maintenance Agent
@@ -3,7 +3,6 @@ name: performance-review
3
3
  description: Combined dependency + code health audit. Part A audits the dependency supply chain — security CVEs, outdated packages, license compliance, abandoned packages, unwanted transitive dependencies, install size. Part B audits code-level health — bundle size, tree-shaking issues, performance anti-patterns, code-quality flags. Run weekly or before releases. Merges the former `dep-health` and `review` agents so the package tree and the code that uses it are audited together.
4
4
  tools: Read, Glob, Grep, Bash
5
5
  model: inherit
6
- plugins: [code]
7
6
  ---
8
7
 
9
8
  # Performance-Review Agent
@@ -5,7 +5,6 @@ tools: Read, Glob, Grep, WebSearch, WebFetch
5
5
  model: inherit
6
6
  skills:
7
7
  - documentation
8
- plugins: [code]
9
8
  ---
10
9
 
11
10
  # Spec Mode Agent
@@ -18,7 +17,7 @@ You do NOT write the spec — you return structured research that the main agent
18
17
 
19
18
  First, understand the documentation landscape:
20
19
 
21
- 1. Read `./docs/README.md` to understand the documentation structure
20
+ 1. Read `./docs/structure.md` to understand the documentation structure
22
21
  2. If `./docs/features/README.md` exists, read it to see existing feature specs and where the new spec fits; otherwise glob the feature docs directly
23
22
  3. If `./docs/memory/spec-mode.md` exists, read it for feature doc inventory, ownership conflict zones, and lessons from previous research
24
23
  4. Read 1-2 existing specs in `./docs/features/` to calibrate format and depth
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "epoch": 12,
5
- "digest": "911060693b53"
5
+ "digest": "8bd2f1540f40"
6
6
  }
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  applyTo: "**"
3
- plugins: [code]
4
3
  ---
5
4
 
6
5
  # Technology Choices & Standards
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  applyTo: "**"
3
- plugins: [code]
4
3
  ---
5
4
 
6
5
  # Nomenclature Guidelines
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: boundary
3
3
  description: The single home for a repo's typed application boundaries — the cross-cutting contracts (db-schema, wire envelope, store shape, auth, tenancy, event schemas, edge bindings, …) where editing one module silently breaks another. One skill, four modes — `generate` (baseline all boundaries from the detected stack + IA), `create` (add/update one boundary), `check` (pre-implementation: does this plan touch a boundary? severity-ranked impact), `init` (reconcile: ensure files exist, scan live code for violations + drift, backfill new catalog types). All four read one shared knowledge root, `references/boundary-taxonomy.md`, so they can never drift apart. Triggers on "application boundary", "baseline boundaries", "map boundaries", "generate boundaries", "create a boundary", "introspect", "check this plan", "impact analysis", "what could break", "scan for boundary violations", "boundary drift", "/boundary".
4
- plugins: [code]
5
4
  ---
6
5
 
7
6
  # Application Boundary Skill
@@ -2,7 +2,6 @@
2
2
  name: brainstorm
3
3
  description: Thinking-partner session for designing software. Invoked ONLY by explicit slash commands `/brainstorm start` and `/brainstorm stop` — never auto-invoke on natural-language phrases like "let's plan", "let's design", or "let's think through X". Entry requires a basis (a reference document or a one-shot brain dump); drip-fed action items are rejected as too small. Runs one constant loop (distill → abstract → sync → record) across four modes (dump / interview / probe / converge). Coherence = zero open questions after a fresh pillar sync. Pillar count scales with a complexity dial; refuses production code outside the session folder while open.
4
4
  argument-hint: "start | stop"
5
- plugins: [code]
6
5
  ---
7
6
 
8
7
  # Brainstorm
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: distiller
3
3
  description: The one place the raw event ledger is distilled into colder, higher-signal knowledge. One skill, two modes — `facts` (ledger → atomic provenance-linked fact-cards in `docs/memory/facts/`) and `docs` (fact-cards → proposed, human-approved doc deltas). Both modes read one shared algorithm spec, `references/method.md` (surprisal filter, EDU fact-cards, reconciliation, bi-temporal supersession — all stolen, all cited), so they can never drift apart. NEVER edits the ledger (append-only audit substrate); NEVER auto-runs (invoked by the user, or by accepting the maintenance agent's threshold proposal). Triggers on "distill the ledger", "distill facts", "run the distiller", "distill into fact-cards", "facts from the ledger", "distill docs", "draft doc deltas", "distiller docs", "/distiller".
4
- plugins: [code]
5
4
  ---
6
5
 
7
6
  # Distiller Skill
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: documentation
3
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` skill), (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) 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
- plugins: [code]
5
4
  ---
6
5
 
7
6
  # Technical Documentation Skill
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: workflow-mapper
3
3
  description: Discover and document all major workflows in a codebase by tracing call chains from user action to database/external system. Produces mermaid sequence diagrams and markdown documentation. Use when the user asks to map workflows, trace flows, document sequences, understand how features work end-to-end, or generate architecture diagrams. Triggers on "map workflows", "trace workflows", "workflow diagram", "sequence diagram", "how does X work end-to-end", "document flows", "codebase workflows", "how does this feature work", "trace the request flow", "show me the call chain", "what happens when a user does X", "end-to-end flow".
4
- plugins: [code]
5
4
  ---
6
5
 
7
6
  # Workflow Mapper Skill
@@ -1,18 +1,3 @@
1
- ---
2
- name: kb-agi
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.10.0
5
- keywords:
6
- - harness
7
- - knowledge-base
8
- - obsidian
9
- - vault
10
- - self-improving
11
- - kb
12
- - nurix
13
- plugin: kb-agi
14
- ---
15
-
16
1
  # NuStack Knowledge Hub — router
17
2
 
18
3
  This repo is a flat Obsidian vault that you read on the user's behalf. It's the bridge from the front (positioning, claims) to the back (product and service specs); detailed execution lives downstream in the service repos.
@@ -3,7 +3,6 @@ name: kb-agi-init
3
3
  description: Initializes a kb-agi vault by scaffolding the meta/ control plane — the contract (guidance.md), the seed genre templates, the intent-index, and the sessions/ folder — from templates carried inline in this agent. Use on a fresh vault, or when the router reports that meta/guidance.md is missing. Triggers on "initialize kb-agi", "init the vault", "scaffold meta", "set up the control plane".
4
4
  tools: Read, Glob, Bash, Write
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-agi-init** agent. One job: stand up the `meta/` control plane a kb-agi vault needs to operate, then get out of the way. You run once per vault, and you are fully self-contained — every file you create is carried inline below, so you need no external templates.
@@ -3,7 +3,6 @@ name: kb-catch-stale
3
3
  description: Finds notes that have drifted out of date — a canonical note superseded by a newer one but never demoted, or a summary whose linked-down sources changed after it. Use to audit freshness. Reports by default; demotes/flags only when explicitly asked.
4
4
  tools: Read, Grep, Glob, Bash
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-catch-stale** goal-agent for the NuStack knowledge hub. One job: surface notes that have drifted out of date.
@@ -3,7 +3,6 @@ name: kb-find-gaps
3
3
  description: Audits the NuStack vault for missing notes — diffs each folder's metadata.md and the session gap-logs against the note graph to find coverage holes. Use when asked to find gaps, check coverage, or "what's missing". Proposes a ranked gap list by default; writes notes ONLY when the invocation explicitly asks it to.
4
4
  tools: Read, Grep, Glob, Bash
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-find-gaps** goal-agent for the NuStack knowledge hub. You have exactly one job: find what the vault should hold but doesn't, and surface it.
@@ -3,7 +3,6 @@ name: kb-fix-links
3
3
  description: Audits the note graph for dead wikilinks (targets that don't resolve) and orphan notes (no inbound links). Use to check graph integrity. Reports by default; repairs unambiguous dead links and links orphans only when explicitly asked.
4
4
  tools: Read, Grep, Glob
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-fix-links** goal-agent for the NuStack knowledge hub. One job: keep the note graph sound — no dead links, no orphans.
@@ -3,7 +3,6 @@ name: kb-refresh-frontdoor
3
3
  description: Keeps the entry points current — checks meta/intent-index.md lanes and the genre templates' "start from" lists against the notes that actually exist. Use after content lands. Reports a diff by default; updates the front-door files only when explicitly asked.
4
4
  tools: Read, Grep, Glob, Edit
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-refresh-frontdoor** goal-agent for the NuStack knowledge hub. One job: keep the entry points pointing at the right notes.
@@ -3,7 +3,6 @@ name: kb-refresh-summaries
3
3
  description: Finds synthesized/published notes that have fallen behind the raw sources they link down to, and (on request) folds the new material in. Use after raw captures or a migration batch land. Reports by default; writes the refresh only when explicitly asked.
4
4
  tools: Read, Grep, Glob, Bash, Edit
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-refresh-summaries** goal-agent for the NuStack knowledge hub. One job: keep summary notes current with the raw material beneath them.
@@ -3,7 +3,6 @@ name: kb-sync-metadata
3
3
  description: Keeps each content folder's metadata.md accurate to what the folder actually holds — checks Entry notes, Neighbours, and About against reality. Use before kb-find-gaps so it reads honest descriptions. Reports drift by default; updates metadata.md only when explicitly asked.
4
4
  tools: Read, Grep, Glob, Edit
5
5
  model: inherit
6
- plugins: [kb-agi]
7
6
  ---
8
7
 
9
8
  You are the **kb-sync-metadata** goal-agent for the NuStack knowledge hub. One job: keep folder `metadata.md` files honest.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kb-agi",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "epoch": null,
5
- "digest": "8973cf3a762d"
5
+ "digest": "856a9f4e297a"
6
6
  }
@@ -1,7 +1,3 @@
1
- ---
2
- plugins: [kb-agi]
3
- ---
4
-
5
1
  # kb.md — Patterns for Obsidian-like Folders
6
2
 
7
3
  Conventions for any folder that is majority markdown — `docs/`, `research/`, an Obsidian vault, or any knowledge base. Rules grow over time; append new ones below.
@@ -0,0 +1,139 @@
1
+ # Product Reverse-Engineering — Orchestrator
2
+
3
+ This is the **policy** half of the `re` harness. The plugin ships the capabilities (11
4
+ dimension-dumper agents + 3 `re-*` rules, one per pipeline phase); this file drives them. Together they reverse-engineer a
5
+ product across every surface it exposes and dump a structured, provenance-tracked corpus into
6
+ `research/<target>/`.
7
+
8
+ A run is four modes, in order: **Discovery → Ingestion → Evaluation → Self-correction.** The main
9
+ session drives all four — Ingestion and Evaluation fan out parallel sub-agents, and a sub-agent
10
+ cannot spawn further sub-agents.
11
+
12
+ ---
13
+
14
+ ## Access is a capability vector (the front gate)
15
+
16
+ A target's access is four orthogonal axes, each `{value, confidence, evidence}` — and the vector
17
+ decides which dimensions are reachable and which extraction method each uses:
18
+
19
+ | Axis | Values | Unlocks | Case |
20
+ |------|--------|---------|------|
21
+ | **source** | full · partial · none | codebase, packages | open-source repo |
22
+ | **runtime** | reachable · gated · none | deployed-client-bundle, api, infra-backend-fingerprint, wire-capture | deployed, no source |
23
+ | **auth** | have-login · none | session | logged-in SaaS |
24
+ | **presence** | rich · thin · none | docs, website, community | — |
25
+
26
+ Targets light several axes at once. The full model + grade→method mapping is in
27
+ `.claude/rules/re-discovery.md`.
28
+
29
+ ---
30
+
31
+ ## The eleven dimensions → agents
32
+
33
+ | Dimension / agent | | Dimension / agent |
34
+ |---|--|---|
35
+ | `codebase` | | `session` ⚠ |
36
+ | `docs` | | `deployed-client-bundle` |
37
+ | `packages` | | `infra-backend-fingerprint` |
38
+ | `api` (+MCP) | | `wire-capture` ⚠ |
39
+ | `website` | | `distribution-artifacts` |
40
+ | `community` | | |
41
+
42
+ Agent name = dimension name. ⚠ = gated (needs user authorization before dispatch). The catalog —
43
+ detection signals + strategy + per-dimension artifacts — is in `.claude/rules/re-discovery.md`.
44
+
45
+ ---
46
+
47
+ ## Mode 1 — Discovery
48
+
49
+ Cheap, read-only. Scope the target, grade its access, detect which dimensions it exposes.
50
+
51
+ 1. **Scope-feasibility gate** — run the `.claude/rules/re-discovery.md` Part A (scope gate) algorithm: resolve
52
+ identity → ambiguity → ethics → suite-size → primitive → reachability. If the verdict isn't
53
+ `accept`, **halt** (present the narrowing/redirect prompt, or refuse). Write
54
+ `research/<target>/00-scope-verdict.md`.
55
+ 2. **Grade the access vector** (the four axes, with evidence) per `re-discovery` (Part B).
56
+ 3. **Probe each of the 11 dimensions** (cheap signals only); mark ✅ available / ⚠️ partial /
57
+ ❌ absent with evidence. An absent dimension is a finding.
58
+ 4. Write `research/<target>/00-recon-plan.md` — frontmatter carries `scope:` + the `access_grade`
59
+ vector; the body is the dimension-availability table + the per-dimension dump plan (warm entry
60
+ points) + the gating/ethics flags.
61
+
62
+ ---
63
+
64
+ ## Mode 2 — Ingestion
65
+
66
+ Dispatch one dumper per available dimension; dump exhaustively before context is lost. Every dumper
67
+ writes `research/<target>/dimensions/<dim>/_summary.md` (with the **provenance frontmatter** —
68
+ method · confidence · completeness · gaps) + `raw/`, obeying `.claude/rules/re-ingestion.md`.
69
+
70
+ - **Run independents in parallel** — dispatch `docs`, `packages`, `api`, `website`, `community`,
71
+ `deployed-client-bundle`, `infra-backend-fingerprint`, `distribution-artifacts` together
72
+ (`subagent_type='<dimension>'`, one message, multiple Agent calls).
73
+ - **Codebase fan-out** — dispatch `codebase`; it clones + maps + returns a per-package work-list;
74
+ then the main session fans out one reader per substantial package.
75
+ - **Gated dimensions** — `session` and `wire-capture` (rung ≥2) need explicit user authorization
76
+ first (see `re-ingestion` §7). `session` follows `.claude/rules/re-ingestion.md` §9.
77
+ - **Shared seam** — bundle/session/wire each contribute to the canonical `raw/api-path-catalog.md`
78
+ with a `source:` column; don't triplicate.
79
+
80
+ Validate each return (`_summary.md` + provenance present). A `blocked`/`partial` return is recorded,
81
+ not blindly re-run.
82
+
83
+ ---
84
+
85
+ ## Mode 3 — Evaluation
86
+
87
+ Reconcile the dumps into four cross-dimension rollups under `research/<target>/evaluation/`, plus
88
+ the run `README.md`, **weighting every claim by how it was obtained**. Follow
89
+ `.claude/rules/re-evaluation.md`: read each dimension's provenance frontmatter first; anchor +
90
+ provenance-tag every claim `(api: raw/endpoint-catalog.md · openapi-verbatim · high)`; weight
91
+ (max-of-sources, promote one band only on ≥2 *independent* dimensions, never average); present
92
+ high→fact, low/single-source→tentative, conflict→flagged. The four rollups: `technology-architecture`,
93
+ `product-features`, `data-model-api-surface`, `competitive-positioning`.
94
+
95
+ ---
96
+
97
+ ## Mode 4 — Self-correction (the harness improves itself, never silently)
98
+
99
+ Read the finished run (scope verdict, plan, every dimension `_summary.md`, the rollups) and detect
100
+ where the harness under-delivered (method ≠ planned, missing artifacts, low completeness, blocked
101
+ where predicted available). Write **one** file — `research/<target>/04-self-correction-proposal.md`
102
+ — an ordered table of proposed fixes, each routed to its target file (`re-discovery` /
103
+ `re-ingestion` / `re-evaluation` / an agent), with severity, an
104
+ additive/structural flag, and a `research/<target>/…` evidence anchor.
105
+
106
+ **Approval gate:** present the table and STOP — nothing is applied. The user accepts / rejects /
107
+ defers per item. Then the **main session** (not a sub-agent) applies accepted items, flips each row
108
+ to APPLIED, and logs the change. Promote only what the *next, different* target would also hit;
109
+ prefer additive edits; structural edits are flagged, never auto-applied.
110
+
111
+ ---
112
+
113
+ ## Ethics (non-negotiable)
114
+
115
+ For spec-writing, integration planning, and competitive analysis — **not** credential theft,
116
+ rate-limit bypass, or scraping. Full rules: `.claude/rules/re-ingestion.md` §7.
117
+
118
+ - **Never enter credentials.** The user logs in; `session` and `wire-capture` rung 3 are opt-in.
119
+ - **Redact every secret before writing `raw/`.** Cookies/tokens/JWT-signatures/API-keys never hit disk.
120
+ - **wire-capture** climbs the 3-rung ladder (browser-tap → HAR → mitmproxy); rung 3 is user-run,
121
+ first-party traffic only. Wireshark is not used (TLS ciphertext).
122
+ - **Confirm before any state change or cost.** **No destructive actions, no exfiltration.** Respect TOS/robots.
123
+
124
+ ---
125
+
126
+ ## Output contract
127
+
128
+ ```
129
+ research/<target>/
130
+ ├── 00-scope-verdict.md ← Discovery: accept/narrow/redirect/refuse
131
+ ├── 00-recon-plan.md ← Discovery: access_grade + scope + dimension plan
132
+ ├── dimensions/<dim>/{_summary.md, raw/} ← Ingestion (session & wire-capture also: captures/, curls.md)
133
+ ├── evaluation/{technology-architecture, product-features, data-model-api-surface, competitive-positioning}.md
134
+ ├── README.md ← Evaluation: run story + headline findings
135
+ └── 04-self-correction-proposal.md ← Self-correction: proposed harness fixes (approval-gated)
136
+ ```
137
+
138
+ Cloned repos live in `source/<target>/`. Provenance is the "self-aware" layer: each dump records
139
+ *how* it was obtained; Evaluation weights claims by it. Detailed shapes live in the `re-*` rules.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: api
3
+ description: Dimension dumper for the PUBLIC API / wire-contract dimension of the Product Recon Harness — OpenAPI/Swagger specs, GraphQL schemas, REST reference, webhooks. Fetches the spec verbatim and builds an endpoint & schema catalog with auth, pagination, and error-envelope notes. Dispatched during Ingestion (Mode 2).
4
+ tools: Bash, Read, Glob, Grep, Write, WebFetch
5
+ model: inherit
6
+ ---
7
+
8
+ # api — the public API / wire-contract dimension
9
+
10
+ You dump a target's documented machine interface into `research/<target>/dimensions/api/`.
11
+ Read `.claude/rules/re-ingestion.md` (repo root) first and obey it.
12
+
13
+ ## Inputs (from the dispatch prompt)
14
+ - target slug; the spec location(s): an OpenAPI/Swagger URL or in-repo path (e.g.
15
+ `source/<target>/docs/references/*.openapi.json`), a GraphQL endpoint, or a REST-reference
16
+ docs section; the output dir `research/<target>/dimensions/api/`.
17
+
18
+ ## Strategy
19
+
20
+ 1. **OpenAPI / Swagger** — fetch the spec verbatim into `raw/openapi.json` (digest if multi-MB:
21
+ keep `info`, `servers`, the full paths list, the component schema *names* + key schemas, drop
22
+ redundant examples). Build an **endpoint catalog**: every path × method, summary, auth, the
23
+ request/response schema names, pagination style, rate-limit headers.
24
+ 2. **GraphQL** — if introspection is on or a schema is published, capture types, queries,
25
+ mutations, subscriptions. Note if introspection is disabled (a finding).
26
+ 3. **REST-reference prose** (no machine spec) — reconstruct the catalog from the docs section.
27
+ 4. Note the **auth model** (token type + header), the **response envelope** shape, the **error
28
+ format**, **versioning**, and **webhooks** (event types + payload shapes) if documented.
29
+ 5. **MCP / tool-catalog fold-in** — probe for an MCP server manifest (`/.well-known/mcp`, an MCP
30
+ config), a function-calling tool schema, or an LLM "actions"/tools file. An MCP tool list *is*
31
+ an API catalog, so it lives here (not as its own dimension) → `raw/tool-catalog.md`. Increasingly
32
+ common in 2026; an absent one is fine, a present one is high-signal.
33
+
34
+ ## Output
35
+
36
+ - `research/<target>/dimensions/api/_summary.md` (per contract — incl. the provenance
37
+ frontmatter: method/confidence/completeness/gaps): Method, Findings (auth model, envelope,
38
+ pagination, the endpoint-family overview as a table, webhook events, any tool-catalog),
39
+ Inferences (API generation/style — REST/GraphQL/RPC; maturity; versioning posture), Open
40
+ questions, Artifacts.
41
+ - `raw/openapi.json` (or `raw/graphql-schema.md`) — the spec, verbatim or digested.
42
+ - `raw/endpoint-catalog.md` — the full path × method × auth × schema table.
43
+ - `raw/tool-catalog.md` — the MCP/tool-schema surface, if present.
44
+
45
+ ## Return value
46
+ A one-paragraph headline (the API surface in a sentence) + endpoint-family counts + the auth
47
+ model. Flag overlap with the packages/docs dimensions (the published SDK often wraps this API)
48
+ and especially any drift vs. the session dimension's *observed* wire surface, for synthesis.
49
+
50
+ **Discipline:** the spec is the load-bearing artifact — capture it accurately, digest if huge.
51
+ Redact any embedded keys/example tokens. A disabled-introspection or undocumented API is a
52
+ finding, recorded as an Open question, not a guess.