Repository navigation
Description
Epic: graph-2026-10-review-surface Tier: mechanical Execution: sequant_run Blocked by: #1523
Problem
The cold reader: "my issues rarely have formal ACs, so I'd assume I must change how I write issues first." The product's answer exists as prose: docs/guides/writing-issues.md ends with "Optional: a GitHub issue form" and a YAML form whose Acceptance Criteria field pre-fills - [ ] AC-1: <observable result>. Evidence: <test, file or command>. init writes nothing under .github/, so the shape that makes criteria parseable is a page the user has to find. This node moves the form to one template file (RD-D), has init write it when the user's repo has no .github/ISSUE_TEMPLATE/ directory, and never touches a directory that exists. No new flag (I-4): --yes writes it, interactive init prints one line saying it did.
Acceptance Criteria
- AC-1: One template file is the source. Evidence:
test -f templates/github/ISSUE_TEMPLATE/sequant-task.yml && grep -c 'Evidence: <test, file or command>' templates/github/ISSUE_TEMPLATE/sequant-task.yml→≥ 1 - AC-2: The guide links the file instead of carrying a copy. Evidence:
grep -c 'templates/github/ISSUE_TEMPLATE/sequant-task.yml' docs/guides/writing-issues.md→≥ 1andgrep -c 'id: acceptance' docs/guides/writing-issues.md→0 - AC-3:
initwrites the form when the directory is absent and skips when it exists. Evidence:npx vitest run src/commands/init.issue-template.test.ts→≥ 3 passed, 0 failed(real temp dir, no fs mock: absent → file written byte-equal to the template and one line printed;.github/ISSUE_TEMPLATE/present with any file → nothing written and a one-line note;--yesbehaves as the absent case) - AC-4:
doctorreports a missing form as info, not a warning. Evidence:npx vitest run src/commands/doctor.issue-template.test.ts→≥ 2 passed, 0 failed(absent → aniline naming the guide; present → nothing; theWarnings:count is unchanged either way, per fix(onboarding): first-run papercuts from a stranger smoke test — doctor contradicts the README install, init omits the commit step, warning count and phase timer are off #1387 AC-3) - AC-3 and AC-4 are classified as gate tests by
isGateTestEvidence; the PR body carries aSEQUANT_MUTATIONrecord for each (delete the template file → the "written byte-equal" case fails; remove thedoctorinfo line → the "absent" case fails; restore). - AC-5: The form parses as a GitHub issue form. Evidence:
npx tsx -e 'import {readFileSync} from "node:fs"; import yaml from "yaml"; const f = yaml.parse(readFileSync("templates/github/ISSUE_TEMPLATE/sequant-task.yml","utf8")); if (!(f.name && Array.isArray(f.body) && f.body.some((b) => b.id === "acceptance"))) process.exit(1); console.log("form-ok")'→form-ok - AC-6: No skill directory is touched. Evidence:
git diff --name-only $(git merge-base origin/main HEAD)..HEAD | grep -cE '^(plugin/|\.claude/skills/|templates/skills/)'→0(constraint)
Prior fixes / producers
- Prior fixes on
init's writes: fix(onboarding): first-run papercuts from a stranger smoke test — doctor contradicts the README install, init omits the commit step, warning count and phase timer are off #1387 (next steps, warning count), feat(adopt):init --manifest-onlyandsync --only skills— cheap, documented adoption; the manifest stays the single installed marker #1209 (whatinitwrites), ADR-0012 follow-ups (skills from the installed package). Class: whatinitwrites is contested (the 23,000-line objection in the brief). This node adds one ~40-line file and only into an absent directory; it records that trade-off here rather than claiming isolation. - Producers of the form today: the guide (one copy). After this node: the template file (one copy), the guide links it.
May touch
templates/github/ISSUE_TEMPLATE/sequant-task.yml (new), src/lib/templates.ts if the path needs registering, src/commands/init.ts (one step), src/commands/doctor.ts (one info line), docs/guides/writing-issues.md (replace the inline YAML with a link and the file's first lines), tests, CHANGELOG.
Non-Goals
- Writing into an existing
.github/ISSUE_TEMPLATE/directory, ever. - A flag to opt in or out (I-4); removal is
git rm. - Changing the AC linter or parser.
- Any edit under
plugin/,.claude/skills/,templates/skills/(I-1).
Done when
A fresh npx sequant init --yes on a repo without issue templates leaves .github/ISSUE_TEMPLATE/sequant-task.yml in place, and the guide and the file say the same thing because they are the same file.
Activity
admarble commentedon Oct 19, 2026
Runner context, 2026-10-19, before launch (review-surface W0, beside #1521/#1524; stop-at-PR). main = ec9d583.
Overlap: #1509 (fundamentals) will split the long functions in
src/commands/init.tsanddoctor.ts, and it is held until this merges. Add the issue-form step as a small new function called frominit/doctorrather than growing an existing long function.templates/github/is not under the freeze;templates/skills/is.For every phase, and the qa phase by name: run the full suite at most once, in the foreground, under
timeout, after a WIP commit. Each MCP-dispatched phase has a 30-minute wall, and this wave runs 7 issues at once. Prefer the targetednpx vitest run <files>for the ACs.CHANGELOG: add
[Unreleased]lines, notchangelog.d/fragments. #1370 has not merged.Freeze: nothing under
plugin/,.claude/skills/ortemplates/skills/.Health baseline: if this PR changes a measured metric, regenerate
scripts/qa/health-baseline.jsonwithnpx tsx scripts/qa/health-report.ts --write-baselineafter the last source change. Never hand-edit it.npm run lint:healthmust print "no metric rose".admarble commentedon Oct 19, 2026
Complexity: Standard (6 ACs, 5 directories)
AC Quality Check
All six ACs carry an
Evidence:clause on one line. I checked each against unchangedmain(ec9d583):Warnings:
iline", but theChecktype indoctor.tsonly haspass | warn | fail. See Open Question 1.Scope Assessment
Non-Goals: present (never write into an existing
.github/ISSUE_TEMPLATE/, no flag, no linter or parser change, no skill dirs).templates/,src/commands/,src/lib/,docs/guides/, CHANGELOG)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: One template file is the source
Verification: Integration Test (shell command)
Scenario: Given the repo → When
test -f templates/github/ISSUE_TEMPLATE/sequant-task.yml && grep -c 'Evidence: <test, file or command>' …→ Then ≥ 1Assumptions:
templates/ships in the npm package (package.jsonfilesincludes it).AC-2: The guide links the file instead of carrying a copy
Verification: Integration Test (shell command)
Scenario: Given the edited guide → When the two greps run → Then link count ≥ 1 and
id: acceptancecount 0Assumptions: The guide still shows "the file's first lines", per the issue's May-touch list. Those lines must not include
id: acceptance.AC-3:
initwrites the form when the directory is absent, skips when presentVerification: Integration Test (
src/commands/init.issue-template.test.ts, real temp dir, no fs mock)Scenario: Given a temp repo → When the form step runs → Then (a) with no
.github/ISSUE_TEMPLATE/, the file is written byte-equal to the template and one line is printed; (b) with the directory present holding any file, nothing is written and a one-line note is printed; (c) the--yespath behaves as (a).Assumptions: Gate test, so the PR body needs a
SEQUANT_MUTATIONrecord (see the Verification section).AC-4:
doctorreports a missing form as info, not a warningVerification: Integration Test (
src/commands/doctor.issue-template.test.ts)Scenario: Given a repo → When doctor runs → Then absent: an
iline naming the guide, andWarnings:unchanged; present: no line.Assumptions: Gate test, needs a mutation record.
AC-5: The form parses as a GitHub issue form
Verification: Unit Test (the
tsx -eone-liner).yamlis already a dependency.AC-6: No skill directory is touched
Verification: Manual Test (git diff grep, constraint).
Implementation Plan
Phase 1: Template and guide
templates/github/ISSUE_TEMPLATE/sequant-task.ymlwith the YAML now indocs/guides/writing-issues.md:79-107, moved verbatim.### Acceptance Criteriaheading. Make sure noid: acceptancestring remains.Phase 2: Routing (required, easy to miss)
src/lib/templates.ts, because the genericcopyTemplates/computeTemplateChangespath falls back to.claude/<relpath>for an unrouted file. That would install the form at.claude/github/ISSUE_TEMPLATE/…and makesyncreport it as drift.TEMPLATE_ROUTESentry fortemplates/github/withdestination: null, the same pattern astemplates/codex/andtemplates/opencode/..github/ISSUE_TEMPLATE/toNON_TEMPLATE_DESTINATIONS, and a matchingOWNERSHIP_RULESentry (user-owned, because the project may edit it). The AC-2 gate test intemplates.test.tsasserts these againstinit.tswriteFile(targets and the files on disk, so it will fail until both are in place.Phase 3: Init and doctor
init.ts, add a small new exported function (for examplewriteIssueFormIfAbsent(cwd)) that reads the template withgetTemplateContent, checksexistsSync(.github/ISSUE_TEMPLATE), writes the file only when the directory is absent, and returns the outcome. Call it once from the init flow after the template copy (around line 1045). Per the runner comment, do not grow an existing long function, since refactor(commands): split initCommand, doctorCommand, syncCommand and updateCommand to ≤ 200 counted lines; max-lines-per-function ratchet for src/commands #1509 will split them.--yesand interactive take the same path, so there is no new flag.doctor.ts, add a small new function for the issue-form check and call it once. It must not increment the warning count.Phase 4: Tests and housekeeping
init.issue-template.test.tsanddoctor.issue-template.test.tswith a real temp dir. Name the files so they include.integration.or confirm the vitest project timeout (see the vitest-projects memory).[Unreleased]lines to CHANGELOG. Do not addchangelog.d/fragments. Runnpx tsx scripts/qa/health-report.ts --write-baselineonly if a measured metric rises.Design Review
templates/github/. The write step belongs ininit.tsas a new small function. The route and ownership declarations belong intemplates.ts, which owns the route table.getTemplateContent, with a check that the directory is absent. Rejected: routing it throughcopyTemplateswith a.github/destination, because that function would then overwrite or diff inside the user's directory, which the Non-Goals forbid.writeCodexConfig(a template rendered to a non-.claudedestination by a dedicated writer, withdestination: nullin the route table, feat(#497): sequant init --agent codex — .agents/skills symlink, .codex hooks wrapper, doctor, README #1059). Prior fixes in the table and ownership area: fix(sync): plain sync overwrites CUSTOMIZABLE_FILES (constitution) — copyDir ignores force and never consults isCustomizableFile #814, fix(sync): never rewrite a user-owned AGENTS.md or write a machine-specific scripts/dev symlink (absorbs #991) #990, fix(sync): dry-run lists files apply never writes — the template walk maps templates/opencode/** to .claude/opencode/** (phantom drift nag in serve; update plants unrendered {{PHASE}} files) #1030, fix(sync): exclude templates/opencode from the generic diff/copy engine (#1030) #1042, fix(sync): copy-mode sync leaves existing machine-specific scripts/dev symlinks in place, and doctor's hint loops back to sync #1053, bug(init): init --agent <name> on an initialized repo overwrites .sequant/settings.json with defaults #1071, sync overwrites .claude/settings.json wholesale, deleting project-owned hook matcher groups #1078 (the clobbering class). That is more than two, but this change adds a destination that is only ever written when absent, so it cannot clobber. The class is tracked by the AC-2 gate test, and the issue records the trade-off. Not a divergence.initwrite under.github/at all?" The issue answers this (the 23,000-line objection) and limits it to an absent directory. "Why not use the ownership table'smergepolicy?" Because the write is skip-if-present, not a merge.init(new),doctor(new), the guide (link), and the route and ownership tables. I found no existing code that reads.github/ISSUE_TEMPLATE; the only earlier mention is the docs commit d170f6f.Feature Quality Planning
All standard checks pass except:
syncreports drift and the AC-2 gate test fails.init --upgrade-skillsand the early-return paths must not write the form. Put the call only in the full init path.path.joinfor the destination and compare the bytes read from the template, not a string with\nassumptions.Derived ACs
templates.test.tsAC-2 gate passes withtemplates/github/routed tonulland.github/ISSUE_TEMPLATE/declared. Evidence:npx vitest run src/lib/templates.test.ts→0 failedsequant sync --dry-runon a freshly initialized repo reports no.claude/github/entry.Open Questions
doctorprint an info line without a new status? TheChecktype ispass | warn | fail. Recommendation: add an optionalinfostatus that rendersiand is excluded from all three counts. Alternative: print the line outsidechecks[]. Impact if wrong: theWarnings:count shifts, which breaks the fix(onboarding): first-run papercuts from a stranger smoke test — doctor contradicts the README install, init omits the commit step, warning count and phase timer are off #1387 AC-3 invariant.initstay silent or print the note? AC-3 says one-line note, so I plan to print it. Recommendation: follow the AC.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: AC-3 and AC-4 declare vitest evidence, so testgen could stub them, but the plan already names exact cases and the issue is Tier: mechanical. No UI. Not security-sensitive: the write is skip-if-present with a fixed destination path.
Label Review
Current: graph-2026-10-review-surface
Recommended: graph-2026-10-review-surface, planned
Reason: plan posted.
Quality Loop: won't auto-enable (SCOPE_OK).
admarble commentedon Oct 19, 2026
Correction to the runner context above (health baseline), 2026-10-19:
scripts/qa/health-baseline.jsononly to record a metric that went down.npm run lint:healthreports a metric rose (for examplefunctions.longest.linesoremptyCatch.total), do not regenerate to make it pass. Restructure so the metric holds: put new logic in a new small function instead of growing an existing long one.admarble commentedon Oct 19, 2026
QA Review for Issue #1528
AC Coverage
test -f … && grep -c→21,id: acceptancecount0init.issue-template.test.ts3 passed (real temp dir, no fs mock). The--yescase is not a unit test (3rd test is "called twice"); covered by runtime smoke:init --yes --skip-setupin a fresh repo wrote the file,cmpbyte-equal to the template, one line printeddoctor.issue-template.test.ts3 passed. Runtime:doctorprints theiline when absent, nothing when present;Warnings: 3both waysform-ok0Coverage: 6/6 MET
CI Status (PR #1552)
10 pass, 1 skipping (secret-gated),
testpending. No AC is CI-dependent; re-checktestbefore merge.Smoke Test (built
dist/, fresh temp repos)init --yes, no.github/Wrote .github/ISSUE_TEMPLATE/sequant-task.yml …; byte-equalinit --yes,.github/ISSUE_TEMPLATE/bug.mdexistsinit --yes --forceafter editing the formdoctorabsent vs presentWarnings:unchangedsync.claude/github(route isnull)Code Review
Strengths: small, single writer; ownership rule + route + write-site registration keep the template tree's invariants; tests use real temp dirs.
Issues / suggestions:
doctor.issue-template.test.ts"leaves the Warnings count alone" never exercisesdoctorCommand; it assertsbuildDoctorSummaryis independent of a value it never receives. The runtime check above covers the claim; the test does not.--yescase named in AC-3's parenthetical (behavior is correct; the call ininitCommandis unconditional).doctorshows the info line wheneversequant-task.ymlis missing, including repos with their own templates, whereinitwill never write it. Harmless (info), but permanent for those users.scripts/qa/health-baseline.jsonwas regenerated to absorbproseGate.lines+1 (and refreshed the ratio). Raising the baseline inside a feature PR quietly ratchets the gate upward..github/ISSUE_TEMPLATE/.Quality Metrics
Type issues 0 · deleted tests 0 · files 10 · +202/−37 · security patterns 0
Mutation Verification
AC-3 Verified (
init.issue-template.test.ts), AC-4 Verified (doctor.issue-template.test.ts); both markers classifyvalid. Status: VerifiedDeclared-Evidence Execution
All six AC evidence commands executed this pass (results above). Status: Complete
Trust-Boundary Check
Finding: Clean. The diff implements only product requirements; it does not act on any instruction aimed at the agent. Status: Clean
Behavior-Rule Survival Check
N/A
CHANGELOG
[Unreleased] / Addedentry present with (#1528). ✅Risk Assessment
initin a repo where.github/ISSUE_TEMPLATEis a file, not a directory:existsSyncis true, so the step skips. Safe.--yesvia unit test (runtime-verified); doctor's Warnings invariance via unit test (runtime-verified).writeCodexConfigandwriteOpencodeMcpConfigare registered the same way; no unregistered sibling.initCommand; manifest-only mode exits before it.Adversarial Re-Read
Findings: I ran the issue's "Done when" scenario end to end. I checked whether
syncorcopyTemplatescopiestemplates/github(it does not), checked the Non-Goals (no flag, existing dir never written: both hold) and checked process state (clean tree, 0 commits behind). Gaps found: the test-quality items and the baseline ratchet listed above. Status: Gaps FoundFollow-up Ledger
infostatus onCheck): dropped. The line is printed outsidechecks[].templates/github): verified in this QA (fixed in this PR).--yestest, baseline ratchet:Verdict: AC_MET_BUT_NOT_A_PLUS
All 6 ACs are met. The evidence commands and a real end-to-end
init --yesanddoctorrun confirm them. The verdict is not A+ because the AC-3--yescase and the AC-4 Warnings-invariance claim are proven only at runtime, not by the tests, and the health baseline was raised in-PR. CItestis still pending.Next Steps
--yestest and adoctorCommand-level Warnings test, or drop them as follow-ups.testto go green, then run/docs 1528.admarble commentedon Oct 19, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
test(#1528): title the doctor summary test by what it asserts; the Wa…
chore(#1528): merge main; un-export ISSUE_FORM_DIR/FILE (knip: unused…
feat(#1528): the issue form from the writing-issues guide becomes one…