wiggum-cli 0.16.0 → 0.17.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 (97) hide show
  1. package/bin/ralph.js +0 -0
  2. package/dist/agent/memory/ingest.d.ts +14 -0
  3. package/dist/agent/memory/ingest.js +77 -0
  4. package/dist/agent/memory/store.d.ts +15 -0
  5. package/dist/agent/memory/store.js +98 -0
  6. package/dist/agent/memory/types.d.ts +16 -0
  7. package/dist/agent/memory/types.js +14 -0
  8. package/dist/agent/orchestrator.d.ts +7 -0
  9. package/dist/agent/orchestrator.js +266 -0
  10. package/dist/agent/resolve-config.d.ts +26 -0
  11. package/dist/agent/resolve-config.js +43 -0
  12. package/dist/agent/tools/backlog.d.ts +27 -0
  13. package/dist/agent/tools/backlog.js +51 -0
  14. package/dist/agent/tools/dry-run.d.ts +106 -0
  15. package/dist/agent/tools/dry-run.js +119 -0
  16. package/dist/agent/tools/execution.d.ts +51 -0
  17. package/dist/agent/tools/execution.js +256 -0
  18. package/dist/agent/tools/feature-state.d.ts +43 -0
  19. package/dist/agent/tools/feature-state.js +184 -0
  20. package/dist/agent/tools/introspection.d.ts +23 -0
  21. package/dist/agent/tools/introspection.js +40 -0
  22. package/dist/agent/tools/memory.d.ts +44 -0
  23. package/dist/agent/tools/memory.js +99 -0
  24. package/dist/agent/tools/preflight.d.ts +7 -0
  25. package/dist/agent/tools/preflight.js +137 -0
  26. package/dist/agent/tools/reporting.d.ts +58 -0
  27. package/dist/agent/tools/reporting.js +119 -0
  28. package/dist/agent/tools/schemas.d.ts +2 -0
  29. package/dist/agent/tools/schemas.js +3 -0
  30. package/dist/agent/types.d.ts +45 -0
  31. package/dist/agent/types.js +1 -0
  32. package/dist/ai/conversation/conversation-manager.js +8 -0
  33. package/dist/ai/conversation/url-fetcher.js +27 -0
  34. package/dist/ai/providers.js +5 -5
  35. package/dist/commands/agent.d.ts +17 -0
  36. package/dist/commands/agent.js +114 -0
  37. package/dist/commands/monitor.js +50 -183
  38. package/dist/commands/new-auto.d.ts +15 -0
  39. package/dist/commands/new-auto.js +237 -0
  40. package/dist/commands/run.js +20 -10
  41. package/dist/commands/sync.d.ts +15 -0
  42. package/dist/commands/sync.js +68 -0
  43. package/dist/generator/config.d.ts +1 -41
  44. package/dist/generator/config.js +7 -0
  45. package/dist/generator/index.d.ts +2 -2
  46. package/dist/generator/templates.d.ts +2 -0
  47. package/dist/generator/templates.js +9 -1
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.js +115 -4
  50. package/dist/repl/command-parser.d.ts +5 -0
  51. package/dist/repl/command-parser.js +5 -0
  52. package/dist/templates/prompts/PROMPT.md.tmpl +13 -10
  53. package/dist/templates/prompts/PROMPT_e2e.md.tmpl +13 -7
  54. package/dist/templates/prompts/PROMPT_feature.md.tmpl +16 -3
  55. package/dist/templates/prompts/PROMPT_review_auto.md.tmpl +32 -12
  56. package/dist/templates/prompts/PROMPT_review_manual.md.tmpl +4 -1
  57. package/dist/templates/prompts/PROMPT_review_merge.md.tmpl +39 -14
  58. package/dist/templates/prompts/PROMPT_verify.md.tmpl +5 -2
  59. package/dist/templates/scripts/feature-loop.sh.tmpl +441 -69
  60. package/dist/tui/app.d.ts +19 -2
  61. package/dist/tui/app.js +22 -4
  62. package/dist/tui/components/IssuePicker.d.ts +27 -0
  63. package/dist/tui/components/IssuePicker.js +64 -0
  64. package/dist/tui/components/RunCompletionSummary.js +6 -3
  65. package/dist/tui/hooks/useAgentOrchestrator.d.ts +29 -0
  66. package/dist/tui/hooks/useAgentOrchestrator.js +453 -0
  67. package/dist/tui/orchestration/interview-orchestrator.d.ts +5 -1
  68. package/dist/tui/orchestration/interview-orchestrator.js +27 -6
  69. package/dist/tui/screens/AgentScreen.d.ts +21 -0
  70. package/dist/tui/screens/AgentScreen.js +159 -0
  71. package/dist/tui/screens/InitScreen.js +4 -0
  72. package/dist/tui/screens/InterviewScreen.d.ts +3 -1
  73. package/dist/tui/screens/InterviewScreen.js +146 -10
  74. package/dist/tui/screens/MainShell.d.ts +1 -1
  75. package/dist/tui/screens/MainShell.js +36 -1
  76. package/dist/tui/screens/RunScreen.js +38 -6
  77. package/dist/tui/utils/build-run-summary.d.ts +1 -1
  78. package/dist/tui/utils/build-run-summary.js +40 -84
  79. package/dist/tui/utils/clear-screen.d.ts +14 -0
  80. package/dist/tui/utils/clear-screen.js +16 -0
  81. package/dist/tui/utils/loop-status.d.ts +41 -1
  82. package/dist/tui/utils/loop-status.js +243 -35
  83. package/dist/tui/utils/pr-summary.d.ts +3 -2
  84. package/dist/tui/utils/pr-summary.js +41 -6
  85. package/dist/utils/config.d.ts +8 -0
  86. package/dist/utils/config.js +8 -0
  87. package/dist/utils/github.d.ts +32 -0
  88. package/dist/utils/github.js +106 -0
  89. package/package.json +4 -1
  90. package/src/templates/prompts/PROMPT.md.tmpl +13 -10
  91. package/src/templates/prompts/PROMPT_e2e.md.tmpl +13 -7
  92. package/src/templates/prompts/PROMPT_feature.md.tmpl +16 -3
  93. package/src/templates/prompts/PROMPT_review_auto.md.tmpl +32 -12
  94. package/src/templates/prompts/PROMPT_review_manual.md.tmpl +4 -1
  95. package/src/templates/prompts/PROMPT_review_merge.md.tmpl +39 -14
  96. package/src/templates/prompts/PROMPT_verify.md.tmpl +5 -2
  97. package/src/templates/scripts/feature-loop.sh.tmpl +441 -69
