opencode-skills-collection 3.0.45 → 3.0.47

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.
Files changed (71) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +10 -1
  2. package/bundled-skills/2slides-ppt-generator/SKILL.md +1 -1
  3. package/bundled-skills/2slides-ppt-generator/scripts/create_pdf_slides.py +2 -1
  4. package/bundled-skills/2slides-ppt-generator/scripts/generate_narration.py +2 -1
  5. package/bundled-skills/2slides-ppt-generator/scripts/generate_slides.py +13 -7
  6. package/bundled-skills/android-dev/references/hybrid.md +7 -4
  7. package/bundled-skills/android-dev/references/react-native.md +5 -2
  8. package/bundled-skills/atlas-contract/SKILL.md +4 -4
  9. package/bundled-skills/atlas-ledger/SKILL.md +10 -7
  10. package/bundled-skills/bun-development/SKILL.md +1 -1
  11. package/bundled-skills/cloud-penetration-testing/SKILL.md +1 -1
  12. package/bundled-skills/codebase-to-wordpress-converter/SKILL.md +1 -0
  13. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  14. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  15. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  16. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  17. package/bundled-skills/docs/users/bundles.md +1 -1
  18. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  19. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  20. package/bundled-skills/docs/users/getting-started.md +1 -1
  21. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  22. package/bundled-skills/docs/users/usage.md +4 -4
  23. package/bundled-skills/docs/users/visual-guide.md +4 -4
  24. package/bundled-skills/dos-verify-done-claims/SKILL.md +173 -0
  25. package/bundled-skills/ecl-harness-engineer/LICENSE +21 -0
  26. package/bundled-skills/ecl-harness-engineer/SKILL.md +714 -0
  27. package/bundled-skills/ecl-harness-engineer/agents/analyzer.md +119 -0
  28. package/bundled-skills/ecl-harness-engineer/agents/auditor.md +212 -0
  29. package/bundled-skills/ecl-harness-engineer/agents/creator-config.md +343 -0
  30. package/bundled-skills/ecl-harness-engineer/agents/creator-docs.md +201 -0
  31. package/bundled-skills/ecl-harness-engineer/agents/creator-linters.md +123 -0
  32. package/bundled-skills/ecl-harness-engineer/references/adapters/adapter-schema.md +204 -0
  33. package/bundled-skills/ecl-harness-engineer/references/adapters/generic.md +156 -0
  34. package/bundled-skills/ecl-harness-engineer/references/adapters/go.md +212 -0
  35. package/bundled-skills/ecl-harness-engineer/references/adapters/java.md +205 -0
  36. package/bundled-skills/ecl-harness-engineer/references/adapters/python.md +225 -0
  37. package/bundled-skills/ecl-harness-engineer/references/adapters/rust.md +220 -0
  38. package/bundled-skills/ecl-harness-engineer/references/adapters/typescript.md +245 -0
  39. package/bundled-skills/ecl-harness-engineer/references/architecture-diagrams.md +420 -0
  40. package/bundled-skills/ecl-harness-engineer/references/audit-templates.md +649 -0
  41. package/bundled-skills/ecl-harness-engineer/references/capability-registry.md +485 -0
  42. package/bundled-skills/ecl-harness-engineer/references/darwin-eval-prompts.md +373 -0
  43. package/bundled-skills/ecl-harness-engineer/references/documentation-templates.md +741 -0
  44. package/bundled-skills/ecl-harness-engineer/references/durability-patterns.md +423 -0
  45. package/bundled-skills/ecl-harness-engineer/references/ecl-harness.md +1431 -0
  46. package/bundled-skills/ecl-harness-engineer/references/environment-config-guide.md +534 -0
  47. package/bundled-skills/ecl-harness-engineer/references/environment-detection-guide.md +751 -0
  48. package/bundled-skills/ecl-harness-engineer/references/eval-templates.md +377 -0
  49. package/bundled-skills/ecl-harness-engineer/references/gc-templates.md +798 -0
  50. package/bundled-skills/ecl-harness-engineer/references/greenfield-templates.md +1385 -0
  51. package/bundled-skills/ecl-harness-engineer/references/linter-templates.md +448 -0
  52. package/bundled-skills/ecl-harness-engineer/references/observability-templates.md +315 -0
  53. package/bundled-skills/environment-setup-guide/SKILL.md +2 -2
  54. package/bundled-skills/evolution/SKILL.md +1 -1
  55. package/bundled-skills/gitops-workflow/SKILL.md +1 -1
  56. package/bundled-skills/linkerd-patterns/SKILL.md +1 -1
  57. package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package-lock.json +504 -1317
  58. package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package.json +2 -2
  59. package/bundled-skills/lovable-cleanup/SKILL.md +416 -0
  60. package/bundled-skills/monopoly/SKILL.md +397 -0
  61. package/bundled-skills/monopoly/patterns/SKILL.md +331 -0
  62. package/bundled-skills/monopoly/scale-benchmarks/SKILL.md +174 -0
  63. package/bundled-skills/monopoly/security-checklist/SKILL.md +69 -0
  64. package/bundled-skills/monopoly/tech-matrix/SKILL.md +268 -0
  65. package/bundled-skills/pagespeed-enhancer/SKILL.md +579 -0
  66. package/bundled-skills/polis-protocol/SKILL.md +6 -3
  67. package/bundled-skills/unship/SKILL.md +11 -5
  68. package/bundled-skills/uv-package-manager/resources/implementation-playbook.md +1 -1
  69. package/bundled-skills/varlock/SKILL.md +2 -2
  70. package/package.json +1 -1
  71. package/skills_index.json +204 -4
