specsmd 0.0.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +397 -0
  2. package/bin/cli.js +21 -0
  3. package/flows/aidlc/README.md +372 -0
  4. package/flows/aidlc/agents/construction-agent.md +80 -0
  5. package/flows/aidlc/agents/inception-agent.md +97 -0
  6. package/flows/aidlc/agents/master-agent.md +61 -0
  7. package/flows/aidlc/agents/operations-agent.md +89 -0
  8. package/flows/aidlc/commands/construction-agent.md +63 -0
  9. package/flows/aidlc/commands/inception-agent.md +55 -0
  10. package/flows/aidlc/commands/master-agent.md +47 -0
  11. package/flows/aidlc/commands/operations-agent.md +77 -0
  12. package/flows/aidlc/context-config.yaml +67 -0
  13. package/flows/aidlc/memory-bank.yaml +104 -0
  14. package/flows/aidlc/quick-start.md +322 -0
  15. package/flows/aidlc/skills/construction/bolt-list.md +163 -0
  16. package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
  17. package/flows/aidlc/skills/construction/bolt-start.md +414 -0
  18. package/flows/aidlc/skills/construction/bolt-status.md +185 -0
  19. package/flows/aidlc/skills/construction/navigator.md +196 -0
  20. package/flows/aidlc/skills/inception/bolt-plan.md +359 -0
  21. package/flows/aidlc/skills/inception/context.md +171 -0
  22. package/flows/aidlc/skills/inception/intent-create.md +211 -0
  23. package/flows/aidlc/skills/inception/intent-list.md +124 -0
  24. package/flows/aidlc/skills/inception/navigator.md +207 -0
  25. package/flows/aidlc/skills/inception/requirements.md +227 -0
  26. package/flows/aidlc/skills/inception/review.md +248 -0
  27. package/flows/aidlc/skills/inception/story-create.md +304 -0
  28. package/flows/aidlc/skills/inception/units.md +278 -0
  29. package/flows/aidlc/skills/master/analyze-context.md +239 -0
  30. package/flows/aidlc/skills/master/answer-question.md +141 -0
  31. package/flows/aidlc/skills/master/explain-flow.md +158 -0
  32. package/flows/aidlc/skills/master/project-init.md +281 -0
  33. package/flows/aidlc/skills/master/route-request.md +126 -0
  34. package/flows/aidlc/skills/operations/build.md +237 -0
  35. package/flows/aidlc/skills/operations/deploy.md +259 -0
  36. package/flows/aidlc/skills/operations/monitor.md +265 -0
  37. package/flows/aidlc/skills/operations/navigator.md +209 -0
  38. package/flows/aidlc/skills/operations/verify.md +224 -0
  39. package/flows/aidlc/templates/construction/bolt-template.md +205 -0
  40. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  41. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  42. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  43. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  44. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +528 -0
  45. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +342 -0
  46. package/flows/aidlc/templates/construction/bolt-types/spike-bolt.md +240 -0
  47. package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
  48. package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
  49. package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
  50. package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
  51. package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
  52. package/flows/aidlc/templates/inception/project/README.md +55 -0
  53. package/flows/aidlc/templates/inception/requirements-template.md +144 -0
  54. package/flows/aidlc/templates/inception/stories-template.md +38 -0
  55. package/flows/aidlc/templates/inception/story-template.md +147 -0
  56. package/flows/aidlc/templates/inception/system-context-template.md +29 -0
  57. package/flows/aidlc/templates/inception/unit-brief-template.md +177 -0
  58. package/flows/aidlc/templates/inception/units-template.md +52 -0
  59. package/flows/aidlc/templates/standards/catalog.yaml +345 -0
  60. package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
  61. package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
  62. package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
  63. package/lib/InstallerFactory.js +36 -0
  64. package/lib/analytics/env-detector.js +92 -0
  65. package/lib/analytics/index.js +22 -0
  66. package/lib/analytics/machine-id.js +33 -0
  67. package/lib/analytics/tracker.js +227 -0
  68. package/lib/cli-utils.js +342 -0
  69. package/lib/constants.js +32 -0
  70. package/lib/installer.js +402 -0
  71. package/lib/installers/AntigravityInstaller.js +22 -0
  72. package/lib/installers/ClaudeInstaller.js +85 -0
  73. package/lib/installers/ClineInstaller.js +21 -0
  74. package/lib/installers/CodexInstaller.js +21 -0
  75. package/lib/installers/CopilotInstaller.js +113 -0
  76. package/lib/installers/CursorInstaller.js +63 -0
  77. package/lib/installers/GeminiInstaller.js +75 -0
  78. package/lib/installers/KiroInstaller.js +22 -0
  79. package/lib/installers/OpenCodeInstaller.js +22 -0
  80. package/lib/installers/RooInstaller.js +22 -0
  81. package/lib/installers/ToolInstaller.js +73 -0
  82. package/lib/installers/WindsurfInstaller.js +76 -0
  83. package/lib/markdown-validator.ts +175 -0
  84. package/lib/yaml-validator.ts +99 -0
  85. package/package.json +117 -0
