@engramm/dev-workflow 0.1.4 → 0.1.6

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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -1
  3. package/dist/cli/index.js +11 -0
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/cli/init.d.ts.map +1 -1
  6. package/dist/cli/init.js +7 -1
  7. package/dist/cli/init.js.map +1 -1
  8. package/dist/cli/run.d.ts.map +1 -1
  9. package/dist/cli/run.js +2 -0
  10. package/dist/cli/run.js.map +1 -1
  11. package/dist/cli/task.d.ts.map +1 -1
  12. package/dist/cli/task.js +35 -0
  13. package/dist/cli/task.js.map +1 -1
  14. package/dist/mcp/handlers.d.ts +1 -0
  15. package/dist/mcp/handlers.d.ts.map +1 -1
  16. package/dist/mcp/handlers.js +7 -0
  17. package/dist/mcp/handlers.js.map +1 -1
  18. package/dist/mcp/tools.d.ts.map +1 -1
  19. package/dist/mcp/tools.js +11 -0
  20. package/dist/mcp/tools.js.map +1 -1
  21. package/dist/tasks/phase-tasks.d.ts +8 -0
  22. package/dist/tasks/phase-tasks.d.ts.map +1 -0
  23. package/dist/tasks/phase-tasks.js +35 -0
  24. package/dist/tasks/phase-tasks.js.map +1 -0
  25. package/package.json +1 -1
  26. package/templates/agents/architect.md +9 -3
  27. package/templates/agents/coder.md +9 -3
  28. package/templates/agents/committer.md +8 -0
  29. package/templates/agents/debugger.md +8 -2
  30. package/templates/agents/planner.md +8 -2
  31. package/templates/agents/reader.md +7 -0
  32. package/templates/agents/reviewer.md +8 -1
  33. package/templates/agents/tester.md +8 -2
  34. package/templates/claude/commands/git/merge.md +6 -4
  35. package/templates/claude/commands/session/handover.md +12 -4
  36. package/templates/claude/commands/session/resume.md +8 -0
  37. package/templates/claude/commands/session/review.md +7 -5
  38. package/templates/claude/commands/vault/analyze.md +9 -8
  39. package/templates/claude/commands/vault/from-spec.md +9 -6
  40. package/templates/claude/commands/workflow/dev.md +94 -907
  41. package/templates/claude/commands/workflow/steps/coder.md +105 -0
  42. package/templates/claude/commands/workflow/steps/commit.md +52 -0
  43. package/templates/claude/commands/workflow/steps/plan-review.md +67 -0
  44. package/templates/claude/commands/workflow/steps/plan.md +106 -0
  45. package/templates/claude/commands/workflow/steps/preflight.md +50 -0
  46. package/templates/claude/commands/workflow/steps/principles.md +35 -0
  47. package/templates/claude/commands/workflow/steps/read.md +39 -0
  48. package/templates/claude/commands/workflow/steps/review.md +168 -0
  49. package/templates/claude/commands/workflow/steps/test.md +38 -0
  50. package/templates/claude/commands/workflow/steps/vault-updates.md +98 -0
  51. package/templates/claude/commands/workflow/steps/verify.md +49 -0
@@ -15,6 +15,13 @@ You are a reader agent for {{projectName}}.
15
15
  Gather and summarize project context. You read code, documentation,
16
16
  and vault data to build a complete picture of the current state.
17
17
 
18
+ ## Permissions (VIOLATION = ABORT)
19
+
20
+ - Read files: YES
21
+ - Write/Edit files: FORBIDDEN
22
+ - Bash commands: FORBIDDEN
23
+ - Max files: 10, max 500 lines each
24
+
18
25
  ## Project Context
19
26
 
20
27
  ### Stack
@@ -13,7 +13,14 @@ You are a reviewer agent for {{projectName}}.
13
13
  ## Your Role
14
14
 
15
15
  Review code changes for quality, security, and convention compliance.
16
- You do NOT modify any files. Your output is a review report.
16
+ Your output is a review report. You NEVER fix code only report issues.
17
+
18
+ ## Permissions (VIOLATION = ABORT)
19
+
20
+ - Read files: YES
21
+ - Write/Edit files: FORBIDDEN — you MUST NOT modify, create, or delete any file
22
+ - Bash commands: FORBIDDEN
23
+ - If you see a problem: describe it and suggest a fix. Do NOT apply the fix.
17
24
 
18
25
  ## Project Context
19
26
 
@@ -12,8 +12,14 @@ You are a tester agent for {{projectName}}.
12
12
 
13
13
  ## Your Role
