opencastle 1.4.3 → 1.5.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/dist/cli/bootstrap-on-init.test.js +5 -5
- package/dist/cli/bootstrap-on-init.test.js.map +1 -1
- package/dist/cli/bootstrap.d.ts +17 -0
- package/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +284 -312
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/bootstrap.test.js +22 -16
- package/dist/cli/bootstrap.test.js.map +1 -1
- package/dist/cli/convoy/engine.d.ts.map +1 -1
- package/dist/cli/convoy/engine.js +8 -2
- package/dist/cli/convoy/engine.js.map +1 -1
- package/dist/cli/detect.d.ts +4 -0
- package/dist/cli/detect.d.ts.map +1 -1
- package/dist/cli/detect.js +1 -1
- package/dist/cli/detect.js.map +1 -1
- package/dist/cli/doctor.js +4 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/init.test.js +4 -5
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/log.d.ts +2 -2
- package/dist/cli/log.d.ts.map +1 -1
- package/dist/cli/log.js +1 -1
- package/dist/cli/log.js.map +1 -1
- package/dist/cli/log.test.js +1 -1
- package/dist/cli/log.test.js.map +1 -1
- package/dist/cli/managed-paths.d.ts +1 -1
- package/dist/cli/managed-paths.d.ts.map +1 -1
- package/dist/cli/managed-paths.js +0 -1
- package/dist/cli/managed-paths.js.map +1 -1
- package/dist/cli/project-facts.d.ts +103 -0
- package/dist/cli/project-facts.d.ts.map +1 -0
- package/dist/cli/project-facts.js +577 -0
- package/dist/cli/project-facts.js.map +1 -0
- package/dist/cli/project-facts.test.d.ts +2 -0
- package/dist/cli/project-facts.test.d.ts.map +1 -0
- package/dist/cli/project-facts.test.js +209 -0
- package/dist/cli/project-facts.test.js.map +1 -0
- package/dist/cli/stack-config.js +1 -1
- package/dist/cli/stack-config.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/bootstrap-on-init.test.ts +5 -5
- package/src/cli/bootstrap.test.ts +22 -16
- package/src/cli/bootstrap.ts +361 -373
- package/src/cli/convoy/engine.ts +9 -2
- package/src/cli/detect.ts +1 -1
- package/src/cli/doctor.ts +4 -4
- package/src/cli/init.test.ts +4 -5
- package/src/cli/log.test.ts +1 -1
- package/src/cli/log.ts +2 -2
- package/src/cli/managed-paths.ts +0 -1
- package/src/cli/project-facts.test.ts +228 -0
- package/src/cli/project-facts.ts +647 -0
- package/src/cli/stack-config.ts +1 -1
- package/src/orchestrator/agent-workflows/data-pipeline.md +2 -2
- package/src/orchestrator/agent-workflows/feature-implementation.md +1 -1
- package/src/orchestrator/agent-workflows/schema-changes.md +1 -1
- package/src/orchestrator/agents/team-lead.agent.md +1 -1
- package/src/orchestrator/customizations/README.md +27 -84
- package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +38 -238
- package/src/orchestrator/prompts/brainstorm.prompt.md +1 -1
- package/src/orchestrator/prompts/implement-feature.prompt.md +6 -6
- package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +1 -1
- package/src/orchestrator/skills/agent-memory/SKILL.md +7 -16
- package/src/orchestrator/skills/documentation-standards/SKILL.md +1 -1
- package/src/orchestrator/skills/observability-logging/SKILL.md +1 -1
- package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +1 -1
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +2 -2
- package/src/orchestrator/customizations/AGENT-EXPERTISE.md +0 -325
- package/src/orchestrator/customizations/AGENT-FAILURES.md +0 -69
- package/src/orchestrator/customizations/AGENT-PERFORMANCE.md +0 -55
- package/src/orchestrator/customizations/DISPUTES.md +0 -162
- package/src/orchestrator/customizations/KNOWLEDGE-GRAPH.md +0 -10
- package/src/orchestrator/customizations/agents/skill-matrix.md +0 -111
- package/src/orchestrator/customizations/logs/events.ndjson +0 -0
- package/src/orchestrator/customizations/project/decisions.md +0 -31
- package/src/orchestrator/customizations/project/docs-structure.md +0 -34
- package/src/orchestrator/customizations/project/roadmap.md +0 -24
- /package/src/orchestrator/{customizations/logs/README.md → skills/observability-logging/LOG-SCHEMA.md} +0 -0
|
@@ -17,7 +17,7 @@ Base weight: 1. Add bonuses:
|
|
|
17
17
|
|--------|-------|
|
|
18
18
|
| Domain expertise (relevant to review) | +2 |
|
|
19
19
|
| Confidence high / med / low | +1 / 0 / -1 |
|
|
20
|
-
| Prior success rate >80% (
|
|
20
|
+
| Prior success rate >80% (`opencastle convoy dashboard`, or `review` records in `.opencastle/logs/events.ndjson`) | +1 |
|
|
21
21
|
|
|
22
22
|
Example: Security Expert + high = 4; Architect + med = 2.
|
|
23
23
|
|
|
@@ -103,7 +103,7 @@ Prefix each agent's output summary `### [Agent Name] TAS-XX Description`. Never
|
|
|
103
103
|
|
|
104
104
|
## Dead Letter Queue Format
|
|
105
105
|
|
|
106
|
-
Log to `.opencastle/AGENT-FAILURES.md` when agent fails 2+ attempts, background output fails all gates, or unrecoverable error occurs. Panel 3x BLOCK → create dispute instead.
|
|
106
|
+
Log to `.opencastle/AGENT-FAILURES.md` — create it on the first entry — when agent fails 2+ attempts, background output fails all gates, or unrecoverable error occurs. Panel 3x BLOCK → create dispute instead.
|
|
107
107
|
|
|
108
108
|
Entry (`DLQ-XXX: Short description`): **Date**, **Agent**, **Tracker Issue**, **Failure Type** (`verification-fail` / `tool-error` / `panel-block` / `timeout` / `scope-creep`), **Attempts**, **Task**, **Failure Details**, **Resolution**. Scan DLQ for pending retries at session start.
|
|
109
109
|
|
|
@@ -115,7 +115,7 @@ For common failure modes, recovery procedures, load **orchestration-protocols**
|
|
|
115
115
|
|
|
116
116
|
Triggers: Panel 3× BLOCK, agent-reviewer disagreement, criteria contradictions, no convergence, needs human input.
|
|
117
117
|
|
|
118
|
-
Create in `.opencastle/DISPUTES.md
|
|
118
|
+
Create in `.opencastle/DISPUTES.md` (create the file on the first dispute). Entry (`DSP-XXX: Short description`): **Date**, **Priority** (`critical`/`high`/`medium`/`low`), **Tracker Issue**, **Trigger** (`panel-3x-block` / `approach-conflict` / `criteria-conflict` / `architectural-ambiguity` / `external-dependency`), **Implementing Agent**, **Reviewing Agent(s)**, **Attempts**, **Status** (`pending`/`resolved`/`deferred`); then Context, Agent's Position, Reviewer's Position, Attempt History (# · type · verdict · key feedback), 2–3 Resolution Options with rationale and risk, Recommended Action, Artifacts.
|
|
119
119
|
1. Number (`DSP-XXX`), set priority, document both perspectives with file references
|
|
120
120
|
2. Build attempt history; present ≥2 options with rationale/risk
|
|
121
121
|
3. Link panel reports, DLQ entries, changed files
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# Agent Expertise Registry
|
|
2
|
-
|
|
3
|
-
Structured tracking of agent performance across sessions. Updated by the Team Lead after task completion.
|
|
4
|
-
|
|
5
|
-
> **Protocol:** See the **agent-memory** skill for update triggers, retrieval protocol, and pruning rules.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Developer
|
|
10
|
-
|
|
11
|
-
### Strong Areas
|
|
12
|
-
|
|
13
|
-
| Area | Evidence | Last Updated |
|
|
14
|
-
|------|----------|-------------|
|
|
15
|
-
| _(no entries yet)_ | | |
|
|
16
|
-
|
|
17
|
-
### Weak Areas
|
|
18
|
-
|
|
19
|
-
| Area | Evidence | Last Updated |
|
|
20
|
-
|------|----------|-------------|
|
|
21
|
-
| _(no entries yet)_ | | |
|
|
22
|
-
|
|
23
|
-
### File Familiarity
|
|
24
|
-
|
|
25
|
-
_(no entries yet)_
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Testing Expert
|
|
30
|
-
|
|
31
|
-
### Strong Areas
|
|
32
|
-
|
|
33
|
-
| Area | Evidence | Last Updated |
|
|
34
|
-
|------|----------|-------------|
|
|
35
|
-
| _(no entries yet)_ | | |
|
|
36
|
-
|
|
37
|
-
### Weak Areas
|
|
38
|
-
|
|
39
|
-
| Area | Evidence | Last Updated |
|
|
40
|
-
|------|----------|-------------|
|
|
41
|
-
| _(no entries yet)_ | | |
|
|
42
|
-
|
|
43
|
-
### File Familiarity
|
|
44
|
-
|
|
45
|
-
_(no entries yet)_
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Content Engineer
|
|
50
|
-
|
|
51
|
-
### Strong Areas
|
|
52
|
-
|
|
53
|
-
| Area | Evidence | Last Updated |
|
|
54
|
-
|------|----------|-------------|
|
|
55
|
-
| _(no entries yet)_ | | |
|
|
56
|
-
|
|
57
|
-
### Weak Areas
|
|
58
|
-
|
|
59
|
-
| Area | Evidence | Last Updated |
|
|
60
|
-
|------|----------|-------------|
|
|
61
|
-
| _(no entries yet)_ | | |
|
|
62
|
-
|
|
63
|
-
### File Familiarity
|
|
64
|
-
|
|
65
|
-
_(no entries yet)_
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Data Engineer
|
|
70
|
-
|
|
71
|
-
### Strong Areas
|
|
72
|
-
|
|
73
|
-
| Area | Evidence | Last Updated |
|
|
74
|
-
|------|----------|-------------|
|
|
75
|
-
| _(no entries yet)_ | | |
|
|
76
|
-
|
|
77
|
-
### Weak Areas
|
|
78
|
-
|
|
79
|
-
| Area | Evidence | Last Updated |
|
|
80
|
-
|------|----------|-------------|
|
|
81
|
-
| _(no entries yet)_ | | |
|
|
82
|
-
|
|
83
|
-
### File Familiarity
|
|
84
|
-
|
|
85
|
-
_(no entries yet)_
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## UI/UX Expert
|
|
90
|
-
|
|
91
|
-
### Strong Areas
|
|
92
|
-
|
|
93
|
-
| Area | Evidence | Last Updated |
|
|
94
|
-
|------|----------|-------------|
|
|
95
|
-
| _(no entries yet)_ | | |
|
|
96
|
-
|
|
97
|
-
### Weak Areas
|
|
98
|
-
|
|
99
|
-
| Area | Evidence | Last Updated |
|
|
100
|
-
|------|----------|-------------|
|
|
101
|
-
| _(no entries yet)_ | | |
|
|
102
|
-
|
|
103
|
-
### File Familiarity
|
|
104
|
-
|
|
105
|
-
_(no entries yet)_
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Performance Expert
|
|
110
|
-
|
|
111
|
-
### Strong Areas
|
|
112
|
-
|
|
113
|
-
| Area | Evidence | Last Updated |
|
|
114
|
-
|------|----------|-------------|
|
|
115
|
-
| _(no entries yet)_ | | |
|
|
116
|
-
|
|
117
|
-
### Weak Areas
|
|
118
|
-
|
|
119
|
-
| Area | Evidence | Last Updated |
|
|
120
|
-
|------|----------|-------------|
|
|
121
|
-
| _(no entries yet)_ | | |
|
|
122
|
-
|
|
123
|
-
### File Familiarity
|
|
124
|
-
|
|
125
|
-
_(no entries yet)_
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Security Expert
|
|
130
|
-
|
|
131
|
-
### Strong Areas
|
|
132
|
-
|
|
133
|
-
| Area | Evidence | Last Updated |
|
|
134
|
-
|------|----------|-------------|
|
|
135
|
-
| _(no entries yet)_ | | |
|
|
136
|
-
|
|
137
|
-
### Weak Areas
|
|
138
|
-
|
|
139
|
-
| Area | Evidence | Last Updated |
|
|
140
|
-
|------|----------|-------------|
|
|
141
|
-
| _(no entries yet)_ | | |
|
|
142
|
-
|
|
143
|
-
### File Familiarity
|
|
144
|
-
|
|
145
|
-
_(no entries yet)_
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Data Engineer
|
|
150
|
-
|
|
151
|
-
### Strong Areas
|
|
152
|
-
|
|
153
|
-
| Area | Evidence | Last Updated |
|
|
154
|
-
|------|----------|-------------|
|
|
155
|
-
| _(no entries yet)_ | | |
|
|
156
|
-
|
|
157
|
-
### Weak Areas
|
|
158
|
-
|
|
159
|
-
| Area | Evidence | Last Updated |
|
|
160
|
-
|------|----------|-------------|
|
|
161
|
-
| _(no entries yet)_ | | |
|
|
162
|
-
|
|
163
|
-
### File Familiarity
|
|
164
|
-
|
|
165
|
-
_(no entries yet)_
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## DevOps Expert
|
|
170
|
-
|
|
171
|
-
### Strong Areas
|
|
172
|
-
|
|
173
|
-
| Area | Evidence | Last Updated |
|
|
174
|
-
|------|----------|-------------|
|
|
175
|
-
| _(no entries yet)_ | | |
|
|
176
|
-
|
|
177
|
-
### Weak Areas
|
|
178
|
-
|
|
179
|
-
| Area | Evidence | Last Updated |
|
|
180
|
-
|------|----------|-------------|
|
|
181
|
-
| _(no entries yet)_ | | |
|
|
182
|
-
|
|
183
|
-
### File Familiarity
|
|
184
|
-
|
|
185
|
-
_(no entries yet)_
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Architect
|
|
190
|
-
|
|
191
|
-
### Strong Areas
|
|
192
|
-
|
|
193
|
-
| Area | Evidence | Last Updated |
|
|
194
|
-
|------|----------|-------------|
|
|
195
|
-
| _(no entries yet)_ | | |
|
|
196
|
-
|
|
197
|
-
### Weak Areas
|
|
198
|
-
|
|
199
|
-
| Area | Evidence | Last Updated |
|
|
200
|
-
|------|----------|-------------|
|
|
201
|
-
| _(no entries yet)_ | | |
|
|
202
|
-
|
|
203
|
-
### File Familiarity
|
|
204
|
-
|
|
205
|
-
_(no entries yet)_
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## Writer
|
|
210
|
-
|
|
211
|
-
### Strong Areas
|
|
212
|
-
|
|
213
|
-
| Area | Evidence | Last Updated |
|
|
214
|
-
|------|----------|-------------|
|
|
215
|
-
| _(no entries yet)_ | | |
|
|
216
|
-
|
|
217
|
-
### Weak Areas
|
|
218
|
-
|
|
219
|
-
| Area | Evidence | Last Updated |
|
|
220
|
-
|------|----------|-------------|
|
|
221
|
-
| _(no entries yet)_ | | |
|
|
222
|
-
|
|
223
|
-
### File Familiarity
|
|
224
|
-
|
|
225
|
-
_(no entries yet)_
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## Researcher
|
|
230
|
-
|
|
231
|
-
### Strong Areas
|
|
232
|
-
|
|
233
|
-
| Area | Evidence | Last Updated |
|
|
234
|
-
|------|----------|-------------|
|
|
235
|
-
| _(no entries yet)_ | | |
|
|
236
|
-
|
|
237
|
-
### Weak Areas
|
|
238
|
-
|
|
239
|
-
| Area | Evidence | Last Updated |
|
|
240
|
-
|------|----------|-------------|
|
|
241
|
-
| _(no entries yet)_ | | |
|
|
242
|
-
|
|
243
|
-
### File Familiarity
|
|
244
|
-
|
|
245
|
-
_(no entries yet)_
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Writer
|
|
250
|
-
|
|
251
|
-
### Strong Areas
|
|
252
|
-
|
|
253
|
-
| Area | Evidence | Last Updated |
|
|
254
|
-
|------|----------|-------------|
|
|
255
|
-
| _(no entries yet)_ | | |
|
|
256
|
-
|
|
257
|
-
### Weak Areas
|
|
258
|
-
|
|
259
|
-
| Area | Evidence | Last Updated |
|
|
260
|
-
|------|----------|-------------|
|
|
261
|
-
| _(no entries yet)_ | | |
|
|
262
|
-
|
|
263
|
-
### File Familiarity
|
|
264
|
-
|
|
265
|
-
_(no entries yet)_
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## Writer
|
|
270
|
-
|
|
271
|
-
### Strong Areas
|
|
272
|
-
|
|
273
|
-
| Area | Evidence | Last Updated |
|
|
274
|
-
|------|----------|-------------|
|
|
275
|
-
| _(no entries yet)_ | | |
|
|
276
|
-
|
|
277
|
-
### Weak Areas
|
|
278
|
-
|
|
279
|
-
| Area | Evidence | Last Updated |
|
|
280
|
-
|------|----------|-------------|
|
|
281
|
-
| _(no entries yet)_ | | |
|
|
282
|
-
|
|
283
|
-
### File Familiarity
|
|
284
|
-
|
|
285
|
-
_(no entries yet)_
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
## Developer
|
|
290
|
-
|
|
291
|
-
### Strong Areas
|
|
292
|
-
|
|
293
|
-
| Area | Evidence | Last Updated |
|
|
294
|
-
|------|----------|-------------|
|
|
295
|
-
| _(no entries yet)_ | | |
|
|
296
|
-
|
|
297
|
-
### Weak Areas
|
|
298
|
-
|
|
299
|
-
| Area | Evidence | Last Updated |
|
|
300
|
-
|------|----------|-------------|
|
|
301
|
-
| _(no entries yet)_ | | |
|
|
302
|
-
|
|
303
|
-
### File Familiarity
|
|
304
|
-
|
|
305
|
-
_(no entries yet)_
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
## DevOps & Release
|
|
310
|
-
|
|
311
|
-
### Strong Areas
|
|
312
|
-
|
|
313
|
-
| Area | Evidence | Last Updated |
|
|
314
|
-
|------|----------|-------------|
|
|
315
|
-
| _(no entries yet)_ | | |
|
|
316
|
-
|
|
317
|
-
### Weak Areas
|
|
318
|
-
|
|
319
|
-
| Area | Evidence | Last Updated |
|
|
320
|
-
|------|----------|-------------|
|
|
321
|
-
| _(no entries yet)_ | | |
|
|
322
|
-
|
|
323
|
-
### File Familiarity
|
|
324
|
-
|
|
325
|
-
_(no entries yet)_
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
````markdown
|
|
2
|
-
# Agent Failure Log (Dead Letter Queue)
|
|
3
|
-
|
|
4
|
-
Structured log of failed agent delegations for diagnosis and retry. Prevents failed work from silently disappearing.
|
|
5
|
-
|
|
6
|
-
> **Review this file at the start of each session.** Check for pending failures that need retry and patterns that indicate systemic issues.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## How to Use This File
|
|
11
|
-
|
|
12
|
-
### When to add an entry
|
|
13
|
-
|
|
14
|
-
Add an entry when **any** of these occur:
|
|
15
|
-
|
|
16
|
-
- A delegated agent fails to complete its task after 2+ attempts
|
|
17
|
-
- A background agent produces output that fails all verification gates
|
|
18
|
-
- A panel review BLOCKs 3 times and requires escalation → **create a dispute record** in `DISPUTES.md` instead (see below)
|
|
19
|
-
- An agent encounters an unrecoverable error (e.g., MCP server down, tool unavailable)
|
|
20
|
-
|
|
21
|
-
> **Disputes vs. DLQ:** When a panel BLOCKs 3 times or agents fundamentally disagree on an approach, create a **dispute record** in `DISPUTES.md` — not a DLQ entry. Disputes package both perspectives and resolution options for human decision-making. DLQ entries are for simple failures (tool errors, timeouts, scope creep).
|
|
22
|
-
|
|
23
|
-
### Entry format
|
|
24
|
-
|
|
25
|
-
```markdown
|
|
26
|
-
### DLQ-XXX: Short description
|
|
27
|
-
|
|
28
|
-
| Field | Value |
|
|
29
|
-
|-------|-------|
|
|
30
|
-
| **Date** | YYYY-MM-DD |
|
|
31
|
-
| **Agent** | Agent name |
|
|
32
|
-
| **Tracker Issue** | PREFIX-XX (if applicable) |
|
|
33
|
-
| **Failure Type** | `verification-fail` / `tool-error` / `panel-block` / `timeout` / `scope-creep` |
|
|
34
|
-
| **Attempts** | Number of attempts before logging |
|
|
35
|
-
|
|
36
|
-
**Task:** What was the agent supposed to do?
|
|
37
|
-
|
|
38
|
-
**Failure Details:** What went wrong? Include error messages, failed checks, or panel BLOCK reasons.
|
|
39
|
-
|
|
40
|
-
**Root Cause:** Why did it fail? (if known)
|
|
41
|
-
|
|
42
|
-
**Resolution:** How was it eventually resolved? (or "pending" if unresolved)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Failure types
|
|
46
|
-
|
|
47
|
-
| Type | Description |
|
|
48
|
-
|------|-------------|
|
|
49
|
-
| `verification-fail` | Agent completed but output fails lint/test/build/browser checks |
|
|
50
|
-
| `tool-error` | MCP server down, tool unavailable, API error |
|
|
51
|
-
| `panel-block` | Panel review blocked 3+ times |
|
|
52
|
-
| `timeout` | Agent ran out of context or took too long |
|
|
53
|
-
| `scope-creep` | Agent modified files outside its partition or went off-task |
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Failures
|
|
58
|
-
|
|
59
|
-
<!-- Failures are appended here by the Team Lead during sessions.
|
|
60
|
-
Start numbering from DLQ-001. -->
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Index
|
|
65
|
-
|
|
66
|
-
| ID | Date | Agent | Type | Status |
|
|
67
|
-
|----|------|-------|------|--------|
|
|
68
|
-
|
|
69
|
-
````
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
````markdown
|
|
2
|
-
# Agent Performance Tracking
|
|
3
|
-
|
|
4
|
-
Tracks agent success rates across panel reviews and delegated tasks to inform model routing and panel reviewer selection.
|
|
5
|
-
|
|
6
|
-
## Data Sources
|
|
7
|
-
|
|
8
|
-
Performance data is collected automatically via NDJSON session logs:
|
|
9
|
-
- **All events:** `.opencastle/logs/events.ndjson` — unified log for all event types (sessions, delegations, reviews, panels, disputes), appended via `opencastle log`
|
|
10
|
-
- **Dashboard:** Run `npx opencastle convoy dashboard` to visualize agent performance
|
|
11
|
-
|
|
12
|
-
## Quick Queries
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# Sessions per agent
|
|
16
|
-
jq -r 'select(.type == "session") | .agent' .opencastle/logs/events.ndjson | sort | uniq -c | sort -rn
|
|
17
|
-
|
|
18
|
-
# Success rate by agent
|
|
19
|
-
jq -r 'select(.type == "session") | [.agent, .outcome] | @tsv' .opencastle/logs/events.ndjson | sort | uniq -c
|
|
20
|
-
|
|
21
|
-
# Delegation tier distribution
|
|
22
|
-
jq -r 'select(.type == "delegation") | .tier' .opencastle/logs/events.ndjson | sort | uniq -c
|
|
23
|
-
|
|
24
|
-
# Failed delegations
|
|
25
|
-
jq 'select(.type == "delegation" and .outcome == "failed")' .opencastle/logs/events.ndjson
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Panel Review Performance
|
|
29
|
-
|
|
30
|
-
Panel review data is collected automatically in `.opencastle/logs/events.ndjson` with `type: "panel"` (appended by the panel runner after each review — see step 7 in the panel majority vote skill).
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
# Total panel reviews
|
|
34
|
-
jq 'select(.type == "panel")' .opencastle/logs/events.ndjson | wc -l
|
|
35
|
-
|
|
36
|
-
# Pass vs block rate
|
|
37
|
-
jq -r 'select(.type == "panel") | .verdict' .opencastle/logs/events.ndjson | sort | uniq -c
|
|
38
|
-
|
|
39
|
-
# Reviews by panel key
|
|
40
|
-
jq -r 'select(.type == "panel") | .panel_key' .opencastle/logs/events.ndjson | sort | uniq -c | sort -rn
|
|
41
|
-
|
|
42
|
-
# Reviews that required retries (attempt > 1)
|
|
43
|
-
jq 'select(.type == "panel" and .attempt > 1)' .opencastle/logs/events.ndjson
|
|
44
|
-
|
|
45
|
-
# Average SHOULD-FIX items per review
|
|
46
|
-
jq -s '[.[] | select(.type == "panel")] | if length > 0 then (map(.should_fix) | add) / length else 0 end' .opencastle/logs/events.ndjson
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Usage
|
|
50
|
-
|
|
51
|
-
Referenced by the **panel-majority-vote** skill for weight assignment:
|
|
52
|
-
- Agents with >80% success rate for similar reviews get a +1 weight bonus
|
|
53
|
-
- This file is the source of truth for that metric
|
|
54
|
-
|
|
55
|
-
````
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
````markdown
|
|
2
|
-
# Dispute Records
|
|
3
|
-
|
|
4
|
-
Structured escalation records created when agents exhaust all automated resolution paths. Unlike the Dead Letter Queue (simple failure log), disputes are **formal action items for humans** — they package conflicting perspectives, prior attempts, and resolution options so a human can make an informed decision.
|
|
5
|
-
|
|
6
|
-
> **Review this file at the start of each session.** Pending disputes may block downstream work and need human input before proceeding.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## When to Create a Dispute
|
|
11
|
-
|
|
12
|
-
Create a dispute record when **any** of these occur:
|
|
13
|
-
|
|
14
|
-
| Trigger | Typical Path |
|
|
15
|
-
|---------|-------------|
|
|
16
|
-
| Panel review BLOCKs 3 times | Fast review 3x FAIL → Panel → Panel 3x BLOCK → **Dispute** |
|
|
17
|
-
| Agent and reviewer fundamentally disagree on approach | Agent retries with reviewer feedback but keeps failing because the feedback conflicts with other constraints → **Dispute** |
|
|
18
|
-
| Conflicting acceptance criteria | Reviewer flags an issue, but fixing it would violate another acceptance criterion → **Dispute** |
|
|
19
|
-
| Architectural ambiguity | Multiple valid approaches exist, automated agents can't converge → **Dispute** |
|
|
20
|
-
| External dependency blocks resolution | Fix requires upstream library change, API access, or infrastructure action → **Dispute** |
|
|
21
|
-
|
|
22
|
-
**Do NOT create a dispute for:**
|
|
23
|
-
- Simple tool errors (MCP server down, build timeout) → use the DLQ
|
|
24
|
-
- Scope creep → use the DLQ with a redirect
|
|
25
|
-
- First or second failure → retry automatically
|
|
26
|
-
|
|
27
|
-
## Dispute Record Format
|
|
28
|
-
|
|
29
|
-
```markdown
|
|
30
|
-
### DSP-XXX: Short description of the disagreement
|
|
31
|
-
|
|
32
|
-
| Field | Value |
|
|
33
|
-
|-------|-------|
|
|
34
|
-
| **Date** | YYYY-MM-DD |
|
|
35
|
-
| **Priority** | `critical` / `high` / `medium` / `low` |
|
|
36
|
-
| **Tracker Issue** | PRJ-XX |
|
|
37
|
-
| **Trigger** | `panel-3x-block` / `approach-conflict` / `criteria-conflict` / `architectural-ambiguity` / `external-dependency` |
|
|
38
|
-
| **Implementing Agent** | Agent name |
|
|
39
|
-
| **Reviewing Agent(s)** | Agent name(s) |
|
|
40
|
-
| **Attempts** | Total attempts (fast review + panel) |
|
|
41
|
-
| **Est. Tokens Spent** | ~XXK across all attempts |
|
|
42
|
-
| **Status** | `pending` / `resolved` / `deferred` |
|
|
43
|
-
|
|
44
|
-
#### Context
|
|
45
|
-
|
|
46
|
-
Brief description of the task and what was being implemented.
|
|
47
|
-
|
|
48
|
-
#### Agent's Position
|
|
49
|
-
|
|
50
|
-
What the implementing agent produced and why it believes the approach is correct.
|
|
51
|
-
Include specific file paths and code references.
|
|
52
|
-
|
|
53
|
-
#### Reviewer's Position
|
|
54
|
-
|
|
55
|
-
What the reviewer(s) flagged and why they believe changes are needed.
|
|
56
|
-
Include the specific MUST-FIX items from the last review attempt.
|
|
57
|
-
|
|
58
|
-
#### Attempt History
|
|
59
|
-
|
|
60
|
-
| # | Type | Verdict | Key Feedback |
|
|
61
|
-
|---|------|---------|-------------|
|
|
62
|
-
| 1 | Fast review | FAIL | [one-line summary] |
|
|
63
|
-
| 2 | Fast review | FAIL | [one-line summary] |
|
|
64
|
-
| 3 | Fast review | FAIL → escalate | [one-line summary] |
|
|
65
|
-
| 4 | Panel (attempt 1) | BLOCK (1/3 PASS) | [one-line summary] |
|
|
66
|
-
| 5 | Panel (attempt 2) | BLOCK (0/3 PASS) | [one-line summary] |
|
|
67
|
-
| 6 | Panel (attempt 3) | BLOCK (1/3 PASS) | [one-line summary] |
|
|
68
|
-
|
|
69
|
-
#### Resolution Options
|
|
70
|
-
|
|
71
|
-
Present 2-3 concrete options for the human decision-maker:
|
|
72
|
-
|
|
73
|
-
1. **Option A: [Accept agent's approach]** — Rationale: ... Risk: ...
|
|
74
|
-
2. **Option B: [Accept reviewer's feedback]** — Rationale: ... Risk: ...
|
|
75
|
-
3. **Option C: [Alternative approach]** — Rationale: ... Risk: ...
|
|
76
|
-
|
|
77
|
-
#### Recommended Action
|
|
78
|
-
|
|
79
|
-
Which option the Team Lead recommends and why. Include specific next steps:
|
|
80
|
-
- [ ] Human decides on option A/B/C
|
|
81
|
-
- [ ] If A: merge as-is, create follow-up ticket for reviewer concerns
|
|
82
|
-
- [ ] If B: re-delegate with explicit instruction to [specific change]
|
|
83
|
-
- [ ] If C: [describe the alternative path]
|
|
84
|
-
|
|
85
|
-
#### Artifacts
|
|
86
|
-
|
|
87
|
-
Links to evidence for human review:
|
|
88
|
-
- Panel report: `.opencastle/logs/panel/[panel-key].md`
|
|
89
|
-
- Review log entries: `.opencastle/logs/events.ndjson` (filter by `type: "review"` and issue)
|
|
90
|
-
- Changed files: [list of files in the last attempt]
|
|
91
|
-
- DLQ entry (if any): `DLQ-XXX`
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Priority Guidelines
|
|
95
|
-
|
|
96
|
-
| Priority | Criteria | Expected Human Response Time |
|
|
97
|
-
|----------|----------|------------------------------|
|
|
98
|
-
| `critical` | Blocks other in-progress work; overnight run stopped | Same day |
|
|
99
|
-
| `high` | Blocks the current feature; no workaround | Within 2 days |
|
|
100
|
-
| `medium` | Feature can proceed without this subtask | Within 1 week |
|
|
101
|
-
| `low` | Nice-to-have; deferrable | Next planning session |
|
|
102
|
-
|
|
103
|
-
## Lifecycle
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
┌──────────────────────────────────────┐
|
|
107
|
-
│ Automated resolution exhausted │
|
|
108
|
-
│ (3x panel BLOCK or approach conflict)│
|
|
109
|
-
└──────────────┬───────────────────────┘
|
|
110
|
-
│
|
|
111
|
-
▼
|
|
112
|
-
┌──────────────────────────────────────┐
|
|
113
|
-
│ Team Lead creates dispute record │
|
|
114
|
-
│ Status: pending │
|
|
115
|
-
│ Logs to events.ndjson │
|
|
116
|
-
│ Links to tracker issue │
|
|
117
|
-
└──────────────┬───────────────────────┘
|
|
118
|
-
│
|
|
119
|
-
▼
|
|
120
|
-
┌──────────────────────────────────────┐
|
|
121
|
-
│ Human reviews dispute │
|
|
122
|
-
│ Picks resolution option │
|
|
123
|
-
│ Updates Status → resolved/deferred │
|
|
124
|
-
└──────────────┬───────────────────────┘
|
|
125
|
-
│
|
|
126
|
-
┌─────────┴──────────┐
|
|
127
|
-
▼ ▼
|
|
128
|
-
resolved deferred
|
|
129
|
-
(re-delegate (create follow-up
|
|
130
|
-
with human's ticket, continue
|
|
131
|
-
decision) with other work)
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Integration with DLQ
|
|
135
|
-
|
|
136
|
-
Disputes and DLQ entries serve different purposes:
|
|
137
|
-
|
|
138
|
-
| | Dead Letter Queue | Dispute Record |
|
|
139
|
-
|--|-------------------|----------------|
|
|
140
|
-
| **Purpose** | Diagnostic failure log | Actionable human decision |
|
|
141
|
-
| **When** | Tool errors, timeouts, simple failures | Unresolvable agent/reviewer conflicts |
|
|
142
|
-
| **Action** | Retry or investigate root cause | Human picks a resolution option |
|
|
143
|
-
| **Urgency** | Can wait for pattern analysis | Needs human input to unblock |
|
|
144
|
-
| **File** | `AGENT-FAILURES.md` | `DISPUTES.md` (this file) |
|
|
145
|
-
|
|
146
|
-
A dispute MAY reference a DLQ entry if the dispute escalated from a logged failure. Use the `DLQ-XXX` ID in the Artifacts section.
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Disputes
|
|
151
|
-
|
|
152
|
-
<!-- Disputes are appended here by the Team Lead during sessions.
|
|
153
|
-
Start numbering from DSP-001. -->
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Index
|
|
158
|
-
|
|
159
|
-
| ID | Date | Priority | Trigger | Tracker Issue | Status |
|
|
160
|
-
|----|------|----------|---------|-------------|--------|
|
|
161
|
-
|
|
162
|
-
````
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Knowledge Graph
|
|
2
|
-
|
|
3
|
-
<!-- Append-only relationship log capturing structured connections between files, agents, patterns, decisions, bugs, and lessons.
|
|
4
|
-
Used by the Team Lead to discover file dependencies, match agents to tasks, and surface relevant context during delegation.
|
|
5
|
-
See the agent-memory skill for the full protocol, entity types, and relationship types. -->
|
|
6
|
-
|
|
7
|
-
## Relationships
|
|
8
|
-
|
|
9
|
-
| Source | Relationship | Target | Added | Context |
|
|
10
|
-
|--------|-------------|--------|-------|---------|
|