Commit c0ec800
authored
feat(skills)!: move machine envelope to orchestration layer (#28)
## What
Moves the machine-readable turn envelope out of the per-skill contract
and into the orchestration layer that is its only consumer.
- Removes the `## Machine envelope` section and its turn-contract
emission clause from the 14 user-facing skills that carried it:
`audit-docs, audit-pr, bump-skill, design-feature, execute-phase,
generate-docs, init-workspace, log-session, plan-feature, plan-fix,
product-audit, review-change, ship-roadmap, triage-issue`. Every turn
now ends cleanly at the closing `→ Next:` block.
- `workflow-status` is unchanged — emitting the envelope inline *is* its
function.
- `orchestration-envelope` (internal) gains the canonical
**driver-injected system-prompt snippet** and documents the **repair
loop** (parse-fail → re-invoke with `Emit only the machine envelope for
the turn above.`; one retry, then a driver-level `FAILED`).
- `docs/workflow/ORCHESTRATION.md` and
`docs/workflow/PORTABLE_PROMPT.md` mirror the snippet + repair-loop
protocol for driver authors.
- MAJOR version bump for each of the 14 skills; MINOR for
`orchestration-envelope`. `CHANGELOG.md`/`CHANGELOG.es.md` rows, README
skill/model tables refreshed, `docs/workflow/MIGRATION.md` entry added.
- `packages/agentic-workflow-schema/` (the envelope JSON schema + npm
package) is untouched — parsers keep working.
## Why
- The envelope's only consumer is an external driver/orchestrator; in
interactive chat the trailing JSON was noise.
- Weak models drop end-of-document duties — the workflow's own stated
reasoning for front-loading turn contracts — yet the envelope sat at the
very end, so weak models were penalized for a duty a static `SKILL.md`
instruction could never actually enforce or recover from.
- Enforcement now sits at the layer that reads the envelope: a driver
can detect a missing envelope and re-ask, something a skill body cannot
do for itself.
## Driver gate note
The SPEC records this as a driver-gated feature: execution should not
start until an external driver's repair loop is confirmed ready. No such
external driver exists yet for this repo (user-confirmed during
execution), so this was proceeded under `--force`, recorded in
`decisions.md` (D9). Any future driver picking up this repo must inject
the canonical snippet (from `orchestration-envelope`) and implement the
repair loop before relying on these 14 skills' output for routing.
## Evidence
- AC1–AC10 all green (see
`docs/features/10-envelope-orchestrator-only/TASKS.md` for the full
per-phase verification log).
- `npx skills add . --list` — 56 skills discovered, no malformed
frontmatter.
- `git diff --name-only origin/main...HEAD | grep
'^packages/agentic-workflow-schema/'` — no output (schema untouched).
Closes #1733 files changed
Lines changed: 1006 additions & 423 deletions
File tree
- docs
- features
- 01-generate-docs
- 06-design-feature
- 10-envelope-orchestrator-only
- workflow
- skills
- audit-docs
- audit-pr
- bump-skill
- design-feature
- execute-phase
- generate-docs
- init-workspace
- log-session
- orchestration-envelope
- plan-feature
- plan-fix
- product-audit
- review-change
- ship-roadmap
- triage-issue
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
357 | | - | |
358 | | - | |
359 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
347 | 352 | | |
348 | 353 | | |
349 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
| |||
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
448 | | - | |
449 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
450 | 454 | | |
451 | 455 | | |
452 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments