@wrongstack/core 0.4.0 → 0.5.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 (62) hide show
  1. package/dist/{agent-bridge-DaOnnHNW.d.ts → agent-bridge-BkjOkSkD.d.ts} +1 -1
  2. package/dist/{compactor-CFky6JKM.d.ts → compactor-CTHjZAwf.d.ts} +1 -1
  3. package/dist/{config-RlhKLjme.d.ts → config-DO2eCKgq.d.ts} +1 -1
  4. package/dist/{context-B1kBj1lY.d.ts → context-P207fTpo.d.ts} +11 -0
  5. package/dist/coordination/index.d.ts +10 -891
  6. package/dist/coordination/index.js +407 -236
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +19 -18
  9. package/dist/defaults/index.js +2163 -301
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{events-BBaKeMfb.d.ts → events-DYAbU84e.d.ts} +41 -1
  12. package/dist/execution/index.d.ts +19 -13
  13. package/dist/execution/index.js +15 -6
  14. package/dist/execution/index.js.map +1 -1
  15. package/dist/extension/index.d.ts +6 -6
  16. package/dist/index-BHL8QDCL.d.ts +899 -0
  17. package/dist/{index-meJRuQtc.d.ts → index-BNzUUDVR.d.ts} +8 -6
  18. package/dist/index.d.ts +30 -27
  19. package/dist/index.js +3792 -1466
  20. package/dist/index.js.map +1 -1
  21. package/dist/infrastructure/index.d.ts +6 -6
  22. package/dist/infrastructure/index.js +71 -18
  23. package/dist/infrastructure/index.js.map +1 -1
  24. package/dist/kernel/index.d.ts +10 -9
  25. package/dist/kernel/index.js.map +1 -1
  26. package/dist/{mcp-servers-Cf4-bJnd.d.ts → mcp-servers-CLkhKdnF.d.ts} +18 -3
  27. package/dist/models/index.d.ts +2 -2
  28. package/dist/models/index.js +106 -0
  29. package/dist/models/index.js.map +1 -1
  30. package/dist/{multi-agent-D5m66hzB.d.ts → multi-agent-B1Nn9eC0.d.ts} +71 -16
  31. package/dist/observability/index.d.ts +2 -2
  32. package/dist/{path-resolver-Bg4OP5fi.d.ts → path-resolver-mPccVA0l.d.ts} +9 -2
  33. package/dist/{provider-runner-CU9gnU2E.d.ts → provider-runner-D7lHu07L.d.ts} +3 -3
  34. package/dist/{skill-DayhFUBb.d.ts → retry-policy-CnYVKGPv.d.ts} +2 -28
  35. package/dist/sdd/index.d.ts +419 -5
  36. package/dist/sdd/index.js +1580 -1
  37. package/dist/sdd/index.js.map +1 -1
  38. package/dist/{secret-scrubber-Dyh5LVYL.d.ts → secret-scrubber-BSgec8CU.d.ts} +1 -1
  39. package/dist/{secret-scrubber-DyUAWS09.d.ts → secret-scrubber-Buo9zLGs.d.ts} +1 -1
  40. package/dist/security/index.d.ts +8 -4
  41. package/dist/security/index.js +24 -5
  42. package/dist/security/index.js.map +1 -1
  43. package/dist/{selector-DBEiwXBk.d.ts → selector-B-CGOshv.d.ts} +1 -1
  44. package/dist/{session-reader-D-z0AgHs.d.ts → session-reader-DmOEmSkq.d.ts} +1 -1
  45. package/dist/skill-CxuWrsKK.d.ts +29 -0
  46. package/dist/skills/index.d.ts +136 -0
  47. package/dist/skills/index.js +478 -0
  48. package/dist/skills/index.js.map +1 -0
  49. package/dist/storage/index.d.ts +5 -5
  50. package/dist/storage/index.js +9 -1
  51. package/dist/storage/index.js.map +1 -1
  52. package/dist/{system-prompt-DNetCecu.d.ts → system-prompt-CzY1zrbC.d.ts} +1 -1
  53. package/dist/{tool-executor-B5bgmEgE.d.ts → tool-executor-CYe5cp5U.d.ts} +4 -4
  54. package/dist/types/index.d.ts +16 -15
  55. package/dist/types/index.js +132 -5
  56. package/dist/types/index.js.map +1 -1
  57. package/dist/utils/index.d.ts +35 -2
  58. package/dist/utils/index.js +49 -1
  59. package/dist/utils/index.js.map +1 -1
  60. package/package.json +5 -1
  61. package/skills/sdd/SKILL.md +93 -6
  62. package/skills/skill-creator/SKILL.md +98 -0
