Commit Graph

4 Commits

Author SHA1 Message Date
null 734b6af828 feat(plan): six sections every plan must name, and the files an agent reads first
WORK_CYCLE.md covered only the end of the cycle. A cycle has two ends, and
the same six questions kept having to be asked out loud on every piece of
work. They are now mandatory in every plan, each justified by something this
household has actually paid for:

  unified code      eight copies of secrets.sh once existed here and five of
                    seven could not detect the most common secret shape --
                    INCLUDING THE TEMPLATE, so every project scaffolded from
                    it inherited a blind scanner
  error handling    the recurring fault is the silent pass, not the crash
  logging           an append-only log is unbounded by construction
  blind spots       named ones get fixed
  landmine fixes    the trap found while passing is cheapest to fix while
                    passing
  hardcode little   derive it, or justify the constant

GUARDS.md was five sections behind the project that has been learning; 11,
12 and 13 are backported, genericised to match the template's style. 13 is
the narrow form of the sixth rule, and WORK_CYCLE now cites it -- so
backporting it is what makes that citation true rather than a broken
reference.

Also adds the three files an agent reads BEFORE it reads docs/:

  CLAUDE.md             short, and it POINTS at DOC_TRUST_MAP rather than
                        repeating it -- a second copy of the map is the
                        failure that map exists to prevent. Carries the
                        exit-code table, the commit gates, and two standing
                        instructions: flag what looks wrong even when it is
                        not what you were asked about, and never print a
                        credential -- not from a file, not from a command's
                        output, not from a config subtree "with the secrets
                        filtered out", because that filter has failed before
                        by matching key NAMES while the secret sat inside an
                        object whose name was innocent
  .claudeignore         excludes artifacts and NEVER docs/. The Command
                        Center reads this repository's documents at a commit;
                        a generic ignore file that sweeps "documentation" or
                        "data" starves both the agent and the reconcile, and
                        everything still runs, just blind
  .claude/settings.json deny rules in the double-slash absolute form. A
                        tilde-style rule looks right in review and silently
                        matches nothing. It closes the Read TOOL only -- a
                        shell reads a file a hundred ways -- so it catches
                        the accidental read, not the determined one

scaffold.sh gains a ROOT array for the three, kept apart from DOCS so the
H1-plus-status-block check stays meaningful rather than being loosened into
a warning that is always wrong (GUARDS.md 5).

Verified: scaffold --dry-run into a scratch repo creates 22 files including
all three, with no HEADERLESS warning; doc-claims passes with 124 claimed
paths, all present.

Does not touch docs/architecture/scripts/secrets.sh, which carries someone
else's uncommitted improvement.
2026-09-01 21:44:00 -05:00
null abf7315aa0 fix(scaffold): new projects were missing two documents they reference
docs/data/README.md links to `img/README.md` for the dimensions, weights and
magic-byte rule of the three marks. scaffold.sh never copied it: DOCS did not
list it and DIRS created docs/data/img empty. Every scaffolded project therefore
started with a broken link in a required document, a doc-claims failure on its
first run, and no copy of the spec the link promises.

The omission looks like a misreading of the script's own rule. Its header says
it does not copy branding and that the template's docs/data/img is not a source
-- both true of the three .webp marks, which must not be invented because a
placeholder that looks deliberate outlives the issue that would have replaced
it. img/README.md is documentation about those files, not one of them.

Verifying that fix surfaced a second, plainer one: docs/architecture/GUARDS.md
was never scaffolded either, while being referenced by TOOLS.md,
DOC_TRUST_MAP.md and architecture/README.md twice. It is a document, not a
script, and nothing argued for leaving it out.

A scaffold now writes 19 files, and a freshly scaffolded project no longer names
a document that is not there.

This is the fourth instance here of one shape -- a document naming a path that
is not present. The others were docs/planning/FUTURE.md in the batch ledger, an
Exempt: line inside a code fence, and docs/data/logo.webp as an example of where
NOT to put an asset. The first three were wrong in the template; this one was
correct in the template and wrong in every copy of it, which is why running
doc-claims here never caught it and scaffolding into a scratch directory did.

closes #15

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 23:34:12 -05:00
null 2dca89e635 feat(docs): OPERATIONS.md, the runbook that did not exist
The template shipped scripts to back up, deploy, check health and read the
deployed version, and no document saying where errors go, what alerts, who
receives it, or what to run first when it is down. Grep across docs/** found
zero mentions of error tracking, observability or database restore.

Five sections. Where errors go, with the distinction that matters at 3am --
healthcheck.sh answers "is it up", error tracking answers "is it working", and a
service returning 500 to everything is up. What alerts and to whom, naming a
person rather than a channel nobody owns. Backups, whose last row is the date of
the last verified restore, because a backup nobody has restored is a guess.
Rate limits and cost ceilings, *(precautionary)*. And an ordered "it is down,
what now" where every step is a command that changes nothing.

Marked *(only for a deployed service)*, with the instruction to delete rather
than keep the headings unanswered: an empty runbook reads as one nobody wrote,
which is worse than one that never applied.

scaffold.sh now lays it down (17 files, 0 skipped) and DOC_TRUST_MAP.md points
at it from both tables. Two prose counts in scaffold.sh's header said
"thirteen documents" and were already stale; they no longer carry a number,
since a count in prose beside a list in code drifts the moment the list grows --
which is what just happened.

closes #6

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 22:57:20 -05:00
null 6965915dbd chore(repo): put the template under version control
The basis for every project here was itself unversioned: no .git, no remote,
no history. Changes to it had no diff and no revert, and two of its own guards
could not run at all -- doc-claims.sh and doc-triggers.py both read git
history, so the script written to catch documentation drift could not be run
against the documents that define drift.

This is the tree as it stands, including work that until now existed only as
loose files on disk: WORK_CYCLE.md, TOOLS.md, the Portainer image-line fix in
deploy.py, the status vocabulary corrected to the four words the conformance
checker actually enforces, the Exempt: mechanism documented, and the Forgejo
instance named in README.md.

secrets.sh --tracked reports one candidate, migrate.sh:480. It is the comment
documenting the three Postgres credential shapes that script redacts, with
literal placeholders, and it is left alone deliberately: GUARDS.md section 2
is that a source-grep guard must tell code from the comment about code, and
deleting an explanation to quiet a scanner is the failure it names.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 22:44:26 -05:00