claude-sprint-gate 1.1.0 → 1.2.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/ccsg.sh +17 -4
- package/package.json +1 -1
- package/test-ccsg.sh +1 -1
package/ccsg.sh
CHANGED
|
@@ -101,13 +101,19 @@ build_mission_response() {
|
|
|
101
101
|
[ -f "$f" ] && completed_count=$((completed_count + 1))
|
|
102
102
|
done
|
|
103
103
|
|
|
104
|
+
# Read mission content for re-prompt
|
|
105
|
+
local mission_content=""
|
|
106
|
+
if [ -f "$MISSION_FILE" ]; then
|
|
107
|
+
mission_content=$(cat "$MISSION_FILE" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/' | tr -d '\n')
|
|
108
|
+
fi
|
|
109
|
+
|
|
104
110
|
log "MISSION — next sprint: ${prefix}-v${next_ver} ($completed_count archived)"
|
|
105
111
|
|
|
106
112
|
cat <<ENDJSON
|
|
107
113
|
{
|
|
108
114
|
"continue": false,
|
|
109
115
|
"decision": "next_sprint",
|
|
110
|
-
"reason": "Sprint verified and complete. Mission is active.\\n\\nYour next action: create ${next_file}\\n\\n1. Read
|
|
116
|
+
"reason": "YOU CANNOT STOP. Sprint verified and complete. Mission is active.\\n\\nYOUR MISSION:\\n---\\n${mission_content}---\\n\\nYour next action: create ${next_file}\\n\\n1. Read goals-completed/ to see what was delivered in prior sprints (${completed_count} archived files)\\n2. Define the next sprint goals that advance the mission above\\n3. Write them as markdown checkboxes in ${next_file}\\n4. Start executing immediately\\n\\nDo not stop. Do not ask for confirmation. Create the sprint file and start working.",
|
|
111
117
|
"next_sprint_file": "${next_file}",
|
|
112
118
|
"next_version": ${next_ver},
|
|
113
119
|
"mission_file": "mission.md",
|
|
@@ -201,8 +207,12 @@ ENDJSON
|
|
|
201
207
|
|
|
202
208
|
# ── BLOCK: unchecked items remain ────────────────────────────────────
|
|
203
209
|
if [ "$UNCHECKED" -gt 0 ]; then
|
|
204
|
-
|
|
205
|
-
|
|
210
|
+
# Re-prompt: inject the full goal file so the agent gets the complete task back
|
|
211
|
+
GOAL_CONTENT=$(cat "$GOAL_FILE" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/' | tr -d '\n')
|
|
212
|
+
|
|
213
|
+
REPROMPT="YOU CANNOT STOP. ${UNCHECKED} of ${TOTAL} items in $(basename "$GOAL_FILE") are not done.\\n\\nRe-read the goal file and continue executing. Here is your active task:\\n\\n---\\n${GOAL_CONTENT}---\\n\\nWork through each unchecked item (- [ ]) in order. Check each one off (- [x]) as you complete it. Do not stop until every box is checked.\\n\\nWORK ETHIC: Compilation is not verification. Test each thing the way its end user would use it. A UI — open it in a browser, click every button, fill every form. An API — call it with real requests, check the actual responses. A CLI — run the commands, read the output. A pipeline — feed it real data, verify what comes out. Whatever it is, use it the way a customer would, not the way the developer who wrote it imagines it works. If you cannot show real output proving it works end-to-end, it is not done. Never trade correctness for speed."
|
|
214
|
+
|
|
215
|
+
build_block_response "$GOAL_FILE" "$REPROMPT"
|
|
206
216
|
exit 0
|
|
207
217
|
fi
|
|
208
218
|
|
|
@@ -335,5 +345,8 @@ TOTAL=$UNCHECKED
|
|
|
335
345
|
|
|
336
346
|
# Block with the new verification sprint
|
|
337
347
|
GOAL_FILE="$VERIFY_FILE"
|
|
338
|
-
|
|
348
|
+
# Re-prompt with full verification sprint content
|
|
349
|
+
VERIFY_CONTENT=$(cat "$VERIFY_FILE" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/' | tr -d '\n')
|
|
350
|
+
VERIFY_REPROMPT="You just finished a sprint. But finishing code is not finishing the product. A verification sprint has been created. YOUR TASK NOW:\\n\\n---\\n${VERIFY_CONTENT}---\\n\\nWork through each unchecked item. Do not stop until every box is checked."
|
|
351
|
+
build_block_response "$VERIFY_FILE" "$VERIFY_REPROMPT"
|
|
339
352
|
exit 0
|
package/package.json
CHANGED
package/test-ccsg.sh
CHANGED
|
@@ -500,7 +500,7 @@ assert_contains "blocks stop (mission active)" '"continue": false' "$OUTPUT"
|
|
|
500
500
|
assert_contains "decision is next_sprint" '"next_sprint"' "$OUTPUT"
|
|
501
501
|
assert_contains "suggests v2" 'v2' "$OUTPUT"
|
|
502
502
|
assert_contains "references mission.md" 'mission.md' "$OUTPUT"
|
|
503
|
-
assert_contains "tells agent to keep working" '
|
|
503
|
+
assert_contains "tells agent to keep working" 'Do not stop' "$OUTPUT"
|
|
504
504
|
assert_file_exists "verify moved to completed" "$GOALS_COMPLETED/goal-product-v1-verify.md"
|
|
505
505
|
assert_file_not_exists "verify removed from open" "$GOALS_OPEN/goal-product-v1-verify.md"
|
|
506
506
|
assert_json_valid "valid JSON" "$OUTPUT"
|