@@ -2,9 +2,10 @@
2
2
  name: sdd
3
3
  description: |
4
4
  Specification-driven development workflow. Covers spec parsing,
5
- task graph generation from requirements, dependency tracking, and
6
- done-condition execution. Use when implementing features.
7
- version: 1.0.0
5
+ task graph generation from requirements, dependency tracking,
6
+ interactive spec building, persistence, visualization, critical
7
+ path analysis, spec versioning, and auto-execution.
8
+ version: 2.0.0
8
9
  ---
9
10
 
10
11
  # Spec-Driven Development
@@ -18,7 +19,9 @@ Every non-trivial change starts with a spec. The spec is the source of truth. Ta
18
19
  ## Workflow
19
20
 
20
21
  ```
21
- Spec → Analysis → Task Graph → Execution → Done
22
+ Spec → Analysis → Task Graph → Visualization → Execution → Done
23
+ ↑ ↓
24
+ └── Versioning ──────┘ (incremental updates)
22
25
  ```
23
26
 
24
27
  ### When to use
@@ -28,7 +31,50 @@ Spec → Analysis → Task Graph → Execution → Done
28
31
  - Refactoring with scope
29
32
  - Any task requiring more than 1 hour
30
33
 
31
- ### Spec sections
34
+ ## Slash Command: /sdd
35
+
36
+ The `/sdd` command provides the full SDD workflow through the REPL/TUI:
37
+
38
+ ```
39
+ /sdd new [title] — Interactive spec builder (question-driven)
40
+ /sdd from <template> — Create from template (feature|bugfix|refactor|infra|integration|cli-command)
41
+ /sdd list — List saved specs
42
+ /sdd show <id> — Show spec details + completeness analysis
43
+ /sdd analyze <id> — Deep spec analysis (gaps, risks, suggestions)
44
+ /sdd tasks <id> — Generate task graph from spec
45
+ /sdd graph <id> — ASCII visualization of task graph
46
+ /sdd status <id> — Compact task list grouped by status
47
+ /sdd critical <id> — Critical path analysis with bottlenecks
48
+ /sdd execute <id> — Auto-execute tasks (dependency-aware)
49
+ /sdd templates — List available spec templates
50
+ /sdd version <id> — Show spec version history
51
+ ```
52
+
53
+ ### Full workflow example
54
+
55
+ ```
56
+ 1. /sdd new Auth System
57
+ 2. Answer questions (title, overview, requirements, acceptance criteria)
58
+ 3. /sdd tasks <id> → generates task graph
59
+ 4. /sdd graph <id> → visualize dependencies
60
+ 5. /sdd critical <id> → find bottlenecks
61
+ 6. /sdd execute <id> → run tasks autonomously
62
+ ```
63
+
64
+ ## Spec Templates
65
+
66
+ Built-in templates for common scenarios:
67
+
68
+ | Template | Best for |
69
+ |---|---|
70
+ | `feature` | New feature development |
71
+ | `bugfix` | Bug fix with root cause analysis |
72
+ | `refactor` | Code refactoring with goals |
73
+ | `infra` | Infrastructure/tooling changes |
74
+ | `integration` | External service integration |
75
+ | `cli-command` | New CLI commands/slash commands |
76
+
77
+ ## Spec sections
32
78
 
33
79
  A good spec includes:
34
80
 
@@ -50,6 +96,20 @@ A good spec includes:
50
96
 
51
97
  Priority markers: `[critical]`, `[high]`, `[medium]`, `[low]`
52
98
 
99
+ ## Persistence
100
+
101
+ Specs and task graphs are persisted under `.wrongstack/`:
102
+
103
+ ```
104
+ .wrongstack/
105
+ specs/
106
+ _index.json — Spec index for fast listing
107
+ <uuid>.json — Individual spec files
108
+ task-graphs/
109
+ _index.json — Task graph index
110
+ <uuid>.json — Individual graph files (Map-aware JSON)
111
+ ```
112
+
53
113
  ## Task generation
54
114
 
55
115
  Tasks are derived from requirements:
@@ -69,10 +129,37 @@ pending → in_progress → review → completed
69
129
  failed
