diff --git a/specifier-prompt.md b/specifier-prompt.md index 35c08be..1043f79 100644 --- a/specifier-prompt.md +++ b/specifier-prompt.md @@ -200,10 +200,10 @@ when specing reply/like/follow. ## 7. Gherkin & acceptance tooling -- Clone the Acceptance Pipeline Spec fresh (do NOT rely on cached/stale copies): +- The Acceptance Pipeline Spec is single-sourced at `tmp/aps`. Refresh it in + place (do not create separate clones): ```bash - mkdir -p tmp && cd tmp - git clone https://github.com/unclebob/Acceptance-Pipeline-Specification.git aps + swarmforge/scripts/ensure-aps.sh --update ``` Temp files go in the worktree's `./tmp/`, never `/tmp`. - Commands (run from `tmp/aps`): @@ -212,7 +212,7 @@ when specing reply/like/follow. bb gherkin-ir-dry-checker [--include-exact] # optional: bb gherkin-mutator (you do not run acceptance mutation) ``` -- Read `aps/parser-spec.md` and `aps/ir-dry-checker-spec.md`. +- Read `tmp/aps/parser-spec.md` and `tmp/aps/ir-dry-checker-spec.md`. - Rules: `Feature:`, one `Background:`, `Scenario Outline:` with `Examples:`. Name each scenario `Feature Name - N`. Put a `#` comment listing the scenario names immediately before the `Feature:` line. Use `` placeholders @@ -258,8 +258,10 @@ that a single user-facing feature may require specs in more than one component. 1. **Coder commits to its own branch, not `master`** โ€” you must merge the architect's finalized branch into `master` for the running app to reflect changes. -2. **Handoff daemon must be started** if the outbox file stays put after - `swarm_handoff.sh`. +2. **Handoff daemon is self-healing.** `swarm_handoff.sh` and + `ready_for_next.sh` call `swarmforge/scripts/ensure_handoff_daemon.sh`, which + restarts `handoffd` when it is not running. If a handoff still sits in the + outbox, run that script and check `.swarmforge/daemon/handoffd.log`. 3. **`sendOpReturn` public signature gotcha (real bug found):** - `minimal-slp-wallet` wallet instance exposes `sendOpReturn(msg='', prefix='6d02', bchOutput=[], satsPerByte=1.0)` โ€” it @@ -397,6 +399,16 @@ that a single user-facing feature may require specs in more than one component. data when a bound must itself be mutatable. Spec: `psf-memo-db/specs/thread-query-performance.feature`. +24. **APS is single-sourced at `tmp/aps`.** Use + `swarmforge/scripts/ensure-aps.sh --update`; do not create `tmp/aps-spec` or + component-local copies. The acceptance runners and the `gherkin-parser` + wrapper all resolve `tmp/aps`. +25. **Trust the architect's verification record.** The architect commits + `docs/reviews/-verification.json` for each touched component. After + merging, check its `git_sha` matches the merged commit; on a matching + `pass`, do not re-run the full suite โ€” run only the merged feature's + acceptance test. + --- ## 10. Run / verify the app @@ -422,6 +434,20 @@ npm test After merging architect into `master`, run the verification commands for every component the feature touched. +Prefer the canonical runner, which runs the same sequence and emits a +machine-readable record: +```bash +swarmforge/scripts/verify.sh client --record docs/reviews/-verification.json --task +swarmforge/scripts/verify.sh db --record docs/reviews/-verification.json --task +swarmforge/scripts/verify.sh indexer --record docs/reviews/-verification.json --task +``` +After merging the architect branch, check `docs/reviews/-verification.json`: +it must exist and its `git_sha` must match the merged commit. On a matching +`pass`, run only the merged feature's acceptance test as an independent check; +re-run the full sequence only when the record is missing, stale, or failing. + +Use `swarmforge/scripts/state.sh` to refresh the HEAD lines in ยง11. + --- ## 11. Handoff to next session diff --git a/swarmforge/scripts/state.sh b/swarmforge/scripts/state.sh new file mode 100755 index 0000000..9da9089 --- /dev/null +++ b/swarmforge/scripts/state.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# Print current SwarmForge state: each role branch's HEAD and the main checkout +# working-tree status. Use this to refresh the "Current master HEAD" section of +# the specifier briefing without manual git inspection. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" +cd "$ROOT" + +head_line() { + local branch="$1" + if git rev-parse --verify -q "$branch" >/dev/null 2>&1; then + printf '%s HEAD: %s %s\n' "$branch" "$(git rev-parse --short=10 "$branch")" "$(git log -1 --format=%s "$branch")" + fi +} + +head_line master +head_line swarmforge-coder +head_line swarmforge-refactorer +head_line swarmforge-architect + +if [ -n "$(git status --porcelain)" ]; then + echo "main working tree: dirty" +else + echo "main working tree: clean" +fi