aw-spec-cli 0.1.2 → 0.1.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/README.md +291 -0
- package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +25248 -0
- package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +5726 -0
- package/assets/docs/ModularMonolith/pack-foundation.ps1 +145 -0
- package/assets/docs/ModularMonolith/pack-foundation.sh +196 -0
- package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +157 -0
- package/assets/docs/ModularMonolith/pack-reference-foundation.sh +209 -0
- package/assets/docs/ModularMonolith/unpack-foundation.ps1 +126 -0
- package/assets/docs/ModularMonolith/unpack-foundation.sh +217 -0
- package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +129 -0
- package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +218 -0
- package/assets/docs/UI.Visualization/PACKAGING.md +191 -0
- package/assets/docs/UI.Visualization/UI.Visualization.Reference.pack.txt +11768 -0
- package/assets/docs/UI.Visualization/UI.Visualization.pack.txt +11214 -0
- package/assets/docs/UI.Visualization/pack-foundation.ps1 +165 -0
- package/assets/docs/UI.Visualization/pack-foundation.sh +206 -0
- package/assets/docs/UI.Visualization/pack-reference-foundation.ps1 +159 -0
- package/assets/docs/UI.Visualization/pack-reference-foundation.sh +205 -0
- package/assets/docs/UI.Visualization/unpack-foundation.ps1 +126 -0
- package/assets/docs/UI.Visualization/unpack-foundation.sh +217 -0
- package/assets/docs/UI.Visualization/unpack-reference-foundation.ps1 +129 -0
- package/assets/docs/UI.Visualization/unpack-reference-foundation.sh +218 -0
- package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +19318 -0
- package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +157 -0
- package/assets/docs/VerticalSlice/pack-reference-foundation.sh +209 -0
- package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +129 -0
- package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +218 -0
- package/assets/docs/components/Email/README.md +7 -0
- package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +84 -0
- package/assets/docs/components/Email/integration.md +57 -17
- package/assets/docs/components/Jobs/integration.md +29 -15
- package/assets/docs/components/QrGenerator/README.md +7 -0
- package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +57 -0
- package/assets/docs/components/QrGenerator/integration.md +51 -6
- package/assets/docs/components/README.md +19 -2
- package/assets/docs/domainspecs/UIVisualization/chart-bubble.md +70 -0
- package/assets/docs/domainspecs/UIVisualization/chart-dimred.md +58 -0
- package/assets/docs/domainspecs/UIVisualization/chart-heatmap.md +62 -0
- package/assets/docs/domainspecs/UIVisualization/chart-network.md +69 -0
- package/assets/docs/domainspecs/UIVisualization/chart-parallel.md +75 -0
- package/assets/docs/domainspecs/UIVisualization/chart-scurve.md +66 -0
- package/assets/docs/domainspecs/UIVisualization/chart-survival.md +69 -0
- package/assets/docs/domainspecs/UIVisualization/chart-trellis.md +68 -0
- package/assets/docs/domainspecs/UIVisualization/chart-violin.md +61 -0
- package/assets/docs/domainspecs/UIVisualization/chart-volcano.md +63 -0
- package/assets/docs/domainspecs/UIVisualization/charting-standards.domain.md +80 -0
- package/assets/docs/domainspecs/UIVisualization/clean-architecture.domain.md +87 -0
- package/assets/docs/domainspecs/UIVisualization/coding-standards.domain.md +47 -0
- package/assets/docs/domainspecs/UIVisualization/comandrulemap.md +130 -0
- package/assets/docs/domainspecs/UIVisualization/component-contracts.domain.md +67 -0
- package/assets/docs/domainspecs/UIVisualization/data-source.domain.md +68 -0
- package/assets/docs/domainspecs/UIVisualization/domain-requirements.md +110 -0
- package/assets/docs/domainspecs/UIVisualization/folder-structure.domain.md +55 -0
- package/assets/docs/domainspecs/UIVisualization/state-management.domain.md +67 -0
- package/assets/docs/domainspecs/UIVisualization/testing.domain.md +52 -0
- package/assets/docs/domainspecs/UIVisualization/ui-viz-terms.md +39 -0
- package/assets/docs/domainspecs/healthcare/comandrulemap.md +47 -0
- package/assets/docs/domainspecs/pharma/comandrulemap.md +50 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +54 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +142 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/manifest.d.ts +31 -0
- package/dist/utils/manifest.d.ts.map +1 -0
- package/dist/utils/manifest.js +91 -0
- package/dist/utils/manifest.js.map +1 -0
- package/dist/utils/update-engine.d.ts +52 -0
- package/dist/utils/update-engine.d.ts.map +1 -0
- package/dist/utils/update-engine.js +203 -0
- package/dist/utils/update-engine.js.map +1 -0
- package/package.json +5 -2
- package/assets/docs/requirement-spec.txt +0 -15
package/README.md
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# aw-spec-cli
|
|
2
|
+
|
|
3
|
+
**AppWeaver Spec-Driven Development CLI** — Scaffold projects with vertical slices, DDD, CQRS, and AI agent skills.
|
|
4
|
+
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
`aw-spec-cli` initializes new projects with the **AppWeaver Spec-Driven Development** structure:
|
|
12
|
+
|
|
13
|
+
- **Vertical Slice Architecture** — Feature-oriented, decoupled modules
|
|
14
|
+
- **Domain-Driven Design (DDD)** — Rich domain models, bounded contexts
|
|
15
|
+
- **CQRS** — Command/Query separation for scalable reads/writes
|
|
16
|
+
- **AI Agent Skills** — Ready-to-use skills for Claude Code, Antigravity, and KiloCode
|
|
17
|
+
|
|
18
|
+
The CLI copies a battle-tested project skeleton (from the [AppWeaver.Spec](https://dev.azure.com/bytestrone-labs/AppWeaver/_git/AppWeaver.Spec) reference implementation) into your target directory.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
### Global Install (via Azure Artifacts / npm)
|
|
25
|
+
```bash
|
|
26
|
+
# From Azure Artifacts (after publishing)
|
|
27
|
+
npm install -g aw-spec-cli
|
|
28
|
+
|
|
29
|
+
# Or use via npx
|
|
30
|
+
npx aw-spec-cli@latest init
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Local Development Install
|
|
34
|
+
```bash
|
|
35
|
+
# From the cloned repository
|
|
36
|
+
git clone https://dev.azure.com/bytestrone-labs/AppWeaver/_git/appweaver
|
|
37
|
+
cd platform/Appweaver.Spec.Cli
|
|
38
|
+
npm install
|
|
39
|
+
npm run build
|
|
40
|
+
# Then run via node
|
|
41
|
+
dist/index.js init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Requires **Node.js ≥ 18**.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Create a new project in the current directory
|
|
52
|
+
aw-spec init
|
|
53
|
+
|
|
54
|
+
# Or specify a target directory
|
|
55
|
+
aw-spec init my-project
|
|
56
|
+
|
|
57
|
+
# Non-interactive (uses Claude skills by default)
|
|
58
|
+
aw-spec init -y
|
|
59
|
+
|
|
60
|
+
# Choose agent explicitly
|
|
61
|
+
aw-spec init --agent antigravity
|
|
62
|
+
aw-spec init --agent kilocode
|
|
63
|
+
|
|
64
|
+
# Preview what would be copied (no changes)
|
|
65
|
+
aw-spec init --dry-run
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
After initialization:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Verify the installation
|
|
72
|
+
aw-spec doctor
|
|
73
|
+
|
|
74
|
+
# Start spec-driven development
|
|
75
|
+
aw-spec specify "Your feature description"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Commands
|
|
81
|
+
|
|
82
|
+
### `aw-spec init [directory]`
|
|
83
|
+
|
|
84
|
+
Initialize a new AppWeaver Spec project.
|
|
85
|
+
|
|
86
|
+
| Option | Description |
|
|
87
|
+
|--------|-------------|
|
|
88
|
+
| `directory` | Target directory (default: current directory) |
|
|
89
|
+
| `-a, --agent <agent>` | Agent skills to include: `claude`, `antigravity`, `kilocode` (default: prompt) |
|
|
90
|
+
| `-y, --yes` | Skip prompts, use defaults (Claude) |
|
|
91
|
+
| `--dry-run` | Show what would be copied without making changes |
|
|
92
|
+
|
|
93
|
+
**Copied structure:**
|
|
94
|
+
```
|
|
95
|
+
target-dir/
|
|
96
|
+
├── .aw-spec/ # Core spec configuration
|
|
97
|
+
│ ├── extensions.yml # Extension registry
|
|
98
|
+
│ ├── feature.json # Feature tracking
|
|
99
|
+
│ ├── workflows/ # Workflow definitions
|
|
100
|
+
│ ├── templates/ # Spec/plan/task templates
|
|
101
|
+
│ └── scripts/ # Bash/PowerShell helpers
|
|
102
|
+
├── docs/ # Documentation scaffold
|
|
103
|
+
│ ├── architecture/
|
|
104
|
+
│ ├── domain/
|
|
105
|
+
│ ├── governance/
|
|
106
|
+
│ ├── security/
|
|
107
|
+
│ ├── domainspecs/
|
|
108
|
+
│ ├── glossary/
|
|
109
|
+
│ ├── VerticalSlice/ # Vertical slice packaging
|
|
110
|
+
│ └── ...
|
|
111
|
+
└── .claude/skills/ # Or .agents/skills/, .kilocode/
|
|
112
|
+
├── aw-spec-specify/
|
|
113
|
+
├── aw-spec-plan/
|
|
114
|
+
├── aw-spec-implement/
|
|
115
|
+
└── ... (13 skills total)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### `aw-spec doctor`
|
|
119
|
+
|
|
120
|
+
Verify the project structure is complete and valid.
|
|
121
|
+
|
|
122
|
+
| Option | Description |
|
|
123
|
+
|--------|-------------|
|
|
124
|
+
| `-v, --verbose` | Show detailed output (lists all skills, missing items) |
|
|
125
|
+
|
|
126
|
+
**Checks performed:**
|
|
127
|
+
- Required folders: `.aw-spec/`, `docs/`
|
|
128
|
+
- Required config files: `extensions.yml`, `feature.json`, `init-options.json`, `integration.json`, `workflow-registry.json`
|
|
129
|
+
- Agent skills folder (`.claude/skills` or `.agents/skills`) with all 13 skills
|
|
130
|
+
- Documentation structure (`architecture/`, `domain/`, `governance/`, `security/`, `domainspecs/`, `glossary/`, `VerticalSlice/`)
|
|
131
|
+
- Vertical Slice packaging scripts (`pack-foundation.sh`, `unpack-foundation.sh`, `PACKAGING.md`)
|
|
132
|
+
- `.aw-spec` subdirectories (`extensions/`, `templates/`, `scripts/`, `workflows/`, `integrations/`, `memory/`)
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Agent Support
|
|
137
|
+
|
|
138
|
+
| Agent | Folder | Skills |
|
|
139
|
+
|-------|--------|--------|
|
|
140
|
+
| **Claude Code** | `.claude/skills/` | 13 skills (specify, plan, implement, tasks, clarify, analyze, checklist, foundation, constitution, select-domain, agent-context-update, addcomponent, taskstoissues) |
|
|
141
|
+
| **Antigravity** | `.agents/skills/` | Same 13 skills, Antigravity-compatible format |
|
|
142
|
+
| **KiloCode** | `.kilocode/` | Workflow definitions (`.md` files) |
|
|
143
|
+
|
|
144
|
+
Choose based on your AI assistant. Skills provide guided workflows for spec-driven development:
|
|
145
|
+
- `aw-spec-specify` — Write feature specifications
|
|
146
|
+
- `aw-spec-plan` — Create implementation plans
|
|
147
|
+
- `aw-spec-implement` — Generate code from plans
|
|
148
|
+
- `aw-spec-tasks` — Break down into executable tasks
|
|
149
|
+
- ... and more
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Project Structure (After Init)
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
my-project/
|
|
157
|
+
├── .aw-spec/
|
|
158
|
+
│ ├── extensions.yml
|
|
159
|
+
│ ├── feature.json
|
|
160
|
+
│ ├── init-options.json
|
|
161
|
+
│ ├── integration.json
|
|
162
|
+
│ ├── workflows/
|
|
163
|
+
│ │ └── workflow-registry.json
|
|
164
|
+
│ ├── extensions/
|
|
165
|
+
│ │ └── agent-context/
|
|
166
|
+
│ │ ├── scripts/
|
|
167
|
+
│ │ └── commands/
|
|
168
|
+
│ ├── templates/
|
|
169
|
+
│ │ ├── spec-template.md
|
|
170
|
+
│ │ ├── plan-template.md
|
|
171
|
+
│ │ └── tasks-template.md
|
|
172
|
+
│ ├── scripts/
|
|
173
|
+
│ │ └── bash/
|
|
174
|
+
│ │ └── common.sh
|
|
175
|
+
│ ├── integrations/
|
|
176
|
+
│ └── memory/
|
|
177
|
+
├── docs/
|
|
178
|
+
│ ├── architecture/
|
|
179
|
+
│ ├── domain/
|
|
180
|
+
│ ├── governance/
|
|
181
|
+
│ ├── security/
|
|
182
|
+
│ ├── domainspecs/
|
|
183
|
+
│ ├── glossary/
|
|
184
|
+
│ ├── interop/
|
|
185
|
+
│ ├── ModularMonolith/
|
|
186
|
+
│ ├── VerticalSlice/
|
|
187
|
+
│ │ ├── VerticalSlice.pack.txt
|
|
188
|
+
│ │ ├── PACKAGING.md
|
|
189
|
+
│ │ ├── pack-foundation.sh
|
|
190
|
+
│ │ └── unpack-foundation.sh
|
|
191
|
+
│ ├── command.txt
|
|
192
|
+
│ ├── components/
|
|
193
|
+
│ ├── pharma-constitution.my-ref.md
|
|
194
|
+
│ ├── requirement-spec.txt
|
|
195
|
+
│ ├── technology-constitution.md
|
|
196
|
+
│ └── README.md
|
|
197
|
+
└── .claude/skills/ # Or .agents/skills/, .kilocode/
|
|
198
|
+
├── aw-spec-addcomponent/
|
|
199
|
+
├── aw-spec-agent-context-update/
|
|
200
|
+
├── aw-spec-analyze/
|
|
201
|
+
├── aw-spec-checklist/
|
|
202
|
+
├── aw-spec-clarify/
|
|
203
|
+
├── aw-spec-constitution/
|
|
204
|
+
├── aw-spec-foundation/
|
|
205
|
+
├── aw-spec-implement/
|
|
206
|
+
├── aw-spec-plan/
|
|
207
|
+
├── aw-spec-select-domain/
|
|
208
|
+
├── aw-spec-specify/
|
|
209
|
+
├── aw-spec-tasks/
|
|
210
|
+
└── aw-spec-taskstoissues/
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Development
|
|
216
|
+
|
|
217
|
+
### Prerequisites
|
|
218
|
+
- Node.js ≥ 18
|
|
219
|
+
- The [AppWeaver.Spec](https://dev.azure.com/bytestrone-labs/AppWeaver/_git/AppWeaver.Spec) repository cloned as a sibling directory (for bundling assets)
|
|
220
|
+
|
|
221
|
+
### Scripts
|
|
222
|
+
| Command | Description |
|
|
223
|
+
|---------|-------------|
|
|
224
|
+
| `npm run build` | Compile TypeScript to `dist/` |
|
|
225
|
+
| `npm run bundle:content` | Copy assets from `../AppWeaver.Spec` → `assets/` |
|
|
226
|
+
| `npm run prepack` | Build + bundle (runs automatically on `npm publish`) |
|
|
227
|
+
| `npm test` | Run unit tests (Vitest) |
|
|
228
|
+
| `npm run test:watch` | Watch mode |
|
|
229
|
+
| `npm run lint` | ESLint on `src/` |
|
|
230
|
+
| `npm run doctor` | Run CLI doctor on current directory |
|
|
231
|
+
|
|
232
|
+
### Setup (Local Development)
|
|
233
|
+
```bash
|
|
234
|
+
# Clone the main repository
|
|
235
|
+
git clone https://dev.azure.com/bytestrone-labs/AppWeaver/_git/appweaver
|
|
236
|
+
cd platform/Appweaver.Spec.Cli
|
|
237
|
+
npm install
|
|
238
|
+
|
|
239
|
+
# Ensure AppWeaver.Spec is available for bundling
|
|
240
|
+
# Either clone it as a sibling directory:
|
|
241
|
+
# git clone https://dev.azure.com/bytestrone-labs/AppWeaver/_git/AppWeaver.Spec ../AppWeaver.Spec
|
|
242
|
+
# Or the bundling script will fall back to published assets in dist/assets/
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Setup (After Publishing to Azure Artifacts)
|
|
246
|
+
Once published to Azure Artifacts, consumers can install via:
|
|
247
|
+
```bash
|
|
248
|
+
# From Azure Artifacts / npm registry (after publishing)
|
|
249
|
+
npm install -g aw-spec-cli
|
|
250
|
+
|
|
251
|
+
# Or use directly via npx
|
|
252
|
+
npx aw-spec-cli@latest init
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## How It Works
|
|
258
|
+
|
|
259
|
+
1. **Asset Bundling** (`scripts/bundle-content.ts`) — On publish, copies the AppWeaver.Spec reference implementation into `assets/` (excludes build artifacts, secrets, VCS folders).
|
|
260
|
+
|
|
261
|
+
2. **Asset Resolution** (`src/utils/paths.ts`) — At runtime, finds assets in priority order:
|
|
262
|
+
- `dist/assets/` (published package)
|
|
263
|
+
- `../AppWeaver.Spec` (local development)
|
|
264
|
+
- `packageRoot/assets` (fallback)
|
|
265
|
+
|
|
266
|
+
3. **Project Initialization** (`src/commands/init.ts`) — Copies `.aw-spec/`, `docs/`, and the selected agent's skills to the target directory with overwrite protection.
|
|
267
|
+
|
|
268
|
+
4. **Validation** (`src/commands/doctor.ts`) — Comprehensive structure verification with colored output.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Contributing
|
|
273
|
+
|
|
274
|
+
1. Fork the repository
|
|
275
|
+
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
276
|
+
3. Make changes with tests
|
|
277
|
+
4. Run `npm run build && npm test && npm run lint`
|
|
278
|
+
5. Submit a PR
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## License
|
|
283
|
+
|
|
284
|
+
MIT © [AppWeaver Team](https://dev.azure.com/bytestrone-labs/AppWeaver)
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Related
|
|
289
|
+
|
|
290
|
+
- [AppWeaver.Spec](https://dev.azure.com/bytestrone-labs/AppWeaver/_git/AppWeaver.Spec) — Reference implementation & source of bundled assets
|
|
291
|
+
- [Spec-Driven Development](https://dev.azure.com/bytestrone-labs/AppWeaver/_git/AppWeaver.Spec?path=/docs/spec-driven-development.md) — Methodology overview
|