Repository navigation
ISS-12135: Require per-key approval for vibe flags and no new tech debt - #316
Merged
Merged
Conversation
- Add a canonical Feature flags section to guardrails.md: the target repo's own flag rule decides, each new key or read needs a quoted rule sentence and a human source, one behavior gets one key, and an existing key for the surface is reused - Add vibe-sessions.mjs flag-keys, which records per surface the keys that must be on to see the work and refuses unjustified or split keys; list shows them per session and ticket-sections renders them - Make live-ticket-check.mjs fail a ticket without the keys block - Have the writer justify keys before building, add guardrails review check 17, and carry the keys through handoff, the ticket, the summary and a requested pull request - Add a contract test and the pm-flag-key-sprawl-blocked eval case - Bump vibe to 1.0.61 Testing: node --test for the vibe and handoff scripts (161 passed), uv run pytest plugins/vibe (341 passed), ruff, pyright, manifest parity, and the new eval case (1.00 on this branch, 0.67 on main) Risks: handoff now blocks until the session records its flag keys
- Move flag keys to flag-keys.mjs with record, question, approve and show; a proposed key is built only after the person answers its exact question with a yes, recorded with who and when, and only for that proposal - Add the No new tech debt principle to guardrails.md, mapped onto the writer's owner research and reviewer checks 1, 7, 8, 12 and 17 - Have the writer return NEEDS_FLAG_APPROVAL instead of gating, and the vibe skill ask the question and record the answer - Make live-ticket-check fail a session with an unapproved key - Extend the contract test and the eval case to cover approval Testing: node --test for vibe and handoff scripts (167 passed), uv run pytest plugins/vibe (343 passed) Risks: a session cannot hand off a gated change until the person approves each key or the gate is removed
- Keep No new tech debt and Feature flags only in guardrails.md and point the writer, skills, reviewer, ticket template, quality loop and environment worker at them in a line each - Move the approval procedure into flag-keys.mjs output: record lists pending keys with the next step, question prints how to ask and record the answer - Fold the tech debt check into reviewer check 17 and leave checks 1, 7, 8 and 12 as they are on main - Rewrite the contract test against the shorter text and the script Testing: node --test vibe, handoff and fleet monitor scripts (174, one unrelated timing test passed on rerun), uv run pytest plugins/vibe (343) Risks: none beyond the previous commit
- Make check 17 block a copied or divergent type, constant, validator or bound, an export or component only tests or deprecated stories import, and growth of a file near the repo's size ceiling, not only mechanisms checks 1, 7, 8 and 12 find Testing: uv run pytest plugins/vibe/tools/python (323 passed) Risks: None identified
- Add one line to the Feature flags rule: an agent never adds or edits a flag registration ledger row or verification date; the per-key approval and Keys to see this work tell the human which key to ledger Testing: uv run pytest test_vibe_flag_keys_contract.py (9 passed) Risks: None identified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
About 14 vibe sessions in symphony-alpha each added PostHog keys and nothing challenged them. One session gated a single Branches list redesign behind
branches-list-adapter-connected,-disconnectedand-rollback; others gated edits to shipped surfaces, and no handoff said which keys to turn on. Flags are now the tested case of a general rule: a change grows no tech debt without a cited reason. The PR applies that rule to itself: each rule is stated once, other files reference it in a line, and the script output carries the procedure.Stated once (
skills/vibe/references/guardrails.md):Debt:line; its own rationale never counts.AGENTS.mdwith a human source. What the rule ships directly ships ungated.listentry) is reused.Referenced in a line each:
vibe-change-worker: propose and returnNEEDS_FLAG_APPROVAL; follow "No new tech debt".vibe/SKILL.md: theNEEDS_FLAG_APPROVALstatus, and section 7 (ask the printed question, skipping the research gate).quality-loop.md: flag approval stays with the person.handoff/SKILL.md: ask a pending approval once, and tell the person the keys to see the work.ticket-template.mdandvibe-environment-worker(the PR summary): carry "Keys to see this work".vibe-guardrails-reviewer, new check 17: each kind of debt the guardrails section lists without aDebt:reason is blocking (mechanisms found by checks 1, 7, 8 or 12, copied or divergent types, constants, validators and bounds, exports only tests or deprecated stories import, growth near the size ceiling); so is any keyflag-keys.mjs showreports a problem for, or one that the repo rule does not support, splits one behavior, gates a change the rule ships directly, or duplicates an existing key. A cited source is not approval.Carried by
skills/vibe/scripts/flag-keys.mjs(record,question,approve,show):recordvalidates the justification and reports pending keys with the next step.questionprints the exact approval wording and how to ask it, record it, and approve or decline.approvesaves who and when, and only for an answer to that exact question. An approval covers one key and the proposal it answered.recordrefuses a read of an unapproved or declined key, and a second new key on one surface.ticket-sectionsrenders "Keys to see this work" (per surface and host, every key that must be on, its approval and its snapshot value).vibe-sessions.mjs listshows each session's keys.live-ticket-check.mjsfails a ticket without the keys block and, with--worktree, a session with an unapproved key.Cross-session view.
vibe-sessions.mjs listis vibe's existing one. cl-work-report and cl-sweep are ClosedLoop ticket views that do not read vibe session records, so they are unchanged.Instruction length. 8 vibe agent and skill markdown files changed: +77 / -16 lines (net +61), +614 words. Down from net +228 lines and +2,615 words in the previous head.
Coordination.
live-ticket-check.mjs, so whichever lands second resolves those lines.Validation
node --teston the vibe, handoff and codex-fleet-monitor scripts: 174 tests. One untouchedrun-bounded.test.mjstiming case failed under machine load, then passed twice alone.flag-keys.test.mjscovers: no read without a yes, the exact-question check, who and when recorded, a stale proposal asked again, no carry-over between keys, declined, and no operator.uv run pytest plugins/vibe: 343 passed, includingtest_vibe_flag_keys_contract.py(all its tests kept, rewritten against the shorter text and the script's messages).uv run ruff check .: clean.uv run pyright plugins/vibe: 0 errors.pm-flag-key-sprawl-blockedeval scored 1.00 in most runs. This is indicative only: the eval CLI refuses the closedloop-core plugins entry every vibe case carries, and from a temporary copy it often failed to load vibe.Risk
A session cannot hand off a gated change until the person approves each key or the gate is removed. Sessions started on an older version must record their keys at handoff.