@engramm/dev-workflow 0.1.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/dist/agents/context-builder.d.ts +11 -0
- package/dist/agents/context-builder.d.ts.map +1 -0
- package/dist/agents/context-builder.js +62 -0
- package/dist/agents/context-builder.js.map +1 -0
- package/dist/agents/loader.d.ts +3 -0
- package/dist/agents/loader.d.ts.map +1 -0
- package/dist/agents/loader.js +54 -0
- package/dist/agents/loader.js.map +1 -0
- package/dist/agents/registry.d.ts +10 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +35 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/types.d.ts +20 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/cli/agent.d.ts +2 -0
- package/dist/cli/agent.d.ts.map +1 -0
- package/dist/cli/agent.js +101 -0
- package/dist/cli/agent.js.map +1 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +100 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/doctor.d.ts +2 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +123 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +94 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +7 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +177 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/run.d.ts +4 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +191 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/search.d.ts +2 -0
- package/dist/cli/search.d.ts.map +1 -0
- package/dist/cli/search.js +75 -0
- package/dist/cli/search.js.map +1 -0
- package/dist/cli/serve.d.ts +2 -0
- package/dist/cli/serve.d.ts.map +1 -0
- package/dist/cli/serve.js +34 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/status.d.ts +2 -0
- package/dist/cli/status.d.ts.map +1 -0
- package/dist/cli/status.js +89 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/cli/task.d.ts +2 -0
- package/dist/cli/task.d.ts.map +1 -0
- package/dist/cli/task.js +153 -0
- package/dist/cli/task.js.map +1 -0
- package/dist/cli/vault-io.d.ts +3 -0
- package/dist/cli/vault-io.d.ts.map +1 -0
- package/dist/cli/vault-io.js +75 -0
- package/dist/cli/vault-io.js.map +1 -0
- package/dist/hooks/post-edit.d.ts +3 -0
- package/dist/hooks/post-edit.d.ts.map +1 -0
- package/dist/hooks/post-edit.js +43 -0
- package/dist/hooks/post-edit.js.map +1 -0
- package/dist/hooks/post-task.d.ts +3 -0
- package/dist/hooks/post-task.d.ts.map +1 -0
- package/dist/hooks/post-task.js +25 -0
- package/dist/hooks/post-task.js.map +1 -0
- package/dist/hooks/pre-compact.d.ts +7 -0
- package/dist/hooks/pre-compact.d.ts.map +1 -0
- package/dist/hooks/pre-compact.js +34 -0
- package/dist/hooks/pre-compact.js.map +1 -0
- package/dist/hooks/session-end.d.ts +3 -0
- package/dist/hooks/session-end.d.ts.map +1 -0
- package/dist/hooks/session-end.js +80 -0
- package/dist/hooks/session-end.js.map +1 -0
- package/dist/hooks/session-start.d.ts +3 -0
- package/dist/hooks/session-start.d.ts.map +1 -0
- package/dist/hooks/session-start.js +108 -0
- package/dist/hooks/session-start.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/intelligence/collector.d.ts +12 -0
- package/dist/intelligence/collector.d.ts.map +1 -0
- package/dist/intelligence/collector.js +93 -0
- package/dist/intelligence/collector.js.map +1 -0
- package/dist/intelligence/ranker.d.ts +5 -0
- package/dist/intelligence/ranker.d.ts.map +1 -0
- package/dist/intelligence/ranker.js +107 -0
- package/dist/intelligence/ranker.js.map +1 -0
- package/dist/intelligence/store.d.ts +17 -0
- package/dist/intelligence/store.d.ts.map +1 -0
- package/dist/intelligence/store.js +75 -0
- package/dist/intelligence/store.js.map +1 -0
- package/dist/intelligence/sync.d.ts +3 -0
- package/dist/intelligence/sync.d.ts.map +1 -0
- package/dist/intelligence/sync.js +83 -0
- package/dist/intelligence/sync.js.map +1 -0
- package/dist/intelligence/types.d.ts +35 -0
- package/dist/intelligence/types.d.ts.map +1 -0
- package/dist/intelligence/types.js +2 -0
- package/dist/intelligence/types.js.map +1 -0
- package/dist/lib/context.d.ts +3 -0
- package/dist/lib/context.d.ts.map +1 -0
- package/dist/lib/context.js +56 -0
- package/dist/lib/context.js.map +1 -0
- package/dist/lib/conventions-detect.d.ts +12 -0
- package/dist/lib/conventions-detect.d.ts.map +1 -0
- package/dist/lib/conventions-detect.js +337 -0
- package/dist/lib/conventions-detect.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +7 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +45 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/fs-helpers.d.ts +6 -0
- package/dist/lib/fs-helpers.d.ts.map +1 -0
- package/dist/lib/fs-helpers.js +24 -0
- package/dist/lib/fs-helpers.js.map +1 -0
- package/dist/lib/interpolate.d.ts +2 -0
- package/dist/lib/interpolate.d.ts.map +1 -0
- package/dist/lib/interpolate.js +4 -0
- package/dist/lib/interpolate.js.map +1 -0
- package/dist/lib/output.d.ts +27 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +85 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/reader.d.ts +14 -0
- package/dist/lib/reader.d.ts.map +1 -0
- package/dist/lib/reader.js +75 -0
- package/dist/lib/reader.js.map +1 -0
- package/dist/lib/stack-detect.d.ts +12 -0
- package/dist/lib/stack-detect.d.ts.map +1 -0
- package/dist/lib/stack-detect.js +302 -0
- package/dist/lib/stack-detect.js.map +1 -0
- package/dist/lib/statusline.d.ts +3 -0
- package/dist/lib/statusline.d.ts.map +1 -0
- package/dist/lib/statusline.js +40 -0
- package/dist/lib/statusline.js.map +1 -0
- package/dist/lib/templates.d.ts +3 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/templates.js +174 -0
- package/dist/lib/templates.js.map +1 -0
- package/dist/lib/types.d.ts +44 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/writer.d.ts +13 -0
- package/dist/lib/writer.d.ts.map +1 -0
- package/dist/lib/writer.js +97 -0
- package/dist/lib/writer.js.map +1 -0
- package/dist/mcp/handlers.d.ts +34 -0
- package/dist/mcp/handlers.d.ts.map +1 -0
- package/dist/mcp/handlers.js +256 -0
- package/dist/mcp/handlers.js.map +1 -0
- package/dist/mcp/server.d.ts +20 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +89 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +11 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +148 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/tasks/manager.d.ts +14 -0
- package/dist/tasks/manager.d.ts.map +1 -0
- package/dist/tasks/manager.js +151 -0
- package/dist/tasks/manager.js.map +1 -0
- package/dist/tasks/tracker.d.ts +11 -0
- package/dist/tasks/tracker.d.ts.map +1 -0
- package/dist/tasks/tracker.js +31 -0
- package/dist/tasks/tracker.js.map +1 -0
- package/dist/tasks/types.d.ts +19 -0
- package/dist/tasks/types.d.ts.map +1 -0
- package/dist/tasks/types.js +2 -0
- package/dist/tasks/types.js.map +1 -0
- package/dist/workflow/builtin.d.ts +4 -0
- package/dist/workflow/builtin.d.ts.map +1 -0
- package/dist/workflow/builtin.js +93 -0
- package/dist/workflow/builtin.js.map +1 -0
- package/dist/workflow/engine.d.ts +38 -0
- package/dist/workflow/engine.d.ts.map +1 -0
- package/dist/workflow/engine.js +217 -0
- package/dist/workflow/engine.js.map +1 -0
- package/dist/workflow/loader.d.ts +4 -0
- package/dist/workflow/loader.d.ts.map +1 -0
- package/dist/workflow/loader.js +106 -0
- package/dist/workflow/loader.js.map +1 -0
- package/dist/workflow/state.d.ts +11 -0
- package/dist/workflow/state.d.ts.map +1 -0
- package/dist/workflow/state.js +49 -0
- package/dist/workflow/state.js.map +1 -0
- package/dist/workflow/types.d.ts +36 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/types.js +2 -0
- package/dist/workflow/types.js.map +1 -0
- package/package.json +54 -0
- package/templates/agents/architect.md +46 -0
- package/templates/agents/coder.md +46 -0
- package/templates/agents/committer.md +29 -0
- package/templates/agents/debugger.md +54 -0
- package/templates/agents/planner.md +45 -0
- package/templates/agents/reader.md +48 -0
- package/templates/agents/reviewer.md +48 -0
- package/templates/agents/tester.md +41 -0
- package/templates/claude/agents/researcher.md +47 -0
- package/templates/claude/agents/writer.md +29 -0
- package/templates/claude/commands/git/changelog.md +41 -0
- package/templates/claude/commands/git/merge.md +37 -0
- package/templates/claude/commands/git/new-branch.md +34 -0
- package/templates/claude/commands/git/pr-review.md +64 -0
- package/templates/claude/commands/session/handover.md +49 -0
- package/templates/claude/commands/session/resume.md +43 -0
- package/templates/claude/commands/session/review.md +81 -0
- package/templates/claude/commands/task.md +52 -0
- package/templates/claude/commands/vault/adr.md +39 -0
- package/templates/claude/commands/vault/analyze.md +110 -0
- package/templates/claude/commands/vault/bug.md +31 -0
- package/templates/claude/commands/vault/debt.md +28 -0
- package/templates/claude/commands/vault/deps.md +36 -0
- package/templates/claude/commands/vault/from-spec.md +306 -0
- package/templates/claude/commands/vault/search.md +31 -0
- package/templates/claude/commands/vault/security-scan.md +50 -0
- package/templates/claude/commands/vault/test-gaps.md +38 -0
- package/templates/claude/commands/workflow/dev.md +913 -0
- package/templates/claude/commands/workflow.md +47 -0
- package/templates/claude/settings.json +52 -0
- package/templates/claude/skills/obsidian-markdown/SKILL.md +196 -0
- package/templates/claude/skills/obsidian-markdown/references/CALLOUTS.md +58 -0
- package/templates/claude/skills/obsidian-markdown/references/EMBEDS.md +63 -0
- package/templates/claude/skills/obsidian-markdown/references/PROPERTIES.md +61 -0
- package/templates/workflows/deploy.yaml +21 -0
- package/templates/workflows/release.yaml +26 -0
- package/templates/workflows/spike.yaml +14 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# /vault:deps — Map project dependencies
|
|
2
|
+
|
|
3
|
+
Analyze project dependency graph and record in vault knowledge.
|
|
4
|
+
|
|
5
|
+
## Procedure
|
|
6
|
+
|
|
7
|
+
1. Identify dependency sources (`package.json`, `Cargo.toml`, `go.mod`, etc.)
|
|
8
|
+
2. Scan import/use statements across source files (max 20 files)
|
|
9
|
+
3. Build module dependency graph, identify circular dependencies
|
|
10
|
+
4. Find most-imported modules (core modules)
|
|
11
|
+
5. Record in vault via MCP tool `vault_knowledge` section "Architecture"
|
|
12
|
+
|
|
13
|
+
## Output format
|
|
14
|
+
|
|
15
|
+
Use this exact format (markdown, not code block):
|
|
16
|
+
|
|
17
|
+
🔗 **Dependency Map — \<projectName\>**
|
|
18
|
+
|
|
19
|
+
### Core modules
|
|
20
|
+
- **\<module\>** — imported by N files, purpose: \<description\>
|
|
21
|
+
|
|
22
|
+
### External dependencies
|
|
23
|
+
- **\<library\>** — \<purpose\>, used in \<scope\>
|
|
24
|
+
|
|
25
|
+
### Module relationships
|
|
26
|
+
- **\<module A\>** → **\<module B\>** — \<relationship\>
|
|
27
|
+
|
|
28
|
+
### Circular dependencies
|
|
29
|
+
✅ None found / ⚠️ \<list\>
|
|
30
|
+
|
|
31
|
+
💡 Updated knowledge.md → Architecture
|
|
32
|
+
|
|
33
|
+
## Rules
|
|
34
|
+
|
|
35
|
+
- Read-only — never modify source code
|
|
36
|
+
- Focus on architecture-relevant dependencies, not every import
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# /vault:from-spec — Fill vault from project specification
|
|
2
|
+
|
|
3
|
+
## Output language
|
|
4
|
+
|
|
5
|
+
All user-facing output (phase headers, tables, questions, summaries) MUST be in Russian (ru-RU).
|
|
6
|
+
Vault file content (stack.md, conventions.md, knowledge.md, gameplan.md) stays in English — it is machine-readable context for agents.
|
|
7
|
+
|
|
8
|
+
Read SPEC.md (or provided file) and fill all vault sections through phased approval.
|
|
9
|
+
For new projects where only a specification exists and the codebase is empty or minimal.
|
|
10
|
+
|
|
11
|
+
## Procedure
|
|
12
|
+
|
|
13
|
+
### Step 1: Find and read spec
|
|
14
|
+
|
|
15
|
+
1. If argument provided — read that file
|
|
16
|
+
2. Otherwise search: `SPEC.md`, `spec.md`, `docs/SPEC.md`, `.dev-vault/spec.md`
|
|
17
|
+
3. If not found:
|
|
18
|
+
|
|
19
|
+
> No spec file found. Create SPEC.md in the project root with at least:
|
|
20
|
+
> - Technology stack (languages, frameworks, databases)
|
|
21
|
+
> - Architecture overview
|
|
22
|
+
> - Features / phases
|
|
23
|
+
>
|
|
24
|
+
> Then run `/vault:from-spec` again, or pass a path: `/vault:from-spec docs/my-spec.md`
|
|
25
|
+
|
|
26
|
+
4. Read the spec file fully
|
|
27
|
+
|
|
28
|
+
### Step 2: Check vault state
|
|
29
|
+
|
|
30
|
+
Read all vault files and show current state:
|
|
31
|
+
|
|
32
|
+
📚 **From spec:** \<filename\> (\<N lines\>)
|
|
33
|
+
|
|
34
|
+
| Section | Status | Content |
|
|
35
|
+
|---------|--------|---------|
|
|
36
|
+
| stack.md | ✅ / ○ | N technologies / empty |
|
|
37
|
+
| conventions.md | ✅ / ○ | N rules / empty |
|
|
38
|
+
| knowledge.md | ✅ / ○ | N entries / empty |
|
|
39
|
+
| gameplan.md | ✅ / ○ | N phases / empty |
|
|
40
|
+
|
|
41
|
+
**Plan:** fill \<N\> empty sections from spec. Already filled sections — append only, no overwrite.
|
|
42
|
+
|
|
43
|
+
**Start?** (yes / edit / skip)
|
|
44
|
+
|
|
45
|
+
### Step 3: Fill vault (4 phases)
|
|
46
|
+
|
|
47
|
+
Wait for user confirmation before each phase.
|
|
48
|
+
|
|
49
|
+
#### Phase 1: stack.md — Technology stack
|
|
50
|
+
|
|
51
|
+
Extract from spec: languages, frameworks, databases, ORMs, testing tools, infrastructure, dev tools.
|
|
52
|
+
|
|
53
|
+
If spec is vague (e.g., "modern stack"), propose concrete choices with rationale.
|
|
54
|
+
|
|
55
|
+
**Version check:** for each library/framework, use context7 MCP (`resolve-library-id` → `query-docs`) to verify the current stable version. Specify exact versions, not ranges. If spec mentions a version — verify it's not outdated.
|
|
56
|
+
|
|
57
|
+
Show before writing:
|
|
58
|
+
|
|
59
|
+
📚 **Phase 1/4 — stack.md**
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
## Languages
|
|
63
|
+
- <language> — <version if mentioned, purpose>
|
|
64
|
+
|
|
65
|
+
## Frameworks
|
|
66
|
+
- <framework> — <purpose>
|
|
67
|
+
|
|
68
|
+
## Database
|
|
69
|
+
- <database> — <purpose>
|
|
70
|
+
|
|
71
|
+
## Testing
|
|
72
|
+
- <tool> — <purpose>
|
|
73
|
+
|
|
74
|
+
## Infrastructure
|
|
75
|
+
- <tool> — <purpose>
|
|
76
|
+
|
|
77
|
+
## Dev Tools
|
|
78
|
+
- <tool> — <purpose>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Only include sections that have content from the spec.**
|
|
82
|
+
|
|
83
|
+
If stack.md already has content — show diff: what will be added, what already exists.
|
|
84
|
+
|
|
85
|
+
**Apply?** (yes / edit / skip)
|
|
86
|
+
|
|
87
|
+
If yes — write to `.dev-vault/stack.md`, preserving existing content.
|
|
88
|
+
|
|
89
|
+
#### Phase 2: conventions.md — Code conventions
|
|
90
|
+
|
|
91
|
+
Extract or derive from spec: file structure, naming conventions, code style, patterns, git workflow, testing approach.
|
|
92
|
+
|
|
93
|
+
If spec does not mention conventions explicitly — derive from the chosen stack:
|
|
94
|
+
- TypeScript project → suggest standard TS conventions
|
|
95
|
+
- Rust project → suggest standard Rust conventions
|
|
96
|
+
- etc.
|
|
97
|
+
|
|
98
|
+
Reference stack.md from Phase 1 for consistency.
|
|
99
|
+
|
|
100
|
+
Show before writing:
|
|
101
|
+
|
|
102
|
+
📚 **Phase 2/4 — conventions.md**
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
## File Structure
|
|
106
|
+
- <directory> — <purpose>
|
|
107
|
+
|
|
108
|
+
## Naming
|
|
109
|
+
- Functions: <convention>
|
|
110
|
+
- Types/Classes: <convention>
|
|
111
|
+
- Files: <convention>
|
|
112
|
+
- Database: <convention if applicable>
|
|
113
|
+
|
|
114
|
+
## Code Style
|
|
115
|
+
- <rule>
|
|
116
|
+
|
|
117
|
+
## Patterns
|
|
118
|
+
- <pattern>: <where/when>
|
|
119
|
+
|
|
120
|
+
## Git
|
|
121
|
+
- Branches: <convention>
|
|
122
|
+
- Commits: <convention>
|
|
123
|
+
|
|
124
|
+
## Testing
|
|
125
|
+
- <approach>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Apply?** (yes / edit / skip)
|
|
129
|
+
|
|
130
|
+
#### Phase 3: knowledge.md — Architecture, Data Model, API, Security
|
|
131
|
+
|
|
132
|
+
This is the most substantial phase. Extract from spec and analyze from multiple perspectives.
|
|
133
|
+
|
|
134
|
+
**3a: Architecture**
|
|
135
|
+
|
|
136
|
+
Extract: components, their relationships, data flow, deployment model.
|
|
137
|
+
|
|
138
|
+
Analyze from 3 perspectives:
|
|
139
|
+
- **Maintainability** — separation of concerns, modularity, testability
|
|
140
|
+
- **Security** — attack surface, trust boundaries, auth/authz model
|
|
141
|
+
- **Pragmatism** — complexity vs value, MVP scope, what to defer
|
|
142
|
+
|
|
143
|
+
If perspectives conflict — note the conflict and recommend a resolution.
|
|
144
|
+
|
|
145
|
+
**3b: Data Model (if applicable)**
|
|
146
|
+
|
|
147
|
+
Extract: entities, relationships, constraints, indexes.
|
|
148
|
+
|
|
149
|
+
**3c: API (if applicable)**
|
|
150
|
+
|
|
151
|
+
Extract: endpoints, methods, auth requirements, request/response shapes.
|
|
152
|
+
|
|
153
|
+
**3d: Security**
|
|
154
|
+
|
|
155
|
+
Extract: auth mechanism, data protection, input validation, secrets management.
|
|
156
|
+
|
|
157
|
+
Show before writing:
|
|
158
|
+
|
|
159
|
+
📚 **Phase 3/4 — knowledge.md**
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
## Architecture
|
|
163
|
+
- <component> -> <component>: <relationship>
|
|
164
|
+
- Deployment: <model>
|
|
165
|
+
|
|
166
|
+
## Data Model
|
|
167
|
+
- <entity>: <key fields, relationships>
|
|
168
|
+
|
|
169
|
+
## API
|
|
170
|
+
- <method> <path> — <purpose> [auth: <type>]
|
|
171
|
+
|
|
172
|
+
## Security
|
|
173
|
+
- Auth: <mechanism>
|
|
174
|
+
- Data: <protection approach>
|
|
175
|
+
- Validation: <approach>
|
|
176
|
+
|
|
177
|
+
## Gotchas
|
|
178
|
+
- <non-obvious constraint or decision from spec>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Only include sections that have content from the spec.**
|
|
182
|
+
|
|
183
|
+
If knowledge.md already has content — append new sections, do not overwrite existing.
|
|
184
|
+
|
|
185
|
+
**Apply?** (yes / edit / skip)
|
|
186
|
+
|
|
187
|
+
#### Phase 4: gameplan.md — Phases and tasks
|
|
188
|
+
|
|
189
|
+
Break the spec into implementation phases. Each phase should be:
|
|
190
|
+
- Independently deployable (or at least testable)
|
|
191
|
+
- 1-3 days of work
|
|
192
|
+
- Ordered by dependencies (foundation first)
|
|
193
|
+
|
|
194
|
+
Show before writing:
|
|
195
|
+
|
|
196
|
+
📚 **Phase 4/4 — gameplan.md**
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
## Current Phase
|
|
200
|
+
Phase 1: <name>
|
|
201
|
+
|
|
202
|
+
## Phases
|
|
203
|
+
|
|
204
|
+
### Phase 1: <name> — <goal>
|
|
205
|
+
- [ ] <task>
|
|
206
|
+
- [ ] <task>
|
|
207
|
+
**Done when:** <completion criteria>
|
|
208
|
+
|
|
209
|
+
### Phase 2: <name> — <goal>
|
|
210
|
+
- [ ] <task>
|
|
211
|
+
- [ ] <task>
|
|
212
|
+
**Done when:** <completion criteria>
|
|
213
|
+
|
|
214
|
+
### Phase N: Hardening
|
|
215
|
+
- [ ] Test coverage
|
|
216
|
+
- [ ] Security audit
|
|
217
|
+
- [ ] Performance
|
|
218
|
+
- [ ] Documentation
|
|
219
|
+
**Done when:** <completion criteria>
|
|
220
|
+
|
|
221
|
+
## Backlog
|
|
222
|
+
- <deferred items from spec>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Apply?** (yes / edit / skip)
|
|
226
|
+
|
|
227
|
+
After approval, offer to create tasks and phase files:
|
|
228
|
+
|
|
229
|
+
> Create tasks from Phase 1? (yes / no)
|
|
230
|
+
|
|
231
|
+
If yes — create task for each item in Phase 1 via `dev-workflow task create "<title>"`.
|
|
232
|
+
|
|
233
|
+
> Create executable phase files? (yes / no)
|
|
234
|
+
|
|
235
|
+
If yes — for each phase in gameplan.md, create `.dev-vault/phases/phase-N-<slug>.md`:
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
---
|
|
239
|
+
phase: <N>
|
|
240
|
+
name: <phase name>
|
|
241
|
+
status: pending
|
|
242
|
+
depends_on: <N-1 or null>
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
# Phase N: <name>
|
|
246
|
+
|
|
247
|
+
## Goal
|
|
248
|
+
<from gameplan "Done when" criteria>
|
|
249
|
+
|
|
250
|
+
## Tasks
|
|
251
|
+
1. <task from gameplan>
|
|
252
|
+
2. <task from gameplan>
|
|
253
|
+
|
|
254
|
+
## New files
|
|
255
|
+
- <path> — <purpose>
|
|
256
|
+
|
|
257
|
+
## Changes to existing files
|
|
258
|
+
- <path> — <what to change>
|
|
259
|
+
|
|
260
|
+
## Tests
|
|
261
|
+
- <test file> — <what to test>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
For each phase file:
|
|
265
|
+
- Derive file/change list from spec requirements for that phase
|
|
266
|
+
- Keep tasks matching gameplan.md exactly
|
|
267
|
+
- "New files" and "Changes" are best-effort estimates from spec context
|
|
268
|
+
|
|
269
|
+
After creation:
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
✅ Phase files created:
|
|
273
|
+
.dev-vault/phases/phase-1-<slug>.md
|
|
274
|
+
.dev-vault/phases/phase-2-<slug>.md
|
|
275
|
+
...
|
|
276
|
+
|
|
277
|
+
💡 Run: /workflow:dev .dev-vault/phases/phase-1-<slug>.md
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Step 4: Summary
|
|
281
|
+
|
|
282
|
+
✅ **vault:from-spec complete**
|
|
283
|
+
|
|
284
|
+
| Phase | Section | Items | Status |
|
|
285
|
+
|-------|---------|-------|--------|
|
|
286
|
+
| 1 | stack.md | +N technologies | ✅ applied / ○ skipped |
|
|
287
|
+
| 2 | conventions.md | +N rules | ✅ applied / ○ skipped |
|
|
288
|
+
| 3 | knowledge.md | +N entries | ✅ applied / ○ skipped |
|
|
289
|
+
| 4 | gameplan.md | +N phases, M tasks | ✅ applied / ○ skipped |
|
|
290
|
+
|
|
291
|
+
**Next steps:**
|
|
292
|
+
- Review vault: `dev-workflow status`
|
|
293
|
+
- Start Phase 1: `dev-workflow task list` then `dev-workflow task start <id>`
|
|
294
|
+
- Or run full workflow: `dev-workflow run dev "Phase 1 task"`
|
|
295
|
+
|
|
296
|
+
## Rules
|
|
297
|
+
|
|
298
|
+
- **Gate criteria:** each phase requires explicit user approval before writing
|
|
299
|
+
- **Preserve existing content** — never overwrite filled sections, only append
|
|
300
|
+
- **Be specific** — "TypeScript 5.x with strict mode" not "typed language"
|
|
301
|
+
- **Derive when implicit** — if spec says "REST API" but not "Express", propose based on stack
|
|
302
|
+
- **Skip empty phases** — if spec has no data model, skip 3b entirely
|
|
303
|
+
- **No secrets** — never include API keys, passwords, or credentials
|
|
304
|
+
- **Reference spec** — cite which part of the spec each item comes from
|
|
305
|
+
- **Multi-perspective on architecture only** — other phases use single-pass analysis
|
|
306
|
+
- **Gameplan phases are coarse** — detailed task breakdown happens in `/task` and `/workflow`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# /vault:search — Search the vault
|
|
2
|
+
|
|
3
|
+
Search `.dev-vault/` for relevant information.
|
|
4
|
+
|
|
5
|
+
## Procedure
|
|
6
|
+
|
|
7
|
+
1. Take the user's search query
|
|
8
|
+
2. Use MCP tool `vault_search` with the query, or search via Grep
|
|
9
|
+
3. Present results grouped by type
|
|
10
|
+
4. Show 3-5 lines of context around each match
|
|
11
|
+
5. If no results, suggest alternative terms
|
|
12
|
+
|
|
13
|
+
## Output format
|
|
14
|
+
|
|
15
|
+
Use this exact format (markdown, not code block):
|
|
16
|
+
|
|
17
|
+
🔍 **Search:** "\<query\>"
|
|
18
|
+
|
|
19
|
+
### Knowledge
|
|
20
|
+
- **knowledge.md:42** — \<matching line with context\>
|
|
21
|
+
|
|
22
|
+
### Branches
|
|
23
|
+
- **branches/feature-auth.md:15** — \<matching line\>
|
|
24
|
+
|
|
25
|
+
### Tasks
|
|
26
|
+
- **tasks/task-001.md:3** — \<matching line\>
|
|
27
|
+
|
|
28
|
+
### Daily logs
|
|
29
|
+
- **daily/2026-03-30.md:8** — \<matching line\>
|
|
30
|
+
|
|
31
|
+
**Found N matches across M files.**
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# /vault:security-scan — Security audit of the codebase
|
|
2
|
+
|
|
3
|
+
Scan the project for common security issues and record findings in vault.
|
|
4
|
+
|
|
5
|
+
## Procedure
|
|
6
|
+
|
|
7
|
+
1. Check for hardcoded secrets:
|
|
8
|
+
- Search for patterns: `API_KEY`, `SECRET`, `PASSWORD`, `TOKEN`, `PRIVATE_KEY` in source files
|
|
9
|
+
- Check `.env.example` exists if `.env` is in `.gitignore`
|
|
10
|
+
- Verify no `.env` files are committed: `git ls-files | grep '\.env'`
|
|
11
|
+
|
|
12
|
+
2. Check dependency security:
|
|
13
|
+
- Run `npm audit` or `cargo audit` if available
|
|
14
|
+
- Check for known vulnerable dependencies
|
|
15
|
+
|
|
16
|
+
3. Check OWASP Top 10 patterns:
|
|
17
|
+
- SQL injection: raw queries without parameterization
|
|
18
|
+
- XSS: unescaped user input in templates
|
|
19
|
+
- Command injection: `exec()`, `execSync()` with user input
|
|
20
|
+
- Path traversal: file operations with unsanitized paths
|
|
21
|
+
- Insecure deserialization: `JSON.parse()` on untrusted input
|
|
22
|
+
|
|
23
|
+
4. Check configuration:
|
|
24
|
+
- CORS headers, HTTPS, rate limiting, auth middleware
|
|
25
|
+
|
|
26
|
+
5. Record findings:
|
|
27
|
+
- Critical/High → use MCP tool `vault_record` type "bug"
|
|
28
|
+
- Patterns → use MCP tool `vault_knowledge` section "Security"
|
|
29
|
+
|
|
30
|
+
## Output format
|
|
31
|
+
|
|
32
|
+
Use this exact format (markdown, not code block):
|
|
33
|
+
|
|
34
|
+
🔒 **Security Scan — \<projectName\>**
|
|
35
|
+
|
|
36
|
+
### 🔴 Critical
|
|
37
|
+
- **\<file:line\>** — \<issue description\>
|
|
38
|
+
|
|
39
|
+
### 🟠 High
|
|
40
|
+
- **\<file:line\>** — \<issue description\>
|
|
41
|
+
|
|
42
|
+
### 🟡 Medium
|
|
43
|
+
- **\<file:line\>** — \<issue description\>
|
|
44
|
+
|
|
45
|
+
### ✅ Recommendations
|
|
46
|
+
- \<action item\>
|
|
47
|
+
|
|
48
|
+
**Scanned N files. Found M issues (C critical, H high, M medium).**
|
|
49
|
+
|
|
50
|
+
💡 Record high issue? (yes → /vault:bug)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# /vault:test-gaps — Find untested code
|
|
2
|
+
|
|
3
|
+
Analyze test coverage gaps and record as tech debt.
|
|
4
|
+
|
|
5
|
+
## Procedure
|
|
6
|
+
|
|
7
|
+
1. Identify test files (`tests/`, `__tests__/`, `*.test.ts`, `*_test.rs`, `*_test.go`)
|
|
8
|
+
2. Map each test file to the source file it covers
|
|
9
|
+
3. Find source files without tests (exclude types, constants, re-exports)
|
|
10
|
+
4. Analyze test quality for covered files
|
|
11
|
+
5. Run test suite if possible (`npm test` / `cargo test` / `go test ./...`)
|
|
12
|
+
6. Record findings via MCP tools
|
|
13
|
+
|
|
14
|
+
## Output format
|
|
15
|
+
|
|
16
|
+
Use this exact format (markdown, not code block):
|
|
17
|
+
|
|
18
|
+
🧪 **Test Coverage Gaps — \<projectName\>**
|
|
19
|
+
|
|
20
|
+
### 🔴 Untested
|
|
21
|
+
- **\<file\>** — \<reason it needs tests\>
|
|
22
|
+
|
|
23
|
+
### 🟡 Under-tested
|
|
24
|
+
- **\<file\>** (N tests) — Missing: \<specific gaps\>
|
|
25
|
+
|
|
26
|
+
### Quality
|
|
27
|
+
- ✅ \<positive observation\>
|
|
28
|
+
- ⚠️ \<issue\>
|
|
29
|
+
|
|
30
|
+
**Summary:** N/M source files tested. K need attention.
|
|
31
|
+
|
|
32
|
+
💡 Record as debt? (yes → /vault:debt for each gap)
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- Read-only — never create test files (that's the tester agent's job)
|
|
37
|
+
- Focus on significant gaps, not 100% coverage
|
|
38
|
+
- Prioritize: critical paths > error handling > edge cases > utility functions
|