Commit Graph

10 Commits

Author SHA1 Message Date
Benjamin D. Smith 7d0a136515 perf(build): mark 36 slash-only skills disable-model-invocation
📝 Summary:
• add `disable-model-invocation: true` to the frontmatter of every
  gstack skill that is only ever user-invoked, so their descriptions
  drop out of Claude Code's always-loaded prompt (~1,050 tokens per
  request on this machine)
• flag lives in each `SKILL.md.tmpl`; generated `SKILL.md` files
  regenerated via `bun run gen:skill-docs` (claude host is denylist
  frontmatter mode, so the key passes through untouched)

🔧 Technical Improvements:
• flagged (36): benchmark, benchmark-models, canary, careful, codex,
  cso, design-html, design-shotgun, devex-review, diagram,
  document-generate, document-release, freeze, gstack-upgrade,
  guard, health, ios-clean, ios-design-review, ios-fix, ios-qa,
  ios-sync, landing-report, make-pdf, open-gstack-browser
  (covers the connect-chrome alias), pair-agent, plan-devex-review,
  plan-tune, pr-prep, retro, scrape, setup-browser-cookies,
  setup-deploy, setup-gbrain, skillify, spec, unfreeze
• kept model-invocable on purpose — every skill named in the
  CLAUDE.md skill-routing tables (here and in consumer repos):
  autoplan, browse, context-restore/save, design-consultation,
  design-review, investigate, land-and-deploy, learn, office-hours,
  plan-ceo/design/eng-review, qa, qa-only, review, ship,
  sync-gbrain, plus the `_gstack-command` router
• verified: `bun test` tier-1 suites green (733 pass, 0 fail);
  `browse/test/sidebar-ux.test.ts` failures reproduce with this
  change stashed (73/176 fail on the base tree — pre-existing,
  needs a live browse daemon)

📊 Code Changes: 72 insertions, 0 deletions (net +72)

📦 Files Modified:
• 36 × `<skill>/SKILL.md.tmpl` (minor updates — one frontmatter line)
• 36 × `<skill>/SKILL.md` (minor updates — regenerated)
2026-07-18 14:18:04 +00:00
Benjamin D. Smith 2311e32d63 docs(workspace): mandate single-select default in AskUserQuestion format
📝 Summary:
• Add a `multiSelect` rule to the shared AskUserQuestion decision-brief
  preamble, plus a matching self-check bullet
• Regenerate the 44 SKILL.md surfaces that inline the preamble

🔧 Technical Improvements:
• `generate-ask-user-format.ts` now states that options are mutually
  exclusive by DEFAULT, and `multiSelect: true` is legal only when
  every option is an independently-selectable atom whose pro/con and
  effort stand alone
• Bundles or combinations of the same underlying items (`E1+E3`,
  `All three`, `E1 only`, `Defer all`) are mutually exclusive by
  construction, so they take `multiSelect: false` and score
  `Completeness:` per option LETTER, not per sub-item
• Names the diagnostic tell: a defer/none option or a do-everything
  option sitting in the list proves the question is single-select
• Routes 5+ independent atoms to the existing split chain rather than
  to `multiSelect`, so the 4-option cap is never silently exceeded

🏗 Architecture:
• The rule lives in the preamble resolver, not in any one skill, so
  every skill that renders a decision brief inherits it from one
  source; the 44 regenerated `SKILL.md` files are build output

🧾 Reports:
• Regenerated with `gen:skill-docs:user` to match how this branch's
  `SKILL.md` were produced (gbrain blocks inlined); the pure-form
  `gen:skill-docs` variant strips them and would have carried 326
  unrelated deletions
• `bun test test/host-config.test.ts test/skill-validation.test.ts
  test/audit-compliance.test.ts test/question-log-hook.test.ts
  test/gstack-question-preference.test.ts` — 387 pass, 0 fail across
  the four non-golden files
• The three `golden-file regression` tests were ALREADY red at HEAD:
  `test/fixtures/golden/*-ship-SKILL.md` are pure-form while the
  committed `ship/SKILL.md` is brain-form. Left untouched — a
  pre-existing defect, not this change

📊 Code Changes:
• 138 insertions, 0 deletions (net +138)

📦 Files Modified:
• `scripts/resolvers/preamble/generate-ask-user-format.ts`
  (substantial changes) — add the single-select rule paragraph and
  the `multiSelect: false` self-check bullet
• 44 × `**/SKILL.md` (minor updates) — regenerated preamble
2026-07-10 23:38:53 +10:00
Benjamin D. Smith 779b12a261 chore(build): regenerate SKILL.md after v1.60.1.0 upstream merge
📝 Summary:
• `./setup` re-rendered 49 `SKILL.md` files from their `.tmpl`
  sources after merging `upstream/main` (v1.58.5.0 → v1.60.1.0)
• Additive only — 304 insertions, 0 deletions; picks up the new
  preamble blocks shipped upstream

