opencode-skills-collection 3.0.46 → 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,714 @@
1
+ ---
2
+ name: ecl-harness-engineer
3
+ description: "Create or audit ECL Agent Harness infrastructure: AGENTS.md, change tracking, repository guidance, lint checks, CI gates, and agent handoff docs."
4
+ category: development
5
+ risk: safe
6
+ source: community
7
+ source_repo: qinghui316/ecl-harness-engineer
8
+ source_type: community
9
+ date_added: "2026-06-13"
10
+ author: qinghui316
11
+ tags: [codex, agent-harness, ecl, workflow, ci]
12
+ tools: [codex, claude, cursor, gemini, antigravity]
13
+ license: MIT
14
+ license_source: "https://github.com/qinghui316/ecl-harness-engineer/blob/main/LICENSE"
15
+ ---
16
+
17
+ # ECL Harness Engineer
18
+ Design and create Harness Engineering infrastructure so AI agents can work reliably in a codebase.
19
+
20
+ > **Core Philosophy**: "Intelligence without infrastructure is just a demo." The Agent Harness is the Operating System — the LLM is just the CPU. The repository becomes the single source of truth — if an agent can't see it in context, it doesn't exist.
21
+
22
+ ## When to Use This Skill
23
+
24
+ - Use when a repository needs AI-agent collaboration infrastructure such as `AGENTS.md`, `docs/ECL.md`, `docs/STATUS.md`, harness change tracking, or mechanical validation gates.
25
+ - Use when auditing an existing Agent Harness for missing ECL lifecycle docs, change templates, lint checks, environment contracts, or CI integration.
26
+ - Use when converting repeated agent workflow failures into repository-local documentation, tests, lint rules, or lightweight auto-evolution checks.
27
+ - Do not use for ordinary business feature implementation unless the requested work is specifically about creating or improving the repository harness.
28
+
29
+ ## Limitations
30
+
31
+ - This skill creates or audits harness infrastructure; it does not replace product requirements, implementation planning, code review, or release approval for the target project.
32
+ - The generated ECL docs, linters, scripts, and CI examples must be adapted to the repository's actual stack, security model, and existing contributor workflow before enforcement.
33
+ - Auto-evolve recommendations are guidance only. Apply harness changes through normal review, validation, and rollback discipline instead of accepting them as autonomous policy changes.
34
+
35
+ ## Unified Workflow
36
+
37
+ This skill follows a single unified workflow regardless of project state (empty, existing code, or existing harness). The core idea: **detect the gap between current state and target state, then fill it**.
38
+
39
+ Default to a **core ECL harness**. Core includes lightweight auto-evolve threshold checking:
40
+ closed changes are counted, a pending evolution note is generated when the threshold is reached,
41
+ and Codex applies harness improvements only through evidence, validation, scoring, and rollback.
42
+ Advanced agent-platform capabilities such as eval datasets, execution traces, durable state,
43
+ checkpoints, long-term memory, and metrics remain optional profiles only when the user explicitly
44
+ asks for agent evaluation, observability, resumable execution, or long-term memory.
45
+
46
+ This skill improves the target repository's agent harness. It does **not** implement ordinary
47
+ business features, replace the coding agent's plan mode, or create a separate requirements product.
48
+ Plan mode is useful for live discussion; ECL artifacts are the repository record that later agents,
49
+ linters, CI, and archive history can inspect.
50
+
51
+ 1. **Quick Detection + Intent Confirmation** — what exists, what already passes, and what the user wants.
52
+ 2. **Analysis** — architecture, harness state, environment, and project identity.
53
+ 3. **Intake Review + Delta Synthesis** — classify small vs structured work, support requirement-first
54
+ and plan-first inputs, and compute exactly what to create or update.
55
+ 4. **Creation/Update** — docs, status handoff, linters, ECL/change scripts, environment config, and CI.
56
+ 5. **Verification + Handoff** — run checks, attribute failures, update STATUS.md, trigger auto-evolve checks, and summarize results.
57
+
58
+ ---
59
+
60
+ ## Phase 1: Quick Detection + Intent Confirmation
61
+
62
+ **Goal**: In under 5 minutes, understand project state and user intent.
63
+
64
+ ### 1.1 Project State Detection
65
+
66
+ Run this quick scan:
67
+
68
+ ```bash
69
+ # Count files
70
+ file_count=$(find . -type f ! -path './.git/*' ! -path './node_modules/*' ! -path './vendor/*' 2>/dev/null | wc -l)
71
+ code_files=$(find . -type f \( -name "*.go" -o -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.rs" \) ! -path './.git/*' ! -path './node_modules/*' ! -path './vendor/*' 2>/dev/null | wc -l)
72
+
73
+ # Check harness components
74
+ has_agents_md=$(test -f AGENTS.md && echo "yes" || echo "no")
75
+ has_architecture=$(test -f docs/ARCHITECTURE.md && echo "yes" || echo "no")
76
+ has_linters=$(ls scripts/lint-* 2>/dev/null | wc -l)
77
+ has_harness_dir=$(test -d harness && echo "yes" || echo "no")
78
+ has_ecl_doc=$(test -f docs/ECL.md && echo "yes" || echo "no")
79
+ has_changes_dir=$(test -d harness/changes && echo "yes" || echo "no")
80
+ has_change_templates=$(test -d harness/templates/change && echo "yes" || echo "no")
81
+ has_change_script=$(ls scripts/harness-change.* 2>/dev/null | wc -l)
82
+ has_evolve_script=$(ls scripts/harness-evolve.* 2>/dev/null | wc -l)
83
+ has_ecl_lint=$(ls scripts/lint-ecl.* 2>/dev/null | wc -l)
84
+ has_encoding_lint=$(ls scripts/lint-encoding.* 2>/dev/null | wc -l)
85
+ has_makefile=$(test -f Makefile && echo "yes" || echo "no")
86
+ has_package_json=$(test -f package.json && echo "yes" || echo "no")
87
+
88
+ # Detect tech stack
89
+ if test -f go.mod; then TECH="Go"
90
+ elif test -f package.json; then TECH="TypeScript/Node.js"
91
+ elif test -f requirements.txt || test -f pyproject.toml; then TECH="Python"
92
+ else TECH="Unknown"
93
+ fi
94
+ ```
95
+
96
+ ### 1.2 Classify Project State
97
+
98
+ Based on detection:
99
+
100
+ | State | Criteria | Action |
101
+ |-------|----------|--------|
102
+ | **Empty** | file_count < 5 AND code_files = 0 | Guide user through project choices first |
103
+ | **Code Only** | code_files > 0 AND has_agents_md = "no" | Full analysis + core harness creation |
104
+ | **Partial Harness** | has_agents_md = "yes" AND (has_linters = 0 OR has_harness_dir = "no") | Gap analysis + fill gaps |
105
+ | **Harness Present** | Core harness components exist | Audit + improvement suggestions |
106
+
107
+ Also classify ECL readiness:
108
+
109
+ | ECL State | Criteria | Action |
110
+ |-----------|----------|--------|
111
+ | **ECL Missing** | has_ecl_doc = "no" OR has_changes_dir = "no" | Create ECL docs, change templates, and scripts |
112
+ | **ECL Partial** | ECL doc exists but scripts/templates missing | Fill ECL automation gaps |
113
+ | **ECL Ready** | docs/ECL.md, harness/changes, templates, harness-change, harness-evolve, lint-ecl, lint-encoding exist | Audit index freshness and workflow quality |
114
+
115
+ ### 1.3 Baseline Verification Snapshot
116
+
117
+ For existing projects, capture a best-effort baseline before creating or updating harness files.
118
+ The baseline is for attribution only: it distinguishes pre-existing project failures from
119
+ failures introduced by harness work. It must not be used to weaken default CI.
120
+
121
+ Run only commands that already exist in the project:
122
+
123
+ | Ecosystem | Baseline commands |
124
+ |-----------|-------------------|
125
+ | TypeScript/Node.js | package scripts such as `lint`, `typecheck`, `test`, `build`; include nested package build scripts when detected |
126
+ | Go | `go test ./...`, `go build ./...`, existing `make lint` or `make test` |
127
+ | Python | existing test/lint scripts, `python -m compileall .` |
128
+
129
+ Record each command as `pass`, `fail`, or `missing`, with the short failure reason. If a command
130
+ fails before harness creation, report it later as **pre-existing project debt**, not as harness
131
+ failure. Default CI remains strict and should still include normal business gates unless the user
132
+ explicitly asks for a temporary staged rollout.
133
+
134
+ ### 1.4 Intent Confirmation
135
+
136
+ Before planning changes, classify requested scope:
137
+
138
+ | Scope | Default? | Includes |
139
+ |-------|----------|----------|
140
+ | **Core harness** | Yes | AGENTS.md, docs/ECL.md, docs/STATUS.md, docs, ECL changes, lightweight auto-evolve, linters, environment contract, CI |
141
+ | **Advanced harness** | No | Core harness plus explicitly requested eval, trace, state, checkpoints, memory, or metrics |
142
+ | **Documentation only** | No | AGENTS.md and docs without linters, scripts, or CI |
143
+
144
+ When a user-confirmation tool is available, confirm scope. In Codex, use `request_user_input`.
145
+ On other platforms, use the equivalent user-choice tool. If no such tool is available, use the
146
+ detected context and record assumptions.
147
+
148
+ ```json
149
+ {
150
+ "question": "What's your priority for this harness setup?",
151
+ "header": "Scope",
152
+ "multiSelect": false,
153
+ "options": [
154
+ {
155
+ "label": "Core harness (Recommended)",
156
+ "description": "Project-first AGENTS.md, ECL changes, STATUS handoff, auto-evolve threshold checks, linters, environment contract, and strict CI"
157
+ },
158
+ {
159
+ "label": "Advanced harness",
160
+ "description": "Core harness plus explicitly requested eval, trace, memory, checkpoint, or metrics infrastructure"
161
+ },
162
+ {
163
+ "label": "Documentation only",
164
+ "description": "AGENTS.md and project docs only; skip linters, scripts, and CI for now"
165
+ }
166
+ ]
167
+ }
168
+ ```
169
+
170
+ **If Empty project**, also ask for basics:
171
+
172
+ ```json
173
+ {
174
+ "question": "What tech stack for this project?",
175
+ "header": "Tech Stack",
176
+ "multiSelect": false,
177
+ "options": [
178
+ {"label": "Go", "description": "CLI tools, high-performance services, system programming"},
179
+ {"label": "TypeScript/Node.js", "description": "Web APIs, full-stack apps, rapid prototyping"},
180
+ {"label": "Python", "description": "Data processing, ML/AI, scripting"}
181
+ ]
182
+ }
183
+ ```
184
+
185
+ If no user-confirmation tool is available, use detected values and document assumptions:
186
+
187
+ ```markdown
188
+ ## Auto-Detected Context
189
+
190
+ | Field | Value | Confidence | Evidence |
191
+ |-------|-------|------------|----------|
192
+ | Tech Stack | {TECH} | High | Found {config file} |
193
+ | Project State | {state} | High | {criteria matched} |
194
+ | Scope | Core harness | Default | No user preference specified |
195
+
196
+ Proceeding with these assumptions. Tell me if any need adjustment.
197
+ ```
198
+
199
+ ### 1.5 ECL Work Intake Rules
200
+
201
+ When generating ECL guidance for a target project, keep the process small enough to use:
202
+
203
+ | Intake type | Criteria | Required ECL handling |
204
+ |-------------|----------|-----------------------|
205
+ | **Small Change** | Local, low-risk edits such as copy, comments, style-only tweaks, or single-file bug fixes with no interface, data, permission, architecture, or release impact | Active change optional; still record the verification command in the final response or existing task notes |
206
+ | **Structured Change** | Cross-file/module behavior, APIs, data model, permissions, architecture, validation chain, unclear requirements, or work likely to exceed 20 minutes | Use active change files and require intake/spec/plan review before implementation |
207
+
208
+ Decision tree:
209
+
210
+ 1. If an active change already exists, keep using it; do not create a second active context.
211
+ 2. If the change is copy, comments, README text, formatting, or an obviously local single-file fix
212
+ with no runtime, API, data, permission, architecture, or validation-chain impact, treat it as
213
+ Small Change.
214
+ 3. If the change touches APIs, data, permissions, architecture, multiple modules, release/runtime
215
+ behavior, or unclear requirements, treat it as Structured Change.
216
+ 4. If impact is unclear, do read-only investigation first. If uncertainty remains after inspection,
217
+ ask one high-impact question or upgrade to Structured Change; do not assume Small Change.
218
+
219
+ For structured changes, support both common entry points:
220
+
221
+ - **Requirement-first input**: extract target users/scenarios, evidence, success criteria,
222
+ acceptance criteria, non-goals, constraints, assumptions, and risks into `spec.md`.
223
+ - **Plan-first input**: treat the user's plan as a draft, split WHAT/WHY into `spec.md` and HOW into
224
+ `plan.md`, then ask only about high-impact gaps that affect implementation direction or acceptance.
225
+ If the plan is complete and does not conflict with repository evidence, do not repeat a full
226
+ interview. If it conflicts with code, docs, commands, or existing harness constraints, record the
227
+ conflict and return to Intake Review.
228
+
229
+ Questions are allowed and expected, but must be bounded: ask at most three high-impact questions per
230
+ round. Low-risk unknowns become assumptions; high-impact unknowns become
231
+ `[NEEDS CLARIFICATION: ...]` and block implementation until resolved.
232
+
233
+ For complex structured changes, use a lightweight iteration loop rather than treating the first
234
+ spec as final:
235
+
236
+ ```text
237
+ Draft Spec -> Draft Plan -> Review Gaps -> Revise Spec/Plan -> Gate -> Tasks
238
+ ```
239
+
240
+ Default to at most two loops. If key gaps remain, continue up to five loops; after that, record a
241
+ blocker instead of implementing from guesses. `plan.md` must include any planning-discovered spec
242
+ gaps, because plans often expose missing acceptance, boundary, permission, data, or validation
243
+ requirements.
244
+
245
+ ---
246
+
247
+ ## Phase 2: Analysis
248
+
249
+ **Goal**: Deeply understand codebase architecture, harness state, and environment requirements.
250
+
251
+ ### 2.1 Execution Mode
252
+
253
+ Use subagents only when the user authorized delegation and the environment supports it. Otherwise, execute the same responsibilities inline.
254
+
255
+ If using subagents, assign:
256
+
257
+ - Code architecture analysis: follow `agents/analyzer.md`; output `harness/.analysis/architecture.json`.
258
+ - Harness state audit: follow `agents/auditor.md`; output `harness/.analysis/audit.json`.
259
+ - Environment analysis: follow `references/environment-detection-guide.md`; output `harness/.analysis/environment.json`.
260
+
261
+ If working inline, produce the same three analysis artifacts or equivalent in-memory summaries before Phase 3.
262
+
263
+ ### 2.2 Project Identity Extraction
264
+
265
+ For existing projects, extract target-project meaning before writing docs:
266
+ - One-sentence project identity: what it does and for whom.
267
+ - Core workflow or domain model: user/system flow, key entities, API resources, jobs, or commands.
268
+ - Primary source entrypoints and where common changes belong.
269
+
270
+ Use `README.md`, manifests, entrypoints, routes/controllers, schemas/models, and key source
271
+ directories. Harness files are not sufficient evidence for project identity.
272
+
273
+ ### 2.3 Adapter Selection
274
+
275
+ After detecting the tech stack, load the matching adapter before creating linters, scripts, CI,
276
+ or environment config. Adapter guidance overrides generic templates for language-specific details.
277
+
278
+ | Detected stack | Required adapter |
279
+ |----------------|------------------|
280
+ | TypeScript/Node.js | `references/adapters/typescript.md` |
281
+ | Go | `references/adapters/go.md` |
282
+ | Python | `references/adapters/python.md` |
283
+ | Rust | `references/adapters/rust.md` |
284
+ | Java | `references/adapters/java.md` |
285
+ | Unknown/mixed | `references/adapters/generic.md` plus any detected language adapters |
286
+
287
+ For TypeScript/Node.js projects, prefer Node/TS-native outputs: `scripts/lint-deps.mjs` or
288
+ equivalent, `scripts/lint-quality.mjs`, npm/package-manager scripts, and Node/TS GitHub Actions.
289
+ Do not adapt Go linter or Makefile-only patterns to TypeScript unless the project is actually Go
290
+ or already uses Makefile as the primary command surface.
291
+
292
+ ### 2.4 Command Surface Selection
293
+
294
+ Before creating ECL scripts, select the target project's command surface. Do not assume
295
+ PowerShell is the only Windows option. This selection is normally automatic; do not ask the user to
296
+ choose a script format unless project evidence conflicts or the user has already expressed a hard
297
+ constraint.
298
+
299
+ Priority:
300
+
301
+ 1. Existing project entrypoints: package-manager scripts, Makefile targets, README commands,
302
+ or CI shell conventions.
303
+ 2. Explicit user/project constraints. If the project rejects `.ps1`, do not generate PowerShell
304
+ as the only harness entrypoint.
305
+ 3. Bash profile when allowed. For Windows projects that accept Bash, generate `.sh` scripts and
306
+ document the prerequisite: Git Bash, WSL, MSYS2, or a CI Linux runner.
307
+ 4. PowerShell profile when the project accepts Windows-native PowerShell. Keep it compatible with
308
+ Windows PowerShell 5.1 and PowerShell 7.
309
+ 5. Node or Python profiles when those runtimes are already first-class project dependencies.
310
+
311
+ Default when evidence is sparse: for TypeScript/Node projects choose Node/package-manager scripts;
312
+ for Windows projects that allow Bash choose Bash profile and document Git Bash/WSL/MSYS2; otherwise
313
+ choose the adapter's native lightweight scripting profile.
314
+
315
+ All profiles must implement the same ECL invariants and command set. `harness-change`,
316
+ `harness-evolve`, `lint-ecl`, and `lint-encoding` may be implemented as `.ps1`, `.sh`, `.mjs`,
317
+ or `.py`, but docs, CI, Makefile/package scripts, and verification commands must use the chosen
318
+ entrypoint consistently.
319
+
320
+ ### 2.5 Wait for Analysis Completion
321
+
322
+ When subagents are running, wait for their final reports. While waiting, you can:
323
+ - Review any existing documentation
324
+ - Prepare templates for Phase 4
325
+
326
+ ### 2.5 For Empty Projects
327
+
328
+ Skip Phase 2 analysis agents. Instead:
329
+ - Use templates from `references/greenfield-templates.md`
330
+ - Base decisions on user's tech stack choice
331
+ - Design a standard 3-layer architecture
332
+
333
+ ---
334
+
335
+ ## Phase 3: Delta Synthesis
336
+
337
+ **Goal**: Merge analysis results and compute exactly what needs to be created/updated.
338
+
339
+ ### 3.1 Read Analysis Results
340
+
341
+ ```bash
342
+ cat harness/.analysis/architecture.json
343
+ cat harness/.analysis/audit.json
344
+ cat harness/.analysis/environment.json
345
+ ```
346
+
347
+ ### 3.2 Compute Delta
348
+
349
+ Create a delta list:
350
+
351
+ ```markdown
352
+ ## Delta: What Needs to Be Done
353
+
354
+ ### Core To Create (doesn't exist)
355
+ - [ ] AGENTS.md
356
+ - [ ] docs/ECL.md
357
+ - [ ] docs/STATUS.md
358
+ - [ ] docs/ARCHITECTURE.md
359
+ - [ ] scripts/lint-deps.go
360
+ - [ ] scripts/harness-change.{ps1|sh|mjs|py}
361
+ - [ ] scripts/harness-evolve.{ps1|sh|mjs|py}
362
+ - [ ] scripts/lint-ecl.{ps1|sh|mjs|py}
363
+ - [ ] scripts/lint-encoding.{ps1|sh|mjs|py}
364
+ - [ ] harness/changes/{active,parking,archive}
365
+ - [ ] harness/templates/change/
366
+ - [ ] harness/config/environment.json
367
+ - [ ] harness/evolution/{state.json,results.tsv,proposals/} (`pending.md` is generated later only when the archive threshold is reached)
368
+
369
+ ### Optional Advanced (only if explicitly requested)
370
+ - [ ] harness/eval/ — agent evaluation datasets and runner inputs
371
+ - [ ] harness/trace/ — execution traces for agent runs
372
+ - [ ] harness/state/ — executor runtime state
373
+ - [ ] harness/checkpoints/ — resumable execution checkpoints
374
+ - [ ] harness/memory/ — long-term agent memory experiments
375
+ - [ ] harness/metrics/ — execution and quality metrics
376
+
377
+ ### To Update (exists but has gaps)
378
+ - [ ] docs/DEVELOPMENT.md — missing build commands
379
+ - [ ] scripts/lint-quality.py — missing 3 packages in layer map
380
+
381
+ ### Already Good (no changes needed)
382
+ - [x] Makefile — has all required targets
383
+ - [x] .github/workflows/ci.yml — properly configured
384
+ ```
385
+
386
+ ### 3.3 Confirm with User (if confirmation tool is available)
387
+
388
+ For significant changes:
389
+
390
+ ```json
391
+ {
392
+ "question": "I've analyzed the codebase. Ready to proceed with these changes?",
393
+ "header": "Confirm",
394
+ "multiSelect": false,
395
+ "options": [
396
+ {"label": "Yes, proceed with all", "description": "Create/update all identified items"},
397
+ {"label": "Show me the details first", "description": "I'll explain what each change involves"},
398
+ {"label": "Only critical items", "description": "Just P0/P1 items, skip P2/P3 for now"}
399
+ ]
400
+ }
401
+ ```
402
+
403
+ ---
404
+
405
+ ## Phase 4: Creation/Update
406
+
407
+ **Goal**: Create or update all harness files from the delta.
408
+
409
+ ### 4.1 Execution Mode
410
+
411
+ Use subagents only when authorized and available. Otherwise, perform the same work inline. Keep write scopes disjoint if using parallel workers.
412
+
413
+ Creation responsibilities:
414
+
415
+ - Documentation: follow `agents/creator-docs.md`; create/update AGENTS.md, docs/ECL.md, docs/STATUS.md, docs/ARCHITECTURE.md, docs/DEVELOPMENT.md, and design docs. AGENTS.md is the target project's entry map, not a harness creation record. Keep the first screen project-first, but preserve ECL/current-change priority in context loading: `AGENTS.md` -> `docs/ECL.md` -> active change if present -> auto-evolve pending if present -> otherwise `docs/STATUS.md` -> task-specific project docs.
416
+ - Linters: follow `agents/creator-linters.md`; create/update dependency, quality, ECL, and encoding checks.
417
+ - Config and scripts: follow `agents/creator-config.md`; create/update environment contract, harness scripts, changes directories/templates, lightweight evolution state, harness-change, harness-evolve, Makefile targets, and CI. Create advanced directories only when the confirmed scope requires them.
418
+
419
+ ECL change templates must include `summary.md`, `spec.md`, `plan.md`, `tasks.md`, and
420
+ `reviews/review.md`. `spec.md` captures WHAT/WHY, `plan.md` captures HOW and planning-discovered
421
+ spec gaps, and `tasks.md` is generated only after the spec/plan gate is ready enough for
422
+ implementation. Do not require old archived changes to contain `plan.md`; compatibility applies to
423
+ history.
424
+
425
+ Important: do not create static verification config such as `harness/config/verify.json`. Verification plans are generated at runtime by the executor from `environment.json` and the task context.
426
+
427
+ Strict CI rule: default CI must include normal business quality gates (`lint`, `typecheck`, `test`,
428
+ `build`, and backend/package-specific equivalents when available) plus harness checks. Do not remove
429
+ or skip business gates because the baseline is red. If the baseline was already red, explain that CI
430
+ will be red until the pre-existing project issues are fixed. Generate staged or relaxed CI only when
431
+ the user explicitly asks for it.
432
+
433
+ Command surface rule: create ECL scripts for the selected profile, not a hardcoded shell. If Bash is
434
+ selected on Windows, document Git Bash, WSL, MSYS2, or CI Linux shell requirements in the generated
435
+ environment/development docs. If PowerShell is selected, detect whether `pwsh` is available; if not,
436
+ use `powershell -NoProfile -ExecutionPolicy Bypass`. PowerShell templates must be compatible with
437
+ Windows PowerShell 5.1: avoid ambiguous overloads such as `TrimStart(".\")`, and avoid non-ASCII
438
+ mojibake marker string literals in `.ps1`; represent markers by Unicode codepoint or another
439
+ PS5-safe construction.
440
+
441
+ ### 4.2 For Empty Projects: Also Create Business Code Plan
442
+
443
+ For empty projects, add one more agent:
444
+
445
+ ```
446
+ Agent("create-exec-plan", prompt="""
447
+ Create execution plan for business code (harness-executor will implement this):
448
+
449
+ Tech stack: {TECH}
450
+ Project type: {from user choice}
451
+ Architecture: 3-layer (Types → Core → Entry Points)
452
+
453
+ Create: docs/exec-plans/active/bootstrap-code.md
454
+
455
+ Contents:
456
+ - Full source code for initial project structure
457
+ - main.go/index.ts/main.py entry point
458
+ - Basic types and core logic
459
+ - Test files
460
+
461
+ This is for harness-executor to implement — not ecl-harness-engineer's responsibility.
462
+ """)
463
+ ```
464
+
465
+ ### 4.3 Wait for Creation Completion
466
+
467
+ Agents will notify when done. Collect any issues they encountered.
468
+
469
+ ---
470
+
471
+ ## Phase 5: Verification + Handoff
472
+
473
+ **Goal**: Ensure everything works, then hand off or present results.
474
+
475
+ ### 5.1 Run Verification
476
+
477
+ ```bash
478
+ # 0. Compare against the baseline snapshot
479
+ # Re-run the same existing lint/typecheck/test/build commands captured in Phase 1.
480
+
481
+ # 1. Harness checks pass
482
+ make verify-harness || npm run lint:harness || {generated_harness_lint_command}
483
+
484
+ # 2. Architecture linters pass
485
+ make lint-arch || npm run lint:arch
486
+
487
+ # 3. Business build/test gates run
488
+ go build ./... || npm run build || python -m compileall .
489
+
490
+ # 4. AGENTS.md size check
491
+ wc -l AGENTS.md # Should be 80-120 lines
492
+
493
+ # 4b. AGENTS.md content gate
494
+ # Confirm it explains project identity, core workflow/domain model, source entrypoints,
495
+ # task-based verification, active-change-before-STATUS loading, and contains no
496
+ # ECL Harness Engineer internal boundary language.
497
+
498
+ # 5. All expected files exist
499
+ test -f AGENTS.md && echo "✓ AGENTS.md"
500
+ test -f docs/ARCHITECTURE.md && echo "✓ ARCHITECTURE.md"
501
+ test -f docs/ECL.md && echo "✓ ECL.md"
502
+ test -f docs/STATUS.md && echo "✓ STATUS.md"
503
+ test -f scripts/lint-deps* && echo "✓ lint-deps"
504
+ test -f scripts/harness-change.* && echo "✓ harness-change"
505
+ test -f scripts/lint-ecl.* && echo "✓ lint-ecl"
506
+ test -f scripts/harness-evolve.* && echo "✓ harness-evolve"
507
+ test -d harness/ && echo "✓ harness/"
508
+ test -d harness/changes && echo "✓ harness/changes"
509
+ test -f harness/evolution/state.json && echo "✓ evolution state"
510
+
511
+ # 6. Design docs exist (not just index)
512
+ find docs/design-docs -name "*.md" ! -name "index.md" | wc -l
513
+ ```
514
+
515
+ Classify every verification result:
516
+
517
+ | Classification | Meaning |
518
+ |----------------|---------|
519
+ | Harness pass | Harness-created checks/files/scripts work |
520
+ | Pre-existing project failure | The same command failed in the Phase 1 baseline |
521
+ | New regression | The command passed in Phase 1 and fails after harness creation |
522
+ | Not available | The command/script does not exist in this project |
523
+
524
+ AGENTS.md content gate:
525
+ - A new agent can tell what the project does within 30 seconds.
526
+ - The core product/system workflow or domain model is visible.
527
+ - Main source entrypoints and task-to-directory mapping are visible.
528
+ - Verification guidance maps to task type.
529
+ - Context loading reads `docs/ECL.md` first, then active change when present.
530
+ - If no active change exists and `harness/evolution/pending.md` exists, read it before
531
+ `docs/STATUS.md`, mention it as pending maintenance, and ask whether to handle it now unless the
532
+ user already prioritized the current task. Reading or asking does not start auto-evolve and must
533
+ not block ordinary user work.
534
+ - If no active change exists and no pending evolution exists, context loading reads `docs/STATUS.md` before task-specific project docs.
535
+ - For structured work, `docs/ECL.md` explains Small Change vs Structured Change, bounded Intake
536
+ Review, plan-first input handling, and the spec/plan review gate.
537
+ - Archive history is loaded selectively through `docs/STATUS.md` paths or `harness/changes/INDEX.json`, starting with historical `summary.md` only.
538
+ - No skill-internal boundary leaks, such as sections or sentences that describe this skill's own scope limits as target-project rules.
539
+
540
+ ### 5.2 STATUS.md Handoff Update
541
+
542
+ When a target project uses ECL changes, maintain `docs/STATUS.md` as a lightweight handoff file.
543
+ It is not the authority while an active change exists, but it becomes the default recent-history
544
+ entry point after the active change is closed.
545
+
546
+ Close-change handoff protocol:
547
+
548
+ 1. Before running `harness-change close`, read the active change `summary.md`, `spec.md`,
549
+ `plan.md`, `tasks.md`, and relevant `reviews/`; update `docs/STATUS.md` with completed work,
550
+ verification results, residual risks, and the next recommended resume point.
551
+ 2. Run the close command so the active change moves to `harness/changes/archive/...` and
552
+ `harness/changes/INDEX.json` is rebuilt.
553
+ 3. After close, update `docs/STATUS.md` again with the final archive path, normally pointing to
554
+ the archived `summary.md`.
555
+ 4. Run the harness lint command (`npm run lint:harness`, `make verify-harness`, or the generated
556
+ ECL lint command) to confirm STATUS, ECL structure, and INDEX state are consistent.
557
+
558
+ Hooks and CI may validate `docs/STATUS.md`, but must not auto-write it or move changes.
559
+
560
+ ### 5.3 Auto-Evolve Check
561
+
562
+ Core harnesses include lightweight auto-evolve by default. The script layer only detects when
563
+ enough new archive evidence exists and writes `harness/evolution/pending.md`; Codex performs the
564
+ semantic improvement pass.
565
+
566
+ Trigger model: `harness-change close` and `reindex` run `harness-evolve check`; `new` only reminds
567
+ when pending exists. Hooks and CI may warn, but must not modify docs, scripts, STATUS, or changes.
568
+ Generated scripts do not call subagents. They only count archive evidence and create pending
569
+ context. When no active change exists and Codex notices pending maintenance, it should ask the user
570
+ whether to handle it now unless the user already prioritized the current task. Asking does not start
571
+ pending evolution.
572
+
573
+ `harness/evolution/pending.md` is a maintenance reminder, not a hard lock. Reading it for context
574
+ does not start pending evolution. Pending evolution starts only when Codex creates or uses an
575
+ `auto-evolve-harness-*` change, writes an evolution proposal/result, or edits Harness files based
576
+ on the pending evidence. Once started, finish with a proposal, one `harness/evolution/results.tsv`
577
+ row, and `harness-evolve mark-complete`; otherwise park or close blocked, not completed.
578
+
579
+ Apply only the smallest evidence-backed delta that passes review. No independent scorer =
580
+ no auto-apply: user approval to handle pending implies permission to request an independent
581
+ auditor/subagent when the environment supports it. If the environment still requires explicit
582
+ authorization, ask once. If scoring is unavailable, declined, or still unauthorized after asking,
583
+ record `noop` with `eval_mode=dry_run`, keep the proposal, run `mark-complete`, and stop.
584
+ Machinery repair
585
+ (`harness-evolve`, pending templates, lint) does not complete pending evolution by itself; after
586
+ repair, still evaluate candidate archives or leave the work parked/blocked.
587
+
588
+ Detailed proposal format, scoring weights, status values, and complexity budget live in
589
+ `references/ecl-harness.md`.
590
+
591
+ ### 5.4 Present Summary
592
+
593
+ ```markdown
594
+ ## Harness Infrastructure Complete
595
+
596
+ **Project**: {project-name}
597
+ **Tech Stack**: {TECH}
598
+ **Files Created/Updated**: {count}
599
+
600
+ ### Created Files
601
+ - AGENTS.md ({N} lines)
602
+ - docs/ARCHITECTURE.md
603
+ - docs/ECL.md
604
+ - docs/STATUS.md
605
+ - docs/DEVELOPMENT.md
606
+ - docs/design-docs/{component}.md
607
+ - scripts/lint-deps.{ext}
608
+ - scripts/lint-quality.{ext}
609
+ - scripts/harness-change.{ps1|sh|mjs|py}
610
+ - scripts/lint-ecl.{ps1|sh|mjs|py}
611
+ - scripts/lint-encoding.{ps1|sh|mjs|py}
612
+ - scripts/harness-evolve.{ps1|sh|mjs|py}
613
+ - harness/config/environment.json
614
+ - harness/changes/
615
+ - harness/evolution/
616
+ - harness/templates/change/
617
+ - Makefile
618
+
619
+ ### Verification Results
620
+ - Harness checks: ✓
621
+ - Architecture checks: ✓
622
+ - Business gates: ✓ or pre-existing failures listed below
623
+ - AGENTS.md size: ✓ ({N} lines)
624
+
625
+ ### Pre-existing Project Failures
626
+ - {List baseline-red commands and short reasons, or "None observed."}
627
+
628
+ ### New Regressions Introduced By Harness
629
+ - {List commands that passed before and failed after, or "None observed."}
630
+
631
+ ### Next Steps
632
+ {For empty projects: "Run harness-executor to implement business code from docs/exec-plans/active/bootstrap-code.md"}
633
+ {For existing projects: "The harness is ready. AI agents can now use AGENTS.md as their entry point."}
634
+ ```
635
+
636
+ ### 5.5 Automatic Handoff (for Empty Projects)
637
+
638
+ If this was an empty project with a bootstrap exec-plan, invoke harness-executor:
639
+
640
+ ```
641
+ Skill(skill="harness-executor")
642
+ ```
643
+
644
+ With context: "Implement the bootstrap exec-plan at docs/exec-plans/active/bootstrap-code.md"
645
+
646
+ ---
647
+
648
+ ## Core Principles
649
+
650
+ ### 1. Repository as Single Source of Truth
651
+
652
+ Agents cannot access Slack, Google Docs, or tribal knowledge. If it's not in the repository, it doesn't exist for the agent.
653
+
654
+ ### 2. AGENTS.md is a Map, Not a Manual
655
+
656
+ Keep it 80-120 lines. Link to detailed docs, don't embed them.
657
+
658
+ ### 3. Enforce Invariants Mechanically
659
+
660
+ Linter errors must be agent-actionable:
661
+ ```
662
+ ✗ BAD: "Forbidden import in core/types/user.go"
663
+
664
+ ✓ GOOD: "core/types/user.go:15 imports core/config (layer 0 → layer 2).
665
+ Layer 0 packages must have NO internal dependencies.
666
+
667
+ Fix options:
668
+ 1. Move config-dependent logic to a higher layer
669
+ 2. Pass the config value as a parameter
670
+ 3. Use dependency injection via an interface"
671
+ ```
672
+
673
+ ### 4. Build to Delete
674
+
675
+ Every component should be replaceable. Capabilities that required complex pipelines yesterday may be single prompts tomorrow.
676
+
677
+ ### 5. Start Simple
678
+
679
+ Atomic, well-documented tools > complex agent choreography. Don't over-engineer.
680
+
681
+ ### 6. Change State Is Explicit
682
+
683
+ Use a single `harness/changes/active/` task for personal development. Move paused work to `parking/` and closed work to `archive/` with the generated `scripts/harness-change.*` command. Maintain `docs/STATUS.md` as the soft handoff summary after active work is closed. Never hand-edit `harness/changes/INDEX.json`; it is a generated index rebuilt by `park`, `close`, `resume`, and `reindex`. Structured changes use `spec.md` for WHAT/WHY, `plan.md` for HOW, and `tasks.md` for executable work.
684
+
685
+ ### 7. Harness Evolves From Evidence
686
+
687
+ Every few closed changes, the generated `scripts/harness-evolve.* check` command may create
688
+ `harness/evolution/pending.md`. Treat it as a maintenance reminder to improve harness rules from
689
+ real archived evidence, not as a hard blocker for unrelated user work. If you start acting on the
690
+ pending evidence, first refresh `harness/changes/INDEX.json` and use the current eligible archive
691
+ window; the Candidate Archives in an old pending file are a trigger snapshot, not the only evidence.
692
+ Then finish with proposal + results.tsv + `mark-complete`, or park/block the work.
693
+ Do not turn one-off business bugs into permanent process. Keep only changes that improve the audit
694
+ score and pass validation.
695
+
696
+ ---
697
+
698
+ ## Reference Files
699
+
700
+ | File | When to Read | Contents |
701
+ |------|-------------|----------|
702
+ | `references/greenfield-templates.md` | Empty projects (Phase 2.5) | Complete Go/TS/Python scaffolding |
703
+ | `references/documentation-templates.md` | Phase 4 doc creation | Doc templates with numbered sections |
704
+ | `references/linter-templates.md` | Phase 4 linter creation | Linter code templates per language |
705
+ | `references/ecl-harness.md` | ECL-aware harness creation | docs/ECL.md, docs/STATUS.md, change lifecycle, INDEX.json, PowerShell script templates |
706
+ | `references/darwin-eval-prompts.md` | Skill quality evaluation | Dry-run prompts for darwin-skill review |
707
+ | `references/environment-detection-guide.md` | Phase 2 env analysis | Environment ecosystem detection |
708
+ | `references/environment-config-guide.md` | Phase 4 config creation | Startup, services, env vars, user-confirmation templates |
709
+ | `references/adapters/typescript.md` | TypeScript/Node.js projects | npm scripts, Node linters, package-manager detection, CI defaults |
710
+ | `references/adapters/{go,python,rust,java,generic}.md` | Matching detected stacks | Language-specific commands and conventions |
711
+
712
+ Agent prompts for Phase 2 and Phase 4 subagents are in `agents/`.
713
+
714
+ For small projects (< 20 files) or when subagents aren't available, execute phases inline instead of spawning agents.