@@ -1,5 +1,5 @@
1
1
  ## Context
2
- Study @.ralph/AGENTS.md for commands and patterns.
2
+ If @.ralph/guides/AGENTS.md exists, study it for commands and patterns.
3
3
  Study @.ralph/specs/$FEATURE.md for feature specification.
4
4
  Study @.ralph/specs/$FEATURE-implementation-plan.md for completed tasks.
5
5
 
@@ -9,6 +9,7 @@ Capture any review feedback patterns for future iterations.
9
9
 
10
10
  ## Task
11
11
  All implementation and E2E tasks are complete. Create PR, review, and merge.
12
+ Complete ALL steps in a single pass — do not end the session between steps.
12
13
 
13
14
  ### Step 1: Verify Ready State
14
15
  1. Check all tasks are complete in implementation plan (no `- [ ]` items)
@@ -52,12 +53,14 @@ cd {{appDir}} && gh pr create --base main --head feat/$FEATURE \
52
53
  [Read from implementation plan - list completed phases]
53
54
 
54
55
  ## Testing
55
- - [x] Unit/integration tests: 97 passing
56
- - [x] E2E tests: All scenarios passed via Playwright MCP
56
+ - [x] Unit/integration tests: passing
57
+ - [x] E2E tests: All scenarios passed
57
58
  - [x] Build succeeds
58
59
 
59
60
  ## E2E Test Results
60
- [Copy from implementation plan Phase 9]
61
+ [Copy from implementation plan E2E section]
62
+
63
+ Closes #[Read the source issue number from the spec file metadata or context section]
61
64
 
62
65
  Generated with Claude Code
63
66
  EOF
@@ -88,17 +91,27 @@ Review the git diff against main and check:
88
91
 
89
92
  Run: git diff main
90
93
 
91
- Respond with:
92
- - APPROVED if everything looks good
93
- - Or list specific issues with file:line references that need to be fixed
94
-
95
- IMPORTANT: After posting any PR review comment, you MUST print your final verdict as the LAST line of your output. Print exactly one of:
96
- VERDICT: APPROVED
97
- VERDICT: NOT APPROVED
98
- This line is parsed by the automation — do not omit it."
94
+ Then:
95
+ 1. Post your complete review as a comment on the PR using:
96
+ gh pr comment --body '<your review in markdown>'
97
+ Format the comment with: a summary, specific issues with file:line refs (if any), and the verdict.
98
+ 2. Print your final verdict as the LAST line of stdout. Print exactly one of:
99
+ VERDICT: APPROVED
100
+ VERDICT: NOT APPROVED
101
+ This line is parsed by the automation — do not omit it."
99
102
  fi
