Skip to content

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

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 Reduction
All tracked *.md (AGENTS.md/CLAUDE.md, README.md, docs/brief.md + docs/implementation-plan.md) 63,615 chars 24,582 chars 61.4%
Hot-path (AGENTS.md/CLAUDE.md symlink + .claude/workflow.json) 17,998 chars 15,290 chars 15.0%

The hot-path number is smaller than the doc-wide one because ~35% of AGENTS.md is the Traps
section, which is exempt from fact deletion (compress wording, never drop a lesson) — it already
dominated the file before this pass and has a compression floor once every fact is kept.

What changed

Rewrote every prose surface into strict Simplified Technical English: active voice, one
instruction per sentence, ≤20 words in instructions / ≤25 descriptive, no semicolons, no phrasal
verbs, simple tenses, noun clusters ≤3 words. Scope: AGENTS.md (CLAUDE.md is a symlink to it),
.claude/workflow.json, README.md, readme.txt, docs/brief.md + docs/implementation-plan.md,
and every comment in .github/workflows/{ci,release,workflow-state}.yml, assets/atlas-page.js,
blocks/embed/{editor.js,render.php}, includes/{diagnostics,embed,page,routing,seo,settings, shortcode,sitemap,updates}.php, sahaj-atlas.php, templates/atlas-page.php, and
tests/{bootstrap,contract,domains,lint,report,run,sitemap}.php + tests/render.mjs. No code,
delimiter, or directive changed anywhere — verified per file via targeted diff review (only
comment/prose lines differ; phpcs:ignore rule names, @package/@var tags, and the plugin
header block all kept intact).

Deleted / merged

  • docs/brief.md deleted. Its unique content (fleet survey, embed-contract parameter table,
    path-routing/diagnostics mechanics, SEO-override rationale, distribution rationale, fleet-specific
    risks) folded into docs/implementation-plan.md, which is now the sole planning-history doc.
    Zero remaining repo references to docs/brief.md.
  • Dropped the stale "Step 0a" repo-setup narrative (setup finished years ago) and brief.md's
    pre-#170 sizing/map=true claim (corrected in AGENTS.md since; not carried forward).
  • Deduped the wp_kses paragraph, the Principles list, and the Decisions table to one copy each in
    AGENTS.md, with implementation-plan.md pointing back to it instead of restating.
  • docs/implementation-plan.md demoted from a mandatory pre-coding read to optional background
    reading in AGENTS.md.

Debris fixed

  • workflow.json's ready-to-implement label (the retired Stage-model term): confirmed already
    absent from this branch — a true no-op, re-verified after all edits landed. Only
    prAllowlistGlobs exists here.
  • 6 weak one-line docblocks in includes/ folded to a one-line @return or cut outright, with
    zero TRAP or return-value content lost (2 candidate line numbers from the audit's debris list —
    page.php:38, routing.php:176 — turned out on inspection to be live TRAP docs, not weak
    one-liners, so they were left as full TRAP prose per the ground rule that traps beat debris).
  • 3 stale npm run <script> references inside test docblocks corrected to pnpm (this repo has
    never shipped an npm script; package.json is pnpm-only).
  • tests/lint.php pointed readers at tests/lint-self-test.php, which does not exist anywhere in
    the repo. Reworded to state the lesson (break a file on purpose, confirm lint then fails) without
    the fabricated filename.