14
14
 
15
- Write tests and verify they pass. You may read any file
16
- but only create or modify files in tests/.
15
+ Write tests and verify they pass.
16
+
17
+ ## Permissions (VIOLATION = ABORT)
18
+
19
+ - Read files: YES (any file)
20
+ - Write/Edit: ONLY files in tests/ — FORBIDDEN outside tests/
21
+ - Bash: ONLY test commands (npm test, cargo test, pytest) — no other bash
22
+ - You MUST NOT modify source code. Only tests.
17
23
 
18
24
  ## Project Context
19
25
 
@@ -23,15 +23,17 @@ Transfer knowledge from a merged branch into permanent storage.
23
23
  **Proceed?** (yes / skip)
24
24
 
25
25
  4. If yes:
26
- - Append decisions/gotchas to knowledge.md
27
- - Move unfinished to gameplan.md backlog
28
- - Set branch status: `merged`, add `merged: <today>`
29
- - Update gameplan.md: mark completed tasks
26
+ - APPEND decisions/gotchas to knowledge.md (read first, Edit tool to append to section)
27
+ - APPEND unfinished to gameplan.md backlog (read first, Edit tool to append)
28
+ - Edit branch file: set `status: merged`, add `merged: <today>` (Edit tool, not Write)
29
+ - Edit gameplan.md: mark completed tasks with `[x]` (Edit tool)
30
30
 
31
31
  ✅ **Merged** — branch context archived, knowledge transferred
32
32
 
33
33
  ## Rules
34
34
 
35
+ - **APPEND ONLY** — never overwrite existing vault files. Read first, then append with Edit tool.
36
+ - Use Edit tool for all vault modifications, not Write tool (Write overwrites the entire file)
35
37
  - Never delete branch file — keep as historical record
36
38
  - Transfer only lasting knowledge, not session-specific details
37
39
  - If abandoned: set `status: abandoned` with reason
@@ -35,8 +35,13 @@ Capture the current session's work into `.dev-vault/` for future sessions.
35
35
 
36
36
  **Save?** (yes / edit / skip)
37
37
 
38
- 5. If yes → write to `.dev-vault/daily/<date>.md`
38
+ 5. If yes → APPEND to `.dev-vault/daily/<date>.md`
39
+ - If file exists: read it first, then use Edit tool to append at the end (after `---` separator)
40
+ - If file does not exist: create with Write tool
41
+ - NEVER overwrite existing daily log content
39
42
  6. Update branch context and knowledge.md if insights found
43
+ - knowledge.md: use Edit tool to append to specific section, preserve existing
44
+ - branch context: use Edit tool to update status field only
40
45
  7. Offer to create records: /vault:bug, /vault:adr, /vault:debt
41
46
  8. Commit vault changes
42
47
 
@@ -44,6 +49,9 @@ Capture the current session's work into `.dev-vault/` for future sessions.
44
49
 
45
50
  ## Rules
46
51
 
47
- - Keep entries concise reference material, not essays
48
- - Use Obsidian wikilinks for cross-references
49
- - Never include secrets or tokens
52
+ - **APPEND ONLY**NEVER overwrite existing vault files. Read first, then Edit to append.
53
+ - **Edit tool ONLY** NEVER use Write tool on existing files (it overwrites entirely)
54
+ - **Max 3 sentences per section** — reference material, not essays
55
+ - **MUST include** file paths or commit hashes in "Done" section — no vague descriptions
56
+ - **MUST create** vault records (/vault:bug, /vault:adr, /vault:debt) if findings qualify — not "offer", DO IT
57
+ - NEVER include secrets or tokens
@@ -41,3 +41,11 @@ Use this exact format (markdown, not code block):
41
41
  - **New branch without context** → ask user about goal, create branch file
42
42
  - **No vault** → suggest `dev-workflow init`
43
43
  - **Empty vault files** → suggest `/vault:analyze`
44
+
45
+ ## Rules
46
+
47
+ - **MUST read ALL 4 vault files** (stack, conventions, knowledge, gameplan) — do not skip any
48
+ - **MUST check** for active tasks and paused workflows — not optional
49
+ - **MUST display** branch context if not on main — not optional
50
+ - **Resume complete when:** all vault sections shown + branch context + tasks + workflow status
51
+ - Read-only — NEVER modify vault files during resume
@@ -74,8 +74,10 @@ If perspectives disagree (e.g., Pragmatism says "good enough" but Quality says "
74
74
 
75
75
  ## Rules
76
76
 
77
- - Read-only — never modify project code
78
- - Reference specific files and line numbers
79
- - Each finding tagged with source perspective
80
- - Conflicts: if Security blocks but Pragmatism approves Security wins
81
- - Critical from ANY perspective overall REQUEST_CHANGES
77
+ - **Read-only**NEVER modify project code. VIOLATION = ABORT.
78
+ - **All 5 perspectives REQUIRED** do not skip any. Each MUST produce a verdict.
79
+ - **Reference specific files and line numbers** — no vague "there might be issues"
80
+ - **Each finding MUST be tagged** with source perspective (Security/Quality/Conventions/Completeness/Pragmatism)
81
+ - **Conflict resolution:** Security > Correctness > Conventions > Pragmatism. Higher priority wins.
82
+ - **Critical from ANY perspective** → overall REQUEST_CHANGES
83
+ - **APPEND ONLY** for vault updates — use Edit tool, NEVER Write tool on existing files
@@ -65,11 +65,11 @@ Extract: File Structure, Naming, Code Style, Patterns, Testing conventions.
65
65
  For each phase:
66
66
  1. Show exactly what will be written
67
67
  2. Wait for approval
68
- 3. Write to vault via MCP tools or direct edit
68
+ 3. Write to vault: read file first, then use Edit tool to APPEND (never Write tool which overwrites)
69
69
  4. Confirm what was written
70
70
  5. Proceed to next phase
71
71
 
72
- **Preserve existing content** only append new information.
72
+ **APPEND ONLY** — read existing content first, then append. Never use Write tool on existing vault files.
73
73
 
74
74
  ### conventions.md sections:
75
75
  - `## File Structure`: `- <directory> — <purpose>`
@@ -100,11 +100,12 @@ For each phase:
100
100
 
101
101
  ## Rules
102
102
 
103
- - **Gate criteria:** each phase requires explicit user approval
104
- - **Preserve existing content** — never overwrite, only append
105
- - **Be specific** — "functions use snake_case" not "standard naming"
106
- - **Reference files** — "error handling in cli/src/main.rs uses anyhow"
103
+ - **Gate criteria:** each phase REQUIRES explicit user approval. Do NOT skip.
104
+ - **APPEND ONLY** — use Edit tool. NEVER use Write tool on existing vault files.
105
+ - **Be specific** — "functions use snake_case" not "standard naming". Vague = rewrite.
106
+ - **Reference files** — MUST include file path: "error handling in cli/src/main.rs uses anyhow"
107
107
  - **Skip gameplan.md** — roadmap is human-authored
108
108
  - **Don't add utility crates/packages to stack.md** — only frameworks, ORMs, test runners
109
- - Read max 15 files
110
- - Never include secrets or credentials
109
+ - **MUST read minimum 10 files, maximum 15** — not fewer, not "a few"
110
+ - **Verification:** after each phase, verify no contradictions with existing vault content
111
+ - NEVER include secrets or credentials
@@ -300,12 +300,15 @@ After creation:
300
300
 
301
301
  ## Rules
302
302
 
303
- - **Gate criteria:** each phase requires explicit user approval before writing
304
- - **Preserve existing content** — never overwrite filled sections, only append
305
- - **Be specific** — "TypeScript 5.x with strict mode" not "typed language"
306
- - **Derive when implicit** — if spec says "REST API" but not "Express", propose based on stack
303
+ - **Gate criteria:** each phase REQUIRES explicit user approval before writing. Do NOT skip approval.
304
+ - **APPEND ONLY** — use Edit tool to append. NEVER use Write tool on existing vault files.
305
+ - **Be specific** — "TypeScript 5.x with strict mode" not "typed language". Vague = rewrite.
306
+ - **Verify versions** — MUST use context7 MCP for library versions. No guessing from training data.
307
+ - **Derive when implicit** — if spec says "REST API" but not "Express", MUST research and propose with rationale
307
308
  - **Skip empty phases** — if spec has no data model, skip 3b entirely
308
- - **No secrets** — never include API keys, passwords, or credentials
309
- - **Reference spec** — cite which part of the spec each item comes from
309
+ - **No secrets** — NEVER include API keys, passwords, or credentials
310
+ - **Reference spec** — MUST cite which part of the spec each item comes from
311
+ - **No "best-effort"** — every item MUST be verified against spec or codebase
310
312
  - **Multi-perspective on architecture only** — other phases use single-pass analysis
311
313
  - **Gameplan phases are coarse** — detailed task breakdown happens in `/task` and `/workflow`
314
+ - **Gameplan phases are coarse** — detailed task breakdown happens in `/task` and `/workflow`