feat(commands): add /ecc-guide command for interactive navigation#1332
feat(commands): add /ecc-guide command for interactive navigation#1332Qingzhou-Joshua wants to merge 2 commits intoaffaan-m:mainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new interactive command guide Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant ECC as /ecc-guide
participant Index as Search/Index
participant Repo as Repo (README / SKILL.md / commands)
User->>ECC: Invoke /ecc-guide (mode or find query)
ECC->>User: Clarify intent or continue interactively
ECC->>Index: Query index/recommendation engine for relevant docs
Index->>Repo: Fetch matched files (README, SKILL.md, commands)
Repo-->>Index: Return content snippets/metadata
Index-->>ECC: Return ranked results
ECC->>User: Return progressive-disclosure response (overview, links, examples, follow-ups)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
commands/ecc-guide.md (1)
49-56: Add explicit path-safety guidance to dynamic loading examples.The implementation snippets currently model direct filesystem reads; this can lead to unsafe path handling when topic names become user-influenced. Recommend documenting allowlisting + normalized path checks in the example itself.
Proposed hardening update for the snippet
-const projectIndex = { - skills: fs.readdirSync('./skills').map(dir => ({ - name: dir, - readme: fs.readFileSync(`./skills/${dir}/SKILL.md`, 'utf8') - })), - commands: fs.readdirSync('./commands').filter(f => f.endsWith('.md')) -}; +const path = require('path'); +const ROOT = process.cwd(); +const skillsRoot = path.resolve(ROOT, 'skills'); +const commandsRoot = path.resolve(ROOT, 'commands'); + +const projectIndex = { + skills: fs.readdirSync(skillsRoot).map((dir) => { + const skillFile = path.resolve(skillsRoot, dir, 'SKILL.md'); + if (!skillFile.startsWith(skillsRoot + path.sep)) { + throw new Error('Unsafe skill path'); + } + return { + name: dir, + readme: fs.readFileSync(skillFile, 'utf8') + }; + }), + commands: fs + .readdirSync(commandsRoot) + .filter((f) => /^[a-z0-9-]+\.md$/.test(f)) +};Also applies to: 325-335
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@commands/ecc-guide.md` around lines 49 - 56, The dynamic file-read example uses a raw skillPath and fs.readFileSync which is unsafe for user-influenced topics; update the example and surrounding docs to require an explicit allowlist of valid skill identifiers and perform path normalization/validation before constructing skillPath (e.g., normalize user input, ensure it matches an allowlisted key, then map to a known file path), and document these checks alongside the skillPath/fs.readFileSync usage to prevent directory traversal and unauthorized reads.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@commands/ecc-guide.md`:
- Around line 115-141: The examples use nested triple-fenced code blocks which
break Markdown rendering; update the outer fences to a longer fence (e.g., four
backticks) around the blocks that include inner triple-backtick examples (the
"tdd-workflow" example and the similar workflow example later) so inner fences
are preserved, making sure to replace the outer ``` with ```` (or another longer
fence) around the "Example usage" sections and any other nested examples
referenced.
---
Nitpick comments:
In `@commands/ecc-guide.md`:
- Around line 49-56: The dynamic file-read example uses a raw skillPath and
fs.readFileSync which is unsafe for user-influenced topics; update the example
and surrounding docs to require an explicit allowlist of valid skill identifiers
and perform path normalization/validation before constructing skillPath (e.g.,
normalize user input, ensure it matches an allowlisted key, then map to a known
file path), and document these checks alongside the skillPath/fs.readFileSync
usage to prevent directory traversal and unauthorized reads.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Greptile SummaryThis PR adds a new
Confidence Score: 4/5Safe to merge after fixing broken bold markers and non-existent skill name references in SKILL.md. Two P1 issues remain in SKILL.md: unclosed bold markers in the welcome message example that will render incorrectly for every user, and four non-existent skill names spread across the Examples and Contextual Suggestions sections that will actively mislead new users this guide is intended to help. All other files are clean. skills/ecc-guide/SKILL.md — contains broken markdown formatting and non-existent skill references
|
| Filename | Overview |
|---|---|
| skills/ecc-guide/SKILL.md | New skill file with four issues: two non-existent skill names in Example 2 (using-git-worktrees, systematic-debugging), two non-existent skills in Contextual Suggestions (typescript-patterns, react-patterns), a stale git-worktrees in the pseudocode beginnerPath, and unclosed bold markers in the welcome message example. |
| commands/ecc-guide.md | Clean shim command file with proper frontmatter, $ARGUMENTS usage, and correct delegation to the skill; no issues found. |
| agent.yaml | Correctly registers both the ecc-guide skill and ecc-guide command in alphabetical order. |
| README.md | Count updates from 79→80 commands and 181→182 skills applied consistently across all comparison tables. |
| AGENTS.md | Count bump to 80 commands and 182 skills in header and directory listing; no issues. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User invokes /ecc-guide] --> B{$ARGUMENTS?}
B -- none --> C[Interactive conversation mode]
B -- setup/skills/commands/rules/workflows/examples --> D[Direct topic access]
B -- feature-name --> E[Direct skill/command lookup]
B -- find: query --> F[Search across all skills and commands]
C --> G[ecc-guide SKILL.md activated]
D --> G
E --> G
F --> G
G --> H[Step 1: Parse user intent]
H --> I[Step 2: Dynamic content loading from project files]
I --> J[Step 3: Progressive disclosure response]
J --> K[Step 4: Context-aware follow-up options]
Reviews (6): Last reviewed commit: "fix: Address code review feedback and sy..." | Re-trigger Greptile
There was a problem hiding this comment.
2 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="commands/ecc-guide.md">
<violation number="1" location="commands/ecc-guide.md:13">
P2: Nested triple-backtick fences break Markdown rendering here. The inner ` ``` ` block (at "Example usage:") prematurely closes this outer fence, causing everything after it to render as plain text. Use a longer outer fence (e.g., ``````) to contain inner code blocks. Same issue applies to Example 4 below.</violation>
<violation number="2" location="commands/ecc-guide.md:114">
P2: Nested triple-backtick fences in examples break Markdown rendering by prematurely closing outer code blocks.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
30e017a to
87081c4
Compare
|
Tip: Greploop — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
1 similar comment
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@commands/ecc-guide.md`:
- Around line 17-25: Update the Arguments section to explicitly list the two
missing invocation modes: add an entry for find: "<query>" (searches
features/skills by query) and an entry describing direct feature lookup by slug
(e.g., tdd-workflow) which opens that feature's documentation; ensure the same
additions are made in the corresponding duplicate block later in the file (the
other Arguments list).
- Around line 5-376: This command's full workflow should be canonicalized as a
skill and commands/ecc-guide.md turned into a shim: extract the detailed
workflow content out of commands/ecc-guide.md into a new skill at
skills/ecc-guide/SKILL.md (preserve headings, examples and usage), then modify
commands/ecc-guide.md to only delegate/redirect to that skill (keep the
/ecc-guide command entry but call the skills indexer/dynamic loader used by
indexer.js/projectIndex to read the SKILL.md and present a short compatibility
response). Ensure examples and interactive behavior remain identical when
served, and update any references in scripts/ecc-guide/indexer.js or
recommender.js to include the new skills/ecc-guide SKILL.md.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
f352037 to
c81b775
Compare
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
c81b775 to
ebaf27f
Compare
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
ebaf27f to
2c2e907
Compare
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
- Update command count from 79 to 80 in all documentation files - README.md (quick-start summary + parity table) - README.zh-CN.md (quick-start summary) - AGENTS.md (summary + project structure) - docs/zh-CN/README.md (comparison table + parity table) - docs/zh-CN/AGENTS.md (summary + project structure) - Add ecc-guide to agent.yaml commands list - Fix nested code fences in example sections (Example 3, 4) - Replace non-existent skill names with real ones: - git-worktrees → using-git-worktrees - typescript-patterns → frontend-patterns - golang-patterns → backend-patterns - Update troubleshooting example to be more generic - Remove non-existent /help command from Related Commands - Use $ARGUMENTS placeholder instead of [topic] per project convention
2c2e907 to
61b7c2e
Compare
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
CI Failure Analysis:
|
What Changed
Added a new
/ecc-guidecommand that provides interactive, conversational guidance for navigating the everything-claude-code project.Why This Change
Problem:
Solution:
A lightweight command that helps users:
Testing Done
/ecc-guidewith no arguments (interactive mode)/ecc-guide skills,/ecc-guide workflowsType of Change
feat:New featureSecurity & Quality Checklist
Documentation
Additional Notes
This is my first contribution to the project. Feedback welcome! 🙏
Summary by cubic
Adds a new
/ecc-guidecommand that launches an interactive, in-IDE guide for everything-claude-code. Improves discovery of skills, commands, rules, and workflows, and syncs docs to 80 commands and 182 skills.New Features
/ecc-guide $ARGUMENTSwith topics: setup, skills, commands, rules, workflows, examples; no args starts interactive mode./ecc-guide tdd-workflow) and search (find: "<query>") with context-aware answers.commands/ecc-guide.md(shim) andskills/ecc-guide/SKILL.md; registered the skill and command inagent.yaml.Bug Fixes
$ARGUMENTS; fixed nested code fences; removed/help.README.md,AGENTS.md,README.zh-CN.md,docs/zh-CN/README.md, anddocs/zh-CN/AGENTS.md.Written for commit 61b7c2e. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation