Repository navigation
v7.0.0
·
162 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
[7.0.0] — 2026-10-30
Changed
- The copy script is a real file,
skills/scaffold/shared/tc-copy.sh, instead of abash <<'TC_GUARD'heredoc inharness-kit.mdStep 0 (andTC_TAILin Step G). The agent runs it withTC_STACK=<stack> TC_PART=<part> [TC_CI=<host>] bash "<skill-dir>/shared/tc-copy.sh" "<target>"and never reads its body. The inputs carry aTC_prefix so a caller'sCI=truecannot reach it. It keeps every refusal, the.tmplsuffix stripping, the manifest modes and theSTOP:line, follows a symlink to itself, refuses a non-bash shell, and refuses/and the home directory as a target. The seeded output is byte for byte what it was.TC_PART=tailappends the AGENTS.md tail, which migrate also runs from<skill-dir>/../scaffold/shared/tc-copy.sh. Scaffold load against v6.1.2 (count-load.sh --base v6.1.2): nextjs −55.5%, vite-react −54.4%, fastapi −52.9%, nestjs −52.3% (nestjs was −49.5% with the heredoc).check_copy_script_singlerequires exactly one copy script, bans every shell heredoc in the skills markdown and any other file carrying the copy loop;test-template-copy.shand the CIshell-lintjob run and shellcheck the real script.
Added
- The skills lint finds template trees by directory name (
templateortemplate-*, wherever they sit underskills/), so a tree underskills/add/orskills/migrate/needs no lint edit: itstemplate.manifest, symlink, empty-directory,SKILL.md.tmpland content-scan checks apply the same as for scaffold trees. The duplicated IAM block check resolves a side that moved into a template file through its row intests/golden/fences/moved.d/(the index picks the fence, so moving one of several sibling fences does not shift the others), and the authz seed check also reads the leaf's template tree. A symlinked tree root fails, and so does atemplate.manifestwith no tree beside it, even an empty or comment-only one.skills/CONVENTIONS.md§1 defines the layout. - Eval coverage for
skills/add,skills/migrateandskills/standards.scripts/count-load.sh --entry SKILL:NAME[@STACK]reports the load of one invocation (SKILL.md, router, leaf and what the leafcats) and--summary SKILL|alllists every leaf with its tokens, both with--base REFfor a delta; the scaffold report is unchanged.scripts/check-fences.shchecks a checked-in sha256 snapshot (tests/golden/fences/) of every copy-verbatim fence in those skills, keyed by file, heading and index, and its--from-templatesmode and the per-slicemoved.d/*.tsvmappings (with anindent=Ncolumn for list-indented fences) prove byte identity once a fence moves (check-fences-frozen.shfails a pull request that edits the snapshot unless it carries thefence-snapshot-changelabel) into atemplate*/file.check-fences.test.shbreaks it on purpose;validate-skills.ymlruns both. - The Vite + React scaffold files are real files, copied instead of read and re-typed.
skills/scaffold/vite-react/template/holds every config and source file the scaffold writes verbatim (including thevite-verifyskill, stored asSKILL.md.tmpl),skills/scaffold/vite-react/template-agents/holdsAGENTS.md,skills/scaffold/vite-react/template-tail/holds the task-management text, andskills/scaffold/vite-react/template.manifestlists each file with its mode, placeholders and seams. The copy is the same kit Step 0 script as for Next.js, run withSTACK=vite-reactandPART=stack,PART=baseandPART=agents. Onlypackage.json(__TC_PROJECT_NAME__) andAGENTS.md(__TC_PROJECT_TITLE__) carry placeholders. The seeded output is byte-identical to the 6.1.2 goldens, anddocker-entrypoint.shis now mode 755 in the template (it was 644 in the fence output; the Dockerfile runschmod +xon it anyway). The scaffold steps moved: the package name edit is in Step 1,vite-verifyis copied in Step 1 (7c is a note),PART=agentsruns at Step 7, and Step 9 appendstemplate-tail/task-management.md. scripts/test-template-copy.shcovers the Vite + React trees:vite_react_manifest_matches_tree,placeholders_only_in_small_files,no_leftover_placeholders,copy_keeps_dotfiles, the refusals, andvalidate_configson the Vite template files.lint-skills.test.shfails each re-pointed check for Vite + React on an empty match and on a deleted anchor.- Template skill files ship as
SKILL.md.tmpl(next-verify,next-migrate,skill-audit), so a skill loader that scans the plugin recursively forSKILL.mdregisters none of them. The manifests list the.tmplsource, the copy script andcheck-golden.shdrop the suffix, the project files and goldens are unchanged, andcheck_no_template_skill_mdfails when a file namedSKILL.mdsits in a template tree. - The Next.js scaffold files are real files, copied instead of read and re-typed.
skills/scaffold/nextjs/template/holds every config and source file the scaffold writes verbatim,skills/scaffold/nextjs/template-agents/holdsAGENTS.md, andskills/scaffold/nextjs/template.manifestlists each file with its mode, its__TC_<NAME>__placeholders and its[[post-harness]]seams.AGENTS.mdsits in its own tree because the scaffold copies it after the verification gate: prettier would reformat it if it existed atpnpm format. Onlypackage.json(__TC_PROJECT_NAME__) andAGENTS.md(__TC_PROJECT_TITLE__) carry placeholders;tests/golden/placeholders.envholds the valuescheck-golden.sh --from-templatessubstitutes.docker-entrypoint.shis mode 755 in the tree; the 6.x scaffold wrote it as 644 and the Dockerfiledevstage still runschmod +xon it. - Every other copy-verbatim file the Next.js scaffold loads is a real file too, and the copy is one script.
harness-kit.mdStep 0 is the only copy script: Step B3 runs it withPART=ci, andCI=noneremoves the CI gate script (refusing on a symlink, a non-regular file, a file that differs from the template, or a failedrm). New parts:PART=settings(Step A) copiesshared/template-settings-tsortemplate-settings-py(.claude/settings.json), andPART=late(Step C) copiesshared/template-late(FUTURE.md,docs/CONSTITUTION.md, and the/skill-auditskill, which moved from Step B5 to Step C: it is created before Step E hashes it and prettier ignores.claude/). Both refuse untilAGENTS.mdexists, which keeps them behind the stack's verification gate and format pass in all four stacks.next-migrateandnext-verifyare innextjs/template/.claude/skills/. The AGENTS.md tail (shared/template-tail/AGENTS-tail.md) and the task-management text (nextjs/template-tail/) are listed in the manifests but never copied as files; a fixed command appends them (the tail's typecheck command is fixed per stack in the script, and the append writes nothing when the read fails). A lint check keepstemplate-tailout of everySEL. - The copy guard takes
PART=stackandPART=agents. Both read<skill-dir>/<STACK>/template.manifestand keep every refusal of the kit copy. The Next.js docs hold no copy of the script;check_copy_script_singlepins that Step 0 holds the only copy script (any spelling of a second shell fence fails, apart from the oneTC_TAILAGENTS.md tail command inharness-kit-finalize.md), and a test pins that thePART=cirun is that script. scripts/test-template-copy.shcovers the stack copy:nextjs_manifest_matches_tree,placeholders_only_in_small_files,no_leftover_placeholders,copy_keeps_dotfilesfor the stack, and the refusals (symlink parent, existing file, unwritable and unsearchable directories, empty and missing manifest, unknownSTACK, hostile target and skill-dir names).- The NestJS scaffold files are real files too.
skills/scaffold/nestjs/template/holds every config and source file the scaffold writes verbatim (including thenest-verifyproject skill asSKILL.md.tmpl),template-agents/holdsAGENTS.md, andnestjs/template.manifestlists each file with its mode, placeholders (__TC_PROJECT_NAME__inpackage.json,__TC_PROJECT_TITLE__inAGENTS.md) and seams. The scaffold copies them with kit Step 0 (PART=stack, thenPART=agents), andcheck-golden.shpasses in both modes: the seeded project is unchanged.nestjs/config-files.mdis gone; its notes live innestjs/source-files.md, and the NestJS scaffold loads 49.5% fewer tokens than v6.1.2 (count-load.sh --base v6.1.2, with documentation-kit; 25360 tokens against 50217; the notes keep every constraint the old config and source files carried). - The scaffold harness files are real files, copied instead of read and re-typed.
skills/scaffold/shared/template/holds the two shared hooks (session-context.sh,skill-usage-log.sh),ci-gates.sh,verify-harness.sh,regen-harness.sh, the comment-hygiene patterns,.lefthook/commit-msg.shand.gitleaks.toml;template-ts/andtemplate-py/hold the per-stack hooks,user-prompt-guardandlefthook.yml;template-ci/holds the GitHub (TS, FastAPI) and Azure CI files;template.manifestlists every file with its mode.harness-kit.mdStep 0 copies them under the guard described in the "copy guard" bullet below. Every file is identical to its entry intests/golden/. The comment-hygiene pattern list moved fromskills/scaffold/shared/comment-hygiene-patterns.txttoskills/scaffold/shared/template/.claude/comment-hygiene-patterns.txt. - A
lint-negative-testsCI job runslint-skills.test.sh. Theshell-lintjob runsbash -n,shellcheck --severity=warning,py_compileandnode --checkover the template scripts, and the yaml lint check fails instead of skipping whenCI=trueand PyYAML is missing. - No gitleaks allowlist is added for the template trees: gitleaks reports no leaks without one, and the only
AKIAstrings are regexes inuser-prompt-guard. scripts/test-template-copy.shruns the copy instructions from the kit markdown (copy_keeps_dotfiles,template_sh_executable,copy_refuses_existing_path,manifest_matches_tree,dist_keeps_templates).scripts/lint-skills.test.shfails each re-pointed lint check on an empty match and on a deleted anchor. A new lint check,check_template_trees_complete, keeps the trees and the manifest in step.- The copy guard fails closed and writes only what the manifest lists. The one copy script (Step 0, run for Step B3 with
PART=ci) takesSTACK=(shipped empty, so a skipped edit refuses;PART=settings,lateandciwithCI=githuborazurealso refuse unless the project'slefthook.ymlis the one Step 0 copied for that stack),PART=andCI=(PART=cionly) as inputs and derive the template trees from them, so a wrong stack cannot copy another stack's hooks; each stack'ssource-files.mdnames its own value and lint checks it. The guard refuses a missing or empty manifest, a manifest that differs from the files in the trees (it names the files), an existing target file, a symlink or a non-directory where a directory is needed, an empty or unsubstituted path, and a symlink or empty directory inside a tree. It then creates only missing parent directories and copies each file withcp, setting the manifest mode, so the project root, existing directories and the user's own files keep their modes. Paths are read from quoted heredocs, so no character in a path is expanded or run; a path with a newline needs the agent to stop and ask. Before the first write it checks that every existing directory it needs is writable and every source file is readable, and relative paths are prefixed with./.PART=ciwithCI=nonedeletesci-gates.shonly when it is a regular file, neither it nor.claudeis a symlink, and it matches the template. Every refusal ends with aSTOP:line. The TS stacks run Step 0 beforepnpm install, so thepreparescript findslefthook.yml; FastAPI runsPART=stackat Step 1,PART=baseat step 6b (before itslefthook installnote) andPART=agentsafter its verification gate. - The FastAPI scaffold files are real files too, copied instead of read and re-typed.
skills/scaffold/fastapi/template/holds every config and source file the scaffold writes verbatim (theapi-verifyskill asSKILL.md.tmpl),template-agents/holdsAGENTS.md(the project title is the__TC_PROJECT_TITLE__placeholder),template-tail/holds the task-management section, andskills/scaffold/fastapi/template.manifestlists each file.fastapi/source-files.mdruns kit Step 0 withSTACK=fastapiforPART=stack(Step 1),PART=base(step 6b) andPART=agents(step 6, after the verification gate);fastapi/config-files.mdis gone. The seeded project is byte for byte what the scaffold wrote before, so the golden manifests are unchanged.check_step0_before_installanchors the FastAPIPART=agentscopy after its verification gate in place of the TSpnpm formatline. The migrate docs that read the FastAPI fences (portal-frame-ancestors,nextjs-backend-extraction/fastapi) read the template files. - Deterministic scaffold eval harness.
scripts/extract-fences.pyextracts every copy-verbatim fence
from the scaffold markdown;scripts/check-golden.shcompares that output for all eight
stack × CI combinations with the sha256 manifests intests/golden/;
scripts/count-load.shreports the tokens one scaffold run loads, with a delta against any git ref.
All three run invalidate-skills.yml; the token count is informational. scaffold-verify.ymlnow runs.claude/verify-harness.shand a golden-tree diff on the generated
project, so its pass signal no longer rests on the agent's own report.
Changed
vite-react/config-files.mdis gone and its notes live invite-react/source-files.md;scaffold/SKILL.mdStep 2 loads onlysource-files.md. The package name must match^[a-z0-9][a-z0-9-]*$and theAGENTS.mdtitle must be one line, and the scaffold stops otherwise.lint-skills.shlistsvite-reactinTEMPLATED_STACKS(tree and manifest checks, thePART=basecopy before the first install, thePART=agentscopy afterpnpm format) and requires the Vite + React stack fences in the copy-instruction check.migrate's portal frame-ancestors guide reads the Vite + React files fromscaffold/vite-react/template/.validate-scaffold-configs.shalready checked every<stack>/template/tree, so it now covers Vite + React;validate-skills.ymlalso requires a template script and an.mjsfile there.lint-skills.shreads the Next.js trees:template_filesincludes them,check_template_trees_completechecks each templated stack's manifest against its trees, the copy-instruction check requires the Next.js stack fences, andcheck_ref_file_headersskips the shipped template files (and fails when it finds no reference file). Themiddleware.tsrule excludesscaffold/nextjs/template-agents/AGENTS.mdinstead ofnextjs/source-files.md. Each re-pointed check has an empty-match and an anchor-deleted case inlint-skills.test.sh.- The Next.js config notes now live in
nextjs/source-files.md;nextjs/config-files.mdis gone. The package name must match^[a-z0-9][a-z0-9-]*$and theAGENTS.mdtitle must be one line, and the scaffold stops otherwise. Lint requires thePART=basecopy before the first install and thePART=agentscopy afterpnpm format, and rejects an exact dependency pin in a templatepackage.json(eslint-plugin-sonarjsis exact by design). validate-scaffold-configs.shchecksskills/scaffold/<stack>/template/**/*.jsonwithjqand*.{js,mjs,cjs}withnode --check, fails when it validated nothing, andscaffold-parse.ymltriggers on the template trees.migrate's portal frame-ancestors guide reads the Next.js files fromscaffold/nextjs/template/.migrate's portal frame-ancestors guide reads the NestJS files fromscaffold/nestjs/template/, and the NestJS backend-extraction guide points at the template tree instead ofconfig-files.md.lint-skills.shtreatsnestjsas a templated stack,test-template-copy.shandlint-skills.test.shcover its trees (manifest match, placeholders, copy refusals, empty-match and deleted-anchor cases); with all four stacks templated,scaffold/SKILL.mdStep 2 loads onlysource-files.md,validate-scaffold-configs.shchecks the template files only, and the repo's docs and workflows no longer mentionconfig-files.md.session-context.shno longer printshead -30 AGENTS.md, which the@AGENTS.mdimport already loads. The saving is about 0.3k tokens per session in seeded projects, not in the plugin load.session_context_no_agents_headpins it.migrateappends@AGENTS.mdto an existingCLAUDE.mdthat lacks the import (a line outside a code fence equal to@AGENTS.mdor@./AGENTS.md). The health check flags a missing import and its re-sync step offers the same append.scripts/test-harness-kit.shreads the hooks, gates and lefthook files from the template trees. The lint checkscheck_no_comment_narration,check_scaffold_seeds_complete_harness,check_migrate_hook_inventory_matches_kit,check_yaml_fences_parseandcheck_security_seeds_presentread them there too and fail when a tree is missing or empty.check_hook_command_uses_args_arrayandcheck_skilldir_refs_resolvekeep their anchors in the markdown that still holdssettings.jsonand the copy instructions. Everyscan()rule scans the template trees; none excludes them.- The kit markdown points at each template file in a single line that starts with its backticked path;
extract-fences.pyreads that line as the end of the heading before it (a pointer inside a bullet or split over two lines is not one). check-golden.sh --treealso rejects a symlink in place of a golden file, reports extra files among the hooks and.lefthook/(nothooks/local/), and fails when no golden path was compared.check-golden.shtakes moved paths from the template trees and the rest from the fences; a path produced by both fails asDUPLICATE.--from-templatescompares the paths the trees hold.migrate(Phase 4 Step 4d, Phase 5 Step 5d) names the template files as the canonical source for a re-sync; the merge stays a model step.tc-auditaudits the template files.- FUTURE.md roadmap §1 (phase-splitting) is marked superseded.
Fixed
- AI PR Review fails loudly: it stops with a clear error when
CLAUDE_CODE_OAUTH_TOKENis
empty, and prints Claude's own error text when the review run fails, instead of only
is_error: true.