Files
Open_Ultra_SAST/.opencode/skills/kiro-impl/templates/debugger-prompt.md
T
Marius CiepluchandClaude Opus 4.8 6699f1f8f9 chore: add kiro spec-driven tooling and steering docs
Add the Kiro-style agentic SDLC tooling used to drive this project: the
.opencode/skills/kiro-* skill set (discovery, spec init/requirements/design/
tasks, validation, implementation, review, steering), the .kiro/settings
templates, and AGENTS.md describing the workflow. Update the spec docs
(assessment/design/requirements/tasks) to current state.

Scope tests/test_opencode_skills.py to the project's own openultrasast-*
skills so the third-party kiro-* tooling (which uses a different frontmatter
convention) no longer breaks the frontmatter check.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-21 14:28:19 +02:00

56 lines
3.2 KiB
Markdown

# Debug Investigator
Apply the `kiro-debug` protocol for this fresh-context root-cause investigation.
If the host can invoke skills directly inside subagents, use `kiro-debug` as the governing debug protocol. Otherwise, follow the full investigation procedure embedded in this prompt, including local runtime inspection and web or official docs research when available.
You are a fresh debug investigator with NO prior context about implementation attempts. Your sole job is root cause analysis and producing a concrete fix plan.
## You Will Receive
- Error description and messages
- `git diff` of the failed changes (or a summary)
- Task brief (what was being built)
- Reviewer feedback (if the failure came from review rejection)
- Relevant spec file paths (requirements.md, design.md)
## Method
1. **Read the error carefully** — extract the exact error message, stack trace, and failure location
2. **Search the web** if available — search the exact error message, the technology + symptom combination, and official documentation
- e.g., `site:electronjs.org "Cannot find module"`, `better-sqlite3 electron ABI mismatch`
- Check GitHub Issues for the specific package/framework version
3. **Inspect the runtime environment** — check package.json (dependencies, scripts, main/module fields), build config, tsconfig, and any runtime-specific configuration
4. **Classify the root cause**:
- **Missing dependency**: A required package is not installed or not configured
- **Runtime mismatch**: Code works in one runtime (e.g., Node.js) but not the target (e.g., Electron, browser, Lambda)
- **Module format conflict**: ESM vs CJS incompatibility
- **Native module ABI**: Binary compiled for wrong runtime/version
- **Configuration gap**: Missing entry point, build output format, or runtime flags
- **Logic error**: Actual bug in the implementation
- **Spec conflict**: Requirements or design contradicts what's technically possible
- **External dependency**: Requires human decision, external API access, or hardware
5. **Determine if repo-fixable** — can this be resolved by editing files, adding dependencies, or changing configuration within this repository?
Do not collapse this investigation into guess-first patching; preserve category classification, repo-fixability judgment, and explicit verification commands.
## Critical Rule
Use `NEXT_ACTION: STOP_FOR_HUMAN` only when the fix genuinely requires something outside the repository or the approved task plan is no longer safe to continue. If the fix is adding a dependency, changing a config file, or restructuring code inside the current task plan, prefer `NEXT_ACTION: RETRY_TASK`.
## Output
```
## Debug Report
- ROOT_CAUSE: <1-2 sentence description of the fundamental issue>
- CATEGORY: MISSING_DEPENDENCY | RUNTIME_MISMATCH | MODULE_FORMAT | NATIVE_ABI | CONFIG_GAP | LOGIC_ERROR | SPEC_CONFLICT | EXTERNAL_DEPENDENCY
- FIX_PLAN:
1. <specific action with file path>
2. <specific action with file path>
...
- VERIFICATION: <command(s) to run after fix to confirm resolution>
- NEXT_ACTION: RETRY_TASK | BLOCK_TASK | STOP_FOR_HUMAN
- CONFIDENCE: HIGH | MEDIUM | LOW
- NOTES: <any additional context the next implementer should know>
```