Temperance identity port + layering test harness + parallel-dispatch/GSD reference#2
Temperance identity port + layering test harness + parallel-dispatch/GSD reference#2Sheshiyer wants to merge 9 commits into
Conversation
Approved brainstorming design for (1) a permanent sandbox install-test harness and (2) a surgical, dry-run-default, reversible identity tool that renames the live OpenCode/Codex operator surfaces to Temperance Engine without altering their PAI content. Live is truth; operator surfaces only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Four tasks: sandbox install-layering harness, surgical reversible identity tool (TDD), verify/ISA integration (ISC-33/34), and a gated live apply with an explicit human go/no-go before any write to the live operator surfaces. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds the implementation that the already-committed verify-install.sh check_file entries and ISA ISC-28..32 reference: - docs/parallel-dispatch.md decision guide (superpowers dispatch vs GSD execute-phase/workstreams vs subagent-driven-development) - scripts/install-gsd.sh: opt-in --with-gsd, detect-only, never vendors GSD - package/hooks/ParallelDispatchContext.hook.sh: advisory-only session context, read-only GSD config display, never blocks/dispatches/writes - install.sh: --with-gsd/--skip-gsd flag (default skip) - docs/pai-flow.md: Execute phase references the decision guide Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- docs/architecture/architecture.html (overview: productization lineage, data flow, install pipeline, layers, deployment) - system-internals.html (per-component mechanics), integration-map.html (which seams are real code paths vs reference-only), session-trace.html (concrete install-to-session walkthrough) - README/CHANGELOG document parallel-dispatch, architecture docs, and the identity-port work Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1f1333aad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # never writes into settings.json JSON structure it doesn't own): | ||
| # | ||
| # { "hooks": [ { "type": "command", | ||
| # "command": "$PAI_HOME/hooks/ParallelDispatchContext.hook.sh" } ] } |
There was a problem hiding this comment.
Point hook registration at an installed file
If a user follows this registration snippet after installing, the command points to $PAI_HOME/hooks/ParallelDispatchContext.hook.sh, but the installer never copies package/hooks/ParallelDispatchContext.hook.sh into $PAI_HOME/hooks (repo-wide search only finds tests invoking the repo copy). In that setup Claude will try to run a missing hook path, so either the hook needs to be installed there or the snippet should tell users to reference/copy the repo file explicitly.
Useful? React with 👍 / 👎.
| ib_dir="${TEMPERANCE_BACKUP_DIR:-$HOME/.temperance_engine/backups}/$ib_stamp" | ||
| mkdir -p "$ib_dir" | ||
| cp "$ib_target" "$ib_dir/$ib_slug" |
There was a problem hiding this comment.
Make identity backups unique within a second
When apply-identity.sh is run more than once for the same target within the same second, ib_dir reuses the same timestamp directory and cp writes the same slug path, overwriting the earlier backup. This loses the original rollback point in exactly the fast re-apply/remove workflows this tool is meant to make safe; include a higher-resolution timestamp or otherwise create a unique destination before copying.
Useful? React with 👍 / 👎.
What
Two threads, brainstormed → spec'd → planned → executed via subagent-driven development:
1. Identity port + layering test (this session's focus)
tests/sandbox-install.sh— sandbox harness that runs a real install into a throwawayHOMEand asserts six groups: file landing, backups/idempotency, dry-run safety, restore-from-backup, hook behavior, GSD gating. Pins the Pulse port and never touches the real home. (18/18)scripts/apply-identity.sh— surgical, dry-run-default, backup-first, idempotent, reversible (--remove) tool that prepends a<!-- temperance:identity -->block to the operatorAGENTS.mdsurfaces while preserving all content beneath it. Path-unique backups (no basename collision). (tests/identity-tool.sh, 8/8)ISC-33/ISC-34track both.2. Parallel-dispatch / GSD reference + architecture docs (bundled prior work)
docs/parallel-dispatch.mddecision guide;scripts/install-gsd.shopt-in--with-gsd(detect-only, never vendors GSD);package/hooks/ParallelDispatchContext.hook.shadvisory-only session context (read-only GSD-config display, never blocks/dispatches/writes).docs/architecture/{architecture,system-internals,integration-map,session-trace}.html— overview + deep-dives (mechanics, which seams are real code paths vs reference-only, a concrete session trace).Design decisions (locked during brainstorming)
~/.claude/PAI,~/.codex/PAIsymlink,CLAUDE.md, voice) untouched.ISA.md; GSD config and PAI steering/memory stay external.Verification
HEADpasses./verify.sh(exit 0), sandbox harness 18/0, identity-tool 8/0.--removerestores cleanly.Known minor (non-blocking)
apply→removeappends a trailing\nto a file that lacked one. All three live targets already end in\n, so live surfaces are unaffected. Can harden the awk if we want the byte-for-byte guarantee to be literally universal.🤖 Generated with Claude Code