Accuracy fix found during this pass (not in the audit): implementation-plan.md's status note
claimed sitemaps were still unimplemented, tracked as SahajCloud#650. AGENTS.md already says
sitemaps ship (#651 supplied the enumeration endpoint #650 requested). Dropped the stale bullet,
kept the still-true front-page-routing departure note next to it.

Finisher pass (this PR's own verification, beyond the rewriters')

  • Re-checked every inline file:line pointer in AGENTS.md's Traps section against the actual ⚠
    comment locations, since the comment-sweep partitions' rewrites shifted several docblocks by 1-5
    lines. Corrected all drifted pointers: embed.php:337→342, render.mjs:196→198,
    run.php:138→143, atlas-page.php:13,19,30→14,20,31, atlas-page.php:7→8,
    sahaj-atlas.php:83→84, page.php:193→191, tests/contract.php:126,148→131,
    sitemap.php:86→81, tests/sitemap.php:81→82, diagnostics.php:399→398,
    sitemap.php:187→181, tests/render.mjs:83→85. Left embed.php:48, routing.php:113,163,
    sahaj-atlas.php:22, diagnostics.php:262, tests/bootstrap.php:5,42,
    tests/sitemap.php:20 unchanged — verified they still land on the right ⚠ comment.
  • Confirmed zero non-comment code lines changed across every comment-sweep file (only exception:
    the free-text reason after one phpcs:ignore -- in blocks/embed/render.php, which is comment
    text, not the directive itself).

Traps preserved (all 16 + 2 CI traps, verbatim-in-substance)

  1. auto.js is a real ES module — wp_enqueue_script_module(), not wp_enqueue_script()+defer
  2. Print an explicit <sahaj-atlas> element; core's own script-tag placement no longer matters
  3. Element placement is now load-bearing; wp_body_open would misplace a contained map
  4. Size with display:block + a definite height (SahajAtlasWeb#170 inverted the old rule)
  5. min-height is not a height — needs a definite height and display:block
  6. Never run wp_kses() on this plugin's own markup — safecss_filter_attr() drops display
  7. get_header() on a block theme falls through to theme-compat and duplicates the DOCTYPE
  8. get_footer() is not wp_footer() — the latter must fire
  9. redirect_canonical() 301s deep links unless suppressed when the route var is set
  10. No translated string may run before init on WordPress 6.7
  11. One _wp_page_template value serves both theme kinds — do not branch to "fix" it
  12. A front-page atlas refuses path routing, or it hijacks the host's own 404
  13. An empty sitemap must 404, never an empty <urlset>
  14. allowedDomains is newline-separated; an empty list allows every origin by design
  15. Publish sitemap URLs only for this host
  16. Suppress the host's SEO plugin only after a successful fetch
  • CI contract job: the old warn-and-pass check on the false SahajCloud-is-private premise — a
    green run never proved the diff executed
  • GitHub's own "Source code (zip)" installs as a second plugin copy, not an update

Gates run, all green

  • gh pr list --repo sydevs/SahajAtlasWordpress — re-checked right before finishing: no open PRs.
  • pnpm install --frozen-lockfile — ok.
  • pnpm test:all (lint + WP 6.7/PHP 7.4 behaviour suite + render checks) — 12/12 PHP files
    syntax-clean, 122 assertions / 0 failures, 0 render failures across both theme kinds.
  • python3 -m json.tool .claude/workflow.json — valid JSON.
  • readme.txt Stable tag and sahaj-atlas.php Version: — both 0.1.0, unaltered, still in
    lockstep.
  • git diff --stat -- tests/atlas-url-contract.json — empty (generated file untouched).
  • README.md's ## Installation heading — unchanged, #installation anchor still resolves.
  • grep -rn docs/brief.md and grep -rln ready-to-implement across the repo — zero hits outside
    .git.

Native php -l was unavailable in this environment (no system PHP interpreter). pnpm lint's
WASM-based token_get_all(..., TOKEN_PARSE) syntax check covers the same 12 non-test PHP files
(all ok), and the full test:all run requires and executes every tests/*.php file too — a
syntax error there would have failed the run outright, and it didn't.

Not applicable to this repo: bumping claude-workflow's plugin version and running
rule-delta.mjs — those steps are scoped to the claude-workflow repo only.

🤖 Generated with Claude Code

Rewrites all prose in this repo (docs, comments, config) into strict
Simplified Technical English: active voice, short sentences, no
semicolons, no phrasal verbs. Tracked *.md files drop from 63,615 to
24,582 chars (61.4%); the hot-path bootstrap docs (AGENTS.md/CLAUDE.md
symlink + .claude/workflow.json) drop from 17,998 to 15,290 chars
(15.0%), most of that mass held by the exempt Traps section, which is
compressed in wording but loses no fact.

Structural changes
- Merge docs/brief.md into docs/implementation-plan.md and delete
  brief.md. Drop the stale "Step 0a" repo-setup narrative and the
  pre-#170 sizing/map=true claim brief.md carried; fold every fact
  unique to either source doc into the survivor. Zero remaining repo
  references to brief.md.
- Demote docs/implementation-plan.md from a mandatory pre-coding read
  to optional background reading in AGENTS.md.
- Dedup the wp_kses paragraph, the Principles list, and the Decisions
  table down to one copy each in AGENTS.md, with implementation-plan.md
  pointing back to it.
- Fold the 16-trap catalog into an index in AGENTS.md: each trap keeps
  its full lesson, now pointing at the file:line of its inline `⚠`
  comment where one exists.

Debris fixed
- workflow.json's `ready-to-implement` label: confirmed already absent
  from this branch (a true no-op — only `prAllowlistGlobs` exists here).
- 6 weak one-line docblocks in includes/ folded or cut (no TRAP or
  return-value content lost).
- 3 stale `npm run <script>` references in test docblocks corrected to
  `pnpm` (this repo has never had an npm script).
- tests/lint.php's docblock pointed at `tests/lint-self-test.php`,
  which does not exist; reworded to state the lesson (break a file on
  purpose and confirm lint then fails) without the fabricated filename.

Accuracy fix (found during this pass, not in the audit)
- implementation-plan.md's status note claimed sitemaps were still
  unimplemented (SahajCloud#650); AGENTS.md already says they ship
  (#651). Dropped the stale departure bullet.

Finisher pass
- Re-verified every inline file:line pointer in AGENTS.md's Traps
  section against the actual `⚠` comment locations after the comment
  rewrites shifted several docblocks by 1-5 lines (embed.php,
  atlas-page.php, sahaj-atlas.php, page.php, sitemap.php, render.mjs,
  contract.php, diagnostics.php) and corrected the drifted ones.
- Confirmed zero non-comment code lines changed across every
  comment-sweep file (workflows, assets, blocks, includes, tests,
  templates, sahaj-atlas.php) via targeted diff review.

Traps preserved (all 16, verbatim-in-substance, all inline ⚠ comments
intact): auto.js is a real ES module; explicit element printing beats
core's own placement; element placement + wp_body_open hazard;
display:block + definite height (SahajAtlasWeb#170 inversion);
min-height is not a height; never wp_kses our own markup; get_header()
duplicate-DOCTYPE on block themes; get_footer() != wp_footer();
redirect_canonical() breaks path routing; no translated string before
init (WP 6.7); one _wp_page_template value serves both theme kinds;
front-page atlas refuses path routing; empty sitemap must 404;
allowedDomains is newline-separated with an open-by-default empty
list; sitemap publishes only this-host URLs; suppress host SEO only
after a successful fetch. Plus the CI contract-job trap (old
warn-and-pass check on the false SahajCloud-is-private premise) and
the GitHub auto-zip second-plugin hazard.

Gates run, all green
- gh pr list --repo sydevs/SahajAtlasWordpress: no open PRs.
- pnpm install --frozen-lockfile: ok.
- pnpm test:all (lint + WP 6.7/PHP 7.4 behaviour suite + render
  checks): 12/12 files syntax-clean, 122 assertions / 0 failures,
  0 render failures across both theme kinds.
- python3 -m json.tool .claude/workflow.json: valid.
- readme.txt Stable tag / sahaj-atlas.php Version: both 0.1.0,
  unaltered.
- tests/atlas-url-contract.json: untouched (generated file).
- README.md `## Installation` heading: unchanged, anchor intact.
- grep for docs/brief.md and ready-to-implement: zero hits outside
  .git.
Native `php -l` was unavailable in this environment (no system PHP);
pnpm lint's WASM-based `token_get_all(TOKEN_PARSE)` syntax check
covers the same 12 non-test PHP files, and the full test:all run
exercises (and would fatal on) every tests/*.php file too.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Ardnived
Ardnived merged commit f6e7bd7 into main Sep 5, 2026
3 checks 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
@sydevs-bot sydevs-bot mentioned this pull request Sep 18, 2026
Ardnived pushed a commit that referenced this pull request Sep 18, 2026
* chore(release): v0.2.0

Three merged changes ship in the plugin zip since v0.1.0, and a volunteer sees
none of them until a tag builds one: #21, #23 and #24. Everything else merged
since c1fec89 is CI, docs or tests, all of which `.distignore` keeps out of the
zip, and #10 and #13 touched shipping files in comments only.

Minor, not patch, and pre-1.0 either way: #23 adds a capability and a second
site setting, so the version has to move more than a fix would.

Four declarations, not two. `release.yml` compares the tag against the plugin
header alone, so it would have passed with `SAHAJ_ATLAS_VERSION` left at 0.1.0
— and that constant is the cache-buster on `atlas-page.css`, `atlas-page.js`
and the editor assets. Every updated site would have kept serving the 0.1.0
copies. `blocks/embed/block.json` declares the same version to the editor.
`package.json` declares none: it is dev tooling, and `.distignore` excludes it.

The changelog is written for the one non-technical volunteer who runs each
site, so it names what they will see rather than what changed in the code.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QNEAgEV5tDoLsB9nyLUv26

* fix(readme): the 0.1.0 entry claimed a 0.2.0 row

#23 edited the shipped `= 0.1.0 =` changelog entry, adding "and which
side describes the Atlas page" to the status-panel bullet. That row did
not exist at v0.1.0 — `git show v0.1.0:readme.txt` has the panel covering
four things, not five.

Plugin Update Checker merges readme.txt's sections into the WordPress
update modal, so a volunteer on 0.1.0 deciding whether to update reads
the fifth row credited to the version they already run. The 0.2.0 entry
announcing that same row then reads as a repeat, and the release that
actually ships it loses the credit.

A shipped release's entry describes what that release shipped.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jg5XawkJdwdSyhgVGdkvQu

---------

Co-authored-by: Claude <[email protected]>
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