📦 Files Modified:
*/SKILL.md (minor updates) — regenerated from templates
2026-07-10 22:10:46 +10:00
Benjamin D. Smith 6205b5e05b WIP: pre-v1.60.1.0 upgrade checkpoint — uncommitted local edits 2026-07-10 22:08:44 +10:00
Benjamin D. Smith 29e4c17bfa test(pr-prep): extract + unit-test the collision scorer
The Step 4 bucketing (title/file Jaccard, state weighting, EXACT_DUP /
OVERLAP / SIBLING / CLEAN precedence) lived only as inline bash in the
skill, so it had no behavioral coverage. Extract it into a pure,
deterministic CLI, `bin/gstack-pr-prep-score`, and pin every bucket
threshold in `test/pr-prep-score.test.ts` (13 cases, free, gate-tier).
The skill's Step 4 now points at the scorer as the canonical
implementation rather than re-deriving the thresholds inline, and the
coverage matrix gates pr-prep on the new behavioral test. This is the
v0.2.0 extraction the skill flagged, scoped to the scoring core.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:32 +10:00
Benjamin D. Smith de4f62a317 feat(pr-prep): check commits against the upstream commit-message style
Add Step 4.6: a per-commit conformance check that holds the branch's
commit messages to the UPSTREAM repo's convention, not the
contributor's own house style. A fork PR whose commits read in a
different voice than the project reads as a drive-by and burns reviewer
goodwill before the diff is read.

The authoritative style is resolved once (Step 1.4): the upstream
CONTRIBUTING.md commit rules if present, else the de-facto shape sampled
from `git log upstream/$BASE_BRANCH --no-merges`, else the
conventional-commits baseline. Step 4.6 then flags subject-shape drift,
a personal body template (emoji/bullets) where upstream uses prose, a
subject that promises content it lacks (e.g. "+ tests" with no tests),
and a missing-or-extra trailer relative to upstream (e.g. a
`Co-Authored-By:` line upstream carries on every commit). Surfaced as a
soft warning in the report, never a block — style is not a duplicate,
but it is the cheapest goodwill win in the audit and far cheaper to fix
before the PR exists.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith 3b1079897b chore(pr-prep): regenerate SKILL.md against current resolvers
The committed `pr-prep/SKILL.md` was generated against an older
preamble and had drifted from `bun run gen:skill-docs` output.
Regenerate it so it picks up the current shared resolvers: the
`SESSION_KIND` and `GSTACK_PLAN_MODE` preamble lines, the `/spec`
routing entry, the AskUserQuestion failure fallback, the 5+-option
split rule, and the Boil-the-Ocean rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith 6b4bf39142 feat(pr-prep): step 4.4 — second-opinion review via codex on CLEAN commits
Before filing each CLEAN commit (not bucketed EXACT_DUP / OVERLAP /
SIBLING), invoke `codex review` for an independent second opinion.
Codex CLI uses a different model family (OpenAI vs Claude), so the
signal is genuinely independent and catches structural bugs the author
missed during write-up.

Optional: if `codex` is not on PATH, emit a soft warning and continue;
never block on tool availability. Severity escalation: P0/P1 findings
bump the commit from CLEAN to OVERLAP (don't file until addressed); P2
stays CLEAN at author discretion (fix-before-file or note in PR body).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith fac9a33ad5 feat(pr-prep): read upstream CONTRIBUTING.md + surface pre-push gates per commit
Step 1.4: fetch `CONTRIBUTING.md` (case-insensitive) via gh api from
the upstream repo, cache to /tmp, extract pre-push commands + test
layout conventions + branch naming rules + banned patterns. The agent
uses these inline when writing PR bodies.

Step 4.5: annotate each CLEAN/OVERLAP/SIBLING commit row with the
required pre-push gate (e.g. `bun run verify`), whether changed files
trigger special test paths (eval-replay for retrieval), and whether
the commit added tests. Soft warning on missing-tests when
not-required is unclear — don't block, let the human decide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith 50c474ba72 feat(pr-prep): pre-PR upstream duplicate audit skill
Walks `git log base..HEAD`, derives search keywords per commit from
subject + changed file paths, queries upstream issues + PRs via `gh`,
scores each commit against upstream collisions (EXACT_DUP / OVERLAP /
SIBLING / CLEAN) on a title-token + file-overlap Jaccard, and refuses
to proceed when EXACT_DUP found. Designed to slot into `/ship` as a
Step 0 hook (env `GSTACK_FROM_SHIP=1` switches to JSON output + skips
interactive prompts).

Motivating case (real, 2026-05-26): a contributor branch had 8 commits
ready for upstream PRs; 4 of 4 unverified commits would have duplicated
already-open upstream issues. pr-prep catches all in ~30-60s of `gh`
queries, before any noise PR or reviewer triage round.

v0.1.0 ships inline bash in SKILL.md (reviewable in one file). Out of
scope: diff-content similarity, cross-repo audit, LLM-judged semantic
dup detection, auto-comment on upstream PRs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00