specdacular 0.10.0 → 0.11.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.
Files changed (60) hide show
  1. package/README.md +3 -3
  2. package/bin/install.js +3 -1
  3. package/bin/specd.js +135 -0
  4. package/commands/specd.best-practices.md +75 -0
  5. package/commands/specd.docs.md +81 -0
  6. package/commands/specd.docs.review.md +80 -0
  7. package/commands/specd.generate-skills.learn.md +65 -0
  8. package/commands/specd.new-project.md +58 -0
  9. package/commands/specd.new-runner-task.md +52 -0
  10. package/commands/specd.new.md +6 -6
  11. package/commands/specd.runner-status.md +27 -0
  12. package/package.json +6 -2
  13. package/runner/main/agent/parser.js +39 -0
  14. package/runner/main/agent/runner.js +137 -0
  15. package/runner/main/agent/template.js +16 -0
  16. package/runner/main/bootstrap.js +69 -0
  17. package/runner/main/db.js +45 -0
  18. package/runner/main/index.js +103 -0
  19. package/runner/main/ipc.js +72 -0
  20. package/runner/main/notifications/telegram.js +45 -0
  21. package/runner/main/orchestrator.js +193 -0
  22. package/runner/main/paths.js +36 -0
  23. package/runner/main/pipeline/resolver.js +20 -0
  24. package/runner/main/pipeline/sequencer.js +42 -0
  25. package/runner/main/server/api.js +125 -0
  26. package/runner/main/server/index.js +33 -0
  27. package/runner/main/server/websocket.js +24 -0
  28. package/runner/main/state/manager.js +83 -0
  29. package/runner/main/template-manager.js +41 -0
  30. package/runner/main/test/agent-parser.test.js +44 -0
  31. package/runner/main/test/bootstrap.test.js +58 -0
  32. package/runner/main/test/db.test.js +72 -0
  33. package/runner/main/test/paths.test.js +29 -0
  34. package/runner/main/test/state-manager.test.js +72 -0
  35. package/runner/main/test/template-manager.test.js +66 -0
  36. package/runner/main/worktree/manager.js +95 -0
  37. package/runner/package.json +22 -0
  38. package/runner/preload.js +19 -0
  39. package/specdacular/HELP.md +20 -11
  40. package/specdacular/agents/best-practices-researcher.md +271 -0
  41. package/specdacular/agents/project-researcher.md +409 -0
  42. package/specdacular/references/load-context.md +4 -7
  43. package/specdacular/templates/orchestrator/CONCERNS.md +1 -1
  44. package/specdacular/templates/orchestrator/PROJECTS.md +3 -4
  45. package/specdacular/templates/tasks/PLAN.md +2 -2
  46. package/specdacular/templates/tasks/PROJECT.md +52 -0
  47. package/specdacular/templates/tasks/REQUIREMENTS.md +75 -0
  48. package/specdacular/workflows/best-practices.md +472 -0
  49. package/specdacular/workflows/context-add.md +16 -30
  50. package/specdacular/workflows/context-manual-review.md +7 -7
  51. package/specdacular/workflows/docs-review.md +273 -0
  52. package/specdacular/workflows/docs.md +420 -0
  53. package/specdacular/workflows/generate-learn-skill.md +214 -0
  54. package/specdacular/workflows/new-project.md +799 -0
  55. package/specdacular/workflows/new.md +5 -4
  56. package/specdacular/workflows/orchestrator/new.md +4 -4
  57. package/specdacular/workflows/orchestrator/plan.md +6 -6
  58. package/commands/specd.codebase.map.md +0 -72
  59. package/commands/specd.codebase.review.md +0 -39
  60. package/specdacular/workflows/map-codebase.md +0 -715
@@ -90,21 +90,22 @@ End main workflow.
90
90
 
91
91
  **Check for codebase docs:**
92
92
  ```bash
93
- ls .specd/codebase/*.md 2>/dev/null
93
+ [ -f "CLAUDE.md" ] && cat CLAUDE.md || echo "no_claude_md"
94
+ ls docs/*.md 2>/dev/null
94
95
  ```
95
96
 
96
- **If codebase docs found:**
97
+ **If CLAUDE.md or docs/ found:**
97
98
  ```
98
99
  Found codebase documentation. I'll reference these when defining requirements.
99
100
  ```
100
- Read the available docs to understand project structure, code patterns, and architecture.
101
+ Read the CLAUDE.md routing table and referenced docs to understand project structure, code patterns, and architecture.
101
102
 
102
103
  **If no codebase docs found:**
103
104
  Use AskUserQuestion:
104
105
  - header: "No Codebase Docs"
105
106
  - question: "I didn't find codebase documentation. How should we proceed?"
106
107
  - options:
107
- - "Run map-codebase first" — Creates AI-optimized docs
108
+ - "Run /specd.docs first" — Generates topic docs and CLAUDE.md routing table
108
109
  - "Continue without" — Proceed without codebase context
109
110
  - "Custom location" — Docs are elsewhere
110
111
 
@@ -13,10 +13,10 @@ Called from the main `new.md` workflow after orchestrator mode detection.
13
13
  <step name="load_system_docs">
14
14
  Read system-level codebase docs:
15
15
 
16
- - `.specd/codebase/PROJECTS.md` — Project registry
17
- - `.specd/codebase/TOPOLOGY.md` — Communication patterns
18
- - `.specd/codebase/CONTRACTS.md` — Shared interfaces
19
- - `.specd/codebase/CONCERNS.md` — System-level concerns
16
+ - `docs/PROJECTS.md` — Project registry
17
+ - `docs/TOPOLOGY.md` — Communication patterns
18
+ - `docs/CONTRACTS.md` — Shared interfaces
19
+ - `docs/CONCERNS.md` — System-level concerns
20
20
 
