fix: update dogfood and release skill templates for current CLI#511
fix: update dogfood and release skill templates for current CLI#511carlos-alm merged 5 commits intomainfrom
Conversation
- Remove obsolete `fn`, `explain`, `hotspots` command references from dogfood skill — replaced with `query`, `audit`, `triage` - Update MCP tool counts from 23/24 to 32/33 - Fix programmatic API export list to match actual src/index.js exports - Add embed→rebuild→search and watch mode lifecycle edge case tests - Release skill now bumps crates/codegraph-core/Cargo.toml to match package.json version instead of deferring to publish workflow
|
Claude finished @carlos-alm's task —— View job PR Review Analysis ✅Completed comprehensive review of skill template updates. Todo List:
Root Cause AnalysisProblem Being Solved: Skill templates contain outdated references to CLI commands that no longer exist ( Why This Approach: Direct documentation updates to reflect current state - removes obsolete references and corrects factual information based on actual codebase analysis. Risk Assessment: Low risk - Pure documentation changes with no functional impact on the codebase. Backlog Compliance
Verification ResultsCLI Commands ✅Verified current command inventory from
MCP Tool Count ✅Verified against
API Exports ✅Verified against
Edge Case Testing Additions ✅PR appropriately adds testing for:
Phase AnalysisPhase 1 (Root Cause): ✅ PASS - Addresses real outdated documentation Critical ConcernsNone identified. This is a straightforward documentation maintenance PR. Final Recommendation
The changes are factually correct, well-structured, and improve the user experience by ensuring skill templates match the actual CLI implementation. |
Greptile SummaryThis PR aligns three Claude skill templates with the current state of the CLI and codebase, and fixes a dirty-tree bug in the npm version lifecycle hook. The changes are primarily documentation/prompt updates for AI agents that drive release, dogfood, and review workflows.
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant RelSkill as Release Skill
participant PkgJSON as package.json
participant SyncScript as sync-native-versions.js
participant Cargo as Cargo.toml
participant Git as git staging
Dev->>RelSkill: /release VERSION
RelSkill->>PkgJSON: set version = VERSION (manual edit)
RelSkill->>Cargo: set version = VERSION (manual edit, NEW)
RelSkill->>Git: git add package.json package-lock.json Cargo.toml (NEW)
RelSkill->>Git: commit "chore: release vVERSION"
Note over Dev,Git: Later — publish workflow
Dev->>PkgJSON: npm version (lifecycle hook)
PkgJSON->>SyncScript: node sync-native-versions.js
SyncScript->>PkgJSON: sync optionalDependencies versions
SyncScript->>Cargo: write version = NEW_VERSION (was unstaged before fix)
PkgJSON->>Git: git add package.json crates/codegraph-core/Cargo.toml (FIXED)
Last reviewed commit: "fix: stage Cargo.tom..." |
.claude/skills/dogfood/SKILL.md
Outdated
| | `cycles` | `--functions` for function-level cycles | | ||
| | `structure [dir]` | `--depth <n>`, `--sort cohesion\|fan-in\|fan-out\|density\|files` | | ||
| | `hotspots` | `--metric fan-in\|fan-out\|density\|coupling`, `--level file\|directory`, `-n/--limit` | | ||
| | `triage` | `--level file\|function`, `-n/--limit`, `--json` | |
There was a problem hiding this comment.
triage --level missing directory option
The skill documents --level file|function, but the actual CLI (src/cli/commands/triage.js, line 46–48) accepts three values:
'Granularity: function (default) | file | directory. File/directory level shows hotspots'
directory is a valid level that routes the command through the legacy hotspotsData path (same as file level). Omitting it here means dogfood runs will never exercise the directory-level hotspot aggregation — which is a distinct code path that could have its own regressions.
| | `triage` | `--level file\|function`, `-n/--limit`, `--json` | | |
| | `triage` | `--level file\|function\|directory`, `-n/--limit`, `--json` | |
There was a problem hiding this comment.
Fixed — added directory to the --level options: --level file|function|directory. This ensures dogfood runs exercise the directory-level hotspot aggregation code path.
| - **No co-author lines** in commit messages | ||
| - **No Claude Code references** in commit messages or PR descriptions | ||
| - The publish workflow (`publish.yml`) handles: Cargo.toml version sync, optionalDependencies version sync, npm publishing, git tagging, and the post-publish version bump PR | ||
| - The publish workflow (`publish.yml`) handles: optionalDependencies version sync, npm publishing, git tagging, and the post-publish version bump PR |
There was a problem hiding this comment.
sync-native-versions.js still modifies Cargo.toml — version hook won't stage it
The "Important reminders" now says the publish workflow no longer handles "Cargo.toml version sync", implying Cargo.toml is fully owned by the release step. However, scripts/sync-native-versions.js (lines 29–38) still unconditionally overwrites Cargo.toml when called without --strip:
// Also sync Cargo.toml version (used by the native engine's engine_version())
if (!strip) {
const cargoPath = 'crates/codegraph-core/Cargo.toml';
...cargo = cargo.replace(...);
writeFileSync(cargoPath, cargo);
}The npm version lifecycle hook is "node scripts/sync-native-versions.js && git add package.json". When npm version runs (e.g. in the publish workflow), the script modifies Cargo.toml but only package.json is staged. This leaves a modified-but-unstaged Cargo.toml, which can cause a dirty-tree error in the publish workflow depending on how commit-and-tag-version validates the working tree.
Because the release step now pre-bumps Cargo.toml, the script's write is idempotent — but the dirty-file side-effect persists. The cleanest fix is to also stage Cargo.toml in the hook:
-"version": "node scripts/sync-native-versions.js && git add package.json"
+"version": "node scripts/sync-native-versions.js && git add package.json crates/codegraph-core/Cargo.toml"Or, since Cargo.toml is now explicitly handled in the release step, remove the Cargo.toml write from sync-native-versions.js entirely. Either way, the current "Important reminders" wording is misleading — the publish workflow does still touch Cargo.toml, it just fails to commit it.
There was a problem hiding this comment.
Fixed — updated the npm version lifecycle hook in package.json to also stage Cargo.toml: git add package.json crates/codegraph-core/Cargo.toml. This prevents the dirty-tree error during publish when sync-native-versions.js modifies Cargo.toml.
…#511) The CLI accepts --level function|file|directory but the skill template only documented function|file, meaning dogfood runs never exercised the directory-level hotspot aggregation code path.
#511) sync-native-versions.js writes both package.json and Cargo.toml, but the version lifecycle hook only staged package.json. This left a modified-but-unstaged Cargo.toml that could cause dirty-tree failures during publish.
Summary
fn,explain,hotspotsCLI references — replaced withquery,audit,triagewhich are the actual commands since v3.1.4src/index.jsexportscrates/codegraph-core/Cargo.tomlversion as part of release instead of deferring to publish workflowTest plan
codegraph --helpoutputbuildToolList(false).length/buildToolList(true).length