Skip to content

fix: update dogfood and release skill templates for current CLI#511

Merged
carlos-alm merged 5 commits intomainfrom
chore/update-skill-templates
Mar 19, 2026
Merged

fix: update dogfood and release skill templates for current CLI#511
carlos-alm merged 5 commits intomainfrom
chore/update-skill-templates

Conversation

@carlos-alm
Copy link
Contributor

Summary

  • Dogfood skill: Remove obsolete fn, explain, hotspots CLI references — replaced with query, audit, triage which are the actual commands since v3.1.4
  • Dogfood skill: Update MCP tool counts from 23/24 to 32/33
  • Dogfood skill: Fix programmatic API export list to match actual src/index.js exports
  • Dogfood skill: Add embed→rebuild→search pipeline and watch mode lifecycle edge case tests
  • Release skill: Bump crates/codegraph-core/Cargo.toml version as part of release instead of deferring to publish workflow

Test plan

  • Verify dogfood skill command table matches codegraph --help output
  • Verify MCP tool counts match buildToolList(false).length / buildToolList(true).length
  • Verify release skill stages Cargo.toml in commit step

- 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
Copy link

claude bot commented Mar 19, 2026

Claude finished @carlos-alm's task —— View job


PR Review Analysis ✅

Completed comprehensive review of skill template updates.

Todo List:

  • Read and analyze modified skill files
  • Verify CLI command changes against current state
  • Check MCP tool count accuracy
  • Phase 1: Root cause analysis
  • Phase 2: Configuration change detection
  • Phase 3: Test integrity assessment
  • Phase 4: Code quality review
  • Phase 5: Backlog compliance evaluation
  • Provide final rating and recommendation

Root Cause Analysis

Problem Being Solved: Skill templates contain outdated references to CLI commands that no longer exist (fn, explain, hotspots) and incorrect MCP tool counts, creating confusion for users following the documentation.

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

  • Zero-dep: ✅ No new dependencies
  • Foundation-aligned: ✅ Documentation maintenance fully aligned
  • Problem-fit: 3 - Improves user experience but doesn't directly address core AI navigation problem
  • Breaking: No - documentation-only changes
  • Tier: 1

Verification Results

CLI Commands ✅

Verified current command inventory from src/cli/commands/ directory:

  • Obsolete commands correctly removed: fn, explain, hotspots are indeed not present in current CLI
  • Current commands correctly referenced: query, audit, triage exist and are properly documented

MCP Tool Count ✅

Verified against src/mcp/tool-registry.js:

  • BASE_TOOLS array contains 32 tools (single-repo mode)
  • Multi-repo mode adds list_repos = 33 tools
  • Update accurate: PR correctly updates from "23/24 tools" to "32/33 tools"

API Exports ✅

Verified against src/index.js:

  • Dogfood skill now accurately reflects the 48 actual exports instead of the previous incomplete list
  • All referenced functions exist in the programmatic API

Edge Case Testing Additions ✅

PR appropriately adds testing for:

  • Embed→rebuild→search pipeline consistency
  • Watch mode lifecycle with graceful shutdown
  • Both are legitimate edge cases that should be validated

Phase Analysis

Phase 1 (Root Cause): ✅ PASS - Addresses real outdated documentation
Phase 2 (Config Changes): ✅ PASS - No configuration changes
Phase 3 (Test Integrity): ✅ PASS - No test modifications, only adds more thorough testing guidance
Phase 4 (Code Quality): ✅ PASS - Clean documentation updates, proper markdown formatting
Phase 5 (Backlog Compliance): ✅ PASS - Foundation-aligned, zero-dep, non-breaking

Critical Concerns

None identified. This is a straightforward documentation maintenance PR.

Final Recommendation

  • Rating: ⭐⭐⭐⭐☆ (4/5)
  • Action: APPROVE
  • Reasoning: High-quality documentation maintenance that accurately reflects current CLI state. Removes obsolete references that would confuse users and updates factual information (tool counts) based on verified codebase analysis. Adds valuable edge case testing guidance. Only minor issue is it doesn't directly solve the core AI navigation problem, but documentation accuracy is important for usability.

