From 90c90333aafcb416528d8f3fe1e5020b41696fae Mon Sep 17 00:00:00 2001 From: okash1n <48118431+okash1n@users.noreply.github.com> Date: Fri, 12 Jun 2026 11:40:54 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20commands=20=E3=81=AE=E4=BD=8E=E5=84=AA?= =?UTF-8?q?=E5=85=88=E6=8E=83=E9=99=A4=20=E2=80=94=20update-codemaps=20?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=83=BBcheckpoint=20=E7=B8=AE=E5=B0=8F?= =?UTF-8?q?=E3=81=BB=E3=81=8B=EF=BC=88#115=E3=80=81v0.65.0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - update-codemaps 削除(静的マップは現行モデルの直接探索に劣後、コマンド数 21→20) - checkpoint: native checkpoint/rewind 委譲を明記し git マイルストーン記録に縮小 - research: マジックワード呪文削除 / update-kit: ツール選択 babysitting 削除 - test-coverage: スタック検出 + 例示に一般化 / e2e + e2e-runner: CI バージョンピン除去 - spec-kit-init: v0.10 出荷済みの現状記述に更新、5 steps 不整合修正 Closes #115 --- CHANGELOG.md | 15 +++++++ README.en.md | 4 +- README.md | 4 +- agents/doc-updater.md | 4 +- agents/e2e-runner.md | 17 +++----- commands/checkpoint.md | 63 +++++++--------------------- commands/e2e.md | 13 ++---- commands/research.md | 2 +- commands/spec-kit-init.md | 8 +++- commands/test-coverage.md | 8 ++-- commands/update-codemaps.md | 17 -------- commands/update-kit.md | 2 +- skills/eval-harness/SKILL.md | 2 +- tests/unit/test-agent-definitions.sh | 9 ++-- 14 files changed, 66 insertions(+), 102 deletions(-) delete mode 100644 commands/update-codemaps.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c18f50..4125433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [0.65.0] - 2026-06-12 + +LLM 性能監査(#121)P3 の第 2 弾(#115)。commands の低優先掃除(ネイティブ重複・呪文・ハードコードの除去)。 + +### Removed +- **update-codemaps を削除(#115)**: 静的コードマップの常設維持は旧モデルの探索能力不足への補償で、現行モデルは必要時の直接探索の方が常に新鮮。恣意的な「30% 変更で承認」ゲートと「Use TypeScript/Node.js」指定も同時に廃止。agents/doc-updater の codemap 言及を一般化。doc-blocker の codemaps/ allowlist は既存ユーザーの生成物保護のため残置。既存配備分は update の retired 掃除で除去(コマンド数 21 → 20) + +### Changed +- **checkpoint を git マイルストーン記録に縮小(#115)**: セッション内ロールバックはネイティブ checkpoint/rewind(Esc Esc / /rewind)に委譲することを明記し、本コマンドはセッション横断のマイルストーン記録専用に。記録していないデータ(過去のテスト成績・カバレッジ)との比較を要求していた verify の矛盾を解消(`git diff --stat` + 現在のテスト結果のみ報告) +- **research のマジックワード呪文を削除(#115)**: 「"deeply examine" 等の語句を使え」という旧世代プロンプティングの迷信を削除(精読の強制自体は維持) +- **update-kit のツール選択 babysitting を削除(#115)**: 「cat ではなく Read ツールを使え」の注記を削除(conf 編集ガードレールは維持) +- **test-coverage のスタック固定を一般化(#115)**: npm/pnpm・coverage-summary.json 固定をテストツール検出 + 例示に変更(80% 閾値はキット規約として維持) +- **e2e / e2e-runner の CI 例からバージョンピンを除去(#115)**: actions@v4 / Node 22 の固定例示が「最新を使え」という指示文と自己矛盾していたため、「生成時に最新メジャーと Active LTS を確認、既存 .github/workflows/ があればそれを基準に」へ変更 +- **spec-kit-init の陳腐化前提を更新(#115)**: 「Spec Kit v0.10 が出たら再評価」の未来予告を v0.10.0 出荷済みの現状記述(git extension は opt-in、--no-git 廃止)に置換。「4 steps」→「5 steps」の不整合も修正 + ## [0.64.0] - 2026-06-12 LLM 性能監査(#121)P3 の第 1 弾(#114)。commands の旧モデル向け儀式(固定手順の強制)を成果指向に書き換えた。 diff --git a/README.en.md b/README.en.md index 97d95e4..d14031b 100644 --- a/README.en.md +++ b/README.en.md @@ -52,7 +52,7 @@ Claude Code Starter Kit bootstraps a consistent, high-quality Claude Code enviro - **3 profiles**: Minimal, Standard (recommended), Full - **9 agents**: planner, architect, tdd-guide, code-reviewer, security-reviewer, build-error-resolver, e2e-runner, refactor-cleaner, doc-updater - **10 rules**: coding-style, git-workflow, hooks, patterns, performance, security, testing, agents, anti-patterns, permissions-guide -- **21 slash commands**: /plan, /tdd, /build-fix, /e2e, /verify, /research, /web-article, /oss-analyze, /web-source-review, /handover, /update-kit, and more +- **20 slash commands**: /plan, /tdd, /build-fix, /e2e, /verify, /research, /web-article, /oss-analyze, /web-source-review, /handover, /update-kit, and more - **12 skill modules**: backend-patterns, frontend-patterns, security-review, tdd-workflow, prompt-patterns, and more - **11 optional hooks/settings**: safety net (cc-safety-net), auto update, web content update, tmux reminder, doc blocker, Prettier or Biome formatting, PR creation log, pre-compact snapshot (opt-in), statusline, doc size guard, feature recommendation - **14 plugins** from multiple marketplaces: security-guidance, commit-commands, pr-review-toolkit, feature-dev, code-review, claude-md-management, superpowers, code-simplifier, document-skills, example-skills, typescript-lsp, gopls-lsp, pyright-lsp, rust-analyzer-lsp @@ -393,7 +393,7 @@ claude-code-starter-kit/ │ └── ja/ # Japanese templates & strings ├── agents/ # Agent definitions (9 files) ├── rules/ # Rule files (10 files) -├── commands/ # Slash commands (21 files) +├── commands/ # Slash commands (20 files) └── skills/ # Skill modules (12 dirs) ``` diff --git a/README.md b/README.md index 6e4abec..f64e167 100644 --- a/README.md +++ b/README.md @@ -432,7 +432,7 @@ cd claude-code-starter-kit | **refactor-cleaner** | コード整理 | 不要なコードの削除・整理 | | **doc-updater** | ドキュメント更新 | README やドキュメントの更新 | -### 💬 スラッシュコマンド(21個) +### 💬 スラッシュコマンド(20個) スラッシュコマンドは、Claude に **ワンタッチで指示を出すショートカット** です。 Claude Code のチャットで `/` に続けて入力します。 @@ -1104,7 +1104,7 @@ claude-code-starter-kit/ │ └── ja/ # 日本語 ├── agents/ # AI エージェント定義(9種) ├── rules/ # コーディングルール(10種) -├── commands/ # スラッシュコマンド(21個) +├── commands/ # スラッシュコマンド(20個) └── skills/ # スキルモジュール(12個) ``` diff --git a/agents/doc-updater.md b/agents/doc-updater.md index 1fad856..f8fa9cd 100644 --- a/agents/doc-updater.md +++ b/agents/doc-updater.md @@ -1,6 +1,6 @@ --- name: doc-updater -description: Documentation maintenance specialist. Use when code changes require README, guide, codemap, runbook, or changelog updates. +description: Documentation maintenance specialist. Use when code changes require README, guide, runbook, or changelog updates. tools: Read, Write, Edit, Bash, Grep, Glob model: haiku --- @@ -21,7 +21,7 @@ You keep documentation aligned with the repository. Update only documents that a - Do not invent architecture not visible in the repo. - Do not create new docs when a targeted edit is enough. -- Keep generated codemaps or indexes deterministic. +- Keep generated docs or indexes (if the project maintains any) deterministic. - Mention any documentation area that looks stale but is outside scope. ## Output diff --git a/agents/e2e-runner.md b/agents/e2e-runner.md index 2bbf0e7..848b207 100644 --- a/agents/e2e-runner.md +++ b/agents/e2e-runner.md @@ -26,22 +26,17 @@ You design and run end-to-end tests that protect real user journeys. Prefer a sm ## CI Example -Use current action versions and an active Node LTS: +Use the latest major action versions and the active Node LTS at +generation time (verify rather than recalling pinned versions). The +step sequence is: ```yaml -- uses: actions/checkout@v4 -- uses: actions/setup-node@v4 - with: - node-version: 22 - cache: npm +- checkout +- setup-node (active LTS, cache npm) - run: npm ci - run: npx playwright install --with-deps - run: npm run test:e2e -- uses: actions/upload-artifact@v4 - if: failure() - with: - name: playwright-artifacts - path: test-results/ +- upload-artifact (on failure: test-results/) ``` ## Output diff --git a/commands/checkpoint.md b/commands/checkpoint.md index 06293c0..5f31fce 100644 --- a/commands/checkpoint.md +++ b/commands/checkpoint.md @@ -1,6 +1,8 @@ # Checkpoint Command -Create or verify a checkpoint in your workflow. +Record cross-session git milestones. In-session rollback is handled by +Claude Code's native checkpoint/rewind (Esc Esc / /rewind) — use this +command only for multi-day milestones you want recorded in git. ## Usage @@ -8,11 +10,9 @@ Create or verify a checkpoint in your workflow. ## Create Checkpoint -When creating a checkpoint: - 1. Run `/verify quick` to ensure current state is clean -2. Create a git stash or commit with checkpoint name -3. Log checkpoint to `.claude/checkpoints.log`: +2. Create a git commit or tag with the checkpoint name +3. Log the checkpoint to `.claude/checkpoints.log`: ```bash echo "$(date +%Y-%m-%d-%H:%M) | $CHECKPOINT_NAME | $(git rev-parse --short HEAD)" >> .claude/checkpoints.log @@ -22,53 +22,20 @@ echo "$(date +%Y-%m-%d-%H:%M) | $CHECKPOINT_NAME | $(git rev-parse --short HEAD) ## Verify Checkpoint -When verifying against a checkpoint: - -1. Read checkpoint from log -2. Compare current state to checkpoint: - - Files added since checkpoint - - Files modified since checkpoint - - Test pass rate now vs then - - Coverage now vs then - -3. Report: -``` -CHECKPOINT COMPARISON: $NAME -============================ -Files changed: X -Tests: +Y passed / -Z failed -Coverage: +X% / -Y% -Build: [PASS/FAIL] -``` +1. Read the checkpoint SHA from the log +2. Show what changed since then: `git diff --stat ..HEAD` +3. Run the test suite once and report the **current** status + (the log records only date/name/SHA — there is no historical + test/coverage data to compare against) ## List Checkpoints -Show all checkpoints with: -- Name -- Timestamp -- Git SHA -- Status (current, behind, ahead) - -## Workflow - -Typical checkpoint flow: - -``` -[Start] --> /checkpoint create "feature-start" - | -[Implement] --> /checkpoint create "core-done" - | -[Test] --> /checkpoint verify "core-done" - | -[Refactor] --> /checkpoint create "refactor-done" - | -[PR] --> /checkpoint verify "feature-start" -``` +Show all checkpoints with name, timestamp, git SHA, and whether HEAD is +at, ahead of, or behind each. ## Arguments $ARGUMENTS: -- `create ` - Create named checkpoint -- `verify ` - Verify against named checkpoint -- `list` - Show all checkpoints -- `clear` - Remove old checkpoints (keeps last 5) +- `create ` - Record a milestone +- `verify ` - Diff + current test status against a milestone +- `list` - Show recorded milestones diff --git a/commands/e2e.md b/commands/e2e.md index e054b79..a485332 100644 --- a/commands/e2e.md +++ b/commands/e2e.md @@ -19,15 +19,10 @@ Use the `e2e-runner` agent and the repository's existing browser test setup. ## CI Baseline -When creating GitHub Actions examples, use current actions and active Node LTS: - -```yaml -- uses: actions/checkout@v4 -- uses: actions/setup-node@v4 - with: - node-version: 22 -- uses: actions/upload-artifact@v4 -``` +When creating GitHub Actions examples, check and use the latest major +versions of actions and the active Node LTS at generation time; if the +repository already has `.github/workflows/`, treat those as the current +baseline instead of hardcoding versions. ## Output diff --git a/commands/research.md b/commands/research.md index b32f0e4..55fc1bc 100644 --- a/commands/research.md +++ b/commands/research.md @@ -10,7 +10,7 @@ You are entering **Research Phase**. Your goal is to deeply understand the relev 1. **Identify scope**: Based on the user's request, determine which parts of the codebase are relevant. -2. **Deep read**: Read all relevant files thoroughly. Use words like "deeply examine", "trace the flow", "understand the intricacies" in your analysis. Don't skim - understand the actual logic, edge cases, and design decisions. +2. **Deep read**: Read all relevant files thoroughly. Don't skim - understand the actual logic, edge cases, and design decisions. 3. **Map dependencies**: Trace imports, function calls, and data flow across files. Document the dependency graph. diff --git a/commands/spec-kit-init.md b/commands/spec-kit-init.md index 621bacd..64b0cd3 100644 --- a/commands/spec-kit-init.md +++ b/commands/spec-kit-init.md @@ -14,7 +14,7 @@ cycle; `uv tool upgrade specify-cli` is how you keep Spec Kit current. ## Instructions You are entering **Spec Kit Initialization**. Walk the user through the -4 steps below in order. Do not execute heavy operations without +5 steps below in order. Do not execute heavy operations without confirmation; the user is in control. ### Step 1 — Verify prerequisites @@ -58,6 +58,10 @@ specify init . --integration claude --script sh specify init --here --integration claude --script sh --force ``` +If the user wants Spec Kit's feature-branch automation, run +`specify extension add git` after init (the git extension is opt-in +since v0.10.0). + After init, the project will have: - `.claude/skills/speckit-*` — 14 SKILL.md files (project-local, namespaced) @@ -97,7 +101,7 @@ explicit go-ahead — it executes the entire task list and can be expensive. ## Notes & gotchas - Spec Kit's command separator is **hyphen, not dot**: `/speckit-plan`, NOT `/speckit.plan`. The dot form was retired before v0.8.0. -- `specify init` creates a git branch unless `--no-git` is passed; Spec Kit v0.10 will make the `git` extension opt-in. Re-evaluate this command when v0.10 ships. +- Since Spec Kit v0.10.0 (2026-06), the git extension is opt-in and the `--no-git` flag has been removed; `specify init` does not create a git branch by default. Run `specify extension add git` after init if you want Spec Kit's branch automation. - `specify init` writes only into `/`. It does NOT touch `~/.claude/` (verified during the StarterKit evaluation in `docs/spec-kit-evaluation.md`). - Spec Kit's bash scripts (`.specify/scripts/bash/*.sh`) do NOT use `rm -rf`, `curl`, `wget`, `sudo`, or `git push --force`. They are compatible with the StarterKit's deny rules. - Long-term maintenance of `specify-cli` is delegated to `uv tool upgrade`; the StarterKit does not bundle or pin a Spec Kit version. diff --git a/commands/test-coverage.md b/commands/test-coverage.md index 754eabf..b320185 100644 --- a/commands/test-coverage.md +++ b/commands/test-coverage.md @@ -2,9 +2,11 @@ Analyze test coverage and generate missing tests: -1. Run tests with coverage: npm test --coverage or pnpm test --coverage +1. Identify the project's test tooling and run tests with coverage + (e.g. npm test --coverage, pytest --cov, go test -cover) -2. Analyze coverage report (coverage/coverage-summary.json) +2. Analyze the coverage report your test runner produces + (e.g. coverage/coverage-summary.json for JS) 3. Identify files below 80% coverage threshold @@ -23,5 +25,5 @@ Analyze test coverage and generate missing tests: Focus on: - Happy path scenarios - Error handling -- Edge cases (null, undefined, empty) +- Edge cases (null / missing / empty values) - Boundary conditions diff --git a/commands/update-codemaps.md b/commands/update-codemaps.md deleted file mode 100644 index f363a05..0000000 --- a/commands/update-codemaps.md +++ /dev/null @@ -1,17 +0,0 @@ -# Update Codemaps - -Analyze the codebase structure and update architecture documentation: - -1. Scan all source files for imports, exports, and dependencies -2. Generate token-lean codemaps in the following format: - - codemaps/architecture.md - Overall architecture - - codemaps/backend.md - Backend structure - - codemaps/frontend.md - Frontend structure - - codemaps/data.md - Data models and schemas - -3. Calculate diff percentage from previous version -4. If changes > 30%, request user approval before updating -5. Add freshness timestamp to each codemap -6. Save reports to .reports/codemap-diff.txt - -Use TypeScript/Node.js for analysis. Focus on high-level structure, not implementation details. diff --git a/commands/update-kit.md b/commands/update-kit.md index 2cca10a..8f85423 100644 --- a/commands/update-kit.md +++ b/commands/update-kit.md @@ -35,7 +35,7 @@ Before running the update: After a successful update (or if already up to date), check for pending feature recommendations. -**Note**: Always use the Read tool (not `cat`) to read files, and the Edit tool to modify `~/.claude-starter-kit.conf`. Skip any feature named `feature-recommendation` if it appears in the pending list (self-referential — should not happen, but guard against it). +**Note**: Skip any feature named `feature-recommendation` if it appears in the pending list (self-referential — should not happen, but guard against it). #### Step 1: Check for pending features diff --git a/skills/eval-harness/SKILL.md b/skills/eval-harness/SKILL.md index d2295ba..09a8fd3 100644 --- a/skills/eval-harness/SKILL.md +++ b/skills/eval-harness/SKILL.md @@ -34,7 +34,7 @@ Expected Output: Description of expected result Ensure changes don't break existing functionality: ```markdown [REGRESSION EVAL: feature-name] -Baseline: SHA or checkpoint name +Baseline: git SHA (or a /checkpoint milestone name) Tests: - existing-test-1: PASS/FAIL - existing-test-2: PASS/FAIL diff --git a/tests/unit/test-agent-definitions.sh b/tests/unit/test-agent-definitions.sh index a85fa74..c3a945a 100644 --- a/tests/unit/test-agent-definitions.sh +++ b/tests/unit/test-agent-definitions.sh @@ -44,9 +44,12 @@ } { - test_name="agents: e2e and security guidance use current baselines" - if grep -q 'actions/upload-artifact@v4' "$PROJECT_DIR/agents/e2e-runner.md" \ - && grep -q 'node-version: 22' "$PROJECT_DIR/agents/e2e-runner.md" \ + test_name="agents: e2e and security guidance avoid stale pinned baselines" + if ! grep -q 'actions/checkout@v' "$PROJECT_DIR/agents/e2e-runner.md" \ + && ! grep -q 'node-version:' "$PROJECT_DIR/agents/e2e-runner.md" \ + && ! grep -q 'actions/checkout@v' "$PROJECT_DIR/commands/e2e.md" \ + && ! grep -q 'node-version:' "$PROJECT_DIR/commands/e2e.md" \ + && grep -q 'active Node LTS' "$PROJECT_DIR/agents/e2e-runner.md" \ && grep -q 'context.tracing.start' "$PROJECT_DIR/agents/e2e-runner.md" \ && grep -q 'OWASP Top 10 2021' "$PROJECT_DIR/agents/security-reviewer.md" \ && grep -q 'Server-Side Request Forgery' "$PROJECT_DIR/agents/security-reviewer.md"; then