Skip to content

chore(TRA-1128): stop tracking superpowers artifacts; split shared agreements into AGENTS.md - #218

Merged
mikestankavich merged 3 commits into
mainfrom
chore/tra-1128-superpowers-ignore-sweep
Aug 31, 2026
Merged

mikestankavich merged 3 commits into
mainfrom
chore/tra-1128-superpowers-ignore-sweep

Conversation

@mikestankavich

@mikestankavich mikestankavich commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

The trakrf/docs share of TRA-1128. Three commits, deliberately separate.

1. chore: ignore block + untrack (29 files)

The ignore rule pointed at spec/superpowers/ — the old path, swept in dca90c0 on 2026-08-03. The tooling had already started writing to superpowers/ at repo root three days before that sweep, so the sweep cleaned and ignored a location nothing writes to any more while the tree at the new location was never in scope. 29 files accumulated there unignored. spec/ no longer exists.

Adopts the canonical block. Byte-identity is acceptance criterion 1, so it was taken from the ticket itself — the description's superpowers stanza plus the docs/notes/ stanza from comment bd1463d8 — rather than from any relayed copy. Three sessions each broadcast a "paste-verbatim canonical block" and no two matched; one had picked up a sentence the ticket never contained.

Verified rather than eyeballed, since a pattern can be present and still not fire:

superpowers/specs/probe.md      → .gitignore:49:superpowers/
docs/superpowers/plans/probe.md → .gitignore:50:docs/superpowers/
.superpowers/probe.md           → .gitignore:51:.superpowers/
docs/notes/probe.md             → .gitignore:59:docs/notes/

sha256 of the 14 canonical lines is cfc7cf43…88a6d225, matching all four repos — provable identity rather than four people asserting they pasted carefully.

Three superpowers paths rather than one because the tooling's output default has already moved twice (spec/superpowers/ → docs/superpowers/ → root superpowers/), breaking a different repo each time. superpowers/ and .superpowers/ have no internal slash so they match at any depth; docs/superpowers/ has one and anchors to the root. Both deliberate.