package/README.md ADDED
@@ -0,0 +1,397 @@
1
+ # specs.md
2
+
3
+ <p align="center">
4
+ <img src="images/specs_md_pixel_logo.png" alt="specs.md logo" width="400" />
5
+ </p>
6
+
7
+ **AI-native software development with multi-agent orchestration.**
8
+
9
+ specsmd implements the [AI-Driven Development Lifecycle (AI-DLC)](https://aws.amazon.com/blogs/devops/ai-driven-development-life-cycle/) methodology as a set of markdown-based agents that work with your favorite AI coding tools.
10
+
11
+ [![npm version](https://img.shields.io/npm/v/specsmd)](https://www.npmjs.com/package/specsmd)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13
+ [![Documentation](https://img.shields.io/badge/docs-specs.md-CD6B4D)](https://specs.md)
14
+
15
+ <p align="center">
16
+ <img src="docs.specs.md/images/quickstart.gif" alt="specs.md demo" width="800" />
17
+ </p>
18
+
19
+ ---
20
+
21
+ ## VS Code Extension
22
+
23
+ Track your AI-DLC progress with our sidebar extension for VS Code and compatible IDEs.
24
+
25
+ <p align="center">
26
+ <img src="vs-code-extension/resources/extension-preview.png" alt="VS Code Extension Preview" width="800" />
27
+ </p>
28
+
29
+ > **Note:** Works with any VS Code-based IDE including [Cursor](https://cursor.sh), [Google Antigravity](https://antigravity.google), [Windsurf](https://codeium.com/windsurf), and others.
30
+
31
+ **Install from:**
32
+ - [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=fabriqaai.specsmd)
33
+ - [GitHub Releases (VSIX)](https://github.com/fabriqaai/specs.md/releases)
34
+
35
+ ---
36
+
37
+ ## Quick Start
38
+
39
+ ### Prerequisites
40
+
41
+ - Node.js 18 or higher
42
+ - An AI coding tool (Claude Code, Cursor, GitHub Copilot, or Google Antigravity)
43
+
44
+ ### Installation
45
+
46
+ > [!NOTE]
47
+ > Do not use npm if you want to always get the latest version. Use the npx command below.
48
+
49
+ ```bash
50
+ npx specsmd@latest install
51
+ ```
52
+
53
+ The installer detects your AI coding tools (Claude Code, Cursor, GitHub Copilot) and sets up:
54
+ - Agent definitions and skills
55
+ - Memory bank structure for context persistence
56
+ - Slash commands for easy agent invocation
57
+
58
+ ### Verify Installation
59
+
60
+ ```bash
61
+ # Check the manifest
62
+ cat .specsmd/manifest.yaml
63
+
64
+ # List installed agents
65
+ ls .specsmd/aidlc/agents/
66
+ ```
67
+
68
+ ### Initialize Your Project
69
+ Open your AI Assisted Tool (Claude Code, Cursor, GitHub Copilot) and run the following commands:
70
+
71
+ ```bash
72
+ # Start the Master Agent
73
+ /specsmd-master-agent
74
+
75
+ # Then type:
76
+ project-init
77
+ ```
78
+
79
+ This guides you through establishing:
80
+ - **Tech Stack** - Languages, frameworks, databases, infrastructure
81
+ - **Coding Standards** - Formatting, linting, naming, testing strategy
82
+ - **System Architecture** - Architecture style, API design, state management
83
+ - **UX Guide** - Design system, styling, accessibility (optional)
84
+ - **API Conventions** - API style, versioning, response formats (optional)
85
+
86
+ ### Create Your First Intent
87
+
88
+ ```bash
89
+ /specsmd-inception-agent intent-create
90
+ ```
91
+
92
+ An **Intent** is your high-level goal:
93
+ - "User authentication system"
94
+ - "Product catalog with search"
95
+ - "Payment processing integration"
96
+
97
+ The agent will:
98
+ 1. Ask clarifying questions to minimize ambiguity
99
+ 2. Elaborate into user stories and NFRs
100
+ 3. Define system context
101
+ 4. Decompose into loosely-coupled units
102
+
103
+ ### Plan and Execute Bolts
104
+
105
+ ```bash
106
+ # Plan bolts for your stories
107
+ /specsmd-inception-agent bolt-plan
108
+
109
+ # Execute a bolt
110
+ /specsmd-construction-agent bolt-start
111
+ ```
112
+
113
+ Each bolt goes through validated stages:
114
+ 1. **Domain Model** - Model business logic using DDD principles
115
+ 2. **Technical Design** - Apply patterns and make architecture decisions
116
+ 3. **ADR Analysis** - Document significant decisions (optional)
117
+ 4. **Implement** - Generate production code
118
+ 5. **Test** - Verify correctness with automated tests
119
+
120
+ **Human validation happens at each stage gate.**
121
+
122
+ ---
123
+
124
+ ## What is AI-DLC?
125
+
126
+ AI-DLC is a reimagined software development methodology where **AI drives the conversation** and humans validate. Unlike traditional Agile where iterations span weeks, AI-DLC operates in **Bolts** - rapid iterations measured in hours or days.
127
+
128
+ > "Traditional development methods were built for human-driven, long-running processes. AI-DLC reimagines the development lifecycle with AI as a central collaborator, enabling rapid cycles measured in hours or days rather than weeks."
129
+
130
+ ### AI-DLC vs Traditional Methods
131
+
132
+ | Aspect | Agile/Scrum | AI-DLC |
133
+ |--------|-------------|--------|
134
+ | Iteration duration | Weeks (Sprints) | Hours/days (Bolts) |
135
+ | Who drives | Human-driven, AI assists | AI-driven, human-validated |
136
+ | Design techniques | Out of scope | Integrated (DDD, TDD, BDD) |
137
+ | Task decomposition | Manual | AI-powered |
138
+ | Phases | Repeating sprints | Rapid three-phase cycles (Inception → Construction → Operations) |
139
+ | Rituals | Daily standups, retrospectives | Mob Elaboration, Mob Construction |
140
+
141
+ ---
142
+
143
+ ## How It Works
144
+
145
+ specsmd provides four specialized agents that guide you through the entire development lifecycle:
146
+
147
+ ```mermaid
148
+ flowchart TB
149
+ MA[Master Agent<br/>Orchestrates & Navigates] --> IA[Inception Agent]
150
+ MA --> CA[Construction Agent]
151
+ MA --> OA[Operations Agent]
152
+
153
+ IA --> CA --> OA
154
+
155
+ style MA fill:#8B5CF6,stroke:#7C3AED,color:#fff
156
+ style IA fill:#818CF8,stroke:#6366F1,color:#fff
157
+ style CA fill:#34D399,stroke:#10B981,color:#fff
158
+ style OA fill:#FBBF24,stroke:#F59E0B,color:#fff
159
+ ```
160
+
161
+ ### The Three Phases
162
+
163
+ | Phase | Agent | Purpose | Key Outputs |
164
+ |-------|-------|---------|-------------|
165
+ | **Inception** | Inception Agent | Capture intents, elaborate requirements, decompose into units | User stories, NFRs, Unit definitions, Bolt plans |
166
+ | **Construction** | Construction Agent | Execute bolts through domain design → logical design → code → test | Domain models, Technical designs, Code, Tests |
167
+ | **Operations** | Operations Agent | Deploy, verify, and monitor | Deployment units, Monitoring, Runbooks |
168
+
169
+ ---
170
+
171
+ ## Key Concepts
172
+
173
+ ### Intent
174
+ A high-level statement of purpose that encapsulates what needs to be achieved - whether a business goal, feature, or technical outcome. It serves as the starting point for AI-driven decomposition.
175
+
176
+ ### Unit
177
+ A cohesive, self-contained work element derived from an Intent. Units are loosely coupled and can be developed independently. Analogous to a Subdomain (DDD) or Epic (Scrum).
178
+
179
+ ### Bolt
180
+ The smallest iteration in AI-DLC, designed for rapid implementation. Unlike Sprints (weeks), Bolts are **hours to days**. Each bolt encapsulates a well-defined scope of work.
181
+
182
+ | Type | Best For | Stages |
183
+ |------|----------|--------|
184
+ | **DDD Construction** | Complex business logic, domain modeling | Model → Design → ADR → Implement → Test |
185
+ | **Simple Construction** | UI, integrations, utilities | Plan → Implement → Test |
186
+
187
+ ### Memory Bank
188
+ File-based storage for all project artifacts. Maintains context across agent sessions and provides traceability between artifacts.
189
+
190
+ ### Standards
191
+ Project decisions that inform AI code generation. Standards ensure consistency across all generated code and documentation.
192
+
193
+ ---
194
+
195
+ <details>
196
+ <summary><h2>Project Structure</h2></summary>
197
+
198
+ After installation:
199
+
200
+ ```
201
+ .specsmd/
202
+ ├── manifest.yaml # Installation manifest
203
+ └── aidlc/ # AI-DLC flow
204
+ ├── agents/ # Agent definitions
205
+ ├── skills/ # Agent capabilities
206
+ ├── templates/ # Artifact templates
207
+ │ └── standards/ # Standards facilitation guides
208
+ └── memory-bank.yaml # Memory bank schema
209
+
210
+ memory-bank/ # Created after project-init
211
+ ├── intents/ # Your captured intents
212
+ │ └── {intent-name}/
213
+ │ ├── requirements.md
214
+ │ ├── system-context.md
215
+ │ └── units/
216
+ ├── bolts/ # Bolt execution records
217
+ ├── standards/ # Project standards
218
+ │ ├── tech-stack.md
219
+ │ ├── coding-standards.md
220
+ │ └── ...
221
+ └── operations/ # Deployment context
222
+ ```
223
+
224
+ </details>
225
+
226
+ <details>
227
+ <summary><h2>Agent Commands</h2></summary>
228
+
229
+ ### Master Agent
230
+ ```bash
231
+ /specsmd-master-agent
232
+ ```
233
+ | Command | Purpose |
234
+ |---------|---------|
235
+ | `project-init` | Initialize project with standards |
236
+ | `analyze-context` | View current project state |
237
+ | `route-request` | Get directed to the right agent |
238
+ | `explain-flow` | Learn about AI-DLC methodology |
239
+ | `answer-question` | Get help with any specsmd question |
240
+
241
+ ### Inception Agent
242
+ ```bash
243
+ /specsmd-inception-agent
244
+ ```
245
+ | Command | Purpose |
246
+ |---------|---------|
247
+ | `intent-create` | Create a new intent |
248
+ | `intent-list` | List all intents |
249
+ | `requirements` | Elaborate intent requirements |
250
+ | `context` | Define system context |
251
+ | `units` | Decompose into units |
252
+ | `story-create` | Create stories for a unit |
253
+ | `bolt-plan` | Plan bolts for stories |
254
+ | `review` | Review inception artifacts |
255
+
256
+ ### Construction Agent
257
+ ```bash
258
+ /specsmd-construction-agent
259
+ ```
260
+ | Command | Purpose |
261
+ |---------|---------|
262
+ | `bolt-start` | Start/continue executing a bolt |
263
+ | `bolt-status` | Check bolt progress |
264
+ | `bolt-list` | List all bolts |
265
+ | `bolt-replan` | Replan bolts if needed |
266
+
267
+ ### Operations Agent
268
+ ```bash
269
+ /specsmd-operations-agent
270
+ ```
271
+ | Command | Purpose |
272
+ |---------|---------|
273
+ | `build` | Build the project |
274
+ | `deploy` | Deploy to environment |
275
+ | `verify` | Verify deployment |
276
+ | `monitor` | Set up monitoring |
277
+
278
+ </details>
279
+
280
+ ---
281
+
282
+ ## Why specsmd?
283
+
284
+ ### AI-Native, Not AI-Retrofitted
285
+ Built from the ground up for AI-driven development. AI-DLC is a reimagination based on first principles, not a retrofit of existing methods.
286
+
287
+ ### Human Oversight as Loss Function
288
+ Validation at each stage catches errors early before they cascade downstream. Each validation transforms artifacts into rich context for subsequent stages.
289
+
290
+ ### Design Techniques Built-In
291
+ DDD, TDD, and BDD are integral to the methodology - not optional add-ons. This addresses the "whitespace" in Agile that has led to quality issues.
292
+
293
+ ### Tool Agnostic
294
+ Works with Claude Code, Cursor, GitHub Copilot, and other AI coding assistants. Markdown-based agents work anywhere.
295
+
296
+ ### Context Engineering
297
+ Specs and Memory Bank provide structured context for AI agents. Agents reload context each session - no more lost knowledge.
298
+
299
+ ---
300
+
301
+ ## Supported Tools
302
+
303
+ | Tool | Status | Installation |
304
+ |------|--------|--------------|
305
+ | **Claude Code** | Full support | Slash commands in `.claude/commands/` |
306
+ | **Cursor** | Full support | Rules in `.cursor/rules/` (`.mdc` format) |
307
+ | **GitHub Copilot** | Full support | Agents in `.github/agents/` (`.agent.md` format) |
308
+ | **Google Antigravity** | Full support | Agents in `.agent/agents/` |
309
+
310
+ ---
311
+
312
+ ## Troubleshooting
313
+
314
+ <details>
315
+ <summary><strong>Agent commands not recognized</strong></summary>
316
+
317
+ Ensure specs.md is installed correctly:
318
+ ```bash
319
+ ls .specsmd/aidlc/agents/
320
+ ```
321
+
322
+ If the directory is empty or missing, reinstall:
323
+ ```bash
324
+ npx specsmd@latest install
325
+ ```
326
+ </details>
327
+
328
+ <details>
329
+ <summary><strong>Memory Bank artifacts missing</strong></summary>
330
+
331
+ Check if the memory-bank directory exists:
332
+ ```bash
333
+ ls memory-bank/
334
+ ```
335
+
336
+ If missing, run project initialization:
337
+ ```
338
+ /specsmd-master-agent
339
+ > project-init
340
+ ```
341
+ </details>
342
+
343
+ <details>
344
+ <summary><strong>Standards not being followed in generated code</strong></summary>
345
+
346
+ Ensure standards are defined in `memory-bank/standards/`:
347
+ - `tech-stack.md`
348
+ - `coding-standards.md`
349
+ - `architecture.md`
350
+
351
+ If missing or incomplete, use the Master Agent to define them:
352
+ ```
353
+ /specsmd-master-agent
354
+ > project-init
355
+ ```
356
+ </details>
357
+
358
+ ---
359
+
360
+ <details>
361
+ <summary><h2>FAQ</h2></summary>
362
+
363
+ **Q: Agents don't seem to remember previous context?**
364
+ Each agent invocation starts fresh. Agents read context from the Memory Bank at startup. Ensure artifacts are saved after each step.
365
+
366
+ **Q: How do I reset project state?**
367
+ Clear the `memory-bank/` directory to reset all artifacts. To remove specsmd entirely, delete the `.specsmd/` directory and tool-specific command files.
368
+
369
+ **Q: Can I use specsmd with existing Agile workflows?**
370
+ AI-DLC is designed as a reimagination, not a retrofit. However, familiar concepts (user stories, acceptance criteria) are retained to ease transition.
371
+
372
+ **Q: What project types is this suited for?**
373
+ specsmd is designed for building complex systems that demand architectural complexity, trade-off management, and scalability. Simpler systems may be better suited for low-code/no-code approaches.
374
+
375
+ </details>
376
+
377
+ ---
378
+
379
+ ## Resources
380
+
381
+ - [Documentation](https://specs.md)
382
+ - [AI-DLC Specification (AWS)](https://aws.amazon.com/blogs/devops/ai-driven-development-life-cycle/)
383
+ - [npm Package](https://www.npmjs.com/package/specsmd)
384
+ - [GitHub Issues](https://github.com/fabriqaai/specsmd/issues)
385
+
386
+
387
+ ---
388
+
389
+ ## License
390
+
391
+ MIT License - see [LICENSE](LICENSE) for details.
392
+
393
+ ---
394
+
395
+ <p align="center">
396
+ Built with AWS' AI-DLC methodology by the <a href="https://specs.md">specs.md</a> team.
397
+ </p>
package/bin/cli.js ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { program } = require('commander');
4
+ const installer = require('../lib/installer');
5
+ const packageJson = require('../package.json');
6
+
7
+ program
8
+ .version(packageJson.version)
9
+ .description(packageJson.description);
10
+
11
+ program
12
+ .command('install')
13
+ .description('Interactively install a specsmd flow')
14
+ .action(installer.install);
15
+
16
+ program
17
+ .command('uninstall')
18
+ .description('Uninstall specsmd from the current project')
19
+ .action(installer.uninstall);
20
+
21
+ program.parse(process.argv);