Skip to content

docs: prompt audit cleanup for the agent instruction files - #223

Merged
yihanzhu merged 3 commits into
mainfrom
prompt-audit-cleanup
Sep 3, 2026
Merged

docs: prompt audit cleanup for the agent instruction files#223
yihanzhu merged 3 commits into
mainfrom
prompt-audit-cleanup

Conversation

@yihanzhu

@yihanzhu yihanzhu commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Cleanup from a prompt audit of the instruction files. No script changes.

Broken text fixed (4)

  • AGENTS.md: "with the exact exactly one" → "with exactly one".
  • routines/coder-revision.md: the round-cap sentence lost its subject when the 08-29 edit was inserted mid-sentence.
  • routines/coder.md: "remove and add and verify needs-human" → the standard order.
  • manager/CLAUDE.md (×2): the rename script wrote "(legacy .fabrica/models.conf still honored)" inside a code span.

Stale statements corrected (3)

  • templates/.ystack/models.conf said nothing reads it yet. The gates and the manager do.
  • templates/repo-setup.md said coder/hands wiring is still follow-up work. It is wired.
  • Never-merge rationale in manager/CLAUDE.md, AGENTS.md, repo-setup.md cited the approving-review ruleset. The ruleset no longer requires one; the reason given is now the merge-guard hook and operator policy.