21
21
  Read project list from `.specd/config.json` `"projects"` array.
22
22
 
@@ -13,16 +13,16 @@ Called from the main `plan.md` workflow after orchestrator mode detection.
13
13
  <step name="load_cross_project_context">
14
14
  Load system-level and sub-project context.
15
15
 
16
- **System-level codebase docs:**
17
- - `.specd/codebase/PROJECTS.md` — Project registry
18
- - `.specd/codebase/TOPOLOGY.md` — Communication patterns
19
- - `.specd/codebase/CONTRACTS.md` — Shared interfaces
16
+ **System-level docs:**
17
+ - `docs/PROJECTS.md` — Project registry
18
+ - `docs/TOPOLOGY.md` — Communication patterns
19
+ - `docs/CONTRACTS.md` — Shared interfaces
20
20
 
21
21
  **Sub-project context:**
22
22
  From task config.json `"projects"` array, for each project:
23
23
  - Read `{project-path}/.specd/tasks/{task-name}/FEATURE.md` — Project-specific requirements
24
- - Read `{project-path}/.specd/codebase/MAP.md` — Project code overview (if exists)
25
- - Read `{project-path}/.specd/codebase/PATTERNS.md` — Project patterns (if exists)
24
+ - Read `{project-path}/CLAUDE.md` — Project routing table and docs (if exists)
25
+ - Read `{project-path}/docs/*.md` — Project topic docs (if exists)
26
26
 
27
27
  ```
28
28
  Orchestrator mode: {N} projects involved in this task.
@@ -1,72 +0,0 @@
1
- ---
2
- name: specd.codebase.map
3
- description: Analyze codebase with parallel agents to produce AI-optimized documentation
4
- argument-hint: ""
5
- allowed-tools:
6
- - Read
7
- - Bash
8
- - Glob
9
- - Grep
10
- - Write
11
- - Task
12
- ---
13
-
14
- <objective>
15
- Analyze existing codebase using parallel mapper agents to produce 4 AI-optimized documents.
16
-
17
- Each mapper agent explores a focus area and **writes documents directly** to `.specd/codebase/`. The orchestrator only receives confirmations, keeping context usage minimal.
18
-
19
- Output: .specd/codebase/ folder with 4 documents designed for Claude consumption.
20
- </objective>
21
-
22
- <execution_context>
23
- @~/.claude/specdacular/workflows/map-codebase.md
24
- </execution_context>
25
-
26
- <context>
27
- **These documents are FOR CLAUDE, not humans.**
28
-
29
- Each document answers a question Claude can't get from reading code:
30
-
31
- | Document | Question it answers |
32
- |----------|---------------------|
33
- | MAP.md | "Where is X? What functions exist?" |
34
- | PATTERNS.md | "How do I write code that fits here?" |
35
- | STRUCTURE.md | "Where do I put new code?" |
36
- | CONCERNS.md | "What will bite me?" |
37
-
38
- **Principle:** Don't document what Claude can grep. Document tribal knowledge, gotchas, and patterns.
39
- </context>
40
-
41
- <when_to_use>
42
- **Use map-codebase for:**
43
- - First time working with a codebase
44
- - Before planning a new feature
45
- - After significant refactoring
46
- - Onboarding Claude to an unfamiliar repo
47
-
48
- **Skip map-codebase for:**
49
- - Trivial codebases (<10 files)
50
- - When you already have recent codebase docs
51
- </when_to_use>
52
-
53
- <process>
54
- 1. Check if .specd/codebase/ already exists (offer to refresh or skip)
55
- 2. Create .specd/codebase/ directory
56
- 3. Spawn 4 parallel specd-codebase-mapper agents:
57
- - Agent 1: map focus → writes MAP.md
58
- - Agent 2: patterns focus → writes PATTERNS.md
59
- - Agent 3: structure focus → writes STRUCTURE.md
60
- - Agent 4: concerns focus → writes CONCERNS.md
61
- 4. Wait for agents to complete, collect confirmations
62
- 5. Verify all 4 documents exist
63
- 6. Commit codebase map
64
- 7. Report completion
65
- </process>
66
-
67
- <success_criteria>
68
- - [ ] .specd/codebase/ directory created
69
- - [ ] All 4 documents written by mapper agents
70
- - [ ] Documents contain real code examples (not placeholders)
71
- - [ ] Parallel agents completed without errors
72
- </success_criteria>
@@ -1,39 +0,0 @@
1
- ---
2
- name: specd.codebase.review
3
- description: "Review and edit codebase context files section by section"
4
- argument-hint: ""
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Task
13
- - AskUserQuestion
14
- ---
15
-
16
- <objective>
17
- Walk through and review a codebase context file (.specd/codebase/*.md) section by section. Confirm, edit, remove, or re-map individual sections.
18
-
19
- Output: Updated context file with reviewed/edited sections and updated timestamps.
20
- </objective>
21
-
22
- <execution_context>
23
- Follow the context-manual-review workflow:
24
- @~/.claude/specdacular/workflows/context-manual-review.md
25
- </execution_context>
26
-
27
- <context>
28
- **Context workflows:**
29
- @~/.claude/specdacular/workflows/context-manual-review.md
30
- @~/.claude/specdacular/workflows/context-add.md
31
- </context>
32
-
33
- <success_criteria>
34
- - [ ] User selects a context file to review
35
- - [ ] Section list shown with tag status
36
- - [ ] User can confirm, edit, remove, or re-map each section
37
- - [ ] Timestamps updated after review
38
- - [ ] Changes committed
39
- </success_criteria>