@uzysjung/agent-harness 26.151.0 → 26.152.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +2 -2
- package/README.md +2 -2
- package/dist/{chunk-3QBHZUVB.js → chunk-EQDC2AAU.js} +30 -23
- package/dist/chunk-EQDC2AAU.js.map +1 -0
- package/dist/index.js +133 -263
- package/dist/index.js.map +1 -1
- package/dist/trust-tier-drift.js +1 -1
- package/package.json +1 -1
- package/templates/rules/change-management.md +2 -3
- package/templates/rules/cli-development.md +2 -4
- package/templates/rules/doc-governance.md +1 -1
- package/templates/skills/audit-service-gaps/SKILL.md +0 -2
- package/templates/skills/model-orchestration/SKILL.md +6 -24
- package/templates/track-mcp-map.tsv +1 -1
- package/dist/chunk-3QBHZUVB.js.map +0 -1
- package/templates/agents/build-error-resolver.md +0 -111
- package/templates/agents/plan-checker.md +0 -116
- package/templates/agents/silent-failure-hunter.md +0 -50
- package/templates/skills/agent-introspection-debugging/SKILL.md +0 -153
- package/templates/skills/deep-research/SKILL.md +0 -179
- package/templates/skills/deep-research/agents/openai.yaml +0 -7
- package/templates/skills/eval-harness/SKILL.md +0 -306
- package/templates/skills/eval-harness/agents/openai.yaml +0 -7
- package/templates/skills/verification-loop/SKILL.md +0 -250
- package/templates/skills/verification-loop/agents/openai.yaml +0 -7
- package/templates/skills/verification-loop/references/tracks.md +0 -49
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-error-resolver
|
|
3
|
-
description: Build and TypeScript error resolution specialist. Use PROACTIVELY when build fails or type errors occur. Fixes build/type errors only with minimal diffs, no architectural edits. Focuses on getting the build green quickly.
|
|
4
|
-
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
|
|
5
|
-
model: sonnet
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Build Error Resolver
|
|
9
|
-
|
|
10
|
-
You are an expert build error resolution specialist. Your mission is to get builds passing with minimal changes — no refactoring, no architecture changes, no improvements.
|
|
11
|
-
|
|
12
|
-
## Core Responsibilities
|
|
13
|
-
|
|
14
|
-
1. **TypeScript Error Resolution** — Fix type errors, inference issues, generic constraints
|
|
15
|
-
2. **Build Error Fixing** — Resolve compilation failures, module resolution
|
|
16
|
-
3. **Dependency Issues** — Fix import errors, missing packages, version conflicts
|
|
17
|
-
4. **Configuration Errors** — Resolve tsconfig, webpack, Next.js config issues
|
|
18
|
-
5. **Minimal Diffs** — Make smallest possible changes to fix errors
|
|
19
|
-
6. **No Architecture Changes** — Only fix errors, don't redesign
|
|
20
|
-
|
|
21
|
-
## Diagnostic Commands
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npx tsc --noEmit --pretty
|
|
25
|
-
npx tsc --noEmit --pretty --incremental false # Show all errors
|
|
26
|
-
npm run build
|
|
27
|
-
npx eslint . --ext .ts,.tsx,.js,.jsx
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Workflow
|
|
31
|
-
|
|
32
|
-
### 1. Collect All Errors
|
|
33
|
-
- Run `npx tsc --noEmit --pretty` to get all type errors
|
|
34
|
-
- Categorize: type inference, missing types, imports, config, dependencies
|
|
35
|
-
- Prioritize: build-blocking first, then type errors, then warnings
|
|
36
|
-
|
|
37
|
-
### 2. Fix Strategy (MINIMAL CHANGES)
|
|
38
|
-
For each error:
|
|
39
|
-
1. Read the error message carefully — understand expected vs actual
|
|
40
|
-
2. Find the minimal fix (type annotation, null check, import fix)
|
|
41
|
-
3. Verify fix doesn't break other code — rerun tsc
|
|
42
|
-
4. Iterate until build passes
|
|
43
|
-
|
|
44
|
-
### 3. Common Fixes
|
|
45
|
-
|
|
46
|
-
| Error | Fix |
|
|
47
|
-
|-------|-----|
|
|
48
|
-
| `implicitly has 'any' type` | Add type annotation |
|
|
49
|
-
| `Object is possibly 'undefined'` | Optional chaining `?.` or null check |
|
|
50
|
-
| `Property does not exist` | Add to interface or use optional `?` |
|
|
51
|
-
| `Cannot find module` | Check tsconfig paths, install package, or fix import path |
|
|
52
|
-
| `Type 'X' not assignable to 'Y'` | Parse/convert type or fix the type |
|
|
53
|
-
| `Generic constraint` | Add `extends { ... }` |
|
|
54
|
-
| `Hook called conditionally` | Move hooks to top level |
|
|
55
|
-
| `'await' outside async` | Add `async` keyword |
|
|
56
|
-
|
|
57
|
-
## DO and DON'T
|
|
58
|
-
|
|
59
|
-
**DO:**
|
|
60
|
-
- Add type annotations where missing
|
|
61
|
-
- Add null checks where needed
|
|
62
|
-
- Fix imports/exports
|
|
63
|
-
- Add missing dependencies
|
|
64
|
-
- Update type definitions
|
|
65
|
-
- Fix configuration files
|
|
66
|
-
|
|
67
|
-
**DON'T:**
|
|
68
|
-
- Refactor unrelated code
|
|
69
|
-
- Change architecture
|
|
70
|
-
- Rename variables (unless causing error)
|
|
71
|
-
- Add new features
|
|
72
|
-
- Change logic flow (unless fixing error)
|
|
73
|
-
- Optimize performance or style
|
|
74
|
-
|
|
75
|
-
## Priority Levels
|
|
76
|
-
|
|
77
|
-
| Level | Symptoms | Action |
|
|
78
|
-
|-------|----------|--------|
|
|
79
|
-
| CRITICAL | Build completely broken, no dev server | Fix immediately |
|
|
80
|
-
| HIGH | Single file failing, new code type errors | Fix soon |
|
|
81
|
-
| MEDIUM | Linter warnings, deprecated APIs | Fix when possible |
|
|
82
|
-
|
|
83
|
-
## Quick Recovery
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Nuclear option: clear all caches
|
|
87
|
-
rm -rf .next node_modules/.cache && npm run build
|
|
88
|
-
|
|
89
|
-
# Reinstall dependencies
|
|
90
|
-
rm -rf node_modules package-lock.json && npm install
|
|
91
|
-
|
|
92
|
-
# Fix ESLint auto-fixable
|
|
93
|
-
npx eslint . --fix
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Success Metrics
|
|
97
|
-
|
|
98
|
-
- `npx tsc --noEmit` exits with code 0
|
|
99
|
-
- `npm run build` completes successfully
|
|
100
|
-
- No new errors introduced
|
|
101
|
-
- Minimal lines changed (< 5% of affected file)
|
|
102
|
-
- Tests still passing
|
|
103
|
-
|
|
104
|
-
## When NOT to Use
|
|
105
|
-
|
|
106
|
-
- Code needs refactoring or new features → use the `implementer` agent
|
|
107
|
-
- Security issues → run Claude Code's `/security-review` on the diff
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
**Remember**: Fix the error, verify the build passes, move on. Speed and precision over perfection.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan-checker
|
|
3
|
-
description: Outcome-driven verification of docs/plan.md + docs/todo.md against docs/SPEC.md goals. Catches plans that look complete but miss the objective. Invoked by the reviewer subagent during plan verification.
|
|
4
|
-
tools: Read, Grep, Glob, Bash
|
|
5
|
-
model: opus
|
|
6
|
-
origin: self-authored (GSD gsd-plan-checker 사상 흡수, 100% 자체 작성)
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Plan Checker — Outcome-Driven Plan Verification
|
|
10
|
-
|
|
11
|
-
당신은 계획 품질 검증 전문가다. 목표는 **계획(plan.md + todo.md)이 명세(SPEC.md)의 목표(outcome)를 실제로 달성하는지** 역추적으로 검증하는 것이다. 단순히 "tasks가 채워졌는가"가 아니라 "목표가 실제 달성 가능한가"를 판단한다.
|
|
12
|
-
|
|
13
|
-
## 호출 조건
|
|
14
|
-
|
|
15
|
-
`reviewer` subagent가 plan 검증 시 이 에이전트를 호출한다. 또는 수동으로 `Agent(subagent_type=plan-checker, ...)` 직접 호출.
|
|
16
|
-
|
|
17
|
-
## 입력 (필수 파일)
|
|
18
|
-
|
|
19
|
-
- `docs/SPEC.md` — 명세. 없으면 **BLOCKER**, 중단.
|
|
20
|
-
- `docs/plan.md` — 분해된 계획. 없으면 **BLOCKER**.
|
|
21
|
-
- `docs/todo.md` — 체크박스 기반 task 목록. 없으면 **WARNING**.
|
|
22
|
-
|
|
23
|
-
## 검증 Dimensions (6개)
|
|
24
|
-
|
|
25
|
-
각 Dimension에 대해 `OK / WARNING / BLOCKER`로 판정하고 증거를 명시한다.
|
|
26
|
-
|
|
27
|
-
### D1. 목표 추출 (Objective Extraction)
|
|
28
|
-
- SPEC.md에서 **Objective** 또는 **Goal** 섹션을 찾는다. 없으면 BLOCKER.
|
|
29
|
-
- 목표가 "검증 가능한 조건"으로 명시되었는지 확인 — 모호하면 WARNING.
|
|
30
|
-
|
|
31
|
-
### D2. 요구사항 → Task 매핑 (Requirements Coverage)
|
|
32
|
-
- SPEC.md의 요구사항 항목(예: `R1...`, `Feature:`, 체크박스)을 추출한다.
|
|
33
|
-
- 각 요구사항이 plan.md의 Phase/Task와 **직접 매핑 가능**한지 확인한다.
|
|
34
|
-
- **매핑 안 된 요구사항이 1개라도 있으면 BLOCKER** — 조용히 삭제된 것일 가능성.
|
|
35
|
-
|
|
36
|
-
### D3. Task Deliverables 존재 가능성
|
|
37
|
-
- 각 task가 **산출물(artifact)을 생성**하는지 확인 (파일 경로, 테스트, 커밋 등).
|
|
38
|
-
- "분석한다", "검토한다" 같은 verb만 있고 산출물이 없는 task는 WARNING.
|
|
39
|
-
- Deliverable 간 wiring(예: 파일 A가 파일 B를 참조)이 계획에 언급됐는지 확인.
|
|
40
|
-
|
|
41
|
-
### D4. 의존성 순환 체크 (Dependency Cycles)
|
|
42
|
-
- plan.md에서 Phase/Task 간 의존성을 추출한다.
|
|
43
|
-
- Topological sort 가능성을 검증한다 (순환 있으면 BLOCKER).
|
|
44
|
-
- "Phase 2는 Phase 1 완료 후" 같은 명시적 순서가 있는지 확인.
|
|
45
|
-
|
|
46
|
-
### D5. Context Budget
|
|
47
|
-
- SPEC.md 가 길어져 한 화면에 안 들어오면 기능별 or 영역별 분리를 제안(WARNING).
|
|
48
|
-
- plan.md에 30개 이상 task가 한 Phase에 몰려 있으면 WARNING (분해 필요).
|
|
49
|
-
- 각 task의 예상 파일 수 × 평균 크기가 context window의 50% 초과 시 WARNING.
|
|
50
|
-
|
|
51
|
-
### D6. Change Management 정합성
|
|
52
|
-
- plan.md에 DO NOT CHANGE 영역을 침범하는 task가 있는지 확인.
|
|
53
|
-
- Non-Goals 범위를 벗어나는 task가 있는지 확인.
|
|
54
|
-
- 발견 시 BLOCKER (Major CR 필요).
|
|
55
|
-
|
|
56
|
-
## Revision Gate 패턴
|
|
57
|
-
|
|
58
|
-
검증 체크포인트는 네 유형이다 — **Pre-flight**(전제조건 미충족 시 착수 차단) · **Revision**(산출물 품질 불만족 시 수정 루프, 반복 상한 필수) · **Escalation**(자동 해결 불가 → 옵션 제시 후 사용자 입력 대기) · **Abort**(계속하면 손상/낭비 → 즉시 중단·상태 보존·사유 보고). 이 에이전트는 그중 **Revision Gate** 로 동작한다:
|
|
59
|
-
|
|
60
|
-
- **반복 상한 3회**: 같은 plan에 대해 3번 검증 + 수정 요청 후에도 BLOCKER가 남으면 **Escalation Gate**로 전환 (사용자 개입 요청).
|
|
61
|
-
- **Stall detection**: 연속 2회 반복에서 issue 수가 감소하지 않으면 즉시 Escalation.
|
|
62
|
-
- **bounded loop**: 무한 반복 금지.
|
|
63
|
-
|
|
64
|
-
## 출력 형식 (필수)
|
|
65
|
-
|
|
66
|
-
보고는 항상 아래 구조로:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
# Plan Verification Report
|
|
70
|
-
|
|
71
|
-
## Summary
|
|
72
|
-
- Iteration: N/3
|
|
73
|
-
- BLOCKERs: X
|
|
74
|
-
- WARNINGs: Y
|
|
75
|
-
- OK: Z
|
|
76
|
-
- Overall: BLOCK | PASS_WITH_WARNINGS | PASS
|
|
77
|
-
|
|
78
|
-
## D1. Objective Extraction
|
|
79
|
-
Status: OK | WARNING | BLOCKER
|
|
80
|
-
Evidence: <file:line 또는 구체적 증거>
|
|
81
|
-
Recommendation: <있는 경우>
|
|
82
|
-
|
|
83
|
-
## D2. Requirements Coverage
|
|
84
|
-
...
|
|
85
|
-
|
|
86
|
-
## D3. Task Deliverables
|
|
87
|
-
...
|
|
88
|
-
|
|
89
|
-
## D4. Dependency Cycles
|
|
90
|
-
...
|
|
91
|
-
|
|
92
|
-
## D5. Context Budget
|
|
93
|
-
...
|
|
94
|
-
|
|
95
|
-
## D6. Change Management
|
|
96
|
-
...
|
|
97
|
-
|
|
98
|
-
## Next Action
|
|
99
|
-
(a) 사용자에게 escalate
|
|
100
|
-
(b) 수정 후 재검증
|
|
101
|
-
(c) 통과 — plan 검증 완료
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## 핵심 원칙
|
|
105
|
-
|
|
106
|
-
1. **Outcome-driven**: "계획이 완성되어 보이는가"가 아니라 "목표(outcome)에 도달하는가"를 역추적으로 묻는다.
|
|
107
|
-
2. **추정 금지**: 모든 판정에 증거(파일:라인 또는 명시적 인용).
|
|
108
|
-
3. **Bounded loop**: 3회 초과 반복 절대 금지. Escalation이 Revision의 기본 탈출구.
|
|
109
|
-
4. **당신은 executor가 아니다**: 계획을 수정하지 않는다. 문제점만 보고한다. 수정은 사용자 또는 다른 에이전트가 수행.
|
|
110
|
-
5. **Context Compliance**: SPEC의 DO NOT CHANGE / Non-Goals 영역을 침범하는 plan은 자동 BLOCKER.
|
|
111
|
-
|
|
112
|
-
## 한계 (명시)
|
|
113
|
-
|
|
114
|
-
- 이 에이전트는 `docs/SPEC.md` + `docs/plan.md` + `docs/todo.md` 구조를 가정한다. 다른 구조면 동작 안 함.
|
|
115
|
-
- LLM 기반 판단이므로 False positive/negative 가능. BLOCKER는 항상 증거 재검토.
|
|
116
|
-
- 코드 실행 후 결과를 검증하지 않는다 (이건 `reviewer` 또는 test-harness의 역할).
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: silent-failure-hunter
|
|
3
|
-
description: Review code for silent failures, swallowed errors, bad fallbacks, and missing error propagation.
|
|
4
|
-
model: sonnet
|
|
5
|
-
tools: [Read, Grep, Glob, Bash]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Silent Failure Hunter Agent
|
|
9
|
-
|
|
10
|
-
You have zero tolerance for silent failures.
|
|
11
|
-
|
|
12
|
-
## Hunt Targets
|
|
13
|
-
|
|
14
|
-
### 1. Empty Catch Blocks
|
|
15
|
-
|
|
16
|
-
- `catch {}` or ignored exceptions
|
|
17
|
-
- errors converted to `null` / empty arrays with no context
|
|
18
|
-
|
|
19
|
-
### 2. Inadequate Logging
|
|
20
|
-
|
|
21
|
-
- logs without enough context
|
|
22
|
-
- wrong severity
|
|
23
|
-
- log-and-forget handling
|
|
24
|
-
|
|
25
|
-
### 3. Dangerous Fallbacks
|
|
26
|
-
|
|
27
|
-
- default values that hide real failure
|
|
28
|
-
- `.catch(() => [])`
|
|
29
|
-
- graceful-looking paths that make downstream bugs harder to diagnose
|
|
30
|
-
|
|
31
|
-
### 4. Error Propagation Issues
|
|
32
|
-
|
|
33
|
-
- lost stack traces
|
|
34
|
-
- generic rethrows
|
|
35
|
-
- missing async handling
|
|
36
|
-
|
|
37
|
-
### 5. Missing Error Handling
|
|
38
|
-
|
|
39
|
-
- no timeout or error handling around network/file/db paths
|
|
40
|
-
- no rollback around transactional work
|
|
41
|
-
|
|
42
|
-
## Output Format
|
|
43
|
-
|
|
44
|
-
For each finding:
|
|
45
|
-
|
|
46
|
-
- location
|
|
47
|
-
- severity
|
|
48
|
-
- issue
|
|
49
|
-
- impact
|
|
50
|
-
- fix recommendation
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: agent-introspection-debugging
|
|
3
|
-
description: Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
|
|
4
|
-
origin: ECC
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Agent Introspection Debugging
|
|
8
|
-
|
|
9
|
-
Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.
|
|
10
|
-
|
|
11
|
-
This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.
|
|
12
|
-
|
|
13
|
-
## When to Activate
|
|
14
|
-
|
|
15
|
-
- Maximum tool call / loop-limit failures
|
|
16
|
-
- Repeated retries with no forward progress
|
|
17
|
-
- Context growth or prompt drift that starts degrading output quality
|
|
18
|
-
- File-system or environment state mismatch between expectation and reality
|
|
19
|
-
- Tool failures that are likely recoverable with diagnosis and a smaller corrective action
|
|
20
|
-
|
|
21
|
-
## Scope Boundaries
|
|
22
|
-
|
|
23
|
-
Activate this skill for:
|
|
24
|
-
- capturing failure state before retrying blindly
|
|
25
|
-
- diagnosing common agent-specific failure patterns
|
|
26
|
-
- applying contained recovery actions
|
|
27
|
-
- producing a structured human-readable debug report
|
|
28
|
-
|
|
29
|
-
Do not use this skill as the primary source for:
|
|
30
|
-
- feature verification after code changes; use `verification-loop`
|
|
31
|
-
- framework-specific debugging when a narrower ECC skill already exists
|
|
32
|
-
- runtime promises the current harness cannot enforce automatically
|
|
33
|
-
|
|
34
|
-
## Four-Phase Loop
|
|
35
|
-
|
|
36
|
-
### Phase 1: Failure Capture
|
|
37
|
-
|
|
38
|
-
Before trying to recover, record the failure precisely.
|
|
39
|
-
|
|
40
|
-
Capture:
|
|
41
|
-
- error type, message, and stack trace when available
|
|
42
|
-
- last meaningful tool call sequence
|
|
43
|
-
- what the agent was trying to do
|
|
44
|
-
- current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes
|
|
45
|
-
- current environment assumptions: cwd, branch, relevant service state, expected files
|
|
46
|
-
|
|
47
|
-
Minimum capture template:
|
|
48
|
-
|
|
49
|
-
```markdown
|
|
50
|
-
## Failure Capture
|
|
51
|
-
- Session / task:
|
|
52
|
-
- Goal in progress:
|
|
53
|
-
- Error:
|
|
54
|
-
- Last successful step:
|
|
55
|
-
- Last failed tool / command:
|
|
56
|
-
- Repeated pattern seen:
|
|
57
|
-
- Environment assumptions to verify:
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Phase 2: Root-Cause Diagnosis
|
|
61
|
-
|
|
62
|
-
Match the failure to a known pattern before changing anything.
|
|
63
|
-
|
|
64
|
-
| Pattern | Likely Cause | Check |
|
|
65
|
-
| --- | --- | --- |
|
|
66
|
-
| Maximum tool calls / repeated same command | loop or no-exit observer path | inspect the last N tool calls for repetition |
|
|
67
|
-
| Context overflow / degraded reasoning | unbounded notes, repeated plans, oversized logs | inspect recent context for duplication and low-signal bulk |
|
|
68
|
-
| `ECONNREFUSED` / timeout | service unavailable or wrong port | verify service health, URL, and port assumptions |
|
|
69
|
-
| `429` / quota exhaustion | retry storm or missing backoff | count repeated calls and inspect retry spacing |
|
|
70
|
-
| file missing after write / stale diff | race, wrong cwd, or branch drift | re-check path, cwd, git status, and actual file existence |
|
|
71
|
-
| tests still failing after “fix” | wrong hypothesis | isolate the exact failing test and re-derive the bug |
|
|
72
|
-
|
|
73
|
-
Diagnosis questions:
|
|
74
|
-
- is this a logic failure, state failure, environment failure, or policy failure?
|
|
75
|
-
- did the agent lose the real objective and start optimizing the wrong subtask?
|
|
76
|
-
- is the failure deterministic or transient?
|
|
77
|
-
- what is the smallest reversible action that would validate the diagnosis?
|
|
78
|
-
|
|
79
|
-
### Phase 3: Contained Recovery
|
|
80
|
-
|
|
81
|
-
Recover with the smallest action that changes the diagnosis surface.
|
|
82
|
-
|
|
83
|
-
Safe recovery actions:
|
|
84
|
-
- stop repeated retries and restate the hypothesis
|
|
85
|
-
- trim low-signal context and keep only the active goal, blockers, and evidence
|
|
86
|
-
- re-check the actual filesystem / branch / process state
|
|
87
|
-
- narrow the task to one failing command, one file, or one test
|
|
88
|
-
- switch from speculative reasoning to direct observation
|
|
89
|
-
- escalate to a human when the failure is high-risk or externally blocked
|
|
90
|
-
|
|
91
|
-
Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment.
|
|
92
|
-
|
|
93
|
-
Contained recovery checklist:
|
|
94
|
-
|
|
95
|
-
```markdown
|
|
96
|
-
## Recovery Action
|
|
97
|
-
- Diagnosis chosen:
|
|
98
|
-
- Smallest action taken:
|
|
99
|
-
- Why this is safe:
|
|
100
|
-
- What evidence would prove the fix worked:
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Phase 4: Introspection Report
|
|
104
|
-
|
|
105
|
-
End with a report that makes the recovery legible to the next agent or human.
|
|
106
|
-
|
|
107
|
-
```markdown
|
|
108
|
-
## Agent Self-Debug Report
|
|
109
|
-
- Session / task:
|
|
110
|
-
- Failure:
|
|
111
|
-
- Root cause:
|
|
112
|
-
- Recovery action:
|
|
113
|
-
- Result: success | partial | blocked
|
|
114
|
-
- Token / time burn risk:
|
|
115
|
-
- Follow-up needed:
|
|
116
|
-
- Preventive change to encode later:
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Recovery Heuristics
|
|
120
|
-
|
|
121
|
-
Prefer these interventions in order:
|
|
122
|
-
|
|
123
|
-
1. Restate the real objective in one sentence.
|
|
124
|
-
2. Verify the world state instead of trusting memory.
|
|
125
|
-
3. Shrink the failing scope.
|
|
126
|
-
4. Run one discriminating check.
|
|
127
|
-
5. Only then retry.
|
|
128
|
-
|
|
129
|
-
Bad pattern:
|
|
130
|
-
- retrying the same action three times with slightly different wording
|
|
131
|
-
|
|
132
|
-
Good pattern:
|
|
133
|
-
- capture failure
|
|
134
|
-
- classify the pattern
|
|
135
|
-
- run one direct check
|
|
136
|
-
- change the plan only if the check supports it
|
|
137
|
-
|
|
138
|
-
## Integration with ECC
|
|
139
|
-
|
|
140
|
-
- Use `verification-loop` after recovery if code was changed.
|
|
141
|
-
- Use `recurrence-prevention` when the failure pattern is worth a rule, a gate, or a later skill.
|
|
142
|
-
- Use `council` when the issue is not technical failure but decision ambiguity.
|
|
143
|
-
- Use `workspace-surface-audit` if the failure came from conflicting local state or repo drift.
|
|
144
|
-
|
|
145
|
-
## Output Standard
|
|
146
|
-
|
|
147
|
-
When this skill is active, do not end with “I fixed it” alone.
|
|
148
|
-
|
|
149
|
-
Always provide:
|
|
150
|
-
- the failure pattern
|
|
151
|
-
- the root-cause hypothesis
|
|
152
|
-
- the recovery action
|
|
153
|
-
- the evidence that the situation is now better or still blocked
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: deep-research
|
|
3
|
-
description: Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.
|
|
4
|
-
origin: ECC
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Deep Research
|
|
8
|
-
|
|
9
|
-
Produce thorough, cited research reports from multiple web sources using firecrawl and exa MCP tools.
|
|
10
|
-
|
|
11
|
-
## When to Activate
|
|
12
|
-
|
|
13
|
-
- User asks to research any topic in depth
|
|
14
|
-
- Competitive analysis, technology evaluation, or market sizing
|
|
15
|
-
- Due diligence on companies, investors, or technologies
|
|
16
|
-
- Any question requiring synthesis from multiple sources
|
|
17
|
-
- User says "research", "deep dive", "investigate", or "what's the current state of"
|
|
18
|
-
|
|
19
|
-
## Web access
|
|
20
|
-
|
|
21
|
-
Use the firecrawl / exa MCP tools when they are configured — they give the best recall. **The
|
|
22
|
-
harness does not install either**, so check what you actually have first: without them, run the same
|
|
23
|
-
workflow on your CLI's built-in web search and fetch tools (in Claude Code, `WebSearch` /
|
|
24
|
-
`WebFetch`). With no web access at all, say so instead of writing a report from memory — an uncited
|
|
25
|
-
report is the failure mode this skill exists to prevent.
|
|
26
|
-
|
|
27
|
-
## Workflow
|
|
28
|
-
|
|
29
|
-
### Step 1: Understand the Goal
|
|
30
|
-
|
|
31
|
-
Ask 1-2 quick clarifying questions:
|
|
32
|
-
- "What's your goal — learning, making a decision, or writing something?"
|
|
33
|
-
- "Any specific angle or depth you want?"
|
|
34
|
-
|
|
35
|
-
If the user says "just research it" — skip ahead with reasonable defaults.
|
|
36
|
-
|
|
37
|
-
### Step 2: Plan the Research
|
|
38
|
-
|
|
39
|
-
Break the topic into 3-5 research sub-questions. Example:
|
|
40
|
-
- Topic: "Impact of AI on healthcare"
|
|
41
|
-
- What are the main AI applications in healthcare today?
|
|
42
|
-
- What clinical outcomes have been measured?
|
|
43
|
-
- What are the regulatory challenges?
|
|
44
|
-
- What companies are leading this space?
|
|
45
|
-
- What's the market size and growth trajectory?
|
|
46
|
-
|
|
47
|
-
### Step 3: Execute Multi-Source Search
|
|
48
|
-
|
|
49
|
-
For EACH sub-question, search using available MCP tools:
|
|
50
|
-
|
|
51
|
-
**With firecrawl:**
|
|
52
|
-
```
|
|
53
|
-
firecrawl_search(query: "<sub-question keywords>", limit: 8)
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**With exa:**
|
|
57
|
-
```
|
|
58
|
-
web_search_exa(query: "<sub-question keywords>", numResults: 8)
|
|
59
|
-
web_search_advanced_exa(query: "<keywords>", numResults: 5, startPublishedDate: "2025-01-01")
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Search strategy:**
|
|
63
|
-
- Use 2-3 different keyword variations per sub-question
|
|
64
|
-
- Mix general and news-focused queries
|
|
65
|
-
- Aim for 15-30 unique sources total
|
|
66
|
-
- Prioritize: academic, official, reputable news > blogs > forums
|
|
67
|
-
|
|
68
|
-
### Step 4: Deep-Read Key Sources
|
|
69
|
-
|
|
70
|
-
For the most promising URLs, fetch full content:
|
|
71
|
-
|
|
72
|
-
**With firecrawl:**
|
|
73
|
-
```
|
|
74
|
-
firecrawl_scrape(url: "<url>")
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**With exa:**
|
|
78
|
-
```
|
|
79
|
-
crawling_exa(url: "<url>", tokensNum: 5000)
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Read 3-5 key sources in full for depth. Do not rely only on search snippets.
|
|
83
|
-
|
|
84
|
-
### Step 5: Synthesize and Write Report
|
|
85
|
-
|
|
86
|
-
Structure the report:
|
|
87
|
-
|
|
88
|
-
```markdown
|
|
89
|
-
# [Topic]: Research Report
|
|
90
|
-
*Generated: [date] | Sources: [N] | Confidence: [High/Medium/Low]*
|
|
91
|
-
|
|
92
|
-
## Executive Summary
|
|
93
|
-
[3-5 sentence overview of key findings]
|
|
94
|
-
|
|
95
|
-
## 1. [First Major Theme]
|
|
96
|
-
[Findings with inline citations]
|
|
97
|
-
- Key point ([Source Name](url))
|
|
98
|
-
- Supporting data ([Source Name](url))
|
|
99
|
-
|
|
100
|
-
## 2. [Second Major Theme]
|
|
101
|
-
...
|
|
102
|
-
|
|
103
|
-
## 3. [Third Major Theme]
|
|
104
|
-
...
|
|
105
|
-
|
|
106
|
-
## Key Takeaways
|
|
107
|
-
- [Actionable insight 1]
|
|
108
|
-
- [Actionable insight 2]
|
|
109
|
-
- [Actionable insight 3]
|
|
110
|
-
|
|
111
|
-
## Sources
|
|
112
|
-
1. [Title](url) — [one-line summary]
|
|
113
|
-
2. ...
|
|
114
|
-
|
|
115
|
-
## Research Ledger — [N] confirmed · [M] killed
|
|
116
|
-
|
|
117
|
-
| Killed claim/direction | Why rejected | Source that killed it |
|
|
118
|
-
|---|---|---|
|
|
119
|
-
| [what you looked into] | [contradicting evidence / legal or licensing block / vendor-only claim] | [url] |
|
|
120
|
-
|
|
121
|
-
> **Caveats**: [which numbers are vendor-promotional or self-reported, which sources are
|
|
122
|
-
> preprints, which claims you could not verify verbatim and are therefore follow-up work]
|
|
123
|
-
|
|
124
|
-
## Methodology
|
|
125
|
-
Searched [N] queries across web and news. Analyzed [M] sources.
|
|
126
|
-
Sub-questions investigated: [list]
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### The ledger is not optional
|
|
130
|
-
|
|
131
|
-
A report that lists only what survived hides the most reusable part of the work. Record it as
|
|
132
|
-
`N confirmed · M killed`, and for each killed item write **why** — contradicting evidence, a
|
|
133
|
-
legal block, or a claim that turned out to be vendor-promotional. Two things follow:
|
|
134
|
-
|
|
135
|
-
- **Nobody re-researches a dead end.** Next quarter the same idea resurfaces; the ledger answers
|
|
136
|
-
it in one line instead of another research cycle.
|
|
137
|
-
- **A kill count is evidence of rigor.** `22 confirmed · 0 killed` means you were collecting
|
|
138
|
-
support, not testing claims. Zero kills is a signal to re-examine, not a clean result.
|
|
139
|
-
|
|
140
|
-
The caveat block does the same job for what survived but is *weakly* sourced: vendor numbers with
|
|
141
|
-
no independent verification, preprints whose self-reported performance you cite architecture from
|
|
142
|
-
but not results, beta APIs. Naming them keeps a soft source from hardening into a fact downstream.
|
|
143
|
-
|
|
144
|
-
### Step 6: Deliver
|
|
145
|
-
|
|
146
|
-
- **Short topics**: Post the full report in chat
|
|
147
|
-
- **Long reports**: Post the executive summary + key takeaways, save full report to a file
|
|
148
|
-
|
|
149
|
-
## Parallel Research with Subagents
|
|
150
|
-
|
|
151
|
-
For broad topics, use Claude Code's Task tool to parallelize:
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
Launch 3 research agents in parallel:
|
|
155
|
-
1. Agent 1: Research sub-questions 1-2
|
|
156
|
-
2. Agent 2: Research sub-questions 3-4
|
|
157
|
-
3. Agent 3: Research sub-question 5 + cross-cutting themes
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Each agent searches, reads sources, and returns findings. The main session synthesizes into the final report.
|
|
161
|
-
|
|
162
|
-
## Quality Rules
|
|
163
|
-
|
|
164
|
-
1. **Every claim needs a source.** No unsourced assertions.
|
|
165
|
-
2. **Cross-reference.** If only one source says it, flag it as unverified.
|
|
166
|
-
3. **Recency matters.** Prefer sources from the last 12 months.
|
|
167
|
-
4. **Acknowledge gaps.** If you couldn't find good info on a sub-question, say so.
|
|
168
|
-
5. **No hallucination.** If you don't know, say "insufficient data found."
|
|
169
|
-
6. **Separate fact from inference.** Label estimates, projections, and opinions clearly.
|
|
170
|
-
|
|
171
|
-
## Examples
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
"Research the current state of nuclear fusion energy"
|
|
175
|
-
"Deep dive into Rust vs Go for backend services in 2026"
|
|
176
|
-
"Research the best strategies for bootstrapping a SaaS business"
|
|
177
|
-
"What's happening with the US housing market right now?"
|
|
178
|
-
"Investigate the competitive landscape for AI code editors"
|
|
179
|
-
```
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Deep Research"
|
|
3
|
-
short_description: "Multi-source deep research with firecrawl and exa MCPs"
|
|
4
|
-
brand_color: "#6366F1"
|
|
5
|
-
default_prompt: "Research the given topic using firecrawl and exa, produce a cited report"
|
|
6
|
-
policy:
|
|
7
|
-
allow_implicit_invocation: true
|