70
130
  ```
71
131
 
132
+ ## Critical Path Analysis
133
+
134
+ The critical path identifies:
135
+
136
+ - **Bottleneck tasks** that block the most downstream work
137
+ - **Parallel groups** of tasks that can execute concurrently
138
+ - **Ready tasks** that can start immediately
139
+ - **Execution order** respecting all dependencies
140
+
141
+ ## Spec Versioning
142
+
143
+ When requirements change:
144
+
145
+ - Added requirements → new tasks generated
146
+ - Removed requirements → tasks removed
147
+ - Modified requirements → tasks updated (description, priority, dependencies)
148
+ - Version history tracked for audit trail
149
+
150
+ ## Auto-Execution
151
+
152
+ The auto-executor runs tasks with:
153
+
154
+ - Dependency-aware ordering (blocked tasks wait)
155
+ - Automatic retry on transient failures (configurable max retries)
156
+ - Deadlock detection (all remaining blocked by failed tasks)
157
+ - Progress tracking and event emission
158
+
72
159
  ## Done conditions
73
160
 
74
161
  A feature is done when:
75
162
  1. All critical and high priority tasks completed
76
163
  2. Tests written and passing
77
164
  3. Documentation updated
78
- 4. No blocked tasks remaining
165
+ 4. No blocked tasks remaining
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: skill-creator
3
+ description: |
4
+ Use this skill when the user wants to create a new AI skill.
5
+ Covers skill format, file structure, naming conventions,
6
+ and the interactive creation workflow.
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # Skill Creator
11
+
12
+ Guide the user through creating a new AI skill. You are the wizard — ask questions, validate answers, write the file.
13
+
14
+ ## Skill Format
15
+
16
+ Every skill is a Markdown file with YAML frontmatter:
17
+
18
+ ```markdown
19
+ ---
20
+ name: my-skill-name
21
+ description: |
22
+ First sentence is the trigger — when should this skill activate?
23
+ Rest describes what the skill covers.
24
+ version: 1.0.0
25
+ ---
26
+
27
+ # Skill Title
28
+
29
+ ## Overview
30
+ What this skill does.
31
+
32
+ ## Rules
33
+ - Rule 1
34
+ - Rule 2
35
+
36
+ ## Patterns
37
+ ### Do
38
+ ```code example```
39
+
40
+ ### Don't
41
+ ```anti-pattern example```
42
+
43
+ ## Workflow
44
+ 1. Step one
45
+ 2. Step two
46
+ ```
47
+
48
+ ## File Location
49
+
50
+ Skills live in directories under these paths (priority order):
51
+
52
+ 1. **Project**: `<project>/.wrongstack/skills/<name>/SKILL.md`
53
+ 2. **User global**: `~/.wrongstack/skills/<name>/SKILL.md`
54
+ 3. **Bundled**: `packages/core/skills/<name>/SKILL.md` (read-only)
55
+
56
+ For user-created skills, always use path 1 (project level).
57
+
58
+ ## Naming Rules
59
+
60
+ - kebab-case: `my-skill`, `docker-deploy`, `api-testing`
61
+ - Lowercase letters, numbers, hyphens only
62
+ - No spaces, no underscores, no uppercase
63
+ - Directory name = skill name
64
+
65
+ ## Description Rules
66
+
67
+ - First sentence = trigger condition. This is when the skill activates.
68
+ - Good: "Use this skill when deploying Docker containers."
69
+ - Bad: "This skill is about Docker."
70
+ - Be specific about scope — what technologies, what situations
71
+ - Multi-line descriptions use YAML block scalar (`|`)
72
+
73
+ ## Content Guidelines
74
+
75
+ - **Rules**: concrete do/don't rules, not vague advice
76
+ - **Patterns**: actual code examples, not pseudocode
77
+ - **Anti-patterns**: show what NOT to do with real code
78
+ - **Workflows**: step-by-step, actionable, not theoretical
79
+ - Keep it focused — one skill = one concern
80
+
81
+ ## Creation Workflow
82
+
83
+ When the user wants to create a skill:
84
+
85
+ 1. **Ask the name** — suggest kebab-case, validate format
86
+ 2. **Ask the description** — guide them to write a good trigger sentence
87
+ 3. **Ask what to cover** — rules, patterns, workflows they want in the body
88
+ 4. **Generate the SKILL.md** — write the file to `.wrongstack/skills/<name>/SKILL.md`
89
+ 5. **Confirm** — show the path, remind them to use `/skill` to list skills
90
+
91
+ ## Validation Checklist
92
+
93
+ Before writing the file, verify:
94
+ - [ ] Name is valid kebab-case
95
+ - [ ] Name doesn't collide with existing skills
96
+ - [ ] Description has a clear trigger sentence
97
+ - [ ] Content is actionable (rules, patterns, not just prose)
98
+ - [ ] File will be placed in `.wrongstack/skills/`