100
103
  ```
101
104
 
105
+ After the review completes, check its output:
106
+ - If it contains "VERDICT: APPROVED", echo that line so the automation detects it:
107
+ ```bash
108
+ echo "VERDICT: APPROVED"
109
+ ```
110
+ - If issues were found, echo:
111
+ ```bash
112
+ echo "VERDICT: NOT APPROVED"
113
+ ```
114
+
102
115
  **Handle review feedback:**
103
116
  - If Claude outputs "VERDICT: APPROVED" -> Proceed to Step 5 (rebase and merge)
104
117
  - If Claude lists issues:
@@ -119,7 +132,10 @@ If rebase has conflicts:
119
132
  1. Resolve conflicts in affected files
120
133
  2. `git add .` the resolved files
121
134
  3. `git rebase --continue`
122
- 4. Re-run tests: `{{testCommand}} && {{buildCommand}}`
135
+
136
+ After rebase (whether or not there were conflicts), ALWAYS re-run tests and build:
137
+ cd {{appDir}} && {{testCommand}} && {{buildCommand}}
138
+ If any tests fail after rebase, fix them before proceeding. Do NOT merge with failing tests.
123
139
 
124
140
  Push rebased branch:
125
141
  ```bash
@@ -127,7 +143,9 @@ cd {{appDir}} && git push --force-with-lease origin feat/$FEATURE
127
143
  ```
128
144
 
129
145
  ### Step 6: Merge PR
130
- When Claude review is approved and branch is rebased:
146
+ **Pre-merge gate:** Confirm ALL tests pass. Run `cd {{appDir}} && {{testCommand}}` one final time. If ANY test fails, STOP — do not merge. Fix the failures first, then re-run.
147
+
148
+ When Claude review is approved, all tests pass, and branch is rebased:
131
149
  ```bash
132
150
  cd {{appDir}} && gh pr merge --squash --delete-branch
133
151
  ```
@@ -145,8 +163,15 @@ cd {{appDir}} && gh pr merge --squash --delete-branch
145
163
 
146
164
  Note: Spec status updates are handled in the Spec Verification phase before PR creation.
147
165
 
166
+ ## IMPORTANT: Review scope
167
+ If you discover that no implementation code exists (empty diff, no source files changed),
168
+ do NOT implement the feature yourself. Instead, report "VERDICT: NOT APPROVED —
169
+ no implementation found" so the harness can trigger a new implementation iteration.
170
+
148
171
  ## Rules
172
+ - **NEVER merge if any tests are failing.** If tests fail after rebase, fix them first. If unfixable, output "VERDICT: NOT APPROVED — test failures" and stop.
149
173
  - Do NOT merge without Claude Code approval
174
+ - Do NOT implement missing features — only review and fix minor issues
150
175
  - Address ALL review comments before merging
151
176
  - Use squash merge to keep history clean
152
177
  - If gh CLI fails, check authentication: `gh auth status`
@@ -7,6 +7,7 @@ Read @.ralph/LEARNINGS.md for verification patterns from previous features.
7
7
 
8
8
  ## Task
9
9
  Verify that the implementation meets the spec requirements. Update spec files accordingly.
10
+ Complete ALL steps in a single pass — do not end the session between steps.
10
11
 
11
12
  ### Step 1: Review Requirements
12
13
  Read @.ralph/specs/$FEATURE.md and for each requirement under "## Requirements":
@@ -29,8 +30,10 @@ Update `**Last Updated:**` to today's date.
29
30
 
30
31
  ### Step 4: Update README.md
31
32
  Update @.ralph/specs/README.md Active Specs table:
32
- - Change status from "Planned" to "Completed" (or "Partial")
33
- - Update Last Updated date
33
+ - Add or update ONLY the row for $FEATURE — do NOT remove or modify other rows
34
+ - Change this feature's status from "Planned" to "Completed" (or "Partial")
35
+ - Update this feature's Last Updated date
36
+ - IMPORTANT: Preserve ALL existing rows in the table — previous features must remain intact
34
37
 
35
38
  ### Step 5: Document Gaps (if any)
36
39
  If any requirements were not fully met, add a section to the spec: