@wairon/cli 5.0.1-dev.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SYW (SYW-Apps)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,208 @@
1
+ # wairon
2
+
3
+ **Waffle AIron** — an AI-Driven Development (AIDD) support tool built around
4
+ **Spec-Driven Development (SDD)**.
5
+
6
+ > **Status:** v0.2 — the SDD spec tree, the conformance gate (a 16-module
7
+ > rule registry with narrative control-flow validation, technology
8
+ > boundaries, and per-spec `lint.allow`), spec-derived agent topology,
9
+ > skills, the MCP server, diagrams (Mermaid, interactive canvas + ERD,
10
+ > draw.io/Excalidraw), extension packs (injectable profiles, language
11
+ > tables, and rules), and a self-hostable HTTP **hosting server**
12
+ > (`wairon serve` — HTTP MCP for many isolated projects) are working. See the
13
+ > [roadmap](docs/roadmap.md) for what's next.
14
+
15
+ ---
16
+
17
+ ## What is it?
18
+
19
+ `wairon` turns a validated **spec tree** into (a) an enforced architecture
20
+ **conformance gate** and (b) a ready-made **agent topology + skills** that any AI
21
+ coding tool (Claude Code, Gemini CLI, …) consumes to do the work itself.
22
+
23
+ It is optional and additive: if a project has a `.wai/specs/` tree the workflow
24
+ is active; otherwise you ignore wairon and work normally. wairon does **not** run
25
+ or orchestrate AI sessions — it *equips* the session you already use.
26
+
27
+ ```
28
+ .wai/specs/ (the SDD spec tree — source of truth)
29
+
30
+ ├── wairon validate ──▶ architecture-conformance gate
31
+ │ (stereotype dependency rules, contract↔impl
32
+ │ symmetry, reference integrity, cycle detection)
33
+
34
+ └── wairon generate ──▶ .claude/agents/ .gemini/agents/ (derived subagents)
35
+ + SDD skills installed into each tool
36
+ + wairon MCP server (sdd_* tools)
37
+ ```
38
+
39
+ The host AI tool spawns the generated agents as its **own native subagents**,
40
+ guided by the SDD skills and the `sdd_*` MCP tools.
41
+
42
+ ---
43
+
44
+ ## The SDD spec tree
45
+
46
+ A complete system is specified top-down across six levels:
47
+
48
+ | Level | File | What it defines |
49
+ |-------|------|-----------------|
50
+ | **L0 System** | `.wai/specs/.index.yaml` | Vision, boundaries, global requirements, target language |
51
+ | **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, Specialist) or pattern (Repository, Gateway) + `owns`/`dependsOn` |
53
+ | **L3 Interface** | `…/<component>/.interface.yaml` | Method signatures & structured params (+ optional wire endpoint bindings) |
54
+ | **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
+ | **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 |
56
+
57
+ (Legacy undotted names — `system.yaml`, `subsystem.yaml`, … — still load;
58
+ `wairon doctor --fix` migrates them.)
59
+
60
+ `wairon validate` enforces conformance across the tree: reference integrity,
61
+ contract↔implementation method symmetry, narrative-call resolution and
62
+ control-flow soundness, the component-stereotype dependency rules (e.g. a
63
+ Portal may not depend on a Store), technology-leakage fencing, language-aware
64
+ checks, and dependency-cycle detection — a documented rule registry
65
+ (`wairon rules list`) with per-project severity overrides and per-spec
66
+ `lint.allow` suppressions. Severity is relaxed to warnings while specs are
67
+ `draft`/`design`. Extension packs can inject custom profiles, language
68
+ tables, and rules — see [Extending wairon](docs/extending-wairon.md).
69
+
70
+ ---
71
+
72
+ ## Domains & agents
73
+
74
+ Agents are **derived from the spec tree** — you never hand-maintain an agent
75
+ registry:
76
+
77
+ - a **`system-architect`** from L0,
78
+ - a **`<subsystem>-owner`** per subsystem,
79
+ - a **`<component>-implementer`** per component.
80
+
81
+ A **domain** is a unit of ownership. Subsystems yield spec-backed domains
82
+ automatically; you can also declare **free-standing domains** (docs, infra,
83
+ cross-cutting scopes) in `.wai/topology.yaml`, each of which gets its own owner
84
+ agent. A subsystem is *software*; a domain is *who owns a scope* — every
85
+ subsystem yields a domain, but not every domain comes from a subsystem.
86
+
87
+ ---
88
+
89
+ ## Installation
90
+
91
+ ### Binary install (recommended)
92
+
93
+ No Node.js required — downloads a self-contained binary for your platform.
94
+
95
+ **Windows** (PowerShell):
96
+ ```powershell
97
+ irm https://raw.githubusercontent.com/SYW-Apps/Waffle-AIron/main/install.ps1 | iex
98
+ ```
99
+
100
+ **macOS / Linux** (bash/sh):
101
+ ```sh
102
+ curl -fsSL https://raw.githubusercontent.com/SYW-Apps/Waffle-AIron/main/install.sh | sh
103
+ ```
104
+
105
+ Both `wairon` and `wai` are registered as commands. (wairon is distributed
106
+ as standalone binaries — it is not published to npm.)
107
+
108
+ ### Local development
109
+
110
+ ```sh
111
+ git clone https://github.com/SYW-Apps/Waffle-AIron
112
+ cd Waffle-AIron
113
+ npm install
114
+ npm run build
115
+ node dist/cli/index.js --help
116
+
117
+ # Without a build step (tsx):
118
+ npm run dev -- --help
119
+ ```
120
+
121
+ ### Updating
122
+
123
+ ```sh
124
+ wairon update # check and install the latest stable release
125
+ wairon update --check # check only
126
+ ```
127
+
128
+ Release channels: `stable` (default), `beta`, `preview` — switch with
129
+ `wairon update --channel <name>` (persists in `~/.wairon/config.json`).
130
+
131
+ ---
132
+
133
+ ## Quick Start
134
+
135
+ ```sh
136
+ cd my-project
137
+ wairon init # bootstrap .wai/ (spec tree, context, skills, MCP-ready)
138
+
139
+ # Design the system with the SDD architect skill (in your AI tool), or via the
140
+ # sdd_* MCP tools. Then:
141
+
142
+ wairon status # spec-tree completeness dashboard
143
+ wairon validate # architecture-conformance gate
144
+ wairon generate # regenerate agent files + (re)install skills
145
+ wairon list # agents resolved from the spec tree
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Aliases
151
+
152
+ `wai` is a built-in short alias for `wairon`. Manage aliases with
153
+ `wairon aliases list | enable <name> | disable <name>`.
154
+
155
+ ---
156
+
157
+ ## CLI Reference
158
+
159
+ See [docs/cli.md](docs/cli.md). Summary:
160
+
161
+ | Command | Description |
162
+ |---------|-------------|
163
+ | `wairon init` | Bootstrap `.wai/` and the SDD spec tree |
164
+ | `wairon status` | Spec-tree completeness dashboard |
165
+ | `wairon validate [--ci]` | Architecture-conformance gate |
166
+ | `wairon generate [--target] [--domain] [--dry-run]` | Regenerate agent files + install skills |
167
+ | `wairon list` / `wairon show <id>` | Inspect agents resolved from the spec tree |
168
+ | `wairon diagram [--all] [--canvas] [--drawio] [--excalidraw] [--sequence <comp:method>]` | Mermaid, interactive canvas, and editable draw.io/Excalidraw exports |
169
+ | `wairon rules list` | The conformance rule registry (the architecture linter) |
170
+ | `wairon packs add \| list \| remove [--global]` | Extension packs: injected profiles, language tables, and rules |
171
+ | `wairon domains list \| scan \| add \| remove` | Domains (subsystem-derived + free-standing) |
172
+ | `wairon skills list \| install` | Manage the SDD skills installed into your tools |
173
+ | `wairon lock [-y]` | Validate the tree as-complete and freeze it (generates the implementer agents) |
174
+ | `wairon mcp serve \| install \| status` | The wairon MCP server (`sdd_*` tools) |
175
+ | `wairon serve [--port] [--data-dir] [--no-auth]` | Self-host: HTTP MCP for many isolated projects + admin plane |
176
+ | `wairon host project \| key \| lock \| promote` | Administer the hosting server (projects, keys, state-scoped lock/promote) |
177
+ | `wairon update` / `wairon aliases` | Self-update / command aliases |
178
+
179
+ ---
180
+
181
+ ## Documentation
182
+
183
+ - [Architecture](docs/architecture.md) — layers and design
184
+ - [Requirements](docs/requirements.md) — goals, non-goals, scope
185
+ - [Roadmap](docs/roadmap.md) — what's done and what's next
186
+ - [Vision](docs/vision.md) — long-term direction
187
+ - [CLI Reference](docs/cli.md) — all commands
188
+ - [Hosted server](docs/design/hosted-mcp-server.md) — self-host wairon over HTTP (Docker, auth, sizing)
189
+ - [Extending wairon](docs/extending-wairon.md) — extension packs & wrapper products (with a [working example](examples/wrapper/))
190
+ - [Templates](docs/templates.md) — agent rendering templates
191
+ - [Standards](docs/standards/INDEX.md) — the architecture standards the SDD model is built on
192
+
193
+ ---
194
+
195
+ ## Technology Stack
196
+
197
+ TypeScript + Node 18+, Commander (CLI), Inquirer (prompts), Zod (schema
198
+ validation), js-yaml, the MCP SDK, and Vitest. Bundled with tsup.
199
+
200
+ ---
201
+
202
+ ## Contributing
203
+
204
+ Early development. For bugs or questions, open an issue.
205
+
206
+ ## License
207
+
208
+ MIT