The changes are factually correct, well-structured, and improve the user experience by ensuring skill templates match the actual CLI implementation.


@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 19, 2026

Greptile Summary

This 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.

  • Dogfood skill: Replaces stale CLI command references (fn, explain, hotspots) with their current equivalents (fn-impact, audit, triage); updates MCP tool counts to 32/33; fixes the programmatic API export list to match actual src/index.js exports (removes openDb, findDbPath, isNativeAvailable, ALL_SYMBOL_KINDS, MODELS which were never exported; adds fnImpactData, queryNameData, rolesData, auditData, triageData, complexityData, EVERY_SYMBOL_KIND which are); adds two new edge-case tests (embed→rebuild→search pipeline and watch-mode lifecycle).
  • Release skill: Moves Cargo.toml version bumping from the publish workflow into the release PR step, and updates the staging list (git add) to include crates/codegraph-core/Cargo.toml. This is consistent with the package.json fix.
  • Review skill: Adds a pre-check before re-triggering Greptile — inspects whether the last developer reply already received a positive emoji reaction from greptileai, avoiding redundant re-triggers.
  • package.json version hook: Stages crates/codegraph-core/Cargo.toml alongside package.json after sync-native-versions.js writes to it, preventing a dirty-tree error in the publish workflow (previously raised in review and confirmed fixed).

Confidence Score: 4/5

  • Safe to merge; changes are documentation/prompt files and a one-line version hook fix, with one minor gap in the review skill's reaction-check workflow.
  • All substantive code change (package.json version hook) is correct and directly addresses the previously flagged dirty-tree issue. Skill template changes are accurate and well-verified against the actual source. The only issue is an incomplete two-step reaction-check in review/SKILL.md — the command retrieves reactions_url but no second call is provided to evaluate the reactions, leaving the approval check implicit for the executing AI agent.
  • .claude/skills/review/SKILL.md — the Greptile reaction-check flow is incomplete: it fetches reactions_url but never fetches the reactions themselves.

Important Files Changed

Filename Overview
.claude/skills/dogfood/SKILL.md Removes obsolete CLI command references (fn, explain, hotspots) and replaces with current equivalents (fn-impact, audit, triage); updates MCP tool counts from 23/24 to 32/33; fixes programmatic API export list to match actual src/index.js; adds embed→rebuild→search and watch-mode lifecycle edge cases. Changes are accurate and internally consistent with the codebase.
.claude/skills/release/SKILL.md Adds an explicit step to bump crates/codegraph-core/Cargo.toml during the release PR (Step 2), updates the staging list (Step 8), and removes the note that publish workflow handles Cargo.toml sync. Correctly aligns with the package.json version hook fix that now stages Cargo.toml after sync-native-versions.js writes to it.
.claude/skills/review/SKILL.md Adds Greptile reaction-check logic before re-triggering. The command correctly gets the most recent non-greptileai comment and its reactions_url, but no follow-up API call is provided to evaluate whether greptileai actually posted a positive reaction — creating an implicit gap in the workflow that an agent may mishandle.
package.json Adds crates/codegraph-core/Cargo.toml to git add in the npm version lifecycle hook, preventing a dirty-tree error when sync-native-versions.js modifies Cargo.toml but only package.json was being staged. Correct fix for the issue raised in a previous review thread.

Sequence Diagram

sequenceDiagram
    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)
Loading

Last reviewed commit: "fix: stage Cargo.tom..."

| `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` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Suggested change
| `triage` | `--level file\|function`, `-n/--limit`, `--json` |
| `triage` | `--level file\|function\|directory`, `-n/--limit`, `--json` |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 sync-native-versions.js still modifies Cargo.tomlversion 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@carlos-alm
Copy link
Contributor Author

@greptileai

@carlos-alm carlos-alm merged commit 01e5b96 into main Mar 19, 2026
15 checks passed
@carlos-alm carlos-alm deleted the chore/update-skill-templates branch March 19, 2026 05:39
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant