Skip to content

feat(templates): read docs/ before the first artifact, and fill it with /scc-init - #25

Merged
protonspy merged 2 commits into
mainfrom
feat/prior-art-and-init-skill
Aug 19, 2026
Merged

feat(templates): read docs/ before the first artifact, and fill it with /scc-init#25
protonspy merged 2 commits into
mainfrom
feat/prior-art-and-init-skill

Conversation

@protonspy

Copy link
Copy Markdown
Owner

Two halves of one gap in the template set: nothing told an agent to read the knowledge base, and nothing filled it in a repository that already existed.

prior-art.md — the read side of docs/

A new rule (53 lines, inside the 55-line preload budget), triggered before the first artifact of a piece of work exists — before scc spec new, before scc plan new, before code. docs/ is the constraint set, not reference material for when somebody is stuck: an ADR binds the design about to be written, stack.md says what may be built on, glossary.md says what to call it, and a spec already covering the area makes the work a delta rather than a second statement of the same feature.

  • Its own rule, not a paragraph in knowledge-base.md. The two halves fire at opposite moments — that one when something was learned, this one when something is about to be written — and a read-side instruction filed under the write-side rule is read after the spec exists.
  • It states what no index states. scc map covers plans/ and specs/, the symbol graph covers code, so docs/ is the one corpus reached by opening a file. That stays cheap only because the seeded anchors are built for it: glossary.md and stack.md are lists, wiki/index.md and the ADR filenames are tables of contents.
  • What it finds is stated up front and then cited into the artifact (adr:0007-…, a delta, a [[wikilink]]) — the only trace an auto run leaves that the pass happened at all.

The entry file gains one trigger line and loses one from the rules preamble, keeping it inside the 60-line cap.

The init skill and /scc-init — the fill side

scc init lays four anchors down empty, which is all a binary can do; what turns them into this project's knowledge base is a survey of the code, and a survey is judgment. The skill holds the three things no rule can:

  1. A survey before any artifact — README/CI/manifests, then scc graph explore, then git log for what was argued about, with the map reported back before a file is written.
  2. The order across the six knowledge authorsstack.md first, because stack.undocumented-dependency gives it a real finish line; rules/project.md next, with every command run before it is written; then glossary, wiki, codewiki; docs/adr/ last, because it is where invention is most likely. scc validate between stages.
  3. A bar that applies only here. Everything on this run is reconstructed rather than remembered, so nothing goes in that cannot be pointed at — a manifest, a CI file, a commit, a migration — and what nobody can justify is reported by name instead of filled in with something plausible. A gap is visible; an invention is believed. Each reconstructed ADR says so in its own ## Context.

It is a second WorkflowSkill for the same reason plan-run was the first: the knowledge skills each fire when their concern goes live, and none of them fires when the base is empty. It deliberately never writes specs/ — restating a working system as requirements is the failure mode of a documentation pass, and specs.md already has a spec meet existing code as a delta.

Notes

  • Template set 1517; scc update delivers both to workspaces that already exist.
  • design/orchestration.md §1 and §6 carry the reasoning; CLAUDE.md is updated to match.
  • Verified end to end: scc init --claude in a temp workspace writes .claude/rules/prior-art.md, .claude/skills/init/SKILL.md, and .claude/commands/scc-init.md, with scc validate and scc skill validate both at exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K5jmMZ1sZeQKgcgAnStj7f

protonspy and others added 2 commits August 19, 2026 20:19
…th /scc-init

Two halves of the same gap. `prior-art.md` is the read side of the knowledge
base: `docs/` is consulted before a spec, a plan, or a line of code exists,
because it is the constraint set rather than reference material for when
somebody is stuck. It is its own rule instead of a paragraph in
knowledge-base.md because the two fire at opposite moments — that one when
something was learned, this one when something is about to be written — and it
has to state what no index states, that `scc map` covers plans/ and specs/ and
the graph covers code, so docs/ is the one corpus reached by opening a file.

The `init` skill and /scc-init are what make that base worth reading in a
repository that already exists. `scc init` lays four anchors down empty; the
skill surveys the code and fills them, holding the order across the six
knowledge authors and one bar the authors cannot state for themselves —
everything on that run is reconstructed rather than remembered, so nothing goes
in that cannot be pointed at, and what nobody can justify is reported by name
instead of filled in with something plausible.

Template set 15 -> 17. The entry file's rules preamble loses a line to keep the
new trigger inside the 60-line budget.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5jmMZ1sZeQKgcgAnStj7f
govulncheck reports the recursion-depth vulnerability in encoding/xml as
reachable: stack_manifests.go's pom reader calls xml.Unmarshal. Fixed in
1.25.13 on this branch, so the pin moves up one patch. Nothing else changes —
the note in ci.yml still holds, and the float '1.25' still lags on hosted
runners.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5jmMZ1sZeQKgcgAnStj7f
@protonspy
protonspy merged commit 1aa07fb into main Aug 19, 2026
4 checks passed
@protonspy
protonspy deleted the feat/prior-art-and-init-skill branch August 19, 2026 23:23
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