Skip to content

chore(upstream+skills): close the v2.1.42→2.1.281 gap and fold native engineering rubrics as portable references #1135

Closed

Description

@admarble

Context

Research fan-out on 2026-09-24 (five read-only agents + owner spot checks) on two questions: (1) could Anthropic's native plugin skills (engineering:*, productivity:*) raise Sequant's code quality, and (2) what has changed upstream since /upstream last ran. Findings that this issue turns into work:

Native skills are rubrics, not workflows. The 10 engineering skills are 32–158 lines each (code-review = 4 dimensions × ~5 bullets + an output template; tech-debt = 6 categories + (Impact + Risk) × (6 − Effort); testing-strategy = pyramid + per-component guidance). Sequant's qa is 3,788 lines / 141 MUSTs, exec 2,152, fullsolve 1,113 — 73% of all skill prose. Overlap is ~30% overall; code-review↔qa ~60% (the OWASP items and the performance checks — N+1, unbounded loops, resource leaks — are the gap). Sequant has no ADR convention and no tech-debt prioritization (/improve recommends, nothing scores). No field evidence yet: matcha-maps has zero committed native-skill artifacts.

Portability sets the direction. Prose checklists and markdown output files port to Codex (.agents/skills symlink) and opencode; MCP connectors, subagent fan-out, .claude/.local/skills/*/overrides.md, and invoking a plugin skill are Claude-only (docs/investigations/codex-driver-probe-2026-09.md, docs/investigations/opencode-driver-spike.md Finding 3). opencode truncates a skill body at 51,144 chars. qa/SKILL.md is 179,090 bytes and exec/SKILL.md 82,378 — both already past the ceiling, so every rule added to their bodies is invisible to opencode users and costs Claude users tokens per phase. Adopt the native vocabulary as small references/ files, not as SKILL.md prose, and not as a plugin dependency.

Upstream is 239 releases behind. .sequant/upstream/baseline.json says lastAssessedVersion: v2.1.42; installed is 2.1.281. The baseline itself is stale: hooks.files points at src/hooks/pre-tool-hook.ts (does not exist; the hook is .claude/hooks/pre-tool.sh) and hooks.used lists only PreToolUse although .claude/hooks/post-tool.sh is live. Items in the range that touch Sequant (full changelog scan, verified against gh issue list — none already tracked):

Version Change Sequant impact Tag
2.1.268 TodoWrite/TaskCreate… gated to Claude 3.x / Opus 4.0–4.7 / Sonnet 4.0–4.6 / Haiku 4.5; opt-in elsewhere via CLAUDE_CODE_ENABLE_TODO_TOOLS=1 .sequant/settings.json pins sonnet/opus → resolve to Sonnet 5 / Opus 5.5 → TodoWrite silently absent. 4 skills reference it; baseline.json lists it as a core tool likely live regression
range-wide Auto permission mode (--permission-mode auto, classifier-backed) phase agents hardcode permissionMode: bypassPermissions (.claude/agents/*.md, src/lib/workflow/drivers/claude-code.ts); read-heavy spec/qa could run narrower invest — separate issue
2.1.50 WorktreeCreate/WorktreeRemove hook events for native isolation: worktree revisit whether src/lib/worktree-isolation.ts can lean on them (#632 deferred this citing upstream #47548) invest — separate issue
2.1.139 PostToolUse continueOnBlock returns the reason to the model instead of hard-failing post-tool.sh UX cheap
2.1.281 claude plugin validate checks .mcp.json, insecure URLs, undeclared ${user_config.*} run before /release cheap
2.1.89 hooks receive absolute file_path for Write/Edit/Read spot-check pre-tool.sh file_path parsing cheap
2.1.280 / 2.1.257 Opus 5.5 / Fable 5.1 defaults docs/reference/run-command.md per-phase model examples docs
2.1.74 full model IDs honored in agent model: upstream #43869 (subagent routing) still OPEN as of 2026-09-15 → keep #632 mitigation watch

No breaking changes in SKILL.md frontmatter (additive only: disallowed-tools, ${CLAUDE_SKILL_DIR}), .mcp.json schema, or Agent SDK query() options. Nothing in the range concerns Codex/opencode interop.

Fix shape

Three tracks, ordered so each is independently shippable. Track C's two invest items are filed as follow-ups, not ACs here.

A. Unblock /upstream. Repair baseline.json (hook path, add PostToolUse + post-tool.sh, bump nothing else), then run /upstream --dry-run --since v2.1.42 and commit the report to .sequant/upstream/. Decide the TodoWrite question by evidence, not assumption: run one phase with the current pins and grep the transcript for the tool list; if absent, either set CLAUDE_CODE_ENABLE_TODO_TOOLS=1 in the claude-code driver env or strip the four references.

B. Fold the native rubrics as references, portable to all three backends. Each is a short file under the skill's references/, loaded on demand, mirrored to all three skill dirs by lint:skill-sync:

  • qa/references/review-dimensions.md — the security (injection, authz, secrets, deserialization, path traversal, SSRF) and performance (N+1, allocation, complexity in hot paths, unbounded queries/loops, resource leaks) bullets that qa §2 does not already carry. Diff against §2 first; add only the missing items.
  • improve/references/tech-debt-scoring.md — 6 categories + (Impact + Risk) × (6 − Effort); /improve ranks candidates with it instead of prose priority.
  • testgen/references/testing-pyramid.md — unit/integration/e2e split + per-component-type guidance, used when the spec's verification section is silent on level.
  • docs/adr/README.md + 0001-adopt-adrs.md in the native ADR shape (Status/Context/Decision/Options/Trade-offs/Consequences), and one sentence in spec/SKILL.md: when the recommended plan chooses between designs, the exec PR includes an ADR. Plain markdown, no plugin dependency.

Net SKILL.md growth for qa and exec must be ≤ 0 lines (reference file + pointer, remove any prose the reference now covers).

C. Cheap upstream adoptions. continueOnBlock in post-tool.sh's settings wiring; claude plugin validate as a /release preflight step; file_path spot-check; model-name refresh in the per-phase docs.

Follow-ups to file separately after A lands: auto permission mode for spec/qa phases; native worktree hooks vs worktree-isolation.ts. Already filed: #1138 (optional per-phase advisor model — measure first, then a retry rung between effort and model escalation).

Acceptance criteria

Rescoped 2026-09-27: the upstream half (AC-1, AC-2) is done or superseded; the remaining work is the native-rubrics half (AC-3 to AC-12). AC checks were converted from Verify: to Evidence:, the only verification field ac-parser.ts reads (#1165).

  • AC-1: baseline.json hook paths Moved to fix(upstream): file a finding issue only when the change touches something sequant uses; refresh the stale dependency map #1186 (2026-09-27), whose AC-3 requires every literal path in the baseline dependency map to exist.
  • AC-2: assess v2.1.43–v2.1.281 Superseded (2026-09-27). The baseline moved to v2.1.283 through the first App-token run's report PR docs: Upstream assessment for v2.1.283 #1178, deliberately skipping those versions unassessed. The weekly workflow now assesses forward from v2.1.283.
  • AC-3: The TodoWrite gate is resolved by evidence: the PR body quotes the tool list from one real phase transcript under the current sonnet/opus pins, and either CLAUDE_CODE_ENABLE_TODO_TOOLS=1 is set in the claude-code driver env with a test, or the 4 skill references to TodoWrite are removed in all three skill dirs.
  • AC-4: qa/references/review-dimensions.md exists in all three skill dirs and contains only items absent from qa/SKILL.md §2 (the PR body lists the diff), and qa/SKILL.md references it — Evidence: npx vitest run src/lib/__tests__/qa-review-dimensions-skill.test.ts — gate test scoped to the §2 region, mutation-verified per CLAUDE.md §Testing.
  • AC-5: improve/references/tech-debt-scoring.md defines the 6 categories and the (Impact + Risk) × (6 − Effort) score, and improve/SKILL.md ranks candidates with it — Evidence: npx vitest run src/lib/__tests__/improve-tech-debt-scoring-skill.test.ts — gate test, mutation-verified.
  • AC-6: testgen/references/testing-pyramid.md exists and testgen/SKILL.md consults it when the spec's verification section names no test level — Evidence: npx vitest run src/lib/__tests__/testgen-testing-pyramid-skill.test.ts — gate test, mutation-verified.
  • AC-7: docs/adr/README.md and docs/adr/0001-adopt-adrs.md exist in the Status/Context/Decision/Options/Trade-offs/Consequences shape, and spec/SKILL.md instructs writing an ADR when the plan chooses between designs — Evidence: npx vitest run src/lib/__tests__/adr-convention.test.ts — gate test, mutation-verified.
  • AC-8: wc -l of qa/SKILL.md and exec/SKILL.md is not larger than on origin/main at branch time (numbers in the PR body).
  • AC-9: post-tool.sh's hook registration uses continueOnBlock where it currently hard-blocks, and docs/reference/run-command.md per-phase model examples name current models — Evidence: grep + one hook fixture case.
  • AC-10: /release preflight runs claude plugin validate on the plugin manifest and stops on error — Evidence: npx vitest run src/lib/__tests__/release-plugin-validate-skill.test.ts — gate test for the step text in all three skill copies, mutation-verified.
  • AC-11: Two follow-up issues exist and are linked from the PR body: auto permission mode for spec/qa phases; native WorktreeCreate/WorktreeRemove hooks vs src/lib/worktree-isolation.ts.
  • AC-12: npm run lint:skill-sync reports 0 diverged; npm run lint:skill-calls, npm run build, and npm test are green.

Non-goals

Activity

  1. added
    enhancement
    planned
    upstream
    on Sep 24, 2026
  2. added 2 commits that reference this issue on Sep 28, 2026
  3. admarble commented on Sep 28, 2026

    @admarble
    ContributorAuthor

    All remaining ACs have landed across two PRs. Closing.

    AC Where Evidence
    AC-1, AC-2 #1186; baseline moved via #1178 already recorded in the issue body
    AC-3 TodoWrite #1206 A real phase transcript and a query() init probe under the sonnet/opus pins show no TodoWrite. CLAUDE_CODE_ENABLE_TODO_TOOLS=1 adds Task*, not TodoWrite, so the references were removed in all three dirs.
    AC-4 to AC-7 #1206 gate tests qa-review-dimensions-skill, improve-tech-debt-scoring-skill, testgen-testing-pyramid-skill, adr-convention; mutation records in the PR body
    AC-8 #1206 qa/SKILL.md 3837 → 3837, exec/SKILL.md 2278 → 2277
    AC-9 #1207 continueOnBlock is a prompt-hook option only (2.1.283 binary schema), and post-tool.sh never hard-blocks. A new fixture case pins "never hard-blocks" across all three hook copies. The model-alias table in run-command.md was checked against real runs.
    AC-10 #1207 /release pre-flight validates plugin.json and marketplace.json separately, because claude plugin validate . skips plugin.json. Gate test release-plugin-validate-skill, mutation-verified.
    AC-11 #1191, #1192 follow-ups filed
    AC-12 #1206, #1207 lint:skill-sync 0 diverged; CI test + canary green on both PRs' final heads

    Note: docs/adr/ is not in sequant-landing's EXCLUDED_PREFIXES, so the two ADR files will publish on the next landing build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplannedupstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions