specweave 0.30.18 → 0.32.0
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/CLAUDE.md +22 -0
- package/dist/src/adapters/README.md +275 -0
- package/dist/src/adapters/adapter-base.d.ts +1 -1
- package/dist/src/adapters/adapter-base.js +3 -3
- package/dist/src/adapters/adapter-base.js.map +1 -1
- package/dist/src/adapters/adapter-loader.d.ts +11 -10
- package/dist/src/adapters/adapter-loader.d.ts.map +1 -1
- package/dist/src/adapters/adapter-loader.js +31 -21
- package/dist/src/adapters/adapter-loader.js.map +1 -1
- package/dist/src/adapters/claude/README.md +233 -0
- package/dist/src/adapters/codex/README.md +105 -0
- package/dist/src/adapters/cursor/.cursor/context/docs-context.md +62 -0
- package/dist/src/adapters/cursor/.cursor/context/increments-context.md +71 -0
- package/dist/src/adapters/cursor/.cursor/context/strategy-context.md +73 -0
- package/dist/src/adapters/cursor/.cursor/context/tests-context.md +89 -0
- package/dist/src/adapters/cursor/README.md +283 -0
- package/dist/src/adapters/cursor/adapter.d.ts +5 -1
- package/dist/src/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/src/adapters/cursor/adapter.js +18 -115
- package/dist/src/adapters/cursor/adapter.js.map +1 -1
- package/dist/src/adapters/gemini/README.md +97 -0
- package/dist/src/adapters/generic/README.md +277 -0
- package/dist/src/adapters/registry.yaml +197 -0
- package/dist/src/cli/helpers/init/living-docs-preflight.js +12 -12
- package/dist/src/cli/helpers/init/living-docs-preflight.js.map +1 -1
- package/dist/src/config/types.d.ts +1208 -203
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/core/external-tools/external-items-counter.d.ts +62 -0
- package/dist/src/core/external-tools/external-items-counter.d.ts.map +1 -0
- package/dist/src/core/external-tools/external-items-counter.js +206 -0
- package/dist/src/core/external-tools/external-items-counter.js.map +1 -0
- package/dist/src/core/external-tools/external-items-display.d.ts +39 -0
- package/dist/src/core/external-tools/external-items-display.d.ts.map +1 -0
- package/dist/src/core/external-tools/external-items-display.js +185 -0
- package/dist/src/core/external-tools/external-items-display.js.map +1 -0
- package/dist/src/core/external-tools/index.d.ts +8 -0
- package/dist/src/core/external-tools/index.d.ts.map +1 -0
- package/dist/src/core/external-tools/index.js +8 -0
- package/dist/src/core/external-tools/index.js.map +1 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.d.ts +39 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.js +188 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.js.map +1 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.d.ts +38 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.js +136 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.js.map +1 -0
- package/dist/src/core/external-tools/providers/index.d.ts +7 -0
- package/dist/src/core/external-tools/providers/index.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/index.js +7 -0
- package/dist/src/core/external-tools/providers/index.js.map +1 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.d.ts +42 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.js +153 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.js.map +1 -0
- package/dist/src/core/external-tools/types.d.ts +78 -0
- package/dist/src/core/external-tools/types.d.ts.map +1 -0
- package/dist/src/core/external-tools/types.js +19 -0
- package/dist/src/core/external-tools/types.js.map +1 -0
- package/dist/src/core/increment/increment-utils.d.ts +13 -37
- package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
- package/dist/src/core/increment/increment-utils.js +17 -64
- package/dist/src/core/increment/increment-utils.js.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.d.ts.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.js +4 -0
- package/dist/src/core/increment/status-change-sync-trigger.js.map +1 -1
- package/dist/src/core/llm/providers/azure-openai-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/azure-openai-provider.js +1 -0
- package/dist/src/core/llm/providers/azure-openai-provider.js.map +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.js +4 -3
- package/dist/src/core/llm/providers/bedrock-provider.js.map +1 -1
- package/dist/src/core/llm/providers/openai-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/openai-provider.js +1 -0
- package/dist/src/core/llm/providers/openai-provider.js.map +1 -1
- package/dist/src/core/llm/providers/vertex-ai-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/vertex-ai-provider.js +1 -0
- package/dist/src/core/llm/providers/vertex-ai-provider.js.map +1 -1
- package/dist/src/importers/ado-importer.d.ts.map +1 -1
- package/dist/src/importers/ado-importer.js +2 -1
- package/dist/src/importers/ado-importer.js.map +1 -1
- package/dist/src/importers/github-importer.d.ts.map +1 -1
- package/dist/src/importers/github-importer.js +2 -1
- package/dist/src/importers/github-importer.js.map +1 -1
- package/dist/src/importers/jira-importer.d.ts.map +1 -1
- package/dist/src/importers/jira-importer.js +2 -1
- package/dist/src/importers/jira-importer.js.map +1 -1
- package/dist/src/init/architecture/types.d.ts +140 -33
- package/dist/src/init/architecture/types.d.ts.map +1 -1
- package/dist/src/init/compliance/types.d.ts +27 -30
- package/dist/src/init/compliance/types.d.ts.map +1 -1
- package/dist/src/init/repo/types.d.ts +34 -11
- package/dist/src/init/repo/types.d.ts.map +1 -1
- package/dist/src/init/research/src/config/types.d.ts +82 -15
- package/dist/src/init/research/src/config/types.d.ts.map +1 -1
- package/dist/src/init/research/types.d.ts +93 -38
- package/dist/src/init/research/types.d.ts.map +1 -1
- package/dist/src/init/team/types.d.ts +42 -4
- package/dist/src/init/team/types.d.ts.map +1 -1
- package/dist/src/utils/fs-native.d.ts +2 -1
- package/dist/src/utils/fs-native.d.ts.map +1 -1
- package/dist/src/utils/fs-native.js +6 -1
- package/dist/src/utils/fs-native.js.map +1 -1
- package/dist/src/utils/html-to-mdx.d.ts +37 -0
- package/dist/src/utils/html-to-mdx.d.ts.map +1 -0
- package/dist/src/utils/html-to-mdx.js +98 -0
- package/dist/src/utils/html-to-mdx.js.map +1 -0
- package/package.json +3 -3
- package/plugins/specweave/commands/specweave-external.md +150 -0
- package/plugins/specweave/commands/specweave-judge.md +11 -0
- package/plugins/specweave/hooks/lib/update-status-line.sh +16 -4
- package/plugins/specweave/hooks/universal/hook-wrapper.cmd +26 -26
- package/plugins/specweave/hooks/universal/session-start.cmd +16 -16
- package/plugins/specweave/hooks/universal/session-start.ps1 +16 -16
- package/plugins/specweave/lib/vendor/utils/fs-native.d.ts +2 -1
- package/plugins/specweave/lib/vendor/utils/fs-native.js +6 -1
- package/plugins/specweave/lib/vendor/utils/fs-native.js.map +1 -1
- package/plugins/specweave-docs/commands/build.md +47 -73
- package/plugins/specweave-docs/commands/preview.md +181 -87
- package/plugins/specweave-docs/skills/preview/SKILL.md +45 -56
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +0 -296
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -444
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Claude Code Adapter
|
|
2
|
+
|
|
3
|
+
**Automation Level**: Full (Best-in-class experience)
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Claude Code adapter provides **full automation** for SpecWeave, leveraging Claude Code's native capabilities for skills, agents, hooks, and slash commands.
|
|
8
|
+
|
|
9
|
+
This adapter represents the **gold standard** - all other adapters attempt to approximate this experience within their tool's capabilities.
|
|
10
|
+
|
|
11
|
+
## Why Claude Code Provides Superior Results
|
|
12
|
+
|
|
13
|
+
**Anthropic Defines Industry Standards:**
|
|
14
|
+
|
|
15
|
+
### 1. MCP (Model Context Protocol)
|
|
16
|
+
- **What**: Standardized protocol for context management
|
|
17
|
+
- **Why**: Efficient, tool-integrated, proven pattern
|
|
18
|
+
- **Benefit**: Native context loading, 70%+ token reduction
|
|
19
|
+
|
|
20
|
+
### 2. Skills + Agents Architecture
|
|
21
|
+
- **What**: Proven pattern for AI capabilities and roles
|
|
22
|
+
- **Skills**: Auto-activating capabilities (specweave-detector, skill-router)
|
|
23
|
+
- **Agents**: Specialized roles with separate context windows (PM, Architect, DevOps)
|
|
24
|
+
- **Why**: Context isolation, role-based expertise, automatic activation
|
|
25
|
+
- **Benefit**: More accurate, faster, better UX
|
|
26
|
+
|
|
27
|
+
### 3. Native Tool Integration
|
|
28
|
+
- **What**: Direct access to Read, Write, Edit, Bash, Grep, Glob
|
|
29
|
+
- **Why**: Real-time file system access, command execution
|
|
30
|
+
- **Benefit**: Seamless development workflow
|
|
31
|
+
|
|
32
|
+
## What This Adapter Provides
|
|
33
|
+
|
|
34
|
+
### Skills (Auto-Activating)
|
|
35
|
+
| Skill | Purpose | Activation |
|
|
36
|
+
|-------|---------|------------|
|
|
37
|
+
| `specweave-detector` | Detect SpecWeave projects | Always (proactive) |
|
|
38
|
+
| `skill-router` | Route requests to appropriate skills/agents | Automatic |
|
|
39
|
+
| `context-loader` | Load context manifests (70%+ token savings) | When loading context |
|
|
40
|
+
| `increment-planner` | Plan features with context awareness | When creating features |
|
|
41
|
+
| `role-orchestrator` | Coordinate multi-agent workflows | Complex tasks |
|
|
42
|
+
| `brownfield-analyzer` | Analyze existing codebases | Brownfield projects |
|
|
43
|
+
|
|
44
|
+
**Plus 18+ more skills** (see `src/skills/`)
|
|
45
|
+
|
|
46
|
+
### Agents (Specialized Roles)
|
|
47
|
+
| Agent | Role | When Used |
|
|
48
|
+
|-------|------|-----------|
|
|
49
|
+
| `pm` | Product Manager | Requirements, user stories |
|
|
50
|
+
| `architect` | System Architect | Design, ADRs, architecture |
|
|
51
|
+
| `devops` | DevOps Engineer | Infrastructure, deployment |
|
|
52
|
+
| `qa-lead` | QA Lead | Test strategy, test cases |
|
|
53
|
+
| `security` | Security Engineer | Threat modeling, audits |
|
|
54
|
+
| `tech-lead` | Technical Lead | Code review, best practices |
|
|
55
|
+
| `frontend` | Frontend Developer | UI implementation |
|
|
56
|
+
| `python-backend` | Python Backend Dev | FastAPI, Django APIs |
|
|
57
|
+
| `nodejs-backend` | Node.js Backend Dev | Express, NestJS APIs |
|
|
58
|
+
| `nextjs` | Next.js Specialist | Next.js apps |
|
|
59
|
+
|
|
60
|
+
**Plus 10+ more agents** (see `src/agents/`)
|
|
61
|
+
|
|
62
|
+
### Slash Commands
|
|
63
|
+
| Command | Purpose |
|
|
64
|
+
|---------|---------|
|
|
65
|
+
| `/create-increment` | Create new feature increment |
|
|
66
|
+
| `/sync-docs` | Review strategic documentation |
|
|
67
|
+
| `/sync-github` | Sync to GitHub issues |
|
|
68
|
+
| `specweave init` | Bootstrap new project |
|
|
69
|
+
|
|
70
|
+
**Plus more commands** (see `.claude/commands/`)
|
|
71
|
+
|
|
72
|
+
### Hooks (Auto-Update)
|
|
73
|
+
| Hook | Purpose |
|
|
74
|
+
|------|---------|
|
|
75
|
+
| `post-task-completion` | Auto-update docs after tasks |
|
|
76
|
+
| `pre-implementation` | Check regression risk |
|
|
77
|
+
| `docs-changed` | Validate documentation |
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install SpecWeave with Claude adapter (default)
|
|
83
|
+
npx specweave init my-project
|
|
84
|
+
|
|
85
|
+
# Or explicitly specify Claude adapter
|
|
86
|
+
npx specweave init my-project --adapter claude
|
|
87
|
+
|
|
88
|
+
# Install skills and agents
|
|
89
|
+
cd my-project
|
|
90
|
+
npm run install:skills
|
|
91
|
+
npm run install:agents
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Directory Structure
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
.claude/
|
|
98
|
+
├── skills/ # Auto-activating capabilities
|
|
99
|
+
│ ├── specweave-detector/
|
|
100
|
+
│ ├── skill-router/
|
|
101
|
+
│ ├── context-loader/
|
|
102
|
+
│ └── ...
|
|
103
|
+
├── agents/ # Specialized roles
|
|
104
|
+
│ ├── pm/
|
|
105
|
+
│ ├── architect/
|
|
106
|
+
│ ├── devops/
|
|
107
|
+
│ └── ...
|
|
108
|
+
├── commands/ # Slash commands
|
|
109
|
+
│ ├── create-increment.md
|
|
110
|
+
│ ├── sync-docs.md
|
|
111
|
+
│ └── ...
|
|
112
|
+
└── hooks/ # Auto-update mechanisms
|
|
113
|
+
├── post-task-completion.sh
|
|
114
|
+
├── pre-implementation.sh
|
|
115
|
+
└── ...
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Usage Examples
|
|
119
|
+
|
|
120
|
+
### Example 1: Create Feature (Full Automation)
|
|
121
|
+
|
|
122
|
+
**User**: "Create increment for user authentication"
|
|
123
|
+
|
|
124
|
+
**What Happens** (Automatic):
|
|
125
|
+
1. ✅ `specweave-detector` skill activates (detects SpecWeave project)
|
|
126
|
+
2. ✅ `skill-router` routes to `increment-planner`
|
|
127
|
+
3. ✅ `increment-planner` invokes `pm` agent
|
|
128
|
+
4. ✅ `pm` agent creates `spec.md` (WHAT/WHY)
|
|
129
|
+
5. ✅ `increment-planner` invokes `architect` agent
|
|
130
|
+
6. ✅ `architect` agent creates `plan.md` (HOW)
|
|
131
|
+
7. ✅ `increment-planner` creates `tasks.md` (implementation steps)
|
|
132
|
+
8. ✅ `context-loader` creates `context-manifest.yaml` (70%+ token savings)
|
|
133
|
+
|
|
134
|
+
**Result**: Complete increment ready for implementation!
|
|
135
|
+
|
|
136
|
+
### Example 2: Review Documentation
|
|
137
|
+
|
|
138
|
+
**User**: `/sync-docs`
|
|
139
|
+
|
|
140
|
+
**What Happens** (Automatic):
|
|
141
|
+
1. ✅ Slash command loads `.claude/commands/sync-docs.md`
|
|
142
|
+
2. ✅ Reviews strategic docs (.specweave/docs/internal/strategy/)
|
|
143
|
+
3. ✅ Compares against actual implementation
|
|
144
|
+
4. ✅ Identifies gaps (undocumented features, outdated docs, tech debt)
|
|
145
|
+
5. ✅ Generates report
|
|
146
|
+
|
|
147
|
+
### Example 3: Sync to GitHub
|
|
148
|
+
|
|
149
|
+
**User**: `/sync-github`
|
|
150
|
+
|
|
151
|
+
**What Happens** (Automatic):
|
|
152
|
+
1. ✅ Reads increment spec.md and tasks.md
|
|
153
|
+
2. ✅ Creates/updates GitHub issue
|
|
154
|
+
3. ✅ Adds user stories as description
|
|
155
|
+
4. ✅ Adds tasks as checkable checklist
|
|
156
|
+
5. ✅ Stores issue number for full sync with all permissions enabled
|
|
157
|
+
|
|
158
|
+
## Comparison with Other Adapters
|
|
159
|
+
|
|
160
|
+
| Feature | Claude | Cursor | Copilot | Generic |
|
|
161
|
+
|---------|--------|--------|---------|---------|
|
|
162
|
+
| **Automation** | Full | Semi | Basic | Manual |
|
|
163
|
+
| **Skills** | Native | Simulated | N/A | N/A |
|
|
164
|
+
| **Agents** | Native | Manual invoke | Manual invoke | Copy-paste |
|
|
165
|
+
| **Hooks** | Native | N/A | N/A | N/A |
|
|
166
|
+
| **Commands** | Slash commands | Instructions | Instructions | Copy-paste |
|
|
167
|
+
| **Context Loading** | Auto | Manual ref | Manual ref | Copy-paste |
|
|
168
|
+
| **File Access** | Native | Native | Native | Manual |
|
|
169
|
+
|
|
170
|
+
**Claude Code = Gold Standard**
|
|
171
|
+
|
|
172
|
+
## Technical Details
|
|
173
|
+
|
|
174
|
+
### Skills Activation
|
|
175
|
+
|
|
176
|
+
Skills activate automatically based on:
|
|
177
|
+
- Description matching user's request
|
|
178
|
+
- Keywords in skill YAML frontmatter
|
|
179
|
+
- Context (SpecWeave project detected)
|
|
180
|
+
|
|
181
|
+
**Example**:
|
|
182
|
+
```yaml
|
|
183
|
+
---
|
|
184
|
+
name: increment-planner
|
|
185
|
+
description: Plan features with context awareness. Activates for: create feature, plan increment, new feature.
|
|
186
|
+
---
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
When user says "create feature", Claude Code automatically activates `increment-planner` skill.
|
|
190
|
+
|
|
191
|
+
### Agents Invocation
|
|
192
|
+
|
|
193
|
+
Agents are invoked explicitly via Task tool:
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
await Task({
|
|
197
|
+
subagent_type: "specweave:pm:pm",
|
|
198
|
+
prompt: "Create product requirements for user authentication",
|
|
199
|
+
description: "Product requirements analysis"
|
|
200
|
+
});
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Agents have separate context windows to prevent pollution of main conversation.
|
|
204
|
+
|
|
205
|
+
### Hooks Execution
|
|
206
|
+
|
|
207
|
+
Hooks run automatically on events:
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
When task completes → hook fires → docs auto-update.
|
|
212
|
+
|
|
213
|
+
## Why Other Tools Can't Fully Replicate This
|
|
214
|
+
|
|
215
|
+
1. **No native skills/agents support** - Must simulate via instruction files
|
|
216
|
+
2. **No separate context windows** - All context shared (can cause pollution)
|
|
217
|
+
3. **No hooks** - Can't auto-update on events
|
|
218
|
+
4. **No native MCP** - Context loading less efficient
|
|
219
|
+
|
|
220
|
+
**But they can get close!** See Cursor, Copilot, and Generic adapters for approximations.
|
|
221
|
+
|
|
222
|
+
## Related Documentation
|
|
223
|
+
|
|
224
|
+
- [SPECWEAVE.md](../../SPECWEAVE.md) - Complete development guide
|
|
225
|
+
- [src/skills/](../../skills/) - All available skills
|
|
226
|
+
- [src/agents/](../../agents/) - All available agents
|
|
227
|
+
- [Adapter Architecture](../README.md) - Multi-tool design philosophy
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
**Status**: Active (v0.1.0-beta.1+)
|
|
232
|
+
**Market Share**: ~10% (Claude Code users)
|
|
233
|
+
**Priority**: P1 (baseline/reference adapter)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# OpenAI Codex Adapter
|
|
2
|
+
|
|
3
|
+
**Automation Level**: Semi (Good experience with GPT-5-Codex and multiple access points)
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Codex adapter provides **semi-automation** for SpecWeave using OpenAI's Codex (ChatGPT Code Interpreter/Codex CLI) with **AGENTS.md** as the universal instruction file.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
- **GPT-5-Codex Model**: Optimized for engineering tasks
|
|
12
|
+
- **Multiple Access Points**: CLI, Web, IDE, GitHub, iOS app
|
|
13
|
+
- **Task-Based Execution**: Isolated environments per task
|
|
14
|
+
- **File Operations**: Read, write, execute commands
|
|
15
|
+
- **Test Execution**: Run tests and validate implementations
|
|
16
|
+
- **Real-Time Progress**: Monitor task execution (1-30 min/task)
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Install Codex CLI (requires ChatGPT Plus/Pro/Business/Enterprise)
|
|
22
|
+
npm install -g openai-codex-cli
|
|
23
|
+
|
|
24
|
+
# Initialize SpecWeave project with Codex adapter
|
|
25
|
+
npx specweave init my-project --adapter codex
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## How It Works
|
|
29
|
+
|
|
30
|
+
### Option 1: Codex CLI (Fastest)
|
|
31
|
+
```bash
|
|
32
|
+
codex "Read AGENTS.md and create increment for user authentication"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Option 2: ChatGPT Web (Most Accessible)
|
|
36
|
+
1. Upload AGENTS.md file
|
|
37
|
+
2. Say: "Create increment for user authentication following SpecWeave"
|
|
38
|
+
3. Copy generated content to files
|
|
39
|
+
|
|
40
|
+
### Option 3: IDE Integration
|
|
41
|
+
Use Codex in your IDE (VS Code, JetBrains) with AGENTS.md reference
|
|
42
|
+
|
|
43
|
+
## Universal AGENTS.md
|
|
44
|
+
|
|
45
|
+
Instead of tool-specific files, SpecWeave uses **AGENTS.md** that works with ALL tools:
|
|
46
|
+
|
|
47
|
+
- ✅ Codex (OpenAI)
|
|
48
|
+
- ✅ Gemini CLI
|
|
49
|
+
- ✅ Cursor
|
|
50
|
+
- ✅ GitHub Copilot
|
|
51
|
+
- ✅ ANY AI tool
|
|
52
|
+
|
|
53
|
+
**Single source of truth** = easier maintenance!
|
|
54
|
+
|
|
55
|
+
## Example Workflows
|
|
56
|
+
|
|
57
|
+
### Create Feature (CLI)
|
|
58
|
+
```bash
|
|
59
|
+
codex "Read AGENTS.md. Create increment 0002 for payment processing with Stripe."
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Create Feature (Web)
|
|
63
|
+
1. Upload AGENTS.md to ChatGPT
|
|
64
|
+
2. Say: "Create increment for payment processing"
|
|
65
|
+
3. Download generated files
|
|
66
|
+
|
|
67
|
+
### Implement Task
|
|
68
|
+
```bash
|
|
69
|
+
codex "Read increment 0002, implement task T001"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Fix Bug with Tests
|
|
73
|
+
```bash
|
|
74
|
+
codex "Read AGENTS.md and increment 0001. Fix auth bug. Run tests."
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Comparison with Claude Code
|
|
78
|
+
|
|
79
|
+
| Feature | Claude Code | Codex |
|
|
80
|
+
|---------|-------------|-------|
|
|
81
|
+
| **Automation** | Full | Semi |
|
|
82
|
+
| **Skills** | Native | Via AGENTS.md |
|
|
83
|
+
| **Agents** | Native | Via AGENTS.md |
|
|
84
|
+
| **Access Points** | CLI only | CLI + Web + IDE + GitHub + iOS |
|
|
85
|
+
| **Model** | Sonnet 4.5 | GPT-5-Codex |
|
|
86
|
+
| **Task Isolation** | No | Yes (isolated per task) |
|
|
87
|
+
| **Hooks** | Yes | No |
|
|
88
|
+
|
|
89
|
+
## Plans & Pricing
|
|
90
|
+
|
|
91
|
+
- **ChatGPT Plus**: $20/month (Codex included)
|
|
92
|
+
- **ChatGPT Pro**: $200/month (unlimited, faster)
|
|
93
|
+
- **Business/Enterprise**: Custom pricing
|
|
94
|
+
|
|
95
|
+
## Links
|
|
96
|
+
|
|
97
|
+
- [OpenAI Codex](https://openai.com/codex/)
|
|
98
|
+
- [ChatGPT Features](https://chatgpt.com/features/codex)
|
|
99
|
+
- [SpecWeave Website](https://spec-weave.com)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
**Status**: Active (v0.2.0+)
|
|
104
|
+
**Market Share**: ~20% (OpenAI users)
|
|
105
|
+
**Priority**: P1 (high impact - most accessible AI tool)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @docs - Architecture Documentation Context
|
|
2
|
+
|
|
3
|
+
This file is loaded when you type `@docs` in Cursor.
|
|
4
|
+
|
|
5
|
+
## What This Provides
|
|
6
|
+
|
|
7
|
+
Quick access to architecture documentation:
|
|
8
|
+
- System design (HLD)
|
|
9
|
+
- ADRs (Architecture Decision Records)
|
|
10
|
+
- Component diagrams (C4 Model)
|
|
11
|
+
- Data models (ER diagrams)
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
@docs show me the system architecture
|
|
17
|
+
@docs what ADRs exist for authentication?
|
|
18
|
+
@docs explain the data model
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Files Loaded
|
|
22
|
+
|
|
23
|
+
When `@docs` is used, Cursor should load:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
.specweave/docs/internal/architecture/
|
|
27
|
+
├── system-design.md # HLD
|
|
28
|
+
├── adr/ # Architecture Decision Records
|
|
29
|
+
│ ├── 0001-tech-stack.md
|
|
30
|
+
│ ├── 0002-database-choice.md
|
|
31
|
+
│ └── ...
|
|
32
|
+
├── diagrams/ # C4 diagrams
|
|
33
|
+
│ ├── system-context.mmd # C4 Level 1
|
|
34
|
+
│ ├── system-container.mmd # C4 Level 2
|
|
35
|
+
│ └── {module}/ # C4 Level 3 (component)
|
|
36
|
+
└── data-models/ # ER diagrams
|
|
37
|
+
└── schema.sql
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Context Precision
|
|
41
|
+
|
|
42
|
+
**Don't load everything!**
|
|
43
|
+
|
|
44
|
+
If working on specific module (e.g., authentication):
|
|
45
|
+
1. Check context-manifest.yaml
|
|
46
|
+
2. Load ONLY auth-related docs:
|
|
47
|
+
```
|
|
48
|
+
.specweave/docs/internal/architecture/auth/
|
|
49
|
+
├── design.md
|
|
50
|
+
├── adr/0005-auth-method.md
|
|
51
|
+
└── diagrams/auth-flow.mmd
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Example Workflow
|
|
55
|
+
|
|
56
|
+
User: `@docs show authentication architecture`
|
|
57
|
+
|
|
58
|
+
You:
|
|
59
|
+
1. Load .specweave/docs/internal/architecture/auth/
|
|
60
|
+
2. Load ADRs related to auth (ADR-0005, ADR-0012)
|
|
61
|
+
3. Load auth diagrams
|
|
62
|
+
4. Summarize: "Authentication uses OAuth2 (ADR-0005), JWT tokens stored in httpOnly cookies (ADR-0012). See auth-flow.mmd for sequence diagram."
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @increments - Current Increment Context
|
|
2
|
+
|
|
3
|
+
This file is loaded when you type `@increments` in Cursor.
|
|
4
|
+
|
|
5
|
+
## What This Provides
|
|
6
|
+
|
|
7
|
+
Quick access to the current increment's:
|
|
8
|
+
- spec.md (WHAT and WHY)
|
|
9
|
+
- plan.md (HOW)
|
|
10
|
+
- tasks.md (implementation steps)
|
|
11
|
+
- context-manifest.yaml (what context to load)
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
@increments show me what we're working on
|
|
17
|
+
@increments what's the current task?
|
|
18
|
+
@increments load the spec for this feature
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Files Loaded
|
|
22
|
+
|
|
23
|
+
When `@increments` is used, Cursor should load:
|
|
24
|
+
|
|
25
|
+
1. **Current increment folder** (most recent in-progress):
|
|
26
|
+
```
|
|
27
|
+
.specweave/increments/####-feature-name/
|
|
28
|
+
├── spec.md
|
|
29
|
+
├── plan.md
|
|
30
|
+
├── tasks.md
|
|
31
|
+
└── context-manifest.yaml
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. **How to find current increment**:
|
|
35
|
+
```bash
|
|
36
|
+
# List all increments
|
|
37
|
+
ls -la .specweave/increments/
|
|
38
|
+
|
|
39
|
+
# Find in-progress increments
|
|
40
|
+
grep -r "status: in-progress" .specweave/increments/*/spec.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Load order**:
|
|
44
|
+
- context-manifest.yaml (to know what else to load)
|
|
45
|
+
- spec.md (business requirements)
|
|
46
|
+
- plan.md (technical design)
|
|
47
|
+
- tasks.md (current task status)
|
|
48
|
+
|
|
49
|
+
## Context Manifest Critical
|
|
50
|
+
|
|
51
|
+
**ALWAYS read context-manifest.yaml first!**
|
|
52
|
+
|
|
53
|
+
It tells you which additional files to load:
|
|
54
|
+
```yaml
|
|
55
|
+
spec_sections:
|
|
56
|
+
- .specweave/docs/internal/strategy/auth/spec.md
|
|
57
|
+
documentation:
|
|
58
|
+
- .specweave/docs/internal/architecture/auth-design.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Then load ONLY those files (70%+ token savings).
|
|
62
|
+
|
|
63
|
+
## Example Workflow
|
|
64
|
+
|
|
65
|
+
User: `@increments what's the current feature?`
|
|
66
|
+
|
|
67
|
+
You:
|
|
68
|
+
1. Find most recent in-progress increment
|
|
69
|
+
2. Read spec.md → See it's user authentication
|
|
70
|
+
3. Read tasks.md → See we're on T003 (OAuth2 implementation)
|
|
71
|
+
4. Respond: "Working on user authentication (increment 0002). Currently on task T003: Implement OAuth2 flow."
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @strategy - Business Strategy Context
|
|
2
|
+
|
|
3
|
+
This file is loaded when you type `@strategy` in Cursor.
|
|
4
|
+
|
|
5
|
+
## What This Provides
|
|
6
|
+
|
|
7
|
+
Quick access to business strategy documentation:
|
|
8
|
+
- Product vision and goals
|
|
9
|
+
- Business requirements (technology-agnostic)
|
|
10
|
+
- User stories and acceptance criteria
|
|
11
|
+
- PRDs (Product Requirements Documents)
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
@strategy what's the product vision?
|
|
17
|
+
@strategy show me authentication requirements
|
|
18
|
+
@strategy what are the success criteria?
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Files Loaded
|
|
22
|
+
|
|
23
|
+
When `@strategy` is used, Cursor should load:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
.specweave/docs/internal/strategy/
|
|
27
|
+
├── {module}/ # Module-specific strategy
|
|
28
|
+
│ ├── overview.md # Product vision
|
|
29
|
+
│ ├── requirements.md # FR/NFR (tech-agnostic)
|
|
30
|
+
│ ├── user-stories.md # All user stories
|
|
31
|
+
│ └── success-criteria.md # KPIs, metrics
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Context Precision
|
|
35
|
+
|
|
36
|
+
**Don't load everything!**
|
|
37
|
+
|
|
38
|
+
If working on authentication module:
|
|
39
|
+
1. Load ONLY auth strategy:
|
|
40
|
+
```
|
|
41
|
+
.specweave/docs/internal/strategy/auth/
|
|
42
|
+
├── overview.md
|
|
43
|
+
├── requirements.md
|
|
44
|
+
├── user-stories.md
|
|
45
|
+
└── success-criteria.md
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Technology-Agnostic Requirements
|
|
49
|
+
|
|
50
|
+
**Critical**: Strategy docs are technology-agnostic (WHAT/WHY, not HOW).
|
|
51
|
+
|
|
52
|
+
**Good (technology-agnostic)**:
|
|
53
|
+
```markdown
|
|
54
|
+
## FR-001: User Authentication
|
|
55
|
+
Users must be able to securely authenticate with their email and password.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Bad (too technical)**:
|
|
59
|
+
```markdown
|
|
60
|
+
## FR-001: User Authentication
|
|
61
|
+
Users authenticate via JWT tokens stored in httpOnly cookies with bcrypt password hashing.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The technical details go in architecture docs (@docs), not strategy.
|
|
65
|
+
|
|
66
|
+
## Example Workflow
|
|
67
|
+
|
|
68
|
+
User: `@strategy what are the authentication requirements?`
|
|
69
|
+
|
|
70
|
+
You:
|
|
71
|
+
1. Load .specweave/docs/internal/strategy/auth/requirements.md
|
|
72
|
+
2. Read functional and non-functional requirements
|
|
73
|
+
3. Summarize: "FR-001: Email/password auth. FR-002: Social login (Google, GitHub). NFR-001: < 2s login response time. NFR-002: 99.9% uptime."
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @tests - Test Strategy Context
|
|
2
|
+
|
|
3
|
+
This file is loaded when you type `@tests` in Cursor.
|
|
4
|
+
|
|
5
|
+
## What This Provides
|
|
6
|
+
|
|
7
|
+
Quick access to test documentation:
|
|
8
|
+
- Test strategy (E2E, unit, integration)
|
|
9
|
+
- Test coverage matrix (TC-0001 → test files)
|
|
10
|
+
- Test cases (YAML format for skills)
|
|
11
|
+
- Acceptance criteria validation
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
@tests show me test strategy
|
|
17
|
+
@tests what tests exist for authentication?
|
|
18
|
+
@tests map TC-0001 to test file
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Files Loaded
|
|
22
|
+
|
|
23
|
+
When `@tests` is used, Cursor should load:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
.specweave/increments/####-feature/tests.md # Test strategy
|
|
27
|
+
tests/ # Actual test code
|
|
28
|
+
├── e2e/ # Playwright E2E tests
|
|
29
|
+
│ └── auth.spec.ts
|
|
30
|
+
├── unit/ # Unit tests
|
|
31
|
+
│ └── auth-utils.test.ts
|
|
32
|
+
└── integration/ # Integration tests
|
|
33
|
+
└── auth-api.test.ts
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Test Coverage Matrix
|
|
37
|
+
|
|
38
|
+
**tests.md contains mapping: TC-0001 → test file**
|
|
39
|
+
|
|
40
|
+
Example:
|
|
41
|
+
```markdown
|
|
42
|
+
| TC ID | Acceptance Criteria | Test Type | Location | Priority |
|
|
43
|
+
|---------|-------------------------|-----------|------------------------|----------|
|
|
44
|
+
| TC-0001 | Valid login redirects | E2E | tests/e2e/auth.spec.ts | P1 |
|
|
45
|
+
| TC-0002 | Invalid password errors | E2E | tests/e2e/auth.spec.ts | P1 |
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Four Levels of Test Cases
|
|
49
|
+
|
|
50
|
+
### Level 1: Specification (TC-0001 in spec.md)
|
|
51
|
+
```markdown
|
|
52
|
+
- [ ] **TC-0001**: Valid credentials → redirect to dashboard
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Level 2: Feature Test Strategy (tests.md)
|
|
56
|
+
Mapping TC-0001 to test implementation
|
|
57
|
+
|
|
58
|
+
### Level 3: Skill Test Cases (for SpecWeave skills)
|
|
59
|
+
YAML format in src/skills/{name}/test-cases/
|
|
60
|
+
|
|
61
|
+
### Level 4: Code Tests (Playwright, Jest, etc.)
|
|
62
|
+
```typescript
|
|
63
|
+
test('TC-0001: Valid Login Flow', async ({ page }) => {
|
|
64
|
+
// Implementation
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Context Precision
|
|
69
|
+
|
|
70
|
+
**Load test strategy for current increment only**
|
|
71
|
+
|
|
72
|
+
If working on auth increment:
|
|
73
|
+
```
|
|
74
|
+
.specweave/increments/0002-user-auth/tests.md
|
|
75
|
+
tests/e2e/auth.spec.ts
|
|
76
|
+
tests/unit/auth-utils.test.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Don't load ALL tests from ALL increments.
|
|
80
|
+
|
|
81
|
+
## Example Workflow
|
|
82
|
+
|
|
83
|
+
User: `@tests what's the test coverage for authentication?`
|
|
84
|
+
|
|
85
|
+
You:
|
|
86
|
+
1. Load .specweave/increments/0002-user-auth/tests.md
|
|
87
|
+
2. Read test coverage matrix
|
|
88
|
+
3. Load referenced test files (auth.spec.ts)
|
|
89
|
+
4. Summarize: "TC-0001 to TC-0008 covered. 8/8 E2E tests in auth.spec.ts. All P1 tests passing."
|