@@ -0,0 +1,423 @@
1
+ # Durability Patterns for Agent Harness
2
+
3
+ > "The 100th tool call is where agents fail. Non-trivial agent tasks involve dozens to hundreds of tool calls. Context windows fill up, summarization kicks in, and the agent quietly forgets something essential."
4
+
5
+ This reference documents patterns for building durable agent infrastructure — harnesses that survive failures, manage context across long sessions, and maintain agent effectiveness over extended workstreams.
6
+
7
+ Advanced profile only. Load this reference only when the user explicitly requests resumable
8
+ execution, checkpoints, durable state, long-running agent orchestration, or long-term memory. Do
9
+ not create `harness/state`, `harness/checkpoints`, or `harness/memory` as part of the default core
10
+ harness.
11
+
12
+ ## 1. The Durability Problem
13
+
14
+ ### Why Agents Drift
15
+
16
+ | Phase | Tool Calls | Context State | Risk |
17
+ |-------|-----------|---------------|------|
18
+ | Start (0-20) | Fresh | Full context available | Low |
19
+ | Middle (20-50) | Active | Context filling up | Medium |
20
+ | Extended (50-100) | Sustained | Summarization active | High |
21
+ | Long-running (100+) | Many | Critical details lost | Very High |
22
+
23
+ ### Symptoms of Context Drift
24
+
25
+ - Agent forgets initial requirements
26
+ - Repeated attempts at already-completed tasks
27
+ - Contradictory decisions compared to earlier choices
28
+ - "Hallucinating" APIs or file structures that don't exist
29
+ - Losing track of what's changed vs. what's remaining
30
+
31
+ ## 2. Context Engineering Strategies
32
+
33
+ ### Strategy 1: Progressive Summarization
34
+
35
+ **When to use:** Context window approaching 50% capacity
36
+
37
+ **Implementation:**
38
+ ```json
39
+ // harness/state/context-summary.json
40
+ {
41
+ "task_id": "implement-auth-flow",
42
+ "phase": "execution",
43
+ "completed_steps": [
44
+ {"step": 1, "summary": "Created UserService interface in types/user.go:15-30"},
45
+ {"step": 2, "summary": "Implemented DefaultUserService in core/user.go:20-80"},
46
+ {"step": 3, "summary": "Added JWT middleware in api/middleware/auth.go"}
47
+ ],
48
+ "current_step": 4,
49
+ "remaining_steps": ["Add tests", "Update ARCHITECTURE.md"],
50
+ "critical_context": {
51
+ "architecture_layer": "L2 (Core)",
52
+ "key_interfaces": ["UserService", "AuthProvider"],
53
+ "validation_command": "make lint-arch && go test ./..."
54
+ },
55
+ "timestamp": "2026-03-23T10:30:00Z"
56
+ }
57
+ ```
58
+
59
+ **Agent instruction in exec-plan:**
60
+ ```markdown
61
+ ## Context Management
62
+
63
+ After completing each major step:
64
+ 1. Update `harness/state/context-summary.json` with step summary
65
+ 2. Prune verbose details from working memory
66
+ 3. Keep only: current file being edited, validation commands, critical constraints
67
+
68
+ If context feels unclear, re-read:
69
+ - AGENTS.md (navigation)
70
+ - harness/state/context-summary.json (progress)
71
+ - Current step details in this exec-plan
72
+ ```
73
+
74
+ ### Strategy 2: State Offloading
75
+
76
+ **When to use:** Multi-phase tasks with intermediate artifacts
77
+
78
+ **File structure:**
79
+ ```
80
+ harness/
81
+ ├── state/
82
+ │ ├── current-task.json # What the agent is doing now
83
+ │ ├── context-summary.json # Summarized progress
84
+ │ └── decisions.json # Key decisions made (for consistency)
85
+ ├── checkpoints/
86
+ │ ├── phase-1-complete.json # Snapshot after phase 1
87
+ │ ├── phase-2-complete.json # Snapshot after phase 2
88
+ │ └── latest.json # Symlink to most recent checkpoint
89
+ └── artifacts/
90
+ └── generated/ # Intermediate files the agent produced
91
+ ```
92
+
93
+ **Decision log format:**
94
+ ```json
95
+ // harness/state/decisions.json
96
+ {
97
+ "decisions": [
98
+ {
99
+ "id": "D001",
100
+ "timestamp": "2026-03-23T09:00:00Z",
101
+ "context": "Choosing authentication method",
102
+ "decision": "JWT with refresh tokens",
103
+ "rationale": "Stateless, works with microservices architecture",
104
+ "alternatives_rejected": ["Sessions (stateful)", "OAuth only (too complex for MVP)"]
105
+ },
106
+ {
107
+ "id": "D002",
108
+ "timestamp": "2026-03-23T09:30:00Z",
109
+ "context": "Where to put auth middleware",
110
+ "decision": "api/middleware/auth.go",
111
+ "rationale": "Follows existing middleware pattern in api/middleware/",
112
+ "alternatives_rejected": ["internal/auth/ (wrong layer)"]
113
+ }
114
+ ]
115
+ }
116
+ ```
117
+
118
+ ### Strategy 3: Task Isolation via Sub-Agents
119
+
120
+ **When to use:** Independent subtasks that don't need full context
121
+
122
+ **Pattern:**
123
+ ```markdown
124
+ ## Phase 3: Parallel Work
125
+
126
+ ### 3.1 Test Writing (spawn sub-agent)
127
+ **Context needed:** UserService interface, existing test patterns
128
+ **Context NOT needed:** Implementation details of phases 1-2
129
+ **Output:** test files in internal/core/*_test.go
130
+
131
+ ### 3.2 Documentation Update (spawn sub-agent)
132
+ **Context needed:** Public API changes, ARCHITECTURE.md
133
+ **Context NOT needed:** Internal implementation decisions
134
+ **Output:** Updated docs/design-docs/auth.md
135
+ ```
136
+
137
+ **Sub-agent context injection:**
138
+ ```json
139
+ {
140
+ "task": "write-tests-for-userservice",
141
+ "minimal_context": {
142
+ "interface_file": "internal/types/user.go",
143
+ "test_patterns_file": "internal/core/example_test.go",
144
+ "output_directory": "internal/core/",
145
+ "validation": "go test ./internal/core/..."
146
+ },
147
+ "excluded_context": ["implementation details", "other phases", "decision history"]
148
+ }
149
+ ```
150
+
151
+ ### Strategy 4: Checkpoint Resumption
152
+
153
+ **When to use:** Tasks that may be interrupted (restarts, errors, timeouts)
154
+
155
+ **Checkpoint schema:**
156
+ ```json
157
+ // harness/checkpoints/phase-2-complete.json
158
+ {
159
+ "checkpoint_id": "cp-20260323-103000",
160
+ "task_id": "implement-auth-flow",
161
+ "phase_completed": 2,
162
+ "timestamp": "2026-03-23T10:30:00Z",
163
+
164
+ "state_snapshot": {
165
+ "files_created": ["internal/types/user.go", "internal/core/user.go"],
166
+ "files_modified": ["go.mod"],
167
+ "validation_status": {"build": "pass", "lint": "pass", "test": "pass"}
168
+ },
169
+
170
+ "resume_instructions": {
171
+ "next_phase": 3,
172
+ "context_to_reload": ["AGENTS.md", "docs/exec-plans/active/auth-flow.md"],
173
+ "state_to_restore": "harness/state/context-summary.json",
174
+ "first_step": "Run validation to confirm state is intact"
175
+ },
176
+
177
+ "critical_invariants": [
178
+ "UserService interface must have GetUser, CreateUser, UpdateUser methods",
179
+ "All new code must be in L2 (Core) layer"
180
+ ]
181
+ }
182
+ ```
183
+
184
+ **Resume flow:**
185
+ ```markdown
186
+ ## Resumption Protocol
187
+
188
+ If resuming from checkpoint:
189
+
190
+ 1. Read checkpoint file: `harness/checkpoints/latest.json`
191
+ 2. Verify state is intact:
192
+ ```bash
193
+ make lint-arch && go build ./...
194
+ ```
195
+ 3. If verification fails:
196
+ - Check which files are corrupted
197
+ - Restore from checkpoint's expected state
198
+ - Re-run from last known good state
199
+ 4. If verification passes:
200
+ - Load context from checkpoint's `context_to_reload`
201
+ - Continue from `next_phase`
202
+ ```
203
+
204
+ ## 3. Memory Architecture
205
+
206
+ > "A vector database alone is not memory. That's like giving someone a filing cabinet and calling it a brain."
207
+
208
+ ### Three Types of Agent Memory
209
+
210
+ | Type | What It Stores | How to Implement | When to Access |
211
+ |------|---------------|------------------|----------------|
212
+ | **Episodic** | What happened | `harness/memory/episodes/` — timestamped event logs | When debugging why something went wrong |
213
+ | **Semantic** | What I know | `harness/memory/knowledge/` — facts about this codebase | Before making architectural decisions |
214
+ | **Procedural** | How I do things | `harness/memory/procedures/` — learned workflows | When starting familiar task types |
215
+
216
+ ### Episodic Memory Implementation
217
+
218
+ ```json
219
+ // harness/memory/episodes/2026-03-23-auth-implementation.json
220
+ {
221
+ "episode_id": "ep-20260323-auth",
222
+ "task": "Implement JWT authentication",
223
+ "outcome": "success",
224
+ "duration_minutes": 45,
225
+ "tool_calls": 87,
226
+
227
+ "key_events": [
228
+ {
229
+ "timestamp": "2026-03-23T09:15:00Z",
230
+ "event": "lint_failure",
231
+ "details": "Attempted to import core/config from types/user.go",
232
+ "resolution": "Moved config-dependent logic to core/user.go",
233
+ "lesson": "Layer 0 (types/) cannot import Layer 2 (core/)"
234
+ },
235
+ {
236
+ "timestamp": "2026-03-23T09:45:00Z",
237
+ "event": "test_failure",
238
+ "details": "TestGetUser failed: expected mock to be called",
239
+ "resolution": "Added missing dependency injection in test setup",
240
+ "lesson": "Always use constructor injection for testability"
241
+ }
242
+ ],
243
+
244
+ "patterns_discovered": [
245
+ "This codebase uses constructor injection, not field injection",
246
+ "Test files should mirror source file structure"
247
+ ]
248
+ }
249
+ ```
250
+
251
+ ### Semantic Memory Implementation
252
+
253
+ ```json
254
+ // harness/memory/knowledge/codebase-facts.json
255
+ {
256
+ "updated": "2026-03-23T10:00:00Z",
257
+
258
+ "architecture": {
259
+ "layers": ["L0: types/", "L1: utils/", "L2: core/", "L3: api/, cmd/"],
260
+ "forbidden_imports": "Lower layers cannot import higher layers",
261
+ "key_interfaces": ["UserService", "AuthProvider", "Logger"]
262
+ },
263
+
264
+ "conventions": {
265
+ "naming": "camelCase for variables, PascalCase for exported",
266
+ "testing": "Table-driven tests, testify for assertions",
267
+ "error_handling": "Wrap errors with fmt.Errorf, use typed errors from errors/"
268
+ },
269
+
270
+ "gotchas": [
271
+ "chi router middleware order matters — auth before logging",
272
+ "Database migrations must be idempotent",
273
+ "Config is loaded once at startup, not reloaded"
274
+ ]
275
+ }
276
+ ```
277
+
278
+ ### Procedural Memory Implementation
279
+
280
+ ```json
281
+ // harness/memory/procedures/add-new-endpoint.json
282
+ {
283
+ "procedure": "Add a new API endpoint",
284
+ "last_used": "2026-03-22",
285
+ "success_rate": "4/4",
286
+
287
+ "steps": [
288
+ {"step": 1, "action": "Define types in internal/types/", "notes": "Keep Layer 0 pure"},
289
+ {"step": 2, "action": "Implement business logic in internal/core/", "notes": "Use interfaces for deps"},
290
+ {"step": 3, "action": "Add handler in api/handlers/", "notes": "Follow existing handler patterns"},
291
+ {"step": 4, "action": "Register route in api/routes.go", "notes": "Check middleware ordering"},
292
+ {"step": 5, "action": "Write tests for each layer", "notes": "Use table-driven tests"},
293
+ {"step": 6, "action": "Update docs/references/api.md", "notes": "Include request/response examples"}
294
+ ],
295
+
296
+ "validation": "make lint-arch && go test ./... && make build"
297
+ }
298
+ ```
299
+
300
+ ## 4. Goal Management
301
+
302
+ Real agents don't just respond to prompts — they pursue outcomes. A harness should support goal tracking, progress monitoring, and intelligent escalation.
303
+
304
+ ### Goal Tracking Structure
305
+
306
+ ```json
307
+ // harness/state/goals.json
308
+ {
309
+ "primary_goal": {
310
+ "id": "G001",
311
+ "description": "Implement user authentication with JWT",
312
+ "success_criteria": [
313
+ "Users can register with email/password",
314
+ "Users can log in and receive JWT",
315
+ "Protected endpoints reject invalid tokens",
316
+ "All tests pass"
317
+ ],
318
+ "status": "in_progress",
319
+ "progress": "75%"
320
+ },
321
+
322
+ "subgoals": [
323
+ {"id": "G001.1", "description": "Create user types", "status": "completed"},
324
+ {"id": "G001.2", "description": "Implement user service", "status": "completed"},
325
+ {"id": "G001.3", "description": "Add JWT middleware", "status": "completed"},
326
+ {"id": "G001.4", "description": "Write tests", "status": "in_progress"},
327
+ {"id": "G001.5", "description": "Update documentation", "status": "pending"}
328
+ ],
329
+
330
+ "blockers": [],
331
+
332
+ "escalation_triggers": [
333
+ {"condition": "3+ failures on same step", "action": "Report blocker to user"},
334
+ {"condition": "Goal unchanged for 30 minutes", "action": "Check if stuck"},
335
+ {"condition": "Dependencies missing", "action": "Request clarification"}
336
+ ]
337
+ }
338
+ ```
339
+
340
+ ### When to Escalate
341
+
342
+ | Signal | Interpretation | Action |
343
+ |--------|---------------|--------|
344
+ | 3+ lint failures same rule | Possible misunderstanding | Re-read architecture docs, if still failing → escalate |
345
+ | Test passing then failing | Regression introduced | Review recent changes, if unclear → escalate |
346
+ | Unclear requirements | Ambiguity in task | Document uncertainty, ask user for clarification |
347
+ | Conflicting constraints | Impossible task | Report constraint conflict, propose alternatives |
348
+ | Progress stalled | Stuck or context lost | Resume from checkpoint, if still stuck → escalate |
349
+
350
+ ### Good Agent Behavior: Restraint
351
+
352
+ > "Good agent behavior is often about restraint, not verbosity."
353
+
354
+ **Example from Hugo's article:** An agent detected stress signals (urgency, fragmented input) and instead of a detailed response, sent a simple emoji check-in.
355
+
356
+ **Harness implication:** Include signals for when to simplify:
357
+ - User seems rushed → shorter responses, focus on essentials
358
+ - Many rapid corrections → agent may be overcomplicating
359
+ - Explicit "just do it" → minimize explanation, maximize action
360
+
361
+ ## 5. Harness Directory Structure for Durability
362
+
363
+ ```
364
+ harness/
365
+ ├── eval/ # Eval framework (existing)
366
+ ├── trace/ # Observability (existing)
367
+ ├── state/ # Current task state
368
+ │ ├── current-task.json
369
+ │ ├── context-summary.json
370
+ │ ├── decisions.json
371
+ │ └── goals.json
372
+ ├── checkpoints/ # Resumption points
373
+ │ ├── latest.json -> phase-2-complete.json
374
+ │ └── phase-*.json
375
+ ├── memory/ # Agent learning
376
+ │ ├── episodes/ # What happened (episodic)
377
+ │ ├── knowledge/ # What I know (semantic)
378
+ │ └── procedures/ # How I do things (procedural)
379
+ └── metrics/ # Performance tracking
380
+ └── task-completion-times.json
381
+ ```
382
+
383
+ ## 6. Integration with Exec-Plans
384
+
385
+ Every exec-plan should include durability sections:
386
+
387
+ ```markdown
388
+ ## Durability Configuration
389
+
390
+ ### Context Management
391
+ - **Summary interval:** After each phase
392
+ - **Offload location:** harness/state/context-summary.json
393
+ - **Critical context:** Layer constraints, validation commands
394
+
395
+ ### Checkpoints
396
+ - **Save after:** Each phase completion
397
+ - **Location:** harness/checkpoints/
398
+ - **Resume from:** Latest checkpoint if interrupted
399
+
400
+ ### Memory Updates
401
+ - **Episodic:** Log significant events (failures, key decisions)
402
+ - **Semantic:** Update if new codebase facts discovered
403
+ - **Procedural:** Update if workflow variation proven successful
404
+
405
+ ### Escalation Triggers
406
+ - 3+ failures on same step → Report blocker
407
+ - Unclear requirement → Ask user
408
+ - Conflicting constraints → Propose alternatives
409
+ ```
410
+
411
+ ---
412
+
413
+ ## Summary: The Durable Agent Checklist
414
+
415
+ When designing a harness, verify:
416
+
417
+ - [ ] **Context engineering:** Does the harness manage context for long sessions?
418
+ - [ ] **State persistence:** Can tasks survive restarts and failures?
419
+ - [ ] **Checkpoint resumption:** Can agents resume from intermediate states?
420
+ - [ ] **Memory architecture:** Does the harness help agents learn across sessions?
421
+ - [ ] **Goal tracking:** Does the harness support goal pursuit, not just prompt response?
422
+ - [ ] **Escalation paths:** Does the harness know when to ask for help?
423
+ - [ ] **Trajectory capture:** Does every run produce usable training data?