fe-debug
Use when generated code has runtime errors, test failures, or build issues that need systematic diagnosis.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- fe-debug
- description
- Use when generated code has runtime errors, test failures, or build issues that need systematic diagnosis.
- allowed-tools
- Read, Write, Edit, Glob, Grep, Bash, Agent
- argument-hint
- <feature-name>
- user-invocable
- true
03 SKILL.md 正文
Debug Skill
Resolves issues in generated code using a systematic 4-phase debugging methodology.
The debug session runs autonomously with its own hypothesis-test-fix cycle.
Conventions (fe-shared): ${CLAUDE_PLUGIN_ROOT}/skills/fe-shared/SKILL.md.
Instructions
Step 0: Read Configuration
- Read
.claude/frontend-react-plugin.json→ extractrouterMode,mockFirst,appDir,baseDir - If
baseDiris missing, use default value"src"; ifappDiris missing, use default value"."(project root) - If the file does not exist:
"Frontend React Plugin has not been initialized. Please run
/frontend-react-plugin:fe-initfirst."- Stop here.
- Derive
srcPath— take the configbaseDirafter its default is applied and remove the leading{appDir}/(app/src+appDir=app→src;appDir="."→ unchanged;appDir == baseDir→.). Everynpx …path argument usessrcPath; the repo-relative source root stays available for file operations. See fe-shared § Build Command Working Directory.
Step 1: Validate Files
-
Check if
docs/specs/{feature}/.implementation/frontend/plan.jsonexists- If not found:
"Implementation plan not found." "Please run
/frontend-react-plugin:fe-plan {feature}first."- Stop here.
- If not found:
-
Read
plan.json→ extractbaseDir,feature -
Read
docs/specs/{feature}/.progress/{feature}.json→ extractworkingLanguage(default:"en") andimplementation.status(save aspreviousStatusfor use in Step 5 guidance) -
Language name mapping:
en= English,ko= Korean,vi= Vietnamese
Communication language: All user-facing output in this skill (summaries, questions, feedback presentations, next-step guidance) must be in {workingLanguage_name}.
-
Generated files check — verify that the
baseDirdirectory exists:- If the directory does not exist:
"Generated code not found." "Please run
/frontend-react-plugin:fe-gen {feature}first."- Stop here.
Note: fe-debug intentionally does not check
implementation.status— it serves as an interrupt tool usable at any pipeline stage. The previous status is saved for context-aware guidance in Step 5. - If the directory does not exist:
Step 2: Collect Problem Description
Ask the user to describe the problem:
"Please describe the issue to debug:" "- Error message or stack trace" "- Related file path (if known)" "- Expected behavior vs actual behavior"
Collect the user's response as problemDescription.
Step 3: Launch Debugger Agent
Run the debugger agent:
Agent(subagent_type: "frontend-react-plugin:debugger", prompt: "
Debug the following issue in '{feature}'.
Parameters:
- feature: {feature}
- planFile: docs/specs/{feature}/.implementation/frontend/plan.json
- specDir: docs/specs/{feature}/{workingLanguage}/
- baseDir: {baseDir}/
- projectRoot: {cwd}
- appDir: {appDir}
- srcPath: {srcPath}
- problemDescription: {problemDescription}
- routerMode: {routerMode}
Follow the 4-phase methodology defined in agents/debugger.md.
Write the debug report to docs/specs/{feature}/.implementation/frontend/debug-report.json.
")
Step 4: Display Debug Report
Display the agent execution results.
Resolved:
Debug Report for '{feature}':
Status: RESOLVED
Classification: {issueClassification}
Root Cause:
File: {rootCause.file}:{rootCause.line}
Description: {rootCause.description}
Fix Applied:
{hypothesis description and fix}
Files Modified:
{list of modified files}
Verification:
TypeScript: {tsc result}
Build: {build result}
Tests: {test result}
Report saved to: docs/specs/{feature}/.implementation/frontend/debug-report.json
Escalated:
Debug Report for '{feature}':
Status: ESCALATED (3 hypotheses failed)
Problem: {problemDescription}
Hypotheses Tested:
1. {hypothesis 1} → {result}
2. {hypothesis 2} → {result}
3. {hypothesis 3} → {result}
Evidence Collected:
{evidence list}
Recommendation: {recommendation}
Report saved to: docs/specs/{feature}/.implementation/frontend/debug-report.json
Additional guidance on escalation:
"All 3 hypotheses failed — this may be a structural issue rather than a simple bug."
If previousStatus is review-failed or fixing:
"- Fix remaining review issues:
/frontend-react-plugin:fe-fix {feature}" "- Or re-plan if the issue is structural:/frontend-react-plugin:fe-plan {feature}"
Otherwise:
"- Consider re-reviewing the plan (
/frontend-react-plugin:fe-plan {feature}) or revising the spec."
"Refer to the evidence and structural analysis in the report."
Step 5: Next-Step Guidance
After resolution, read the previous implementation.status (before this debug session) and provide context-aware guidance:
| Previous Status | Guidance |
|---|---|
gen-failed |
> "Issue resolved. Re-run code generation: /frontend-react-plugin:fe-gen {feature}" |
generated |
> "Issue resolved. Continue pipeline: /frontend-react-plugin:fe-verify {feature}" |
verify-failed |
> "Issue resolved. Re-verify: /frontend-react-plugin:fe-verify {feature}" |
review-failed |
> "Issue resolved. Re-review: /frontend-react-plugin:fe-review {feature}, or fix remaining issues: /frontend-react-plugin:fe-fix {feature}" |
fixing |
> "Issue resolved. Re-review to verify fixes: /frontend-react-plugin:fe-review {feature}" |
escalated |
> "Issue resolved. Re-enter pipeline: /frontend-react-plugin:fe-fix {feature}, /frontend-react-plugin:fe-verify {feature}, or /frontend-react-plugin:fe-review {feature}" |
| Other / unknown | > "Issue resolved. Consider re-verifying (/frontend-react-plugin:fe-verify {feature}) or re-reviewing (/frontend-react-plugin:fe-review {feature})." |
If escalated:
"Manual intervention required. After resolving, re-enter the pipeline with
/frontend-react-plugin:fe-fix {feature},/frontend-react-plugin:fe-verify {feature}, or/frontend-react-plugin:fe-review {feature}."
Step 6: Update Progress
Read docs/specs/{feature}/.progress/{feature}.json and update implementation.status:
- resolved →
"resolved"(set status to"resolved") - escalated →
"escalated"(set status to"escalated")
{
"implementation": {
"status": "resolved | escalated",
"debug": {
"status": "resolved | escalated",
"timestamp": "{ISO timestamp}",
"reportFile": "docs/specs/{feature}/.implementation/frontend/debug-report.json"
}
}
}
Merge rule: Read the existing progress file, merge changes into the existing implementation object preserving all other fields (e.g., planFile, tddPhases, verification, review, fix), then write back the complete file.
04 同仓库更多 Skills
hp-shared
Shared conventions for every homepage-plugin agent and skill — stack, code conventions, state-file writes, check commands and how to report them. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.
fe-shared
Shared conventions for every frontend-react-plugin agent and skill — code conventions, state files and locks, accepted deviations, design principles, build working directory, router-mode command matrix, TypeScript check. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.
be-spring-shared
Shared conventions for every backend-springboot-plugin agent and skill — tech stack, CQRS architecture, naming, coding standards, TDD, commit and build rules, state files. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.
pp-translate
Use after directly editing the working language spec to sync changes to other supported languages.
pp-sync-stitch
Use when wireframes were manually edited on the Stitch website and need to be re-fetched to the local project.
pp-sync-notion
Use when a specification needs to be published or re-synced to Notion after finalization or manual edits.