Systematic bug fixing with direct code execution. Cross-references error with design flow to find root cause. Triggers: debug, fix, bugfix
Systematically fixes end-to-end bugs by executing code and cross-referencing errors with design documentation.
/plugin marketplace add samdae/archflow/plugin install archflow@archflow-marketplaceThis skill is limited to using the following tools:
Global Rules: Adheres to
rules/archflow-rules.md. Code Mapping#Rule: Always usemax(existing #) + 1for new rows. NEVER reuse deleted numbers.
Model: Try Sonnet first. For complex bugs (multi-file, flow analysis), use Opus.
Systematically fix bugs by combining direct code execution with documentation analysis.
Debug is for E2E issues, not unit test failures.
/test/debugCommon E2E issues: BE-FE mismatch, API contract violations, integration timing, environment-specific bugs.
| Tool | Alternative |
|---|---|
| Read/Grep | Request file path from user -> ask for copy-paste |
| AskQuestion | "Please select: 1) OptionA 2) OptionB 3) OptionC" format |
| Shell | Ask user to run commands and paste output |
docs/{serviceName}/
├── spec.md # Input (expected behavior)
├── arch-be.md # Input (flow, Code Mapping)
├── arch-fe.md # Input (flow, Code Mapping)
└── trace.md # Output (this skill produces)
Read from arch documents (Tech Stack section):
| Field | Source | Example |
|---|---|---|
| BE Path | arch-be.md -> Tech Stack -> BE Path | apps/auth-api |
| FE Path | arch-fe.md -> Tech Stack -> FE Path | apps/auth-web |
| Run Command (BE) | arch-be.md -> Tech Stack -> Run Command | uv run uvicorn main:app |
| Run Command (FE) | arch-fe.md -> Tech Stack -> Run Command | npm run dev |
Required Documents (
docs/{serviceName}/):
- spec.md (required), arch.md (required), trace.md (optional - created if absent)
{"title":"Start Bug Fix","questions":[{"id":"has_requirements","prompt":"Do you have a requirements document? (docs/{serviceName}/spec.md)","options":[{"id":"yes","label":"Yes - I will provide via @filepath"},{"id":"no","label":"No - I don't have it"}]},{"id":"has_design","prompt":"Do you have a design document? (docs/{serviceName}/arch.md)","options":[{"id":"yes","label":"Yes - I will provide via @filepath"},{"id":"no","label":"No - I don't have it"}]},{"id":"has_changelog","prompt":"Do you have a changelog? (docs/{serviceName}/trace.md)","options":[{"id":"yes","label":"Yes - I will provide via @filepath"},{"id":"no","label":"No - Will be created upon completion"}]}]}
Processing:
no -> General Debug (below)no -> Will create in Phase 3yes -> Request file paths -> Phase 1WARNING: Proceeding without documentation. Bug fixing uses only error log and code analysis. Cannot verify expected behavior or trace design flow.
General Debug Flow:
From file path: docs/alert/spec.md -> serviceName = "alert" -> Output: docs/alert/trace.md
Collect: error message, stack trace, variable state (if available).
"Please describe the error situation. If you have an error message or stack trace, please share it."
| Document | Extract |
|---|---|
| spec.md | Expected behavior, normal scenario |
| arch.md | Flow (call order), Code Mapping |
| trace.md | Recent changes (possible cause) |
Error Location (stack trace)
-> Check Code Mapping (which method)
-> Check requirements (expected behavior)
-> Identify mismatch
## Analysis Results
**Error Location**: {file}:{line} - {error message}
**Design Behavior**: {flow from design document}
**Expected Behavior**: {feature description from requirements}
**Recent Changes**: {possibly related recent changes}
**Estimated Cause**: {cause hypothesis}
**Items Requiring Verification**: {additional checks needed}
Confirm with user: "Is this analysis correct? If yes, I will proceed with the fix."
Read code at error location, verify exact problem point, decide fix direction.
Fix matching: requirements, design flow, existing code style.
Step 1: Read execution config from arch documents (BE/FE Path, Run Commands).
Step 2: Start E2E environment (Shell):
cd {BE Path} && {BE Run Command} &
# Wait for server ready (health check)
cd {FE Path} && {FE Run Command} # or: npm run test:e2e
Step 3: Verify fix:
| Result | Action |
|---|---|
| Success (no errors) | Proceed to Phase 3 |
| Same error | Re-analyze -> Return to 2-1 |
| New error | Analyze new error -> Return to 2-1 |
Tight feedback loop: See error -> Fix -> Re-run -> Confirm fix immediately.
WARNING: Must call trace skill after analysis/fix completion.
After fix: "Calling trace skill to record this session's results." Or guide: "Analysis complete. Would you like to record this in the changelog?"
# numbers)### Code Mapping Changes
| # | Feature | File | Class | Method | Action | Change | Synced |
|---|---------|------|-------|--------|--------|--------|--------|
| 3 | Auth | auth/svc.py | AuthSvc | validate() | Add null check | MODIFY | [ ] |
| 6 | Auth | auth/svc.py | AuthSvc | refresh() | Token refresh | ADD | [ ] |
This structured format enables sync skill to directly apply changes to arch.md
| Result Type | Content to Record |
|---|---|
| Code fix completed | Symptom, cause, fix content, design impact |
| External cause identified | Symptom, external cause, recommended action |
| Investigation ongoing/failed | Symptom, investigation content, next steps |
User can manually call: "trace" or "write changelog". Same session context will be used.
## Bug Fix Complete
### Analysis/Fix Summary
| Item | Content |
|------|---------|
| Symptom | {original bug symptom} |
| Cause | {identified cause} |
| Result Type | Code fix / External cause / Under investigation |
| Modified Files | {file list or "none"} |
### Test Method (if fixed)
1. {Verify with reproduction scenario}
2. {How to verify normal behavior}
### Recurrence Prevention (Required Checklist)
- [ ] Add tests (if applicable)
- [ ] Add guard/validation logic (if applicable)
- [ ] Add logging/monitoring (if applicable)
**Recurrence Probability**: High / Medium / Low
WARNING: Have you recorded this in the changelog? Call "trace" or "write changelog". External causes and investigation failures are also worth recording.
[spec] -> spec.md -> [arch] -> arch.md -> [build] -> Implementation
-> (Bug occurs) -> [debug] -> Analysis/fix
-> [trace] -> trace.md -> (design impact) -> [sync] -> arch.md
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.