Skip to content

Commit bbc671b

Browse files
authored
Merge pull request #280 from Fr-e-d/contrib/sync-1777591481
sync: update 4 file(s) in core/
2 parents 997e0ef + da29aff commit bbc671b

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

.gaai/core/scripts/daemon-prompt-construct.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env bash
2-
# daemon-prompt-construct.sh — Canonical impl prompt construction helper (E134S04)
2+
# daemon-prompt-construct.sh — Canonical impl prompt construction helper
33
#
44
# Outputs the impl prompt to stdout.
55
# Caller captures with: PROMPT_CONTENT=$(bash daemon-prompt-construct.sh)
66
#
77
# Required env vars:
8-
# GAAI_STORY_ID — story identifier (e.g. E134S04)
8+
# GAAI_STORY_ID — story identifier (e.g. E001S01)
99
# GAAI_STORY_PATH — absolute path to {id}.story.md
1010
# GAAI_PLAN_PATH — absolute path to {id}.execution-plan.md
1111
# GAAI_EPIC_PATH — absolute path to {epic_id}.epic.md (may be empty)
@@ -205,11 +205,11 @@ fi
205205

206206
# ── Section 5: DEC reads instruction ─────────────────────────────────────
207207
# Parse related_decs from story YAML frontmatter (--- block).
208-
# Format in frontmatter: related_decs: [DEC-88, DEC-86, DEC-72, DEC-69]
208+
# Format in frontmatter: related_decs: [DEC-NN, DEC-MM, ...]
209209
# or:
210210
# related_decs:
211-
# - DEC-88
212-
# - DEC-86
211+
# - DEC-NN
212+
# - DEC-MM
213213
_related_decs=""
214214
_in_frontmatter=0
215215
_frontmatter_done=0
@@ -226,7 +226,7 @@ while IFS= read -r _line; do
226226
break
227227
fi
228228
if [[ $_in_frontmatter -eq 1 ]]; then
229-
# Inline list form: related_decs: [DEC-88, DEC-86, ...]
229+
# Inline list form: related_decs: [DEC-NN, DEC-MM, ...]
230230
if echo "$_line" | grep -qE '^related_decs:[[:space:]]*\['; then
231231
_related_decs=$(echo "$_line" | sed 's/related_decs:[[:space:]]*//' | tr -d '[]' | tr ',' '\n' | tr -d ' ' | grep -v '^$' || true)
232232
# Multiline list form: - DEC-XX (after related_decs: line)

.gaai/core/scripts/tests/daemon-state-machine.test.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ else
9393
fi
9494

9595
# ── Setup for T4-T8: handle_plan_phase requires GAAI_WORKTREE_PATH + claude shim ──
96-
# handle_plan_phase is now the real spawn (E134S03), not a stub.
96+
# handle_plan_phase is now the real spawn, not a stub.
9797
# T4-T8 need a worktree fixture + success claude shim so plan phase can advance.
9898
DISPATCH_FIXTURE_DIR="/tmp/gaai-dispatch-tests-$$"
9999
mkdir -p "$DISPATCH_FIXTURE_DIR/.gaai/project/contexts/artefacts/stories"
@@ -544,7 +544,7 @@ cat > "$IMPL_STORY_PATH" << 'IMPL_STORY_EOF'
544544
type: artefact
545545
artefact_type: story
546546
id: TST-IMPL-01
547-
related_decs: [DEC-88]
547+
related_decs: []
548548
---
549549
## Acceptance Criteria
550550
- [ ] AC1: test impl phase
@@ -739,8 +739,8 @@ else
739739
fail "T19b: expected [ERROR] line in output — got: $(echo "$T19_OUTPUT" | head -3)"
740740
fi
741741

742-
# ── T20: DEC-72 primary routing confirmed via impl-spawn-stub (AC6.d) ──
743-
echo "T20: DEC-72 primary routing — impl-spawn-stub with primary tag outputs success"
742+
# ── T20: primary routing confirmed via impl-spawn-stub ──
743+
echo "T20: primary routing — impl-spawn-stub with primary tag outputs success"
744744
make_impl_node_shim_success
745745
STUB_PROMPT_FILE_T20=$(mktemp /tmp/gaai-test-prompt-XXXXXX.md)
746746
printf '=== STORY: TST-IMPL-01 ===\nTest.\n=== EXECUTION PLAN ===\nStep 1.\n' > "$STUB_PROMPT_FILE_T20"
@@ -775,14 +775,14 @@ print(d.get('success', False) if d is not None else False)
775775
" 2>/dev/null || echo "False")
776776

777777
if [[ "$T20_SUCCESS" == "True" ]]; then
778-
pass "T20: DEC-72 primary routing — runImpl(primary) reports success:true"
778+
pass "T20: primary routing — runImpl(primary) reports success:true"
779779
else
780-
fail "T20: expected success:true for primary routing, got: $(printf '%s\n' "$T20_RESULT" | tail -3)"
780+
fail "T20: expected success:true (primary routing), got: $(printf '%s\n' "$T20_RESULT" | tail -3)"
781781
fi
782782

783783
# ── T21: daemon-prompt-construct.sh preamble when SECONDARY_ROUTE=true (AC6.b) ──
784784
echo "T21: daemon-prompt-construct.sh — SECONDARY_ROUTE=true emits R1-R6 preamble"
785-
GOLDEN_FIXTURE="$SCRIPT_DIR/fixtures/E134S04-prompt-preamble.golden.md"
785+
GOLDEN_FIXTURE="$SCRIPT_DIR/fixtures/impl-phase-prompt-preamble.golden.md"
786786
if [[ ! -f "$GOLDEN_FIXTURE" ]]; then
787787
fail "T21: golden fixture missing at $GOLDEN_FIXTURE"
788788
else

.gaai/core/scripts/tests/fixtures/E134S04-prompt-preamble.golden.md renamed to .gaai/core/scripts/tests/fixtures/impl-phase-prompt-preamble.golden.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
## R5 — Single-feature focus
88
=== STORY:
99
=== EXECUTION PLAN ===
10-
=== MANDATORY DEC READS ===

.gaai/core/scripts/tests/helpers/impl-spawn-stub.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22
/**
3-
* impl-spawn-stub.mjs — Test helper for E134S04 (AC6.a)
3+
* impl-spawn-stub.mjs — Test helper for handle_impl_phase real runImpl routing
44
*
55
* Invokes nested-claude-spawn.js runImpl() with a controlled _setSpawnFn stub
66
* so that tests can exercise real routing logic without spawning an actual

0 commit comments

Comments
 (0)