@wairon/cli 5.1.1-dev.11 → 5.1.1-dev.110
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/CONTRIBUTING.md +193 -0
- package/README.md +154 -41
- package/dist/cli/index.js +66474 -29775
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +43671 -0
- package/dist/index.js +53581 -21797
- package/dist/index.js.map +1 -1
- package/dist/templates/architect.yaml +15 -13
- package/dist/templates/domain-owner.yaml +5 -4
- package/dist/templates/skills/sdd-architect.md +44 -26
- package/dist/templates/skills/sdd-auditor.md +5 -4
- package/dist/templates/skills/sdd-delegate.md +43 -4
- package/dist/templates/skills/sdd-implement.md +83 -13
- package/dist/templates/skills/sdd-narrative.md +7 -4
- package/dist/templates/variants/logic-shapes.yaml +59 -0
- package/dist/templates/variants/portal-shapes.yaml +13 -0
- package/dist/webapp.html +771 -0
- package/docs/architecture.md +83 -0
- package/docs/cli.md +1208 -0
- package/docs/design/approval-baseline.md +257 -0
- package/docs/design/connecting-agent-entrypoint.md +167 -0
- package/docs/design/execution-budgets.md +199 -0
- package/docs/design/pack-scoping.md +581 -0
- package/docs/design/supervisor-doctrine.md +110 -0
- package/docs/design-export.md +313 -0
- package/docs/extending-wairon.md +616 -0
- package/docs/network.md +109 -0
- package/docs/requirements.md +65 -0
- package/docs/roadmap.md +133 -0
- package/docs/standards/INDEX.md +23 -0
- package/docs/standards/architecture.md +1042 -0
- package/docs/standards/language-bindings.md +120 -0
- package/docs/templates.md +61 -0
- package/docs/vision.md +59 -0
- package/docs/wairon-feature-requests-hosted-mcp.md +74 -0
- package/package.json +18 -5
- package/schemas/design-export-2.json +1186 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# Contributing to wairon
|
|
2
|
+
|
|
3
|
+
The conventions for making a delegated change — never hand-edit `.wai/`, read
|
|
4
|
+
every write back, the lock is the human's, measure before repairing, prove a
|
|
5
|
+
behaviour by revert without `git checkout` — are **not** in this file. They ship
|
|
6
|
+
with the tool, as the **Working conventions** section of the `sdd-implement`
|
|
7
|
+
skill (`src/templates/skills/sdd-implement.md`, installed as
|
|
8
|
+
`.agents/skills/sdd-implement/SKILL.md` and its siblings). Read them there: they
|
|
9
|
+
are true of any wairon project, and the brief-writing half is in `sdd-delegate`.
|
|
10
|
+
|
|
11
|
+
This file is only what is true of **this repository** and would be wrong to ship
|
|
12
|
+
to a wairon user.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Line endings: CRLF in the working tree, LF in the index
|
|
17
|
+
|
|
18
|
+
Git stores LF and checks out CRLF here. `.gitattributes` pins only `*.sh` to LF
|
|
19
|
+
(a CRLF shebang breaks `#!/usr/bin/env bash` on the Linux CI runners).
|
|
20
|
+
|
|
21
|
+
Most tools that write files emit LF, which turns a three-line change into a
|
|
22
|
+
whole-file diff. After any scripted or tool-driven write, normalise the file back
|
|
23
|
+
and confirm `git diff --stat` shows only the lines you meant.
|
|
24
|
+
|
|
25
|
+
**The rule is preserve what the file has, not "make it CRLF".** The heading above
|
|
26
|
+
describes the common case, not a uniform one: measured across `src/**/*.ts`, 212
|
|
27
|
+
files are CRLF, 52 are LF and 3 are mixed. `install.ps1`, `src/commands/aliases.ts`
|
|
28
|
+
and several tests are LF. Because `core.autocrlf` is true, git normalises on the way
|
|
29
|
+
in and `git status` reads clean either way, so the difference is invisible until a
|
|
30
|
+
scripted edit built for the wrong ending fails to match its anchor — or silently
|
|
31
|
+
rewrites the whole file. Detect each file's endings before editing it and write back
|
|
32
|
+
what was there.
|
|
33
|
+
|
|
34
|
+
Most obvious ways to check for carriage returns lie, including one that wraps the correct check:
|
|
35
|
+
|
|
36
|
+
| Command | What it actually does |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `grep '\r' f` | In a basic regular expression `\r` is the letter `r`. It matches every line containing an `r`, so an LF-only file "has carriage returns". |
|
|
39
|
+
| `grep $'\r' f` | Passes a real CR byte — but grep opens the file in text mode here and strips CR before matching, so it reports **0** on a genuinely CRLF file. |
|
|
40
|
+
| `grep -Uc $'\r' f` | Correct. `-U` suppresses the text conversion, so the CR survives to the match. |
|
|
41
|
+
| `file f` | Correct. Says `with CRLF line terminators`, or says nothing about them. |
|
|
42
|
+
| `x=$(grep -Uc $'\r' f)` | Lies, even though the command inside it is the correct one. Capturing it collapses the lone-CR argument to an empty pattern, which matches every line, so what comes back is the file's **line count** whatever its endings are. Run the check unwrapped, or put the CR in a variable first (`CR=$'\r'; grep -Uc "$CR" f`). |
|
|
43
|
+
|
|
44
|
+
Two traps for scripted edits specifically:
|
|
45
|
+
|
|
46
|
+
- **Never let a normaliser touch text that itself contains `\r` or `\n` escapes.**
|
|
47
|
+
A script that rewrites every line ending to CRLF will also rewrite the escape
|
|
48
|
+
sequence you meant to insert, putting a real carriage return inside a string
|
|
49
|
+
literal — which is an unterminated-string parse error, found at build time
|
|
50
|
+
rather than at write time. Build such text with `String.fromCharCode(13)`.
|
|
51
|
+
- **A quoted heredoc still loses doubled backslashes here.** `<<'EOF'` keeps a lone
|
|
52
|
+
backslash but collapses `\\` to `\`, so `p.replace(/\\/g, "/")` arrives as
|
|
53
|
+
`p.replace(/\/g, "/")` — an unterminated character class, and a syntax error at run
|
|
54
|
+
time. **It does not always fail loudly.** The same collapse inside an anchor string turns
|
|
55
|
+
`\\n` into a real newline, so the text simply does not match and the edit is skipped
|
|
56
|
+
with no error at all — which is how it was found the second time. Write the script with
|
|
57
|
+
the file-writing tool, or avoid doubled backslashes, and check the edit applied.
|
|
58
|
+
|
|
59
|
+
Byte counts show it too: a CRLF file loses exactly one byte per line when it is
|
|
60
|
+
flattened, so `wc -c` before and after a rewrite is evidence.
|
|
61
|
+
|
|
62
|
+
**Four generated files are deliberately LF — do not "fix" them:**
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
.wai/context/domains.md
|
|
66
|
+
.wai/context/wairon-guide.md
|
|
67
|
+
.wai/docs/topology.md
|
|
68
|
+
.wai/rules/topology.yaml
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Run wairon from this checkout, not the global install
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
npm run build
|
|
77
|
+
node dist/cli/index.js <command>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
A globally installed `wairon` can lag this working tree — including its
|
|
81
|
+
validator, so it can pass a tree the code here rejects, or lock one under an
|
|
82
|
+
older rule set. The MCP server also runs `dist/`, so build *before* reconnecting
|
|
83
|
+
it.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## The gates, and today's baseline
|
|
88
|
+
|
|
89
|
+
| Gate | Baseline |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `npx tsc --noEmit` | clean |
|
|
92
|
+
| `npx vitest run` | 289 files / 4755 tests |
|
|
93
|
+
| `npx vitest run --config vitest.e2e.config.ts` | 7 files / 33 tests |
|
|
94
|
+
| `npm run build` | clean |
|
|
95
|
+
| `npm run build:web` | clean (typechecks the SPA) |
|
|
96
|
+
| `node dist/cli/index.js validate` | 0 errors, 0 warnings, 0 notices; register 303 findings / 406 units |
|
|
97
|
+
| `node dist/cli/index.js validate --ci` | passes |
|
|
98
|
+
|
|
99
|
+
The counts are a floor, not a target — they move as the suite grows, so update
|
|
100
|
+
this table when they do. `validate` also prints the **conformance debt register**
|
|
101
|
+
(findings carried under `rules.conformance.carried`); it is informational and
|
|
102
|
+
does not fail the gate, but a number that moved is a result worth reporting.
|
|
103
|
+
|
|
104
|
+
Some tests assert on the text of the shipped skill and agent templates
|
|
105
|
+
(`tests/core/template-vocabulary.test.ts`, `tests/core/skill-composition.test.ts`).
|
|
106
|
+
Changing that text is *supposed* to fail them — that is the assertion doing its
|
|
107
|
+
job. Fix it to match the new text; loosening it to match anything removes the one
|
|
108
|
+
thing keeping the templates and the validator's vocabulary in step.
|
|
109
|
+
|
|
110
|
+
A rule's `summary` is spec data, not a code string. `tests/core/rule-catalog.test.ts`
|
|
111
|
+
proves the registry's codes and the L3 `findings[].summary` values on
|
|
112
|
+
`iheuristic_rules.yaml` (and its siblings) are ONE list, so changing a summary in
|
|
113
|
+
the rule file alone fails the suite. Change it through the authoring tools first and
|
|
114
|
+
let the code string follow. This catches every contributor who touches a rule's
|
|
115
|
+
codes, and the suite is currently the only place that says so.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## A stale MCP server
|
|
120
|
+
|
|
121
|
+
When the build on disk changed after the server started — which is exactly what
|
|
122
|
+
`npm run build` does mid-session — every `sdd_*` answer carries
|
|
123
|
+
`staleServer: true` and a `⚠ STALE SERVER` banner, and `sdd_get_status` leads
|
|
124
|
+
with it. What happens to a write depends on what the rebuild changed:
|
|
125
|
+
|
|
126
|
+
- **The spec or tool schemas changed** (the server compares its own schema
|
|
127
|
+
fingerprint with the one the build on disk computes): every spec write, dry
|
|
128
|
+
runs included, is REFUSED and writes nothing, and the answers carry
|
|
129
|
+
`writesRefused: true`. A stale process with old schemas silently drops the
|
|
130
|
+
fields a newer schema introduced, and has — three times.
|
|
131
|
+
- **Only the build changed:** writes still go through, under the warning.
|
|
132
|
+
|
|
133
|
+
Either way the cure is the human reconnecting the server
|
|
134
|
+
(`/mcp reconnect wairon`). So author specs *before* a rebuild that changes a
|
|
135
|
+
schema. For a server old enough not to carry the flag, the tell is the shape of
|
|
136
|
+
the answer: a current `sdd_update_spec` returns a structured change report
|
|
137
|
+
naming what moved, an old one a single sentence.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Narrative jumps: use labels, not hand-counted step numbers
|
|
142
|
+
|
|
143
|
+
Inserting a step into an L5 narrative renumbers every later step, and
|
|
144
|
+
`sdd_update_spec` relocates the jump fields with it. That relocation has gone
|
|
145
|
+
wrong before, and the failure is quiet: a branch keeps a plausible number that
|
|
146
|
+
now points one step past where it meant to land, and nothing but a careful
|
|
147
|
+
re-read catches it.
|
|
148
|
+
|
|
149
|
+
Only STORED jumps relocate. A jump the delta itself writes — on a step it
|
|
150
|
+
inserts, appends or edits — is read in the numbering the whole delta leaves
|
|
151
|
+
behind, after all of its inserts and deletes, so write it as the final
|
|
152
|
+
narrative will number it.
|
|
153
|
+
|
|
154
|
+
Every jump-by-number field has a symbolic twin resolved at write time —
|
|
155
|
+
`label` on the step, and `onTrueLabel` / `onFalseLabel` / `toLabel` / `endLabel`
|
|
156
|
+
on the jump. A labelled jump survives an insert because it never named a number.
|
|
157
|
+
Prefer labels whenever a narrative is likely to grow.
|
|
158
|
+
|
|
159
|
+
When a numeric jump is edited anyway, verify the flow afterwards rather than
|
|
160
|
+
trusting the change report:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
awk '/^ - name: METHOD/{f=1} f&&/^ - name: /&&!/METHOD/{exit} f' <impl>.yaml \
|
|
164
|
+
| grep -E 'stepNumber|type:|onTrueStep|onFalseStep|toStep|outcome'
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
That prints the control flow on its own, which is short enough to read in one
|
|
168
|
+
pass and is where a mis-relocated target is obvious.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Untracked paths are somebody else's work in flight
|
|
173
|
+
|
|
174
|
+
Run `git status` before you start. This repo regularly carries an uncommitted
|
|
175
|
+
design folder under `docs/design/` while an investigation is open (at the time of
|
|
176
|
+
writing, `docs/design/chained-subsystems/`). Do not touch, commit, stash, or
|
|
177
|
+
clean anything untracked that your task did not name.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Where repo-local guidance lives — and where it cannot
|
|
182
|
+
|
|
183
|
+
`CLAUDE.md`, `GEMINI.md`, and `.github/copilot-instructions.md` at the repo root
|
|
184
|
+
are rewritten wholesale by `wairon generate` (`writeRootGuideDelegator`), and
|
|
185
|
+
`.claude/` is gitignored entirely. Neither survives, so neither is a home for
|
|
186
|
+
anything a future contributor or agent should inherit. That home is **this file**
|
|
187
|
+
— and a brief points at it by name rather than paraphrasing it.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Bugs and questions
|
|
192
|
+
|
|
193
|
+
Actively developed. Open an issue.
|
package/README.md
CHANGED
|
@@ -3,22 +3,25 @@
|
|
|
3
3
|
**Waffle AIron** — an AI-Driven Development (AIDD) support tool built around
|
|
4
4
|
**Spec-Driven Development (SDD)**.
|
|
5
5
|
|
|
6
|
-
> **Status:** stable, actively developed — the SDD spec tree, the conformance gate (a
|
|
7
|
-
> registry with narrative control-flow
|
|
8
|
-
> boundaries, and per-spec
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
6
|
+
> **Status:** stable, actively developed — the SDD spec tree, the conformance gate (a
|
|
7
|
+
> documented rule registry — `wairon rules list` — with narrative control-flow
|
|
8
|
+
> validation, code↔spec conformance, technology boundaries, and per-spec
|
|
9
|
+
> `lint.allow`), human approval (`wairon lock`) with a CI merge gate
|
|
10
|
+
> (`wairon lock-check`), members and cross-project references, live agent
|
|
11
|
+
> briefs and skills, the MCP server, the design export, diagrams (Mermaid,
|
|
12
|
+
> interactive canvas + ERD, draw.io/Excalidraw), extension packs (injectable
|
|
13
|
+
> profiles, language tables, and rules), and a self-hostable HTTP **hosting
|
|
14
|
+
> server** (`wairon serve` — HTTP MCP for many isolated projects, with a web UI)
|
|
15
|
+
> are working. See the [roadmap](docs/roadmap.md) for what's next.
|
|
14
16
|
|
|
15
17
|
---
|
|
16
18
|
|
|
17
19
|
## What is it?
|
|
18
20
|
|
|
19
21
|
`wairon` turns a validated **spec tree** into (a) an enforced architecture
|
|
20
|
-
**conformance gate
|
|
21
|
-
|
|
22
|
+
**conformance gate**, (b) a recorded **approval** that CI can check, and (c) a
|
|
23
|
+
ready-made **agent topology + skills** that any AI coding tool (Claude Code,
|
|
24
|
+
Gemini CLI, …) consumes to do the work itself.
|
|
22
25
|
|
|
23
26
|
It is optional and additive: if a project has a `.wai/specs/` tree the workflow
|
|
24
27
|
is active; otherwise you ignore wairon and work normally. wairon does **not** run
|
|
@@ -27,17 +30,22 @@ or orchestrate AI sessions — it *equips* the session you already use.
|
|
|
27
30
|
```
|
|
28
31
|
.wai/specs/ (the SDD spec tree — source of truth)
|
|
29
32
|
│
|
|
30
|
-
├── wairon validate
|
|
31
|
-
│
|
|
32
|
-
│
|
|
33
|
+
├── wairon validate ────▶ architecture-conformance gate
|
|
34
|
+
│ (stereotype dependency rules, contract↔impl
|
|
35
|
+
│ symmetry, reference integrity, cycle detection)
|
|
33
36
|
│
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
├── wairon lock ────────▶ .wai/lock.json (the human approval, committed)
|
|
38
|
+
│ └ wairon lock-check ▶ CI merge gate: is this the approved design?
|
|
39
|
+
│
|
|
40
|
+
└── wairon MCP server ──▶ sdd_* tools + live agent briefs (sdd_get_agent_brief)
|
|
41
|
+
+ SDD skills installed into each tool
|
|
37
42
|
```
|
|
38
43
|
|
|
39
|
-
The host AI tool spawns
|
|
40
|
-
|
|
44
|
+
The host AI tool spawns subagents of its own from the **live briefs** — each
|
|
45
|
+
composed from the current spec tree on every call — guided by the SDD skills
|
|
46
|
+
and the `sdd_*` MCP tools. Agent files on disk (`.claude/agents/`,
|
|
47
|
+
`.gemini/agents/`) are an optional materialized view of the same topology:
|
|
48
|
+
off by default, on with `rules.materializeAgentFiles: true`.
|
|
41
49
|
|
|
42
50
|
---
|
|
43
51
|
|
|
@@ -49,7 +57,7 @@ A complete system is specified top-down across six levels:
|
|
|
49
57
|
|-------|------|-----------------|
|
|
50
58
|
| **L0 System** | `.wai/specs/.index.yaml` | Vision, boundaries, global requirements, target language |
|
|
51
59
|
| **L1 Subsystem** | `.wai/specs/<sub>/.index.yaml` | An isolated software service, its public interfaces, and trusted links |
|
|
52
|
-
| **L2 Component** | `…/<component>/.index.yaml` | A building block (Portal, Orchestrator, Supervisor, Actor, Store, Index, Registry, Adapter, Observer,
|
|
60
|
+
| **L2 Component** | `…/<component>/.index.yaml` | A building block (Portal, Orchestrator, Supervisor, Actor, Store, Index, Query, Registry, Adapter, Observer, and View for UIs) or pattern (Repository; FeatureComponent and RouterComponent for UIs) + `owns`/`dependsOn`. A gateway is a Portal with the `gateway` variant; logic is an Orchestrator whose `dependencyClass` bounds what it may depend on |
|
|
53
61
|
| **L3 Interface** | `…/<component>/.interface.yaml` | Method signatures & structured params (+ optional wire endpoint bindings) |
|
|
54
62
|
| **L4 Implementation** | `…/<component>/.implementation.yaml` | Concrete implementation of a contract: narrative detail level, bound `technologies` (the swap seam for vendors/engines), optional source path |
|
|
55
63
|
| **L5 Narrative** | (within L4) | Step-by-step method logic as a flat numbered list — `call` steps resolve to real dependency methods, and flow steps (`branch`/`switch`/`loop`/`try`/`jump`/`return`/`throw`) jump by step number |
|
|
@@ -69,6 +77,49 @@ tables, and rules — see [Extending wairon](docs/extending-wairon.md).
|
|
|
69
77
|
|
|
70
78
|
---
|
|
71
79
|
|
|
80
|
+
## Reachability: what reaches each verb
|
|
81
|
+
|
|
82
|
+
Every Portal verb must be **reached**: either a modelled caller in the design
|
|
83
|
+
calls it (a `call` step along a `dependsOn` edge, or `alias::portal.verb` across
|
|
84
|
+
projects), or the verb is declared an **entry** — callers outside the design
|
|
85
|
+
reach it. Nothing else counts, so a Portal nobody calls and nobody enters is
|
|
86
|
+
reported (`UNUSED_COMPONENT` / `UNUSED_METHOD`), with both remedies named.
|
|
87
|
+
|
|
88
|
+
- **Transports.** A Portal states its `transport`, one vocabulary with its
|
|
89
|
+
endpoints: network (`HTTP`, `gRPC`, `GraphQL`, `MessageBus`, `Custom`), local
|
|
90
|
+
(`CLI`, `IPC`, `NamedPipe`, `JSONRPC` for stdio JSON-RPC such as a language
|
|
91
|
+
server or stdio MCP) or `InProcess` (a library, which binds no endpoint).
|
|
92
|
+
- **Entries.** `invokedBy: { kind: entry, caller: "…" }` on the Portal (every
|
|
93
|
+
verb inherits it) or on one verb. Declare one only where the callers really are
|
|
94
|
+
outside the design: browsers, a CLI user, an AI tool over stdio, the
|
|
95
|
+
applications that link a library. Never invent one to silence a finding —
|
|
96
|
+
model the caller instead.
|
|
97
|
+
- **Networks.** A project may declare `network: true` (or `{ description }`) in
|
|
98
|
+
`.wai/project.yaml`: it and its members form an isolated network. An entry's
|
|
99
|
+
`scope` is relative — `outside` (the default) or `network` (sibling services
|
|
100
|
+
inside the innermost network). Inside a network only a `gateway` Portal takes
|
|
101
|
+
entries from outside, and a modelled call crossing in must land on one. The
|
|
102
|
+
family run at the root proves every `network` entry has a modelled caller
|
|
103
|
+
(`ENTRY_UNPROVEN`). A project with no network never sees any of this.
|
|
104
|
+
- **Libraries are called directly.** Another project's `InProcess` Portal is
|
|
105
|
+
called from any component — no client Adapter needed. Pure and read logic may
|
|
106
|
+
only call library verbs whose `effect` allows it (`LIBRARY_CALL_IMPURE`), and a
|
|
107
|
+
native library called from another language needs an `abi` (`c` or `wasm`)
|
|
108
|
+
(`LANGUAGE_BRIDGE_MISSING`). Wrapping a volatile third-party API in an Adapter
|
|
109
|
+
stays a good habit, never a rule.
|
|
110
|
+
- **Extension points.** A producer exports a contract consumers implement with
|
|
111
|
+
`role: implement`; the consumer's interface declares `implements: alias::name`.
|
|
112
|
+
- **Networking is derived.** `wairon network flows | policy | diagram | check |
|
|
113
|
+
why` turns the modelled reach into an allowed-flows matrix, Kubernetes
|
|
114
|
+
`NetworkPolicy`, a trust-boundary diagram and live-flow checks — the specs
|
|
115
|
+
never hold an address. See [Derived networking](docs/network.md).
|
|
116
|
+
|
|
117
|
+
Upgrading a tree written before this model: `wairon doctor --fix` migrates the
|
|
118
|
+
retired forms (`portalType`, listener `mounts`, the old `invokedBy` kinds), then
|
|
119
|
+
declare the entries it will not invent.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
72
123
|
## Domains & agents
|
|
73
124
|
|
|
74
125
|
Agents are **derived from the spec tree** — you never hand-maintain an agent
|
|
@@ -76,7 +127,13 @@ registry:
|
|
|
76
127
|
|
|
77
128
|
- a **`system-architect`** from L0,
|
|
78
129
|
- a **`<subsystem>-owner`** per subsystem,
|
|
79
|
-
- a **`<component>-implementer`** per component
|
|
130
|
+
- a **`<component>-implementer`** per component, when
|
|
131
|
+
`rules.generateComponentImplementers` is on.
|
|
132
|
+
|
|
133
|
+
Each agent is served as a **live brief** (`sdd_get_agent_brief`, or
|
|
134
|
+
`wairon agent brief <id>`), composed from the current tree whenever it is
|
|
135
|
+
asked for, so it is never stale. Writing them to disk as agent files is opt-in
|
|
136
|
+
(`rules.materializeAgentFiles: true`).
|
|
80
137
|
|
|
81
138
|
A **domain** is a unit of ownership. Subsystems yield spec-backed domains
|
|
82
139
|
automatically; you can also declare **free-standing domains** (docs, infra,
|
|
@@ -102,8 +159,19 @@ irm https://raw.githubusercontent.com/SYW-Apps/Waffle-AIron/main/install.ps1 | i
|
|
|
102
159
|
curl -fsSL https://raw.githubusercontent.com/SYW-Apps/Waffle-AIron/main/install.sh | sh
|
|
103
160
|
```
|
|
104
161
|
|
|
105
|
-
Both `wairon` and `wai` are registered as commands.
|
|
106
|
-
|
|
162
|
+
Both `wairon` and `wai` are registered as commands.
|
|
163
|
+
|
|
164
|
+
### npm
|
|
165
|
+
|
|
166
|
+
wairon is also published to npm as `@wairon/cli` (Node 18+):
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
npm install --save-dev @wairon/cli # per project; run it with npx wairon
|
|
170
|
+
npm install --global @wairon/cli # or machine-wide
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The dist-tags are the release channels: `latest` (stable), `beta`, `preview`
|
|
174
|
+
and `dev`, e.g. `npm install -D @wairon/cli@dev`.
|
|
107
175
|
|
|
108
176
|
### Local development
|
|
109
177
|
|
|
@@ -138,15 +206,41 @@ merge to `dev`. Installing from npm, the channels are the dist-tags:
|
|
|
138
206
|
|
|
139
207
|
```sh
|
|
140
208
|
cd my-project
|
|
141
|
-
wairon init # bootstrap .wai/ (spec tree, context, skills, MCP
|
|
142
|
-
|
|
143
|
-
# Design
|
|
144
|
-
# sdd_* MCP tools.
|
|
145
|
-
|
|
146
|
-
wairon status #
|
|
147
|
-
wairon validate # architecture-conformance gate
|
|
148
|
-
|
|
149
|
-
|
|
209
|
+
wairon init # bootstrap .wai/ (spec tree, context, skills, MCP registration)
|
|
210
|
+
|
|
211
|
+
# 1. Design: in your AI tool, use the sdd-architect skill, which authors the
|
|
212
|
+
# spec tree through the sdd_* MCP tools.
|
|
213
|
+
|
|
214
|
+
wairon status # the tree, its authoring readiness, and its approval state
|
|
215
|
+
wairon validate # architecture-conformance gate (--ci in CI)
|
|
216
|
+
|
|
217
|
+
# 2. Approve: once it validates, a human approves the design.
|
|
218
|
+
wairon lock # records the approval in .wai/lock.json
|
|
219
|
+
git add .wai && git commit -m "Approve the design"
|
|
220
|
+
|
|
221
|
+
# 3. Gate: in CI, check that what merges is the approved design
|
|
222
|
+
# (or use the reusable workflow with strict: true — see docs/cli.md).
|
|
223
|
+
# --strict also fails when .wai/lock.json is missing or a member project was
|
|
224
|
+
# never approved; plain lock-check only fails an approval that no longer matches.
|
|
225
|
+
wairon lock-check --strict
|
|
226
|
+
npm ci # TS/JS project with code: install the project's dependencies first
|
|
227
|
+
# (pnpm install --frozen-lockfile / yarn install --immutable), so the
|
|
228
|
+
# gate reads your code with YOUR TypeScript (5 or 6); without one —
|
|
229
|
+
# or on TypeScript 7 — it reads with the copy wairon ships. The
|
|
230
|
+
# reusable workflow does this for you.
|
|
231
|
+
wairon validate --ci # the conformance gate, run at the FAMILY ROOT (the project that
|
|
232
|
+
# declares the members): there it is the family run, which judges
|
|
233
|
+
# the network proofs; externals are judged against their pins
|
|
234
|
+
# Optional: gate on the LIVE producers of your externals as well
|
|
235
|
+
# (exit 1 when one is incompatible, 2 when one could not be compared).
|
|
236
|
+
wairon externals status
|
|
237
|
+
|
|
238
|
+
# 4. Implement: your AI tool delegates each component with the sdd-delegate
|
|
239
|
+
# skill, from its live brief (sdd_get_agent_brief).
|
|
240
|
+
|
|
241
|
+
# Optional
|
|
242
|
+
wairon export --out design.json # the whole resolved design as JSON
|
|
243
|
+
wairon diagram # interactive canvas in .wai/docs/diagrams/
|
|
150
244
|
```
|
|
151
245
|
|
|
152
246
|
---
|
|
@@ -165,19 +259,30 @@ See [docs/cli.md](docs/cli.md). Summary:
|
|
|
165
259
|
| Command | Description |
|
|
166
260
|
|---------|-------------|
|
|
167
261
|
| `wairon init` | Bootstrap `.wai/` and the SDD spec tree |
|
|
168
|
-
| `wairon status` |
|
|
169
|
-
| `wairon validate [--ci]` | Architecture-conformance gate |
|
|
170
|
-
| `wairon
|
|
171
|
-
| `wairon
|
|
262
|
+
| `wairon status` | The spec tree, its authoring readiness, and its approval state |
|
|
263
|
+
| `wairon validate [--ci] [--all]` | Architecture-conformance gate (the family run at a project with members) |
|
|
264
|
+
| `wairon doctor [--fix]` | Health check and upgrade repairs |
|
|
265
|
+
| `wairon generate [--target] [--domain] [--dry-run]` | Reconcile guides, skills and context; agent files only when `rules.materializeAgentFiles` is on |
|
|
266
|
+
| `wairon list` / `wairon show <id>` / `wairon agent brief <id>` | Inspect agents resolved from the spec tree; print one's live brief |
|
|
267
|
+
| `wairon export [--out <file>]` | The whole design, resolved, as one JSON document ([format](docs/design-export.md)) |
|
|
172
268
|
| `wairon diagram [--all] [--canvas] [--drawio] [--excalidraw] [--sequence <comp:method>]` | Mermaid, interactive canvas, and editable draw.io/Excalidraw exports |
|
|
269
|
+
| `wairon network flows \| policy \| diagram \| check \| why` | Networking derived from the design: allowed flows, Kubernetes `NetworkPolicy`, a trust-boundary diagram, live-flow checks ([details](docs/network.md)) |
|
|
173
270
|
| `wairon rules list` | The conformance rule registry (the architecture linter) |
|
|
174
|
-
| `wairon
|
|
271
|
+
| `wairon pack init \| build \| install \| use \| unuse \| impact \| sync \| bundle \| which <name> \| list \| add \| remove` | Extension packs: injected profiles, language tables, and rules |
|
|
272
|
+
| `wairon member …` / `wairon subsystem externalize` / `wairon project rename` | Members (parts and projects) and the family migrations |
|
|
273
|
+
| `wairon externals add \| pin \| status \| list \| remove \| use \| consumers [--search <dirs>]` | Declare, pin and check the externals a project consumes (`status` is the opt-in live gate); from a producer, `consumers --search ..` finds who consumes it, sibling checkouts included |
|
|
274
|
+
| `wairon surface export \| import \| list \| diff [--against <ref\|file>]` | Exchange a public surface (native snapshot or OpenAPI, one document per portal); `diff` is the public-surface changelog since the last committed approval |
|
|
275
|
+
| `wairon method rename <component> <method> <new-name> [--dry-run] [--search <dirs...>] [--no-pin-symbol]` | Rename a contract method and retarget every reference; `--dry-run` names every consumer it breaks (`--search` scans sibling checkouts too), `--no-pin-symbol` lets the implementation follow the new name |
|
|
276
|
+
| `wairon method rename-param` / `wairon type rename-field` | Rename a contract parameter or a type field and respell every reference; the old name joins the rename trace |
|
|
175
277
|
| `wairon domains list \| scan \| add \| remove` | Domains (subsystem-derived + free-standing) |
|
|
176
278
|
| `wairon skills list \| install` | Manage the SDD skills installed into your tools |
|
|
177
|
-
| `wairon lock [-y]` | Validate the
|
|
279
|
+
| `wairon lock [-y]` | Validate the design as complete and record its approval in `.wai/lock.json`, code findings beside it; no spec file is rewritten |
|
|
280
|
+
| `wairon lock-check [--strict]` | Merge gate: is the design in this tree the design that was approved? Importable as a [reusable workflow](https://github.com/SYW-Apps/Waffle-AIron/blob/dev/.github/workflows/lock-check.yml) (on `dev` and the dev tags until 6.0.0 ships it on `main`; pin a tag — see [docs/cli.md](docs/cli.md#using-it-in-github-actions)) |
|
|
178
281
|
| `wairon mcp serve \| install \| status` | The wairon MCP server (`sdd_*` tools) |
|
|
179
282
|
| `wairon serve [--port] [--data-dir] [--no-auth]` | Self-host: HTTP MCP for many isolated projects + admin plane |
|
|
180
|
-
| `wairon host project \| key \| lock \|
|
|
283
|
+
| `wairon host unit \| project \| permission \| key \| lock \| doctor \| packs \| git \| producer \| secret \| demo` | Administer the hosting server (units, projects, permissions, keys, the state-scoped lock) |
|
|
284
|
+
| `wairon login` / `wairon remote` / `wairon mcp install --hosted` | Connect a checkout or an AI tool to a hosted instance |
|
|
285
|
+
| `wairon dev` | Local single-project web UI over the current project |
|
|
181
286
|
| `wairon update` / `wairon aliases` | Self-update / command aliases |
|
|
182
287
|
|
|
183
288
|
---
|
|
@@ -188,13 +293,15 @@ See [docs/cli.md](docs/cli.md). Summary:
|
|
|
188
293
|
- [Requirements](docs/requirements.md) — goals, non-goals, scope
|
|
189
294
|
- [Roadmap](docs/roadmap.md) — what's done and what's next
|
|
190
295
|
- [Vision](docs/vision.md) — long-term direction
|
|
191
|
-
- [CLI Reference](docs/cli.md) — all commands
|
|
192
|
-
- [
|
|
296
|
+
- [CLI Reference](docs/cli.md) — all commands and MCP tools
|
|
297
|
+
- [Design export](docs/design-export.md) — the `wairon export` JSON format for generators and translators
|
|
298
|
+
- [Supervisor doctrine](docs/design/supervisor-doctrine.md) — how Supervisors and Actors may depend on data and effects
|
|
299
|
+
- [Hosted server](https://github.com/SYW-Apps/Waffle-AIron/blob/main/docs/design/hosted-mcp-server.md) — self-host wairon over HTTP (Docker, auth, sizing)
|
|
193
300
|
- [Pack scoping](docs/design/pack-scoping.md) — the pack store, per-project selection, and reproducibility (design)
|
|
194
301
|
- [Connecting-agent entrypoint](docs/design/connecting-agent-entrypoint.md) — MCP `instructions`, prompts, and skill composition
|
|
195
302
|
- [Execution budgets](docs/design/execution-budgets.md) — what each agent's work costs to do, derived alongside what it owns (design)
|
|
196
303
|
- [Approval baselines](docs/design/approval-baseline.md) — what `lock` approves, and why it stopped rewriting your spec tree (design)
|
|
197
|
-
- [Extending wairon](docs/extending-wairon.md) — extension packs & wrapper products (with a [working example](examples/wrapper/))
|
|
304
|
+
- [Extending wairon](docs/extending-wairon.md) — extension packs & wrapper products (with a [working example](https://github.com/SYW-Apps/Waffle-AIron/blob/main/examples/wrapper/))
|
|
198
305
|
- [Templates](docs/templates.md) — agent rendering templates
|
|
199
306
|
- [Standards](docs/standards/INDEX.md) — the architecture standards the SDD model is built on
|
|
200
307
|
|
|
@@ -211,6 +318,12 @@ validation), js-yaml, the MCP SDK, and Vitest. Bundled with tsup.
|
|
|
211
318
|
|
|
212
319
|
Actively developed. For bugs or questions, open an issue.
|
|
213
320
|
|
|
321
|
+
Working on this repo (or delegating work in it) — see
|
|
322
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for what this checkout does differently: line
|
|
323
|
+
endings, the gate commands and their baselines, and the stale-MCP-server tell.
|
|
324
|
+
The conventions that hold for *any* wairon project ship in the `sdd-implement`
|
|
325
|
+
and `sdd-delegate` skills.
|
|
326
|
+
|
|
214
327
|
## License
|
|
215
328
|
|
|
216
329
|
MIT
|