specweave 0.3.7 β 0.3.8
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 +4 -3
- package/README.md +4 -4
- package/package.json +1 -1
- package/src/adapters/copilot/README.md +14 -1
- package/src/adapters/cursor/README.md +14 -1
- package/src/hooks/post-task-completion.sh +29 -2
- package/src/templates/AGENTS.md.template +147 -0
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SpecWeave - Development Guide
|
|
2
2
|
|
|
3
3
|
**Project**: SpecWeave - Spec-Driven Development Framework
|
|
4
|
-
**Version**: 0.
|
|
4
|
+
**Version**: 0.3.7 (Windows fix + Competitive advantages documented)
|
|
5
5
|
**Type**: Open Source NPM Package (TypeScript CLI)
|
|
6
6
|
**Repository**: https://github.com/anton-abyzov/specweave
|
|
7
7
|
**Website**: https://spec-weave.com
|
|
@@ -13,9 +13,10 @@ Users receive a different CLAUDE.md via the template system.
|
|
|
13
13
|
|
|
14
14
|
## Quick Start for Contributors
|
|
15
15
|
|
|
16
|
-
**Current Work**: Increment 0002 - Core Framework Enhancements (
|
|
16
|
+
**Current Work**: Increment 0002 - Core Framework Enhancements (complete - testing phase)
|
|
17
17
|
**Active Branch**: `develop` β merges to `features/001-core-feature`
|
|
18
|
-
**
|
|
18
|
+
**Latest**: v0.3.7 - Fixed Windows installation (defaults to claude instead of generic)
|
|
19
|
+
**Next**: v0.4.0 - Hook debouncing, improved detection, GitHub release automation
|
|
19
20
|
|
|
20
21
|
**Typical Workflow**:
|
|
21
22
|
```bash
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> **Spec-Driven Development Framework** - Where specifications and documentation are the source of truth
|
|
4
4
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[](https://github.com/anton-abyzov/specweave/releases/tag/v0.3.7)
|
|
7
7
|
[]()
|
|
8
8
|
[](https://spec-weave.com)
|
|
9
9
|
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
- π€ **Autonomous & Smart** - Just works! Agents ask clarifying questions, review output, validate qualityβminimal interaction required
|
|
32
32
|
- β‘ **Seamless Workflow** - Auto-resume, auto-close, progress trackingβnatural flow without overhead
|
|
33
33
|
- π― **10 Agents + 35+ Skills** - PM, Architect, DevOps, QA, Security work in parallel (minimizes context usage). Easily extensible!
|
|
34
|
-
- π§ **Universal Support** - Works with Claude (
|
|
35
|
-
- **Claude Code
|
|
36
|
-
- **Other tools**: Accessible via universal AGENTS.md
|
|
34
|
+
- π§ **Universal Support** - Works with Claude Code (default), Cursor, Gemini CLI, Codex, Copilot, and ANY AI tool (100% market coverage)
|
|
35
|
+
- **Claude Code** (default): Native agents/skills pre-installed in `.claude/` - best experience!
|
|
36
|
+
- **Other tools**: Accessible via adapters (Cursor, Copilot) or universal AGENTS.md
|
|
37
37
|
- π§ͺ **Complete Test Coverage** - 4-level strategy from specs to integration tests (APIs, UIs, CLIs, libraries)
|
|
38
38
|
- π **Living Documentation** - Specs auto-update after every operation and testβalways in sync with code
|
|
39
39
|
- π¨ **Visual Architecture** - C4 Model diagrams (Context, Container, Component)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Replace vibe coding with spec-driven development. Smart workflow: /specweave inc auto-closes previous, /specweave build auto-resumes, /specweave progress shows status. PM-led planning, 10 agents, 35+ skills. spec-weave.com",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -134,7 +134,7 @@ max_context_tokens: 10000
|
|
|
134
134
|
β **No workflow automation** - Must create folders/files manually
|
|
135
135
|
β **No skills/agents** - Can't simulate roles like Cursor
|
|
136
136
|
β **No commands** - No slash commands or @ shortcuts
|
|
137
|
-
β **No hooks** - Can't auto-update docs
|
|
137
|
+
β **No hooks** - Can't auto-update docs (see workaround below)
|
|
138
138
|
β οΈ **Completely manual workflow** - Just better code suggestions
|
|
139
139
|
|
|
140
140
|
β
**But still helpful for**:
|
|
@@ -142,6 +142,19 @@ max_context_tokens: 10000
|
|
|
142
142
|
- Suggesting file structures
|
|
143
143
|
- Copilot Chat Q&A about project
|
|
144
144
|
|
|
145
|
+
### Documentation Update Workaround
|
|
146
|
+
|
|
147
|
+
Since GitHub Copilot doesn't have hooks, you MUST manually update documentation after every task.
|
|
148
|
+
|
|
149
|
+
**See the comprehensive guide in AGENTS.md** (section: "Documentation Updates - CRITICAL FOR NON-CLAUDE TOOLS")
|
|
150
|
+
|
|
151
|
+
**Quick checklist after completing any task**:
|
|
152
|
+
1. Update `.specweave/increments/{id}/tasks.md` (mark tasks complete)
|
|
153
|
+
2. Update `.specweave/docs/internal/architecture/` (HLD/LLD/ADRs)
|
|
154
|
+
3. Update `.specweave/docs/internal/strategy/` (PRDs if requirements changed)
|
|
155
|
+
4. Update `README.md` (user-facing changes)
|
|
156
|
+
5. Update `CHANGELOG.md` (version history)
|
|
157
|
+
|
|
145
158
|
## When to Use This Adapter
|
|
146
159
|
|
|
147
160
|
β
**Use Copilot adapter if**:
|
|
@@ -206,11 +206,24 @@ documentation:
|
|
|
206
206
|
|
|
207
207
|
β **No auto-activation** - Must explicitly request workflows
|
|
208
208
|
β **No separate context windows** - All context shared
|
|
209
|
-
β **No hooks** - Can't auto-update docs on events
|
|
209
|
+
β **No hooks** - Can't auto-update docs on events (see workaround below)
|
|
210
210
|
β οΈ **Manual role adoption** - Must say "act as PM"
|
|
211
211
|
|
|
212
212
|
β
**But Composer + @ shortcuts provide great UX!**
|
|
213
213
|
|
|
214
|
+
### Documentation Update Workaround
|
|
215
|
+
|
|
216
|
+
Since Cursor doesn't have hooks, you MUST manually update documentation after every task.
|
|
217
|
+
|
|
218
|
+
**See the comprehensive guide in AGENTS.md** (section: "Documentation Updates - CRITICAL FOR NON-CLAUDE TOOLS")
|
|
219
|
+
|
|
220
|
+
**Quick checklist after completing any task**:
|
|
221
|
+
1. Update `.specweave/increments/{id}/tasks.md` (mark tasks complete)
|
|
222
|
+
2. Update `.specweave/docs/internal/architecture/` (HLD/LLD/ADRs)
|
|
223
|
+
3. Update `.specweave/docs/internal/strategy/` (PRDs if requirements changed)
|
|
224
|
+
4. Update `README.md` (user-facing changes)
|
|
225
|
+
5. Update `CHANGELOG.md` (version history)
|
|
226
|
+
|
|
214
227
|
## Tips & Tricks
|
|
215
228
|
|
|
216
229
|
### 1. Always Mention Context-Manifest
|
|
@@ -7,14 +7,42 @@
|
|
|
7
7
|
# 1. Play completion sound (synchronously, not background)
|
|
8
8
|
# 2. Output JSON systemMessage reminding to update docs
|
|
9
9
|
# 3. Log completion
|
|
10
|
+
#
|
|
11
|
+
# DEBOUNCING: Prevents rapid duplicate fires (Claude Code calls hooks twice)
|
|
10
12
|
|
|
11
13
|
set -e
|
|
12
14
|
|
|
13
15
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
14
16
|
cd "$PROJECT_ROOT" 2>/dev/null || true
|
|
15
17
|
|
|
16
|
-
#
|
|
18
|
+
# Debounce: Skip if hook fired within last 2 seconds
|
|
19
|
+
LAST_FIRE_FILE=".specweave/logs/last-hook-fire"
|
|
20
|
+
CURRENT_TIME=$(date +%s)
|
|
21
|
+
DEBOUNCE_SECONDS=2
|
|
22
|
+
|
|
17
23
|
mkdir -p .specweave/logs 2>/dev/null || true
|
|
24
|
+
|
|
25
|
+
if [ -f "$LAST_FIRE_FILE" ]; then
|
|
26
|
+
LAST_FIRE=$(cat "$LAST_FIRE_FILE" 2>/dev/null || echo "0")
|
|
27
|
+
TIME_DIFF=$((CURRENT_TIME - LAST_FIRE))
|
|
28
|
+
|
|
29
|
+
if [ "$TIME_DIFF" -lt "$DEBOUNCE_SECONDS" ]; then
|
|
30
|
+
# Too soon - skip this invocation (prevents duplicates)
|
|
31
|
+
echo "[$(date)] Hook skipped (debounced - last fire was ${TIME_DIFF}s ago)" >> .specweave/logs/hooks-debug.log 2>/dev/null || true
|
|
32
|
+
# Output minimal JSON (no systemMessage)
|
|
33
|
+
cat <<EOF
|
|
34
|
+
{
|
|
35
|
+
"continue": true
|
|
36
|
+
}
|
|
37
|
+
EOF
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Save current timestamp
|
|
43
|
+
echo "$CURRENT_TIME" > "$LAST_FIRE_FILE"
|
|
44
|
+
|
|
45
|
+
# DEBUG: Log hook invocation
|
|
18
46
|
echo "[$(date)] Hook invoked! PWD=$PWD Args=$*" >> .specweave/logs/hooks-debug.log 2>/dev/null || true
|
|
19
47
|
echo "[$(date)] Hook stdin:" >> .specweave/logs/hooks-debug.log 2>/dev/null || true
|
|
20
48
|
cat >> .specweave/logs/hooks-debug.log 2>/dev/null || true
|
|
@@ -40,7 +68,6 @@ play_sound() {
|
|
|
40
68
|
play_sound
|
|
41
69
|
|
|
42
70
|
# 2. Log completion
|
|
43
|
-
mkdir -p .specweave/logs 2>/dev/null || true
|
|
44
71
|
echo "[$(date)] Task completed" >> .specweave/logs/tasks.log 2>/dev/null || true
|
|
45
72
|
|
|
46
73
|
# 3. Output JSON to instruct Claude (systemMessage is shown to user)
|
|
@@ -276,6 +276,152 @@ npm run lint
|
|
|
276
276
|
|
|
277
277
|
---
|
|
278
278
|
|
|
279
|
+
## π Documentation Updates (CRITICAL FOR NON-CLAUDE TOOLS)
|
|
280
|
+
|
|
281
|
+
**IMPORTANT**: Claude Code has automatic hooks that remind you to update documentation. **GitHub Copilot, Cursor, and other tools DO NOT have these hooks!**
|
|
282
|
+
|
|
283
|
+
### You MUST Manually Update Documentation After Every Task
|
|
284
|
+
|
|
285
|
+
When you complete ANY task (implementation, bug fix, refactoring), you MUST update:
|
|
286
|
+
|
|
287
|
+
#### 1. Living Docs (.specweave/docs/)
|
|
288
|
+
|
|
289
|
+
After implementing features, update strategic documentation:
|
|
290
|
+
|
|
291
|
+
**Strategy Docs** (`.specweave/docs/internal/strategy/`):
|
|
292
|
+
- Update PRDs when requirements change
|
|
293
|
+
- Add new user stories if scope expanded
|
|
294
|
+
- Document discovered requirements
|
|
295
|
+
|
|
296
|
+
**Architecture Docs** (`.specweave/docs/internal/architecture/`):
|
|
297
|
+
- Update HLD (high-level design) when architecture changes
|
|
298
|
+
- Update LLD (low-level design) when components change
|
|
299
|
+
- Update ADRs from "Proposed" β "Accepted" after implementation
|
|
300
|
+
- Add new ADRs for significant decisions made during implementation
|
|
301
|
+
|
|
302
|
+
**Delivery Docs** (`.specweave/docs/internal/delivery/`):
|
|
303
|
+
- Update deployment guides after infrastructure changes
|
|
304
|
+
- Update CI/CD docs after pipeline modifications
|
|
305
|
+
|
|
306
|
+
**Operations Docs** (`.specweave/docs/internal/operations/`):
|
|
307
|
+
- Update runbooks after operational changes
|
|
308
|
+
- Update monitoring/alerting docs
|
|
309
|
+
|
|
310
|
+
#### 2. Increment Documentation
|
|
311
|
+
|
|
312
|
+
**Always update these files in `.specweave/increments/{increment-id}/`**:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
# Update implementation status
|
|
316
|
+
vim .specweave/increments/0001-feature/plan.md
|
|
317
|
+
# Add: "## Implementation Notes" section with learnings
|
|
318
|
+
|
|
319
|
+
# Update task checklist
|
|
320
|
+
vim .specweave/increments/0001-feature/tasks.md
|
|
321
|
+
# Mark completed: - [x] T001: Task description
|
|
322
|
+
|
|
323
|
+
# Document completion
|
|
324
|
+
vim .specweave/increments/0001-feature/reports/completion-report.md
|
|
325
|
+
# Add: Summary of what was implemented, challenges, solutions
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
#### 3. Project Documentation
|
|
329
|
+
|
|
330
|
+
**CLAUDE.md or AGENTS.md** (this file):
|
|
331
|
+
- Update when project structure changes
|
|
332
|
+
- Add new workflows or commands
|
|
333
|
+
- Update "Current Work" section
|
|
334
|
+
|
|
335
|
+
**README.md** (user-facing):
|
|
336
|
+
- Update when features are added
|
|
337
|
+
- Update installation instructions if changed
|
|
338
|
+
- Update usage examples
|
|
339
|
+
|
|
340
|
+
**CHANGELOG.md** (version history):
|
|
341
|
+
- Add entries for all user-facing changes
|
|
342
|
+
- Format: `## [version] - date` with bullet points
|
|
343
|
+
|
|
344
|
+
#### 4. Code Documentation
|
|
345
|
+
|
|
346
|
+
**Inline comments**:
|
|
347
|
+
- Add JSDoc/TSDoc for new functions
|
|
348
|
+
- Update existing comments if behavior changes
|
|
349
|
+
- Explain "why" not just "what"
|
|
350
|
+
|
|
351
|
+
### When to Update (Checklist)
|
|
352
|
+
|
|
353
|
+
After you:
|
|
354
|
+
- β
Complete a task β Update increment tasks.md
|
|
355
|
+
- β
Implement a feature β Update living docs (architecture, strategy)
|
|
356
|
+
- β
Make architecture decision β Create or update ADR
|
|
357
|
+
- β
Change project structure β Update CLAUDE.md/AGENTS.md
|
|
358
|
+
- β
Add user-facing feature β Update README.md
|
|
359
|
+
- β
Fix a bug β Update CHANGELOG.md
|
|
360
|
+
- β
Change API β Update API documentation
|
|
361
|
+
- β
Modify deployment β Update deployment guide
|
|
362
|
+
|
|
363
|
+
### Example Workflow (GitHub Copilot/Cursor Users)
|
|
364
|
+
|
|
365
|
+
```markdown
|
|
366
|
+
# After completing "Implement user authentication" task:
|
|
367
|
+
|
|
368
|
+
1. Update living docs:
|
|
369
|
+
echo "## Implementation Notes
|
|
370
|
+
- Used JWT for stateless authentication
|
|
371
|
+
- Password hashing with bcrypt
|
|
372
|
+
- Session timeout: 24 hours
|
|
373
|
+
" >> .specweave/increments/0001-auth/plan.md
|
|
374
|
+
|
|
375
|
+
2. Update architecture:
|
|
376
|
+
vim .specweave/docs/internal/architecture/hld-system.md
|
|
377
|
+
# Add authentication component diagram
|
|
378
|
+
|
|
379
|
+
3. Create ADR:
|
|
380
|
+
vim .specweave/docs/internal/architecture/adr-003-jwt-authentication.md
|
|
381
|
+
|
|
382
|
+
4. Update README:
|
|
383
|
+
vim README.md
|
|
384
|
+
# Add authentication usage example
|
|
385
|
+
|
|
386
|
+
5. Update CHANGELOG:
|
|
387
|
+
echo "### Added
|
|
388
|
+
- User authentication with JWT
|
|
389
|
+
- Password reset flow
|
|
390
|
+
" >> CHANGELOG.md
|
|
391
|
+
|
|
392
|
+
6. Mark task complete:
|
|
393
|
+
vim .specweave/increments/0001-auth/tasks.md
|
|
394
|
+
# Change [ ] to [x] for completed tasks
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Why This Matters
|
|
398
|
+
|
|
399
|
+
**Without documentation updates**:
|
|
400
|
+
- β Specs diverge from implementation (specs become useless)
|
|
401
|
+
- β Team members don't know what changed
|
|
402
|
+
- β Future AI sessions have outdated context
|
|
403
|
+
- β SpecWeave's core principle (living documentation) breaks down
|
|
404
|
+
|
|
405
|
+
**With documentation updates**:
|
|
406
|
+
- β
Specs stay synchronized with code
|
|
407
|
+
- β
Clear audit trail of changes
|
|
408
|
+
- β
AI agents have accurate context
|
|
409
|
+
- β
Team members stay informed
|
|
410
|
+
- β
SpecWeave philosophy is maintained
|
|
411
|
+
|
|
412
|
+
### Tools That Need Manual Updates
|
|
413
|
+
|
|
414
|
+
These tools **DO NOT** have automatic documentation hooks:
|
|
415
|
+
- GitHub Copilot (all versions)
|
|
416
|
+
- Cursor
|
|
417
|
+
- Windsurf
|
|
418
|
+
- Gemini CLI
|
|
419
|
+
- Generic AI tools (ChatGPT, Claude web, etc.)
|
|
420
|
+
|
|
421
|
+
Only **Claude Code** has automatic hooks that remind you to update docs.
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
279
425
|
## Security Considerations
|
|
280
426
|
|
|
281
427
|
- Never commit secrets (use `.env` files, gitignored)
|
|
@@ -317,6 +463,7 @@ When you encounter a new task:
|
|
|
317
463
|
5. β
**Technology-specific in plan.md** (HOW with details)
|
|
318
464
|
6. β
**Use checkboxes in tasks.md** for tracking
|
|
319
465
|
7. β
**All supporting files in increment folders** (never in root)
|
|
466
|
+
8. π΄ **UPDATE DOCUMENTATION AFTER EVERY TASK** (see "Documentation Updates" section above - CRITICAL for non-Claude tools!)
|
|
320
467
|
|
|
321
468
|
---
|
|
322
469
|
|