The tree is removed from disk as well as untracked (AC#2 says deleted, not merely ignored) — load-bearing here, since an ignored-but-present file under a path Docusaurus globs still renders locally.

Also drops the orphaned # CSW local symlink comment, a header left with nothing under it when dca90c0 removed the pattern. No CSW pattern reintroduced; CSW is a plugin now.

2. style: prettier the three docs/api pages

prettier --check . reported 24 failures on main; 21 were the tracked superpowers files removed above. These three are the real remainder and are customer-facing. Own commit so the sweep reviews as a pure mechanical change (AC#6).

Whitespace only — table realignment, one rewrapped row, one blank line moved where Prettier normalises list spacing. No prose, links or code samples touched.

pnpm lint now exits zero (AC#5), which is what makes the validate command in .claude/csw.json usable as a gate.

3. docs: split shared agreements into AGENTS.md

CLAUDE.md carried two kinds of instruction with nothing marking the boundary. Each repo kept its own copy of the shared half, so they drifted independently and — as the ticket diagnoses — none mentioned spec artifacts at all.

  • AGENTS.md (root) — shared, byte-identical in docs, platform, infra. sha256 8aae612ddf7bea89358c13df03ae395aef041533afb019406c15d7c9bd9ac3c1, 25 lines
  • CLAUDE.md — only what is true of this repo, importing the shared half via @AGENTS.md

AGENTS.md rather than a bespoke name so any agent tool reads it, not only Claude Code. At the repo root rather than under .claude/ because a directory that reads as tool config is not where someone cloning the repo would look — tracked and discoverable are different properties and only the first was covered.

The split is justified by shared content across three repos, not by size. Imported files load at launch, so an import costs the same context as inlining. Both files are written to state rather than explain on separate grounds: this text loads every session in three repos, so rationale that can be re-derived isn't worth carrying.

lines words
CLAUDE.md on main 55 287
CLAUDE.md + AGENTS.md now 45 338

Fewer lines covering materially more (spec and note policy, verification rules, publishing gate, OpenAPI provenance). Not a token reduction against main — stating that plainly rather than claiming a win.

Scope is narrow by the same logic: only what a fresh session would otherwise get wrong. Contributing rules already live in CONTRIBUTING.md and now have a single source there. Worktrees are not mentioned — a workflow choice driven by .claude/csw.json, not one to impose on anyone cloning a public repo.

ble-mcp-test is deliberately not in this family — separate org, published npm package, different governance.

Pins the spec and plan output path (AC#3), the actual fix rather than documentation for its own sake: the tooling defaults to docs/superpowers/, but docs/ here is the published tree, and Docusaurus globs docs/**/*.md at build, so an ignored-but-present file renders locally while CI's fresh clone never sees it.

CONTRIBUTING.md gains the merge policy it was missing and its branch-naming is corrected — it documented feature/add-xyz while .claude/csw.json specifies <type>/<ticket>-<slug> and every branch actually cut uses the latter. Outside contributors have no ticket, so the plain <type>/<slug> form is named for them.

On the digest above: AGENTS.md has been superseded twice during this work, so earlier digests (f01ea43d…, and one before it) are dead while looking exactly as canonical as the current one. Re-derive from the branch rather than trusting any hash quoted elsewhere, and pipe straight to sha256sum — capturing file content into a shell variable strips the trailing newline and yields a wrong-but-plausible result. Line count is the cheap tell: 25 is current, 28 is dead.

Verification

pnpm lint       PASS   (was failing on main)
pnpm typecheck  PASS
pnpm build      PASS
  • Wide grep -rn superpowers — zero dangling references into the deleted tree. The passing build under onBrokenLinks: throw independently confirms no published page linked into it.
  • grep -n "@" CLAUDE.md AGENTS.md — exactly one hit, the intended import, not backtick-wrapped. Import parsing skips code spans, so a backticked @path is present, correct-looking and silently dead.

One gap, stated rather than glossed: the import is documented-to-work and syntactically verified, but not observed loading. It is verified that AGENTS.md exists at the expected path, that CLAUDE.md contains exactly one bare @AGENTS.md outside a code span, and that no stray @ could resolve elsewhere. Whether the loader actually consumed it is unverified.

/context is the only way to confirm the import loaded. Worth ten seconds at review time to close.

Correction — that instruction was wrong and is struck rather than deleted, since it was acted on. /context reports Memory files as a token total only (⛁ Memory files: 9.6k tokens (1.0%)), with no filenames; /context all expands MCP tools and skills, not memory files. There is no list in which AGENTS.md could appear, so the check had no place for a negative answer to show up — it could not fail visibly, while telling a reviewer they had verified something. The instruction was sourced from documentation describing a list this build does not print: an accurate citation over a false premise, and nobody ran it before recommending it.

RESOLVED — the import loads. Confirmed by artifact, not agreement. An InstructionsLoaded hook (registered in gitignored local settings, never repo config, deliberately not in this PR) caught a fresh session start:

{"hook_event_name":"InstructionsLoaded",
 "file_path":".../AGENTS.md",
 "memory_type":"Project","load_reason":"include",
 "parent_file_path":".../CLAUDE.md"}

load_reason: "include" with parent_file_path naming CLAUDE.md is the harness stating the import resolved at session start. The same log carries CLAUDE.md at load_reason: "session_start" — the control that proves the instrument was live, without which an empty log would have been evidence of nothing rather than evidence of absence.

A weaker but real fallback is the Memory files token count. Retracted. A fresh session reads 9.4k and a long-running one 9.6k, but that comparison confounds three variables at once — old vs new CLAUDE.md, import absent vs present, and an auto-memory index that grew mid-session. The number cannot separate them, so it is not a weak signal but no signal. Use the hook or nothing.

Notes for review

  • AGENTS.md is a shared artifact — platform and infra should pull the file from this branch rather than retype it. Retyping is what produced three non-matching "canonical" blocks earlier in this work.
  • This repo's CONTRIBUTING.md was checked for the stale-example-filename rot found in infra and is clean; nothing fixed there beyond what the ruling touched.

Closes the trakrf/docs portion of TRA-1128 — 99 files ever tracked across the estate, 0 remaining once this merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RWAqULDa91P8QxVD6hRaer

Mike Stankavich and others added 2 commits August 30, 2026 05:36
…e block

The ignore rule here pointed at spec/superpowers/ — the old path, swept in
dca90c0 on 2026-08-03. A newer version of the superpowers skills had already
started writing to superpowers/ at repo root three days before that sweep, so
the sweep cleaned and ignored a location nothing writes to any more while the
tree at the new one was never in scope. 29 files accumulated there unignored.

Adopt the canonical block agreed across the estate, matching trakrf/platform
byte for byte so no repo is subtly different again. superpowers/ and
.superpowers/ carry no internal slash and so match at any depth, which is what
lets one block be correct in both layouts; docs/superpowers/ has one and
anchors to the root deliberately.

docs/notes/ lands beside them as the sanctioned home for working notes, so a
session has somewhere to put an investigation record instead of inventing a
directory each time.

An ignore pattern does nothing to files already in the index, so the tree is
removed from disk as well as untracked. Verified with git check-ignore -v that
all four patterns actually fire against real paths, rather than eyeballing that
they are present — a pattern can be present and still not match.

Also drops the orphaned "# CSW local symlink" comment, a header left with
nothing under it when dca90c0 removed the pattern. No CSW pattern is
reintroduced: CSW is a plugin now, not a local checkout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWAqULDa91P8QxVD6hRaer
Formatting only, kept in its own commit so the ignore/untrack sweep beside it
stays reviewable as a pure mechanical change.

`prettier --check .` reported 24 failures on main; 21 of them were the tracked
superpowers files, which the previous commit removed. These three are the real
remainder and are customer-facing, so they get fixed rather than ignored.

Changes are whitespace: table column realignment in id-format.md and
resource-identifiers.md, one over-long table row rewrapped in errors.md, and
one blank line moved in the errors.md validation-code list where Prettier
normalises list spacing. No prose, no links and no code samples were touched.

`pnpm lint` now exits zero, which is what makes the `validate` command declared
in .claude/csw.json usable as a gate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWAqULDa91P8QxVD6hRaer
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a0e3d7
Status: ✅  Deploy successful!
Preview URL: https://b0803f08.docs-4n7.pages.dev
Branch Preview URL: https://preview.docs-4n7.pages.dev

View logs

@mikestankavich
mikestankavich force-pushed the chore/tra-1128-superpowers-ignore-sweep branch from 2224495 to e9071cb Compare August 30, 2026 10:39
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@mikestankavich
mikestankavich force-pushed the chore/tra-1128-superpowers-ignore-sweep branch from e9071cb to 6f514b0 Compare August 30, 2026 10:47
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@mikestankavich
mikestankavich force-pushed the chore/tra-1128-superpowers-ignore-sweep branch from 6f514b0 to 17d43e8 Compare August 30, 2026 10:48
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@mikestankavich
mikestankavich force-pushed the chore/tra-1128-superpowers-ignore-sweep branch from 17d43e8 to c9cb214 Compare August 30, 2026 10:49
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@mikestankavich mikestankavich changed the title chore(TRA-1128): stop tracking superpowers artifacts; split shared process out of CLAUDE.md chore(TRA-1128): stop tracking superpowers artifacts; split shared agreements into AGENTS.md Aug 30, 2026
mikestankavich pushed a commit to trakrf/platform that referenced this pull request Aug 30, 2026
TRA-1128. Shared process becomes a root AGENTS.md, byte-identical across
docs, platform and infra, imported by CLAUDE.md via a bare @AGENTS.md.
Root-level and conventionally named, so a human finds it and non-Claude
tooling reads it. File pulled from trakrf/docs#218 rather than retyped:

  sha256  f01ea43d7154e3abe3096bf0edc3ead069ba9ac7064c00bc606fcfcb2fcb48d3

CLAUDE.md keeps only what is specific to this repo, stated rather than
explained: 496 words to 209. Worktree conventions are out entirely --
that is csw.json configuration, not prose, and not a workflow to impose.

CONTRIBUTING.md is the single source for branch, commit and merge rules,
which required fixing three things it got wrong:

  - branch naming said feature/add-xyz, dead letter in every repo. Now
    <type>/<slug>, with <type>/<ticket>-<slug> named for maintainers.
    An outside contributor has no ticket number and could not follow it.
  - conventional commits were marked "Optional ... no tool depends on
    it", contradicting CLAUDE.md, which stated them as a rule. They are
    required; enforcement is manual, which is a different claim.
  - no merge policy was stated at all. Silence in a contributor guide
    reads as no policy. Now: every change via PR, --merge, never squash
    or rebase.

Import verified syntactically -- exactly one bare @ in the repo's
instruction files, the intended one. Import parsing skips backticks, so
a backticked path is silently not imported and a stray bare @ silently
is. Not yet observed loading; /context is user-facing and confirms it.

Refs: TRA-1128

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7p2hFrE6ZFWS91XvyFQcV
CLAUDE.md carried two kinds of instruction with nothing marking the boundary:
agreements shared across the trakrf repos, and rules specific to this being a
Docusaurus site. Each repo kept its own copy of the shared half, so they drifted
independently and none of them mentioned spec artifacts at all.

AGENTS.md holds the shared half, byte-identical in docs, platform and infra.
CLAUDE.md keeps only what is true here and imports it. AGENTS.md rather than a
bespoke filename so any agent tool reads it, not only Claude Code; at the repo
root rather than under .claude/ because a directory that reads as tool config is
not where someone cloning the repo would look. Tracked and discoverable are
different properties and only the first was covered.

The split is justified by shared byte-identical content across three repos, not
by size — imported files load at launch, so an import costs the same context as
inlining. Both files are written to state rather than explain, on the same
grounds: this text loads every session in three repos, so rationale that can be
re-derived is not worth carrying. It covers materially more than the CLAUDE.md
it replaces (spec and note policy, verification rules, the publishing gate) in
fewer lines.

Scope is narrow by the same logic: only what a fresh session would otherwise get
wrong. Contributing rules already live in CONTRIBUTING.md and now have a single
source there instead of a second copy. Worktrees are not mentioned — that is a
workflow choice driven by .claude/csw.json, not one to impose on anyone cloning
a public repo.

ble-mcp-test is deliberately not in this family — separate org, published npm
package, different governance — and keeps its own instructions.

Pins the spec and plan output path, which is the point of the exercise rather
than documentation for its own sake: the tooling defaults to docs/superpowers/,
but docs/ here is the published tree, and Docusaurus globs it at build, so an
ignored-but-present file renders locally while CI's fresh clone never sees it.

CONTRIBUTING.md gains the merge policy it was missing and its branch-naming
guidance is corrected. It documented feature/add-xyz while .claude/csw.json
specifies <type>/<ticket>-<slug> and every branch actually cut uses the latter.
Outside contributors have no ticket, so the plain <type>/<slug> form is named
for them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWAqULDa91P8QxVD6hRaer
@mikestankavich
mikestankavich force-pushed the chore/tra-1128-superpowers-ignore-sweep branch from c9cb214 to 6a0e3d7 Compare August 31, 2026 11:23
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

mikestankavich pushed a commit to trakrf/platform that referenced this pull request Aug 31, 2026
TRA-1128. The shared file carried six lines of preamble explaining its
own mechanism, which violated the state-do-not-explain bar the file
itself sets. Owner's catch.

Removed as description: how CLAUDE.md imports it (the reader already has
the file), why the pointers exist, and the note that ble-mcp-test is out
of the family (no session in these three repos asks).

Kept as constraint: identical across three repos, the repos are public,
the scope bar, and both pointers as routing. Six lines to three, 212
words to 187, no rule lost.

Pulled from trakrf/docs#218, not retyped:

  sha256  8aae612ddf7bea89358c13df03ae395aef041533afb019406c15d7c9bd9ac3c1

Supersedes f01ea43d…, which is now dead and which two open PRs still
carry. A superseded hash is indistinguishable from a current one, so the
target is the branch, not any hash quoted in a message.

Refs: TRA-1128

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7p2hFrE6ZFWS91XvyFQcV
@mikestankavich
mikestankavich merged commit 4dfad42 into main Aug 31, 2026
2 checks passed
@mikestankavich
mikestankavich deleted the chore/tra-1128-superpowers-ignore-sweep branch August 31, 2026 11:28
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