Archaeology removed

  • ~26 issue/PR references and incident tags in behavioral text (#102 round-2, per #87's lesson, post-98a, #54 guard now the last resort, the PR Codex gates at explicit high effort + resolved-config echo (#110) #115 P1 story). Every rule and every reason stays; only the ticket numbers go. The 2026-07-11 degraded-run incident is kept because it explains why the detector exists.
  • "no longer / retired / used to" phrasing rewritten as present-tense rules.

Persona toned down

  • North-star gate paragraph at normal volume (no do **NOT** … do **NOT**).
  • Repo survey stated as a goal plus when to delegate, not a method script.
  • Hands delegation keeps the reason, drops the tokens × turns formula.
  • Removed "detect your own tier and warn": the model cannot verify it and nothing checks it.

Config

  • config/models.conf: dropped the FABRICA_* mirrors. The persona and the command template read YSTACK_*; the parser's handling of FABRICA_* keys in target override files is unchanged. The wiring-status history comment is gone.
  • Shellcheck version pin in both coder routines now points at SHELLCHECK_VERSION in ci.yml instead of restating 0.11.0.

Checks run locally: check-rename.sh clean, required-files manifest present, models-conf-parser.test.sh 63/63, v2-check-rename.test.sh ok, config/models.conf still sources.

After merge: re-run scripts/install.sh so the live /yshifu command picks this up. Several touched files are construction-mode forbidden paths; this is an operator-driven change.

🤖 Generated with Claude Code

Fixes four sentences broken by stacked edits (AGENTS.md "the exact
exactly one", coder-revision.md dangling "still subject to", coder.md
"remove and add and verify", and the rename script's parenthetical
inside a code span in manager/CLAUDE.md). Corrects three statements
the repo contradicts: the template models.conf "nothing reads this
yet", repo-setup.md "wiring is still follow-up work", and the
never-merge rationale that cites an approving-review ruleset. Removes
issue and PR numbers from behavioral text, rewrites "no longer /
retired / used to" phrasing as present-tense rules, and drops the
FABRICA_* legacy bridge whose removal condition is met. Tones down
the yshifu persona: north-star gate at normal volume, survey guidance
stated as a goal, hands delegation without the arithmetic formula,
and no self-tier detection. Points the shellcheck pin at the CI
constant instead of restating the number.

No script changes. Prompt edits take effect after scripts/install.sh
regenerates the live /yshifu command.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploying ystack with  Cloudflare Pages  Cloudflare Pages

Latest commit: fd037c0
Status: ✅  Deploy successful!
Preview URL: https://995ca078.fabrica-6yx.pages.dev
Branch Preview URL: https://prompt-audit-cleanup.fabrica-6yx.pages.dev

View logs

yihanzhu commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Codex reviewer (cross-vendor, read-only)

Reviewed-head: b004c5e
Reviewed-base: 5868e88
reviewer: codex @ high

Final review: NOT CLEAN

Important — the Claude Bash hook is described as universal merge enforcement

AGENTS.md and manager/CLAUDE.md now say that .claude/hooks/no-merge-guard.sh blocks every merge command and supports the claim that no agent has a merge path.

That hook is a Claude PreToolUse hook for Bash. It pattern-matches several known command-line paths. It does not govern other agent harnesses or purpose-built GitHub connector calls. The active construction publisher is a concrete example of a merge path that is controlled by policy and exact evidence rather than this hook.

This wording creates false confidence in mechanical enforcement. Keep the universal rule as policy: outside the named construction overlay, every agent is forbidden to merge. Describe the hook only as defense-in-depth for known Claude Bash merge/direct-main-push commands. Apply the same correction in both files.

Other review results

  • No other blocking finding was found in the ten-file diff.
  • The broken sentences are repaired.
  • Removing the control-plane FABRICA_* mirrors is consistent with current YSTACK_* consumers; legacy target-file parsing remains intact.
  • Local focused checks passed: rename check, model parser 63/63, v2 rename suite, config syntax/source checks, and git diff --check.
  • Per operator direction, this content review did not wait for the still-running PR CI result.

Do not merge this head until the enforcement wording is corrected and the new head is reviewed.

…orcement

The rule that no agent merges is policy and binds every harness. The
Claude Bash hook only catches known command-line merge and push paths.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@yihanzhu

yihanzhu commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Codex reviewer (cross-vendor, read-only)

Reviewed-head: b004c5e
Reviewed-base: 5868e88
reviewer: operator-default @ high

Posted verbatim by codex-review.sh (codex exec review --json --base refs/codex-review/223-98981/base in an isolated temp worktree, sandbox forced read-only). Comments only — Codex never pushes, approves, or merges.

The cleanup introduces a false claim about universal merge enforcement and generalizes a tool-installation instruction in a way that can prevent external targets from reproducing CI reliably.

Full review comments:

  • [P2] Limit the no-merge claim to where the hook runs — /var/folders/rm/bkx4f4b91vqfn79vk02pcd140000gn/T/tmp.QWrx2Bukrp/manager/CLAUDE.md:873-875
    When /yshifu operates on a normal target repository, install.sh installs only the command template and neither it nor setup-target-repo.sh installs this project-local Claude hook. Even within ystack, the hook pattern-matches only selected shell command forms rather than every push or merge path. This statement therefore presents a prompt-level prohibition as universal mechanical enforcement; describe the hook as a ystack-local defense-in-depth measure or install an appropriately comprehensive target-side guard.

  • [P2] Install pinned tools through the repository's CI path — /var/folders/rm/bkx4f4b91vqfn79vk02pcd140000gn/T/tmp.QWrx2Bukrp/routines/coder.md:362-365
    For target repositories whose pinned tool is installed through npm, pip, a setup action, or another official channel, there may be no usable GitHub release artifact, and bypassing the project's installer can produce a different dependency or platform setup than CI. Since this routine applies to every target, direct the coder to reproduce CI's installation mechanism; keep GitHub release fetching only as the explicit ystack ShellCheck case.

…y CI does

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@yihanzhu

yihanzhu commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Codex reviewer (cross-vendor, read-only)

Reviewed-head: fd037c0
Reviewed-base: 5868e88
reviewer: operator-default @ high

Posted verbatim by codex-review.sh (codex exec review --json --base refs/codex-review/223-1654/base in an isolated temp worktree, sandbox forced read-only). Comments only — Codex never pushes, approves, or merges.

The changes are documentation and prompt cleanups that preserve the existing safety and workflow semantics while correcting stale or malformed guidance. No actionable regression was found.

@yihanzhu
yihanzhu merged commit 27c8755 into main Sep 3, 2026
2 checks passed
@yihanzhu
yihanzhu deleted the prompt-audit-cleanup branch September 3, 2026 00:14
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