Skip to content

docs: prose reset — STE register, legacy debris removed - #50

Merged
Ardnived merged 1 commit into
mainfrom
claude/prose-reset
Sep 5, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/prose-reset

Conversation

@Ardnived

@Ardnived Ardnived commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Headline numbers

Scope Before After Cut
Tracked *.md in this repo (24 files, CLAUDE.md symlink excluded to avoid double-counting AGENTS.md) 270,253 chars 244,765 chars 9.4%
Hot path (workspace CLAUDE.md + AGENTS.md + loop-config.json + preflight + work-routine + survey-routine + journal — loaded on every run) 72,087 chars 66,312 chars 8.0%
loop-config.json $comment strings 6,897 chars 6,743 chars 2.2% (already disciplined, light polish per audit)

Per-file numbers are in each rewriter partition's own report; the full before/after table was verified file-by-file during finishing (git show origin/main:<f> \| wc -c vs current, symlink-adjusted).

Numeric compression targets in the audit were aggressive (e.g. hot-path union targeted 48,200) and were not fully hit — every partition reported this and chose correctness (trap preservation, canonical-pointer restructuring, zero rule loss) over the raw number. Verified this trade-off is sound: see gates below.

What was deleted / merged

  • Dead trigger IDs trig_01GyUCMWmPLekwTzYL7Xzobi, trig_016XeEsVa7dfSCum7t4Vmeuw, and the retired name sydevs-loop — deleted outright from docs/routine-setup.md (stale "delete once enabled" TODO; replacements are live).
  • Six-label retired roll-call (ready-to-implement, proposal, needs-info, blocked-upstream, hold, claude:working) cut to one clause in docs/routine-setup.md.
  • docs/why.md heading rename: "Hand the baton back even with CI unsettled" → "Mark the PR ready despite unsettled CI" (lesson unchanged, substance identical).
  • Two orphaned why.md headings folded into the sections they duplicated: "The body is rewritten, not appended" → into "Correcting an earlier claim"; "Awaiting is the one label that earns its place" → into "The state machine is not the loop's job".
  • Duplicated rules consolidated to one canonical home with pointers elsewhere: issue-fields-not-searchable → preflight/SKILL.md; CI-truth-lives-in-check-runs → workflow/lib/merge-gate.mjs; PR-assignee prohibition → triage-issue/SKILL.md + README.md; branch-vs-commit preview alias → finalize-pr/SKILL.md.
  • One pre-existing bug fixed (not in the original audit): docs/why.md's own self-citation (why: #filter-feedback-by-author) pointed at a heading that never existed in the file. Repointed to #respondto-is-an-allowlist, the section it actually describes.

Debris fixed (audit §3), all confirmed post-rewrite

