Skip to content

setup-openspeckit: re-sync the Triad protocol fallbacks (D001-D003); n or no stops per design D2 (D004) - #140

Merged
brettheap merged 4 commits into
mainfrom
fix/openspeckit-fallback-triad-resync
Oct 6, 2026
Merged

brettheap merged 4 commits into
mainfrom
fix/openspeckit-fallback-triad-resync

Conversation

@brettheap

@brettheap brettheap commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Lane: codeXfactory-5

Refs #138

This PR has two parts, both under #138:

Merge order: this PR must merge after brettheap/new-workstation#53. Part A's D002 fallback renders byte-identical to project-agent-bootstrap.md at #53's head. That head corrects one stale Script Status sentence. Once both PRs have landed, the fallback and the live file match.

Trigger

Brett Heap, verbatim: "merge 139 and 52".

Part A: the fallback re-syncs (D001-D003)

All of this is inside three f-strings in devBenches/base-image/files/openspeckit/setup-openspeckit.

Fallback Matches Renders to
D001 openspec_speckit_protocol() live openspec-speckit-workflow.md (new-workstation e081c5a, unchanged by #53) byte-identical, 26017 bytes, md5 5b36047e02421ab4e295285122a103fc
D002 project_agent_bootstrap_protocol() project-agent-bootstrap.md at new-workstation#53's head 356238579549c65dd010575e0a579ea4a862f451 byte-identical, 14821 bytes, md5 692f68037aa27d17eeb6f460b194597d
D003 global_agent_entrypoint() the shape bullet of live AGENTS.md (unchanged by #53) the bullet is byte-identical (8 lines)

What D002 restored. D002 had already been two sections behind before #52. It gains:

  • the "The workspace config" paragraph;
  • the ## Non-Triad Advisory section;
  • the Script Status entries "Non-Triad advisory (2026-10-06)" and "Adopted feature amendment workflow (2026-10-04)", plus the "Earlier bootstrap delivery" heading.

The corrected sentence. #53 corrects the stale "Until that lands, the installed script only logs shape: single repository." It now reads "is realized in the script under #138." The fallback carries the corrected text.

Method (#131's). Both protocol bodies are generated from the live files:

  • braces are doubled (one {spec,code} each);
  • absolute protocol paths are rendered from agent_root;
  • the tilde literal ~/.agents/workspace.yaml is kept.

Rendering with another agent root changes exactly two lines per file.

Not byte-identical, by design. global_agent_entrypoint() as a whole renders a 43-line curated subset of the 517-line live AGENTS.md. Only its shape bullet is in scope. The live file's separate "Preferred triad default" bullet is not in the fallback.

Part B: stop-on-no (D004), as ratified design D2 says

openxFactory openspec/changes/prefer-triad-project-shape/design.md, D2, at a2dc658d, lines 76-80, verbatim:

The interactive answer "no" is the person's own stop. Taking the default gives the run the person would have had without the advisory. Answering no ends the run before it writes anything; that is the person choosing to stop, not the advisory refusing, and the realization owner picks the exit status for it with the rule that nothing reads that status as a verdict about the repository.

Why it changes. #139 shipped no as an unrecognised answer that continues, which departs from D2. The lane coordinator, acting as realization owner, ruled the correction. The live protocol's "Answering no stops before anything is written" stays as it is.

What changes:

  • TRIAD_STOP_ANSWERS = ("n", "no") is matched after strip().lower(), at both the first question and the question after the steps.
  • Such an answer takes Ctrl-C's path, stop_at_the_triad_question(). Nothing has been written, "Stopped at your request; nothing was written." is said, and the run ends by SIGINT. That is the platform's own status for an interrupted process: the advisory adds no exit status of its own, and nothing reads it as a verdict.
  • Enter, y, yes, any other answer and end-of-file still continue, and the run is then exactly the one without the advisory. s still shows the steps.
  • The two questions now read:
    • "Press Enter to continue (s = show the steps; n or Ctrl-C stops before anything is written): "
    • "Press Enter to continue (n or Ctrl-C stops before anything is written): "

Bookkeeping. specs/021-triad-shape-advisory/ gains:

Audit, reported and not edited. No sentence in the D001 or D003 fallback says that "no" continues or that Ctrl-C is the only stop. Ctrl-C appears in none of the three protocol texts. The workflow's "Never ask, block or convert on its account" and the entrypoint's "carry on" describe agent sessions, which never ask; the bootstrap's question is governed by D002's "Answering no stops before anything is written", and the code now matches it.

Validation

Check main 9fbe609c previous head e2cfc09b (Part A only) this head d692274f
bash devBenches/devcontainer.test/test-openspeckit-bootstrap.sh exit 0, 966 PASS, 0 FAIL exit 0, 979 PASS, 0 FAIL exit 0, 1042 PASS, 0 FAIL
python3 devBenches/base-image/update-upstream.py check 23 copies match 23 copies match 23 copies match
  • Part A: 13 assert_contains lines, one per restored section. Against main's script they fail, exactly those 13.
  • Part B: 63 more pseudo-terminal checks, driven the way the existing Ctrl-C test drives the terminal. 48 are in a new stop loop and 15 in the continue loop.
    • Stop loop. It covers n, no, NO and No at the first question, plus s then n and steps then No. Each of these must:
      • end by SIGINT;
      • ask the expected number of questions;
      • show the advisory once;
      • say "Stopped at your request; nothing was written.";
      • never reach done;
      • leave the repository tree as it was, with no record.
    • Continue loop. It covers Enter, y, yes, maybe later, s then Enter, SHOW then maybe, and end-of-file. Each of these must:
      • exit 0 and reach done;
      • write exactly the tree the non-interactive run writes;
      • show the new question text.
    • Inverted, not only added. setup-openspeckit: advise a non-Triad repository at bootstrap (prefer-triad-project-shape 5.4) #139's suite asserted that no continues, in its typed-no case and in SHOW then no. Those two cases are gone from the continue loop: no now sits in the stop loop, and the steps case answers maybe. y and yes are added as continue cases.
  • Lint. python3 -m py_compile and bash -n pass. CI runs neither shellcheck nor a separate compile step. Locally, shellcheck reports only SC2016 notes: 16 on main and 19 here. The three extra come from Part A's literal backtick needles, and Part B adds none.
  • Diff scan. Scanned for secrets, tokens and workstation paths before pushing; none were found.

Held for Brett Heap's merge word; do not merge.

🤖 Generated with Claude Code

Brett Heap's "merge 139 and 52" merged the shared protocol's Triad
advisory (brettheap/new-workstation#52, e081c5a). This brings the three
fallbacks setup-openspeckit writes, when the live files are missing, back
in line with the live text. These are the deferred D001-D003 of
specs/021-triad-shape-advisory.

- D001: openspec_speckit_protocol() gains the Triad preference paragraph
  and the "Advise a single repository once" block. It now renders
  byte-identical to the live openspec-speckit-workflow.md (26017 bytes).
- D002: project_agent_bootstrap_protocol() gains the workspace-config
  paragraph and the "## Non-Triad Advisory" section. It also gains the
  Script Status entries for the Non-Triad advisory and the 2026-10-04
  feature amendment workflow, and the "Earlier bootstrap delivery"
  heading. It was already two sections behind before #52. It now renders
  byte-identical to the live project-agent-bootstrap.md (14895 bytes).
- D003: global_agent_entrypoint()'s shape bullet now matches the live
  AGENTS.md bullet byte for byte.

Both bodies were generated from the live files by #131's rules:
- braces doubled (one {spec,code} each);
- absolute protocol paths rendered from agent_root;
- the tilde literal ~/.agents/workspace.yaml kept.

Rendering with another agent root moves exactly two lines in each file.

test-openspeckit-bootstrap.sh gains 13 assert_contains lines pinning the
restored sections. Against the previous script they fail, exactly those
13. Totals: 966 PASS before, 979 PASS / 0 FAIL after. update-upstream.py
check: 23 vendored copies match before and after.

Refs #138

Lane: codeXfactory-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 22 hours and 7 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Re-syncs the three embedded setup-openspeckit fallbacks with the live Triad protocol documents through template-only insertions and one entrypoint bullet replacement, while adding 13 targeted regression assertions. Review the byte-identity claims, preserved agent-root interpolation, and the documented contract discrepancies between the live bootstrap text and the merged script behavior.

File-Level Changes

Change Details Files
Re-synchronize the embedded protocol fallbacks with the current Triad advisory text while preserving existing template parameterization.
  • Add the Triad preference, single-repository advisory, and exemption text to the workflow fallback.
  • Add workspace configuration, Non-Triad Advisory, and updated Script Status content to the bootstrap fallback.
  • Replace the entrypoint shape bullet with the byte-identical live version.
  • Keep brace escaping, agent-root substitution, and other rendering rules unchanged.
devBenches/base-image/files/openspeckit/setup-openspeckit
Extend bootstrap tests to assert every restored protocol section is present in generated fallbacks.
  • Add five workflow protocol assertions.
  • Add six bootstrap protocol assertions.
  • Add two global entrypoint assertions.
  • Verify the new assertions fail against the pre-change script and pass after regeneration.
devBenches/devcontainer.test/test-openspeckit-bootstrap.sh

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Bookkeeping only. The three deferred re-syncs of
specs/021-triad-shape-advisory are done in #140, after
brettheap/new-workstation#52 merged as e081c5a.
- D001 and D002: the protocol fallbacks render byte-identical to the live files.
- D003: the entrypoint shape bullet matches the live one.

Refs #138

Lane: codeXfactory-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Oct 6, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

brettheap and others added 2 commits October 6, 2026 21:35
…n D2

Ratified design D2 of openxFactory's prefer-triad-project-shape (a2dc658d,
lines 76-80) says: "Answering no ends the run before it writes anything;
that is the person choosing to stop, not the advisory refusing, and the
realization owner picks the exit status for it with the rule that nothing
reads that status as a verdict about the repository." #139 shipped "no" as
an unrecognised answer that continues. The lane coordinator, acting as
realization owner, ruled the correction.

What changes:
- New TRIAD_STOP_ANSWERS = ("n", "no"), matched after strip().lower(), at
  both questions. Such an answer takes Ctrl-C's path,
  stop_at_the_triad_question(): nothing has been written, the stop is said,
  and the run ends by SIGINT, the platform's own status for an interrupted
  process.
- Enter, y, yes, any other answer, and end of file still continue. s shows
  the steps and asks once more.
- Both questions now read "n or Ctrl-C stops before anything is written".

The D002 fallback takes brettheap/new-workstation#53's corrected Script
Status sentence ("is realized in the script under
#138."). It now renders byte-identical to
project-agent-bootstrap.md at #53's head 35623857: 14821 bytes, md5
692f68037aa27d17eeb6f460b194597d. D001 and the entrypoint bullet are
unchanged and still match.

Pseudo-terminal tests:
- stop on n, no, NO, " No ", s then n, and steps then No: SIGINT, the stop
  is said, nothing is written;
- continue on Enter, y, yes, an unrecognised word, SHOW then a word, and
  end of file.

Suite: 979 PASS before (e2cfc09), 1042 PASS / 0 FAIL after.
update-upstream.py check: 23 copies match.

Refs #138

Lane: codeXfactory-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rkstation#53

- tasks.md gains D004, ticked by #140. It quotes design D2 verbatim and
  records the realization and its tests.
- D002 now notes that it tracks the corrected Script Status sentence of
  brettheap/new-workstation#53, and that #140 merges after #53.
- spec.md decision 2 and User Story 3 are amended to the stop-on-no
  behaviour. The superseded "typing no continues" bullet is kept as the
  record of what #139 shipped.

Refs #138

Lane: codeXfactory-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap brettheap changed the title setup-openspeckit: re-sync the embedded fallbacks with the Triad protocol (D001-D003) setup-openspeckit: re-sync the Triad protocol fallbacks (D001-D003); n or no stops per design D2 (D004) Oct 6, 2026
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

Lane: codeXfactory-5

New head d692274 adds D004: n or no at the Triad question stops the run, per ratified design D2. Part A, the D001-D003 re-sync, is unchanged apart from the D002 Script Status sentence, which now follows brettheap/new-workstation#53.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@brettheap
brettheap merged commit d86ba59 into main Oct 6, 2026
11 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

LANDED — lane codeXfactory-5, session ed23f049-7e99-4601-8a6d-760b6aeb5f26@Eagle, 2026-10-06T22:00:06Z, PR #140 into opensoft/workBenches main → squash d86ba59b1c81b777d05a7a5457553f3e9895432c

Merged on Brett Heap's word "merge 53 and 140". It went in after brettheap/new-workstation#53 (cb411460), so the fallback and the live protocol match byte for byte. With #139 (9fbe609c), this completes task 5.4 of openxFactory's ratified prefer-triad-project-shape.

Lane: codeXfactory-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant