@nurix/etna 0.15.2 → 0.15.3
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/README.md +16 -13
- package/bin/etna.js +8 -20
- package/data/harness-index.json +2 -1
- package/data/harnesses/code/CLAUDE.md +0 -14
- package/data/harnesses/code/agents/brainstorm.md +0 -1
- package/data/harnesses/code/agents/change-review.md +0 -1
- package/data/harnesses/code/agents/harness-manager.md +0 -1
- package/data/harnesses/code/agents/maintenance.md +0 -1
- package/data/harnesses/code/agents/performance-review.md +0 -1
- package/data/harnesses/code/agents/spec-mode.md +0 -1
- package/data/harnesses/code/harness.json +1 -1
- package/data/harnesses/code/rules/general.md +0 -1
- package/data/harnesses/code/rules/nomenclature.md +0 -1
- package/data/harnesses/code/skills/boundary/SKILL.md +0 -1
- package/data/harnesses/code/skills/brainstorm/SKILL.md +0 -1
- package/data/harnesses/code/skills/distiller/SKILL.md +0 -1
- package/data/harnesses/code/skills/documentation/SKILL.md +0 -1
- package/data/harnesses/code/skills/workflow-mapper/SKILL.md +0 -1
- package/data/harnesses/kb-agi/CLAUDE.md +0 -15
- package/data/harnesses/kb-agi/agents/kb-agi-init.md +0 -1
- package/data/harnesses/kb-agi/agents/kb-catch-stale.md +0 -1
- package/data/harnesses/kb-agi/agents/kb-find-gaps.md +0 -1
- package/data/harnesses/kb-agi/agents/kb-fix-links.md +0 -1
- package/data/harnesses/kb-agi/agents/kb-refresh-frontdoor.md +0 -1
- package/data/harnesses/kb-agi/agents/kb-refresh-summaries.md +0 -1
- package/data/harnesses/kb-agi/agents/kb-sync-metadata.md +0 -1
- package/data/harnesses/kb-agi/harness.json +1 -1
- package/data/harnesses/kb-agi/rules/kb.md +0 -4
- package/data/harnesses/re/CLAUDE.md +139 -0
- package/data/harnesses/re/agents/api.md +52 -0
- package/data/harnesses/re/agents/codebase.md +63 -0
- package/data/harnesses/re/agents/community.md +47 -0
- package/data/harnesses/re/agents/deployed-client-bundle.md +94 -0
- package/data/harnesses/re/agents/distribution-artifacts.md +97 -0
- package/data/harnesses/re/agents/docs.md +49 -0
- package/data/harnesses/re/agents/infra-backend-fingerprint.md +97 -0
- package/data/harnesses/re/agents/packages.md +48 -0
- package/data/harnesses/re/agents/session.md +55 -0
- package/data/harnesses/re/agents/website.md +50 -0
- package/data/harnesses/re/agents/wire-capture.md +91 -0
- package/data/harnesses/re/harness.json +6 -0
- package/data/harnesses/re/rules/re-discovery.md +266 -0
- package/data/harnesses/re/rules/re-evaluation.md +100 -0
- package/data/harnesses/re/rules/re-ingestion.md +266 -0
- 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
|
|
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
|
|
65
|
-
| `kb-agi` | [`plugins/kb-agi
|
|
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
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
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
|
-
|
|
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: [
|
|
79
|
-
|
|
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
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
-
|
|
228
|
-
|
|
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).
|
package/data/harness-index.json
CHANGED
|
@@ -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."
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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.
|
|
@@ -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.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase
|
|
3
|
+
description: Dimension dumper for the open-source CODEBASE dimension of the Product Recon Harness. Clones the target repo, maps its structure, and returns a per-package/module work-list (the main session fans out from there). Dispatched during Ingestion (Mode 2) — not invoked directly by users.
|
|
4
|
+
tools: Bash, Read, Glob, Grep, Write
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# codebase — the open-source codebase dimension
|
|
9
|
+
|
|
10
|
+
You dump the **source** of a target into `research/<target>/dimensions/codebase/`. Read
|
|
11
|
+
`.claude/rules/re-ingestion.md` (repo root) first — it defines the `_summary.md` + `raw/` shape,
|
|
12
|
+
the size discipline, and the redaction rules. You obey it.
|
|
13
|
+
|
|
14
|
+
You **cannot spawn sub-agents.** Your job is the top-level map *plus* a per-package work-list
|
|
15
|
+
that the main session uses to fan out deep per-package readers. Don't try to read every line
|
|
16
|
+
of every package yourself — map breadth, flag depth.
|
|
17
|
+
|
|
18
|
+
## Inputs (from the dispatch prompt)
|
|
19
|
+
- target slug, the repo clone URL (or a path if already cloned in `source/<target>/`),
|
|
20
|
+
- the output dir `research/<target>/dimensions/codebase/`.
|
|
21
|
+
|
|
22
|
+
## Steps
|
|
23
|
+
|
|
24
|
+
1. **Clone** (if not already): `git clone --depth 1 <url> source/<target>/`. Capture the
|
|
25
|
+
HEAD commit. If huge, still shallow-clone; you'll digest, not read everything.
|
|
26
|
+
2. **Orientation read:** root `README.md`, `AGENTS.md`/`CLAUDE.md`, `CONTRIBUTING`, the root
|
|
27
|
+
manifest (`package.json` / `pyproject.toml` / `Cargo.toml` / `go.mod`), and the workspace
|
|
28
|
+
manifest (`pnpm-workspace.yaml` / `turbo.json` / `lerna.json` / Cargo workspace).
|
|
29
|
+
3. **Structural map:** top-level layout; every package/app/module with a one-line purpose
|
|
30
|
+
(from its own README / manifest `description`); the **internal dependency hierarchy**
|
|
31
|
+
(which package depends on which); the build system, language(s), test setup; license posture
|
|
32
|
+
(look for a `licenses/` dir or per-package `license` fields).
|
|
33
|
+
4. **Identify the substantial units** — the packages/modules worth a deep read (public SDKs,
|
|
34
|
+
the core engine, anything large or load-bearing). These become the work-list.
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
Write `research/<target>/dimensions/codebase/_summary.md` (per the contract): Method,
|
|
39
|
+
Findings (the structural map + dep hierarchy + build system, as tables), Inferences
|
|
40
|
+
(architecture, public vs private packages, runtime model), Open questions, Artifacts.
|
|
41
|
+
|
|
42
|
+
Write `research/<target>/dimensions/codebase/raw/structure-map.md` — the full layout + a
|
|
43
|
+
table of every package: name · path · purpose · public/private · key deps. And
|
|
44
|
+
`raw/dependency-graph.md` — the internal dependency hierarchy.
|
|
45
|
+
|
|
46
|
+
## Return value (critical — this drives the fan-out)
|
|
47
|
+
|
|
48
|
+
Return a **per-unit work-list** as a compact table so the main session can dispatch one reader
|
|
49
|
+
per unit:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
| unit | path | why it matters | suggested output file |
|
|
53
|
+
|------|------|----------------|-----------------------|
|
|
54
|
+
| @scope/client | packages/x-client | core SDK, public | raw/client.md |
|
|
55
|
+
| ... | ... | ... | ... |
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Plus a one-paragraph headline of what the codebase reveals. The main session will dispatch
|
|
59
|
+
readers that each write `raw/<unit>.md` (install/exports/key-files/architecture for that unit).
|
|
60
|
+
|
|
61
|
+
**Discipline:** breadth over depth; digest large trees; never read or write secrets (scan
|
|
62
|
+
`.env*`, config, fixtures for credentials and redact before quoting). An empty/over-large
|
|
63
|
+
area is an Open question, not a guess.
|