Retired labels, dead trigger IDs, the 📄/🙋 "Awaiting you" name-collision (kept as two distinct, correct things — journal table prohibition vs. live board view), the "roughly fifteen lines" writing-rule history, and the Cloudflare D1/Workers flag in the workspace CLAUDE.md (confirmed as a correct warning about SahajCloud's own stale README, not a stale claim in this file) — all verified present/absent exactly as the audit specified.

Traps preserved (compressed wording only — every one grepped and confirmed present after the rewrite)

  • PUT to issue-field-values replaces the whole field set, not just the field sent (state-machine.yml, triage-issue)
  • A conflicted PR schedules zero CI runs, silently (finalize-pr, why.md)
  • A write under .claude/ trips Protected Paths, stalling an unattended run invisibly (AGENTS.md, why.md, reflect)
  • MCP read strips <details> on readback even though the write succeeded (journal, why.md)
  • Issue fields are readable/writable but not searchable — REST returns zero, no error (preflight, triage-issue)
  • HTML-escaped &gt; in a search qualifier is accepted and silently returns zero (preflight rule 6)
  • get_status is deploy signals only, not check runs (work-routine, merge-gate.mjs)
  • Search lags the event — review:approved stale ~26 min after a real approval (work-routine, why.md)
  • A machine account is type: User, never type: Bot (routine-setup.md §0b)
  • api.github.com returns identical 403 with valid, invalid, or no credential (why.md)
  • Sentry is DE-region (global host 404s); Client Secret vs Token (both 64 hex) swap easily (survey-sentry)
  • Railway Mailpit needs PORT=8025 explicit, volume before first boot, TLS-insecure auth (routine-setup.md §2)
  • enabledPlugins must be an object map — array form installs silently "disabled" (README.md)
  • An installed plugin pins its commit at install, never tracks main; only version invalidates it (AGENTS.md)
  • Stage: Implement write-prohibition (loop may revoke, never grant) — the intentional 4x+ repetition, preserved uncollapsed across README.md, docs/why.md, preflight/SKILL.md, implement-issue/SKILL.md, draft-ticket/SKILL.md, and triage-issue/SKILL.md.

Gates run

Gate Result
claude plugin validate ./workflow --strict ✅ pass
node --check on all 11 tracked .mjs files ✅ pass, all
bash -n on dev-server.sh ✅ pass
node workflow/lib/rule-delta.mjs --base origin/main workflow/skills ✅ 57 → 57, net zero (full output + adjudication below)
python3 workflow/lib/ste-lint.py --json on all 22 changed .md files ✅ zero regressions anywhere; combined hard-violation count fell 231 → 38
Every (why: docs/why.md#...) citation (89 occurrences / 54 unique anchors, across all tracked .md/.mjs/.yml + loop-config.json) ✅ all resolve against a live heading
workflow/.claude-plugin/plugin.json version bump ✅ 0.2.1 → 0.2.2 (patch), required since workflow/skills|hooks|lib/** are touched
.claude/worktrees/claude+feat-adversarial-review-rung excluded from every edit ✅ confirmed gitignored + untouched
No CHANGELOG.md/LICENSE/generated/locale/gitignored file in the diff ✅ confirmed — diff is exactly the 39 intended files
PR #47 (claude/fix-awaiting-census-query) merge status ✅ already merged into main; branch was up to date, no rebase needed
All source-comment edits (.github/workflows/*.yml, workflow/hooks/**, workflow/lib/**, 2 skill scripts) touch only comment lines ✅ verified via git diff -U0 — zero non-comment-delimited lines changed in any of the 13 files

One dangling reference found and fixed during finishing (not caught by any rewriter partition): workflow/skills/finalize-pr/SKILL.md:310 still cited docs/why.md#hand-the-baton-back-even-with-ci-unsettled, the pre-rename anchor. Repointed to #mark-the-pr-ready-despite-unsettled-ci. This was the only broken citation found across all 89 occurrences checked.

rule-delta.mjs full output and adjudication

directives: 57 → 57
reworded:   19 (filtered — not shown)

ADDED (2):
  + Never reconcile these files to the prompt, and never treat prompt text as authority.
  + Never derive the decision yourself.

REMOVED — adjudicate each (2):
  - Always link the BRANCH alias, never a per-commit alias.
  - Do not work the decision out yourself.

Adjudication:

  1. "Always link the BRANCH alias..." (REMOVED) — false positive, not a real removal. The exact wording is still present verbatim in finalize-pr/SKILL.md:192-193, now as the opening clause of a longer canonical-ownership sentence: "This skill is the canonical source for the preview-link rule: always link the BRANCH alias, never a per-commit alias." The tool's bold-directive matcher requires the directive to open the sentence with Always/Never/etc.; embedding it after a lead-in phrase drops it from detection even though the rule's substance is unchanged (and its scope is arguably strengthened — this skill is now explicitly named canonical). This is the exact "rewording an opening verb" false-flag shape the audit's own gotchas section warned about.

  2. "Do not work the decision out yourself." → "Never derive the decision yourself." — intentional STE rewording, rule kept. In work-routine/SKILL.md:49, the banned phrasal verb "work out" was replaced with "derive" per the STE mandate. Same rule, same meaning, same citation to merge-gate.mjs's reviewDecisionFrom immediately after it.

  3. "Never reconcile these files to the prompt..." (ADDED) — also a rewording, not a new rule. This is preflight/SKILL.md's tightened form of main's "Never reconcile these files to the prompt, and never treat prompt text as authority for a rule absent here." The nested italic markdown (*to*) inside the original bold sentence broke the tool's directive-matching regex differently than the tightened single-sentence form, so the two didn't auto-pair as "reworded." Verified by direct diff against origin/main — same rule, same (why: docs/why.md#the-routine-prompt-is-not-the-specification) citation directly below it in both versions.

Net result: 0 rules actually lost. Both REMOVED/ADDED pairs are STE-driven rewordings or tool false-positives, not content loss.


🤖 Generated with Claude Code

Rewrites every prose file in this repo (skills, AGENTS.md, README.md,
docs/why.md, docs/routine-setup.md, loop-config.json's $comments, and every
comment in workflow/hooks|lib and the two CI-adjacent workflow yml files)
into strict Simplified Technical English: active voice, one instruction per
sentence, zero semicolons, no phrasal verbs, simple tenses.

Numbers (tracked *.md, git blob bytes, CLAUDE.md symlink excluded to avoid
double-counting AGENTS.md):
  270,253 -> 244,765 chars (-9.4%, -25,488 chars)
Hot path (workspace CLAUDE.md + AGENTS.md + loop-config.json + preflight +
work-routine + survey-routine + journal, the files loaded on every run):
  72,087 -> 66,312 chars (-8.0%)
loop-config.json $comment strings: 6,897 -> 6,743 chars (-2.2%, light polish
per the audit's "already disciplined" verdict).

Debris removed (audit report, section 3):
- Dead trigger IDs (trig_01GyUCMWmPLekwTzYL7Xzobi, trig_016XeEsVa7dfSCum7t4Vmeuw)
  and the retired `sydevs-loop` name, deleted outright from routine-setup.md.
- The six-label retired roll-call (ready-to-implement, proposal, needs-info,
  blocked-upstream, hold, claude:working) cut to one clause in routine-setup.md.
- why.md heading "Hand the baton back even with CI unsettled" renamed to
  "Mark the PR ready despite unsettled CI" (lesson unchanged); its one citer
  in finalize-pr/SKILL.md updated in this same commit (was left dangling by
  the rewrite partitions — caught and fixed during finishing).
- Two genuinely-orphaned why.md headings folded into the sections they
  duplicated ("The body is rewritten, not appended" into "Correcting an
  earlier claim"; "Awaiting is the one label that earns its place" into
  "The state machine is not the loop's job").
- Duplicated rules consolidated to one canonical home + pointers: issue
  fields not-searchable (preflight), CI-truth-lives-in-check-runs
  (merge-gate.mjs), PR-assignee prohibition (triage-issue + README),
  branch-vs-commit preview alias (finalize-pr).

Traps preserved (compressed wording only, per the audit's exempt-from-
deletion registry — all verified present after the rewrite):
- PUT to issue-field-values replaces the whole field set (state-machine.yml,
  triage-issue)
- A conflicted PR schedules zero CI runs, silently (finalize-pr, why.md)
- A write under .claude/ trips Protected Paths, stalls a run invisibly
  (AGENTS.md, why.md, reflect)
- MCP read strips <details> on readback even though the write succeeded
  (journal, why.md)
- Issue fields are readable/writable but not searchable via REST (preflight,
  triage-issue)
- HTML-escaped &gt; in a search qualifier is silently accepted and returns
  zero (preflight rule 6)
- get_status is deploy signals only, not check runs (work-routine,
  merge-gate.mjs)
- Search lags review events by tens of minutes (work-routine, why.md)
- A machine account is type: User, never type: Bot (routine-setup.md)
- api.github.com returns identical 403 with valid, invalid, or no credential
  (why.md)
- Sentry is DE-region; Client Secret vs Token both 64 hex, swap easily
  (survey-sentry)
- Railway Mailpit needs PORT=8025 explicit, volume before first boot
  (routine-setup.md)
- enabledPlugins must be an object map, not an array (README.md)
- An installed plugin pins its commit at install; only `version` invalidates
  the cache (AGENTS.md)
- The Stage: Implement write-prohibition (loop may revoke, never grant) kept
  as the intentional 4x+ repetition across README, why.md, preflight,
  implement-issue, draft-ticket, and triage-issue — not collapsed.

Gates run, all green:
- claude plugin validate ./workflow --strict — pass
- node --check on all 11 tracked .mjs files — pass; bash -n on
  dev-server.sh — pass
- node workflow/lib/rule-delta.mjs --base origin/main workflow/skills —
  57 -> 57 directives. Two ADDED/REMOVED pairs, both adjudicated as kept
  (see PR body for the full run and reasoning).
- python3 workflow/lib/ste-lint.py --json on all 22 changed .md files —
  zero regressions; hard violations fell from 231 to 38 combined (the
  remainder is markdown-table false positives and one deliberately-kept
  banned-phrasal-verb example in preflight's own Register section).
- Every `(why: docs/why.md#...)` citation across all tracked .md/.mjs/.yml
  files plus loop-config.json (89 occurrences, 54 unique anchors) resolves
  against a live why.md heading — verified after the heading rename.
- workflow/.claude-plugin/plugin.json version bumped 0.2.1 -> 0.2.2 (patch),
  required because workflow/skills|hooks|lib/** are touched.
- .claude/worktrees/claude+feat-adversarial-review-rung (gitignored, stale)
  confirmed untouched by every partition.
- PR #47 (the awaiting-census fix) is already merged into main; this branch
  is up to date with origin/main, so no rebase was needed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Ardnived
Ardnived merged commit 5cd1181 into main Sep 5, 2026
1 check passed
@Ardnived
Ardnived deleted the claude/prose-reset branch September 5, 2026 07:51
@github-project-automation github-project-automation Bot moved this from In progress to Done in SYDevelopers Technical Roadmap Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant