orchestrix-skills 0.3.0 → 0.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/README.md +7 -3
- package/package.json +1 -1
- package/project-scaffold/core-config.yaml +5 -1
- package/project-scaffold/knowledge/taste/coding-standards.md +10 -7
- package/skills/brainstorm/SKILL.md +3 -2
- package/skills/deploy/SKILL.md +83 -0
- package/skills/draft-story/SKILL.md +9 -7
- package/skills/investigate/SKILL.md +80 -0
- package/skills/map-codebase/SKILL.md +78 -0
- package/skills/orchestrate/SKILL.md +86 -7
- package/skills/smoke-test/SKILL.md +88 -0
package/README.md
CHANGED
|
@@ -15,11 +15,15 @@ hosting, and team features are the premium layer — see below.
|
|
|
15
15
|
intent
|
|
16
16
|
└─ orchestrate (root: warm context, wires skills by output→input, enforces gates)
|
|
17
17
|
├─ brainstorm ──(needs facts?)─→ research
|
|
18
|
+
├─ (existing repo?) ──→ map-codebase (brownfield entry: evidence-based map → registry)
|
|
18
19
|
├─ (has UI?) ──→ design-system (once) → design-ui
|
|
19
20
|
├─ (arch decision?) ──→ design-architecture
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
├─ draft-story → implement → run-tests → review-code → commit
|
|
22
|
+
│ ↑ verify ↑ design-review (UI only)
|
|
23
|
+
│ (objective) ↑ accept (batched)
|
|
24
|
+
├─ (verify failing, cause unknown?) ──→ investigate (root cause → rework)
|
|
25
|
+
├─ (runnable app?) ──→ smoke-test (drive real flows, evidence captured)
|
|
26
|
+
└─ (accepted + ship it?) ──→ deploy (inline gate, rollback-first)
|
|
23
27
|
```
|
|
24
28
|
|
|
25
29
|
Human gates are front-loaded (planning = direction) and at the end (acceptance);
|
package/package.json
CHANGED
|
@@ -12,7 +12,11 @@ work: # work products — skills WRITE these (outputs:), humans review at gates
|
|
|
12
12
|
stories: docs/stories # <slug>.md (flat, origin tag)
|
|
13
13
|
research: docs/research # research briefs
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
# FIXED platform protocol — the orchestrate skill writes, and the platform polls,
|
|
16
|
+
# `.orchestrate/ledger.jsonl` + `.orchestrate/verify/` at this literal path. It is
|
|
17
|
+
# NOT a remappable namespace: changing it breaks live progress rendering. Listed
|
|
18
|
+
# here for transparency only.
|
|
19
|
+
runtime: .orchestrate # ledger + verify logs (ephemeral, gitignored)
|
|
16
20
|
|
|
17
21
|
# Org-level cascade (shared taste/standards across many products) is intentionally
|
|
18
22
|
# NOT enabled yet (YAGNI). When needed: add an `extends:` base that project paths
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# taste/coding-standards
|
|
2
2
|
|
|
3
3
|
Rules `implement` and `review-code` read as their taste slice. Terse rules, each
|
|
4
|
-
with provenance. Not prose. Seed
|
|
4
|
+
with provenance. Not prose. Seed is empty — this is honest: no project
|
|
5
|
+
preferences exist yet. Rows enter via human seeding (orchestrate's first-run
|
|
6
|
+
preflight offers this) or the metabolism loop — never as unapproved defaults.
|
|
5
7
|
|
|
6
|
-
| id
|
|
7
|
-
|
|
|
8
|
-
| ts-strict | TypeScript strict mode on; no `any` without an inline justification | Catches runtime errors at compile time | human | 2026-06-27 | dorayo |
|
|
9
|
-
| named-exports | Named exports only; no default exports | Refactor-safe imports, better autocomplete | human | 2026-06-27 | dorayo |
|
|
10
|
-
| no-swallow | Never swallow errors; handle or rethrow with context | Silent failures are undebuggable | human | 2026-06-27 | dorayo |
|
|
11
|
-
| pure-io-split | Keep I/O at the edges; core logic pure and testable | Testability, fewer mocks | human | 2026-06-27 | dorayo |
|
|
8
|
+
| id | rule | rationale | source | added | approved_by |
|
|
9
|
+
| --- | ---- | --------- | ------ | ----- | ----------- |
|
|
12
10
|
|
|
13
11
|
<!--
|
|
12
|
+
Row shape (copy per rule — every row needs real provenance):
|
|
13
|
+
|
|
14
|
+
| ts-strict | TypeScript strict mode on; no `any` without inline justification | Catches runtime errors at compile time | human | <date> | <who> |
|
|
15
|
+
| named-exports | Named exports only; no default exports | Refactor-safe imports, better autocomplete | human | <date> | <who> |
|
|
16
|
+
|
|
14
17
|
Metabolism: when a human corrects taste at the accept gate, append or supersede a
|
|
15
18
|
row here (source: <skill or human>, with date + approver). Supersede, don't
|
|
16
19
|
delete — keep what the org learned visible.
|
|
@@ -29,8 +29,9 @@ but always presented and approved.
|
|
|
29
29
|
|
|
30
30
|
## Process
|
|
31
31
|
|
|
32
|
-
1. **Explore context.** Read the relevant
|
|
33
|
-
|
|
32
|
+
1. **Explore context.** Read the relevant knowledge slices (`taste/*`,
|
|
33
|
+
`architecture/*`, `registry/*` — physical paths from `core-config.yaml`,
|
|
34
|
+
default under `knowledge/`) and existing code before asking anything.
|
|
34
35
|
2. **Scope check first.** If the intent spans independent subsystems, say so and
|
|
35
36
|
help decompose into sub-projects — each gets its own spec → stories → build.
|
|
36
37
|
Don't refine details of something that should be split.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy
|
|
3
|
+
description: Use when an ACCEPTED deliverable must be shipped to a live environment. Never mid-run, never on unaccepted work.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: [Read, Bash]
|
|
6
|
+
metadata:
|
|
7
|
+
contract:
|
|
8
|
+
inputs: [accepted_deliverable, target]
|
|
9
|
+
reads: [registry/deploy]
|
|
10
|
+
outputs: [deploy_report]
|
|
11
|
+
authority: "Run the project's DOCUMENTED deploy command for the named target, and its rollback. No infra provisioning, no DNS/billing/secret changes, no undocumented deploy paths."
|
|
12
|
+
verify: "A real request against the LIVE target succeeds post-deploy (the deploy tool's own 'success' does not count), and one core flow responds correctly."
|
|
13
|
+
accept:
|
|
14
|
+
when: "always — deploying is irreversible and user-facing."
|
|
15
|
+
timing: inline
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Deploy (Ship Accepted Work, With a Way Back)
|
|
19
|
+
|
|
20
|
+
The most dangerous skill in the graph. Everything here is designed around two
|
|
21
|
+
facts: deploys are user-facing, and the only safe deploy is one you can undo.
|
|
22
|
+
|
|
23
|
+
**Core principle:** No rollback plan, no deploy. If you cannot state the exact
|
|
24
|
+
command that undoes this deploy, you are not ready to run the one that does it.
|
|
25
|
+
|
|
26
|
+
## Preconditions — ALL must hold, verify each now
|
|
27
|
+
|
|
28
|
+
1. **The work is accepted.** Final acceptance happened; you are not deploying
|
|
29
|
+
to "see if it works" (that is `smoke-test`'s job, locally).
|
|
30
|
+
2. **The tree is clean and tested.** `git status` clean; `run-tests` green on
|
|
31
|
+
the exact commit being shipped (fresh run, not remembered).
|
|
32
|
+
3. **The deploy method is documented** in `registry/deploy` (or the project's
|
|
33
|
+
own deploy config/scripts). Not documented → STOP and ask the human how this
|
|
34
|
+
project ships. NEVER guess a deploy path — a guessed deploy against the
|
|
35
|
+
wrong target is the worst failure this graph can produce.
|
|
36
|
+
4. **The target is unambiguous.** "Deploy" without a named target defaults to
|
|
37
|
+
asking, not to production.
|
|
38
|
+
|
|
39
|
+
## Process
|
|
40
|
+
|
|
41
|
+
1. **Write the rollback plan first.** Record: the currently-live version
|
|
42
|
+
identifier (commit/tag/deployment id) and the exact rollback command.
|
|
43
|
+
Put both in the report BEFORE deploying.
|
|
44
|
+
2. **Inline human gate (this skill's accept).** Present: target, version to
|
|
45
|
+
ship, one-line change summary, rollback command. Deploy only on explicit
|
|
46
|
+
sign-off. This gate cannot be batched or deferred.
|
|
47
|
+
3. **Deploy** with the documented command. Capture the full output to
|
|
48
|
+
`.orchestrate/verify/deploy-<target>.log`.
|
|
49
|
+
4. **Post-verify against the LIVE target.** A real HTTP request (or the
|
|
50
|
+
platform equivalent) to the deployed URL: correct status AND expected
|
|
51
|
+
content, plus one core flow. The deploy tool saying "success" is step 3,
|
|
52
|
+
not step 4.
|
|
53
|
+
5. **On post-verify failure: roll back immediately** with the recorded
|
|
54
|
+
command, re-verify the old version is live again, and report honestly.
|
|
55
|
+
A failed deploy cleanly rolled back is a good outcome; a broken prod
|
|
56
|
+
left up while you debug is not.
|
|
57
|
+
|
|
58
|
+
## Output: `deploy_report`
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
# Deploy — <target>
|
|
62
|
+
|
|
63
|
+
Shipped: <version/commit> (previous live: <version>)
|
|
64
|
+
Command: <documented command used>
|
|
65
|
+
Post-verify: <request + result> — passed/failed
|
|
66
|
+
Rollback: <command> — standing by | EXECUTED at <time>, old version re-verified live
|
|
67
|
+
Log: .orchestrate/verify/deploy-<target>.log
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Red flags — stop
|
|
71
|
+
|
|
72
|
+
- Deploying work that has not passed final acceptance
|
|
73
|
+
- Guessing the deploy method because `registry/deploy` is empty
|
|
74
|
+
- No recorded rollback command before deploying
|
|
75
|
+
- Treating the deploy tool's success message as proof the site works
|
|
76
|
+
- An ambiguous target resolved to production by default
|
|
77
|
+
- Debugging a broken deploy IN production instead of rolling back first
|
|
78
|
+
|
|
79
|
+
## Done
|
|
80
|
+
|
|
81
|
+
Live target verified serving the new version (or cleanly rolled back), report
|
|
82
|
+
written. Durable facts learned (the deploy command, the health URL) go back to
|
|
83
|
+
`registry/deploy` via the metabolism rules.
|
|
@@ -7,8 +7,8 @@ metadata:
|
|
|
7
7
|
contract:
|
|
8
8
|
inputs: [requirement, context]
|
|
9
9
|
reads: [taste/coding-standards, registry/api, registry/db, front-end-spec?]
|
|
10
|
-
outputs: [
|
|
11
|
-
authority: "Write one flat story file
|
|
10
|
+
outputs: [stories/<slug>.md]
|
|
11
|
+
authority: "Write one flat story file in the stories namespace (physical path from core-config.yaml; default docs/stories/). No folders. No source code. No production. No spend."
|
|
12
12
|
verify: "Every requirement maps to at least one acceptance criterion; constraints are copied verbatim; no placeholders (no TBD/TODO/'handle edge cases')."
|
|
13
13
|
accept:
|
|
14
14
|
when: "Always — this output sets the direction the whole build rests on."
|
|
@@ -25,7 +25,8 @@ implement it without guessing.
|
|
|
25
25
|
|
|
26
26
|
## Output
|
|
27
27
|
|
|
28
|
-
Write ONE flat Markdown file
|
|
28
|
+
Write ONE flat Markdown file in the stories namespace (physical path from
|
|
29
|
+
`core-config.yaml`, default `docs/stories/`): `<slug>.md` — `<slug>` is a kebab
|
|
29
30
|
handle from the title. No folders, no `epic.story` numbering. Produce exactly
|
|
30
31
|
these sections (with frontmatter) and nothing more.
|
|
31
32
|
|
|
@@ -76,9 +77,9 @@ What this story deliberately does NOT do.
|
|
|
76
77
|
## Rules
|
|
77
78
|
|
|
78
79
|
- **One story, one coherent deliverable.** If it spans independent subsystems,
|
|
79
|
-
split into separate stories — each its own
|
|
80
|
-
sharing the same `origin` so the set is queryable as one group.
|
|
81
|
-
- **Flat, no hierarchy.** One file per story
|
|
80
|
+
split into separate stories — each its own `<slug>.md` in the stories
|
|
81
|
+
namespace, all sharing the same `origin` so the set is queryable as one group.
|
|
82
|
+
- **Flat, no hierarchy.** One file per story in the stories dir. Grouping is
|
|
82
83
|
the `origin` field (a query the AI runs), never a folder. Order comes from
|
|
83
84
|
Interfaces (dependencies), never from a number.
|
|
84
85
|
- **No placeholders.** "Add validation", "handle errors", "TBD" are failures.
|
|
@@ -101,6 +102,7 @@ What this story deliberately does NOT do.
|
|
|
101
102
|
|
|
102
103
|
## Done
|
|
103
104
|
|
|
104
|
-
Write
|
|
105
|
+
Write the story file in the stories namespace. Hand off its path for direction
|
|
106
|
+
confirmation
|
|
105
107
|
(this skill's `accept` is `inline`): the human approves the direction, or sends
|
|
106
108
|
it back, before `implement` begins.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: investigate
|
|
3
|
+
description: Use when something is broken and the CAUSE is unknown — a repeatedly failing verify, a bug report, a regression — before any fix is attempted.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: [Read, Bash, Grep, Glob]
|
|
6
|
+
metadata:
|
|
7
|
+
contract:
|
|
8
|
+
inputs: [symptom, context?, prior_attempts?]
|
|
9
|
+
reads: [registry/architecture, taste/coding-standards]
|
|
10
|
+
outputs: [root_cause_report]
|
|
11
|
+
authority: "Read code and run diagnostics/reproductions. Temporary instrumentation is allowed but MUST be reverted before finishing. No fixes — the fix belongs to a re-dispatched implement."
|
|
12
|
+
verify: "The report contains a reproduction command that fails, and a mechanism that explains every observed symptom (not just the loudest one)."
|
|
13
|
+
accept:
|
|
14
|
+
when: "never — informational; it feeds the rework loop."
|
|
15
|
+
timing: deferred
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Investigate (Root Cause Before Any Fix)
|
|
19
|
+
|
|
20
|
+
Debugging is not "try changes until it passes". It is locating the mechanism.
|
|
21
|
+
|
|
22
|
+
**Core principle:** A fix you cannot explain mechanistically is not a fix — it
|
|
23
|
+
is a coincidence that will regress.
|
|
24
|
+
|
|
25
|
+
## The Iron Law
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
NO FIX WITHOUT A ROOT CAUSE STATED AS:
|
|
29
|
+
"X happens BECAUSE Y — evidenced by Z (something I observed this session)"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Process
|
|
33
|
+
|
|
34
|
+
1. **Reproduce.** Find the exact command/steps that show the symptom, run them,
|
|
35
|
+
capture the output verbatim. Read the error LITERALLY — the message usually
|
|
36
|
+
says what is wrong, not what you assume is wrong. Cannot reproduce → that IS
|
|
37
|
+
the finding (report the conditions tried; do not "fix" what you cannot see).
|
|
38
|
+
2. **Localize.** Shrink the search space with evidence, not intuition:
|
|
39
|
+
- `git log`/`git bisect` when it used to work — what changed?
|
|
40
|
+
- Binary-search the pipeline: add temporary instrumentation (prints/asserts)
|
|
41
|
+
at midpoints to find where good state becomes bad state.
|
|
42
|
+
- Minimize the reproduction — smallest input that still fails.
|
|
43
|
+
3. **Hypothesize and FALSIFY.** For each hypothesis, design the observation
|
|
44
|
+
that would DISPROVE it, then run it. A hypothesis you only sought
|
|
45
|
+
confirmation for is not tested. Two failed rounds on the same theory →
|
|
46
|
+
the bug is in an assumption one level deeper (the config, the framework
|
|
47
|
+
contract, the data, the environment) — widen, don't re-try harder.
|
|
48
|
+
4. **State the root cause** in the iron-law form, plus:
|
|
49
|
+
- the minimal fix scope (which file/function, what change class),
|
|
50
|
+
- the regression test that would have caught it,
|
|
51
|
+
- any OTHER symptoms this mechanism predicts (check them — a mechanism
|
|
52
|
+
that doesn't explain all symptoms is incomplete).
|
|
53
|
+
5. **Revert your instrumentation.** `git diff` must be clean when you finish.
|
|
54
|
+
|
|
55
|
+
## Output: `root_cause_report`
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
# Root cause — <symptom, one line>
|
|
59
|
+
|
|
60
|
+
## Reproduction — exact command; fails with <output tail>.
|
|
61
|
+
## Mechanism — X happens because Y. Evidence: Z (file:line / captured output).
|
|
62
|
+
## Fix scope — <file(s)>, <change class>. Explicitly NOT needed: <what a shotgun fix would have touched>.
|
|
63
|
+
## Regression test — <the test to add so this cannot silently return>.
|
|
64
|
+
## Ruled out — <hypotheses falsified and how> (saves the next person re-walking them).
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Red flags — stop and re-localize
|
|
68
|
+
|
|
69
|
+
- "Probably" / "might be" in the mechanism line
|
|
70
|
+
- A symptom fix: retry loops, sleeps, broad try/catch, widened types — with no
|
|
71
|
+
mechanism behind it
|
|
72
|
+
- Changing several things at once and observing "it passes now"
|
|
73
|
+
- A mechanism that explains one symptom but not the others
|
|
74
|
+
- Finishing with instrumentation still in the diff
|
|
75
|
+
|
|
76
|
+
## Done
|
|
77
|
+
|
|
78
|
+
Report written; reproduction demonstrably fails; diff clean. The orchestrator
|
|
79
|
+
re-dispatches `implement` with this report as `qa_feedback` — same capability,
|
|
80
|
+
now with a target instead of a guess.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: map-codebase
|
|
3
|
+
description: Use when entering an EXISTING codebase (brownfield) before designing or changing anything — build an evidence-based map of its architecture, conventions, and hazards.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: [Read, Bash, Grep, Glob]
|
|
6
|
+
metadata:
|
|
7
|
+
contract:
|
|
8
|
+
inputs: [repo_path, focus?]
|
|
9
|
+
reads: []
|
|
10
|
+
outputs: [codebase_map, registry_updates]
|
|
11
|
+
authority: "Read-only on source; non-mutating commands only (ls, grep, git log, test discovery). Writes go ONLY to the registry/* namespace (physical path from core-config.yaml; default knowledge/registry/)."
|
|
12
|
+
verify: "Every architectural claim in the map cites a file path you actually read; the traced flows exist in code, not in the README."
|
|
13
|
+
accept:
|
|
14
|
+
when: "never — informational; it feeds design and implement."
|
|
15
|
+
timing: deferred
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Map Codebase (Brownfield Entry)
|
|
19
|
+
|
|
20
|
+
Greenfield runs start from intent; brownfield runs start from SOMEONE ELSE'S
|
|
21
|
+
decisions. Changing code you haven't mapped produces changes that fight the
|
|
22
|
+
codebase — wrong layer, wrong convention, duplicated machinery.
|
|
23
|
+
|
|
24
|
+
**Core principle:** The map comes from reading code, not from directory names
|
|
25
|
+
or the README. A README describes what the project wishes it were; `git log`
|
|
26
|
+
and the source describe what it is.
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
1. **Inventory.** Layout, manifests (`package.json`/`pyproject`/`go.mod`…),
|
|
31
|
+
scripts, CI config, generated/vendored dirs (mark them DO-NOT-EDIT).
|
|
32
|
+
2. **Trace one or two REAL flows end to end** (guided by `focus` if given):
|
|
33
|
+
entry point → routing/dispatch → business logic → persistence/IO. Read the
|
|
34
|
+
actual files; record the chain as `file:symbol → file:symbol`. This step is
|
|
35
|
+
what separates a map from a guess.
|
|
36
|
+
3. **Extract conventions from evidence** — for each, cite the example file you
|
|
37
|
+
derived it from: naming, module boundaries, error handling style, test
|
|
38
|
+
location and framework, how config/env is read, commit message style.
|
|
39
|
+
4. **Hazards.** Migrations and how they run; generated code and what generates
|
|
40
|
+
it; global state; areas with no test coverage; anything `git log` shows as
|
|
41
|
+
churn-heavy (bug-prone) or untouched-for-years (fragile assumptions).
|
|
42
|
+
5. **Write back to the `registry/*` namespace** (physical path from
|
|
43
|
+
`core-config.yaml`; default `knowledge/registry/`) following the metabolism
|
|
44
|
+
governance in `orchestrate` (read-before-write, update-don't-append, facts
|
|
45
|
+
only):
|
|
46
|
+
- `registry/architecture.md` — the traced structure
|
|
47
|
+
- `registry/conventions.md` — the evidenced conventions
|
|
48
|
+
Registry holds FACTS about this codebase. Opinions and preferences belong
|
|
49
|
+
in `taste/*`, and only via a human correction — not from this skill.
|
|
50
|
+
|
|
51
|
+
## Output: `codebase_map`
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
# Codebase map — <repo> @ <commit>
|
|
55
|
+
|
|
56
|
+
## Shape — <stack, top-level layout, one paragraph>
|
|
57
|
+
## Traced flows
|
|
58
|
+
- <flow>: entry `a.ts:handler` → `b.ts:service` → `c.ts:repo` → <storage>
|
|
59
|
+
## Conventions (evidence-cited)
|
|
60
|
+
- <convention> — see <file>
|
|
61
|
+
## Hazards
|
|
62
|
+
- <hazard> — <why it bites> — <file/dir>
|
|
63
|
+
## Where a change like "<focus>" belongs — <layer/files>, following <convention>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Red flags — stop
|
|
67
|
+
|
|
68
|
+
- Architecture described from folder names without opening the files
|
|
69
|
+
- Repeating a README/document claim without spot-checking it in code
|
|
70
|
+
- A "convention" cited from zero examples
|
|
71
|
+
- Writing preferences/judgments into `registry/` (facts only)
|
|
72
|
+
- Editing anything outside the `registry/*` namespace
|
|
73
|
+
|
|
74
|
+
## Done
|
|
75
|
+
|
|
76
|
+
Map written with citations; registry updated. Downstream `design-architecture`
|
|
77
|
+
and `implement` read the registry and MUST follow the documented conventions —
|
|
78
|
+
that is the point of having mapped them.
|
|
@@ -4,10 +4,10 @@ description: Use when a goal must be delivered end-to-end by composing skills, w
|
|
|
4
4
|
license: MIT
|
|
5
5
|
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Task]
|
|
6
6
|
metadata:
|
|
7
|
-
version:
|
|
7
|
+
version: 5
|
|
8
8
|
contract:
|
|
9
9
|
inputs: [intent, constraints?]
|
|
10
|
-
reads: [skill-registry, taste/*]
|
|
10
|
+
reads: [core-config, skill-registry, taste/*]
|
|
11
11
|
outputs: [accepted_deliverable, run_ledger]
|
|
12
12
|
authority: "Dispatch leaf skills, each within its own authority. Do not directly touch source, production, or spend — leaf skills do that, gated. Enforce every accept gate."
|
|
13
13
|
verify: "Every dispatched skill's verify passed; final review is clean; all inline accepts were obtained."
|
|
@@ -32,14 +32,17 @@ no step above intent.
|
|
|
32
32
|
## The loop
|
|
33
33
|
|
|
34
34
|
1. **Bind intent.** Read the human's goal and constraints. This is the only
|
|
35
|
-
place intent enters.
|
|
35
|
+
place intent enters. Then run the first-run preflight (below) before any
|
|
36
|
+
wiring.
|
|
36
37
|
2. **Select.** Read the skill registry. Pick skills by their `description`
|
|
37
38
|
(when-to-use). Load a skill's full `contract` only when it is a candidate —
|
|
38
39
|
never load every contract at once.
|
|
39
40
|
3. **Wire (emergent, not hardcoded).** Build the path by matching one skill's
|
|
40
41
|
`outputs` to the next skill's `inputs`. Skills do not know each other; only
|
|
41
42
|
you do. Do not assume a fixed pipeline — wire what this intent needs.
|
|
42
|
-
4. **Dispatch.** Hand the skill exactly the `inputs` it declares, as files
|
|
43
|
+
4. **Dispatch.** Hand the skill exactly the `inputs` it declares, as files —
|
|
44
|
+
resolving each logical namespace it reads/writes to a physical path via
|
|
45
|
+
`core-config.yaml` (see Namespace resolution). Run
|
|
43
46
|
it as a fresh subagent for isolation. Choose the cheapest model that can do
|
|
44
47
|
the step. **Dispatch independent steps in PARALLEL** (whose `inputs` don't
|
|
45
48
|
depend on each other) — as concurrent FOREGROUND subagents awaited together in
|
|
@@ -66,6 +69,49 @@ no step above intent.
|
|
|
66
69
|
8. **Final acceptance.** Present the batched deferred accepts and a final review
|
|
67
70
|
to the human, once. Apply corrections (see Metabolism), then deliver.
|
|
68
71
|
|
|
72
|
+
## Namespace resolution (`core-config.yaml`)
|
|
73
|
+
|
|
74
|
+
Skill contracts address knowledge and work products by **logical namespace**
|
|
75
|
+
(`taste/*`, `architecture/*`, `registry/*`, `specs/*`, `stories/*`,
|
|
76
|
+
`research/*`), never by physical path. At run start, read `core-config.yaml`
|
|
77
|
+
once and build the logical→physical map. When you dispatch a skill, resolve
|
|
78
|
+
every namespace in its `reads:` / `outputs:` / `updates:` to a real path via
|
|
79
|
+
that map, and hand the resolved files as its inputs. If `core-config.yaml` is
|
|
80
|
+
absent, fall back to the scaffold defaults (`knowledge/taste`,
|
|
81
|
+
`knowledge/architecture`, `knowledge/registry`, `docs/specs`, `docs/stories`,
|
|
82
|
+
`docs/research`).
|
|
83
|
+
|
|
84
|
+
This is what makes brownfield work: a project keeps its brain wherever it
|
|
85
|
+
already lives, the mapping changes, the skills do not.
|
|
86
|
+
|
|
87
|
+
**Exception — the ledger/verify path is a FIXED platform protocol, not a
|
|
88
|
+
namespace.** Always write to `.orchestrate/ledger.jsonl` and
|
|
89
|
+
`.orchestrate/verify/…` literally. The platform polls that exact path to render
|
|
90
|
+
live progress; it is NOT resolved through `core-config.yaml` and must not be
|
|
91
|
+
remapped.
|
|
92
|
+
|
|
93
|
+
## First-run preflight (brownfield guard)
|
|
94
|
+
|
|
95
|
+
Emergent wiring alone can silently skip brownfield entry. So after binding
|
|
96
|
+
intent, run two DETERMINISTIC checks (cheap: one `ls`/`test -d` each on the
|
|
97
|
+
resolved paths):
|
|
98
|
+
|
|
99
|
+
1. **Empty registry + existing code → map-codebase is MANDATORY.** If the
|
|
100
|
+
resolved `registry/*` namespace is empty or missing AND the repo already
|
|
101
|
+
contains source code, wire `map-codebase` before any design or build skill.
|
|
102
|
+
This is a hard rule, not a description-match: building on an unmapped
|
|
103
|
+
codebase produces changes that fight it.
|
|
104
|
+
2. **Empty taste → surface it once.** If the resolved `taste/*` namespace is
|
|
105
|
+
empty — no project-specific entries; file headers, shape comments, and
|
|
106
|
+
unedited scaffold examples do NOT count — tell the human at the front gate: the brain has no preferences yet;
|
|
107
|
+
offer to draft `taste/coding-standards` from existing material (CLAUDE.md,
|
|
108
|
+
lint configs, review conventions) for their approval. Never seed taste
|
|
109
|
+
without human sign-off (opinions enter the brain only through a human —
|
|
110
|
+
same rule as Metabolism). If they decline, proceed with defaults and do not
|
|
111
|
+
ask again this run.
|
|
112
|
+
|
|
113
|
+
Both checks are per-run and idempotent: a populated brain makes them no-ops.
|
|
114
|
+
|
|
69
115
|
## Accept gate
|
|
70
116
|
|
|
71
117
|
| Skill's `accept.timing` | Skill's `authority` | Action |
|
|
@@ -83,6 +129,12 @@ A failed `verify` or a `changes_requested` review is not a separate "fix" step.
|
|
|
83
129
|
Re-dispatch the same skill with the feedback as an input (e.g. `qa_feedback`).
|
|
84
130
|
Same capability, new input.
|
|
85
131
|
|
|
132
|
+
**Rework without understanding is a coin flip.** If a verify failure's CAUSE
|
|
133
|
+
is not understood after the first failed attempt, dispatch `investigate` before
|
|
134
|
+
spending the next attempt — its `root_cause_report` becomes the re-dispatch's
|
|
135
|
+
`qa_feedback`. An attempt aimed at a stated mechanism converges; an attempt
|
|
136
|
+
aimed at a symptom re-rolls the dice.
|
|
137
|
+
|
|
86
138
|
**Hard cap: 3 attempts per step.** If a step's verify still fails on attempt 3,
|
|
87
139
|
STOP the run — do not burn a 4th attempt. Write a `gate` event to the ledger
|
|
88
140
|
(`{"e":"gate","kind":"rework_exhausted","question":"step <n> (<skill>) failed 3
|
|
@@ -90,11 +142,34 @@ attempts: <one-line why>"}`), summarize the three failures for the human, and
|
|
|
90
142
|
report AWAIT. A step that cannot pass its own verify after three tries needs a
|
|
91
143
|
human decision (wrong approach, wrong spec, or wrong verify), not more tokens.
|
|
92
144
|
|
|
93
|
-
## Metabolism
|
|
145
|
+
## Metabolism — governed writeback
|
|
94
146
|
|
|
95
147
|
When the human corrects something at final acceptance ("not on-brand", "wrong
|
|
96
|
-
tone"),
|
|
97
|
-
the next run
|
|
148
|
+
tone"), fold it back into `taste/*` (preferences) or `registry/*` (facts about
|
|
149
|
+
this codebase), so the next run starts smarter. The run teaches the
|
|
150
|
+
organization — but memory rots without curation, so writeback is GOVERNED:
|
|
151
|
+
|
|
152
|
+
1. **Read before write.** Open the target file first. An existing entry on the
|
|
153
|
+
same topic gets UPDATED in place — never append a near-duplicate.
|
|
154
|
+
2. **Contradiction = replacement.** A correction that contradicts an existing
|
|
155
|
+
entry REPLACES it (add a short `supersedes: <old rule> (<date>)` note).
|
|
156
|
+
Never leave both standing — two contradictory rules poison every later run
|
|
157
|
+
that reads them.
|
|
158
|
+
3. **Durable preferences only.** Taste holds style/architecture/process
|
|
159
|
+
preferences that apply to FUTURE runs. One-off task facts, transient state,
|
|
160
|
+
and anything the repo or ledger already records do not belong there.
|
|
161
|
+
4. **One lesson per entry** — imperative phrasing, a one-line why, and a date.
|
|
162
|
+
5. **Size bound: ~100 lines per file.** If a write would push past it,
|
|
163
|
+
consolidate in the same edit (merge near-duplicates, drop obsolete entries)
|
|
164
|
+
— never blind-append to a bloated file.
|
|
165
|
+
6. **The human sees the diff.** taste/registry changes made during a run are
|
|
166
|
+
part of final acceptance: present what changed and why, so a bad lesson can
|
|
167
|
+
be vetoed before it contaminates future runs.
|
|
168
|
+
|
|
169
|
+
`taste/*` vs `registry/*`: taste is HOW we prefer things done (opinions,
|
|
170
|
+
overridable); registry is WHAT is true of this project (facts, verifiable).
|
|
171
|
+
A correction usually lands in taste; a discovered fact (the deploy command,
|
|
172
|
+
the test runner) lands in registry.
|
|
98
173
|
|
|
99
174
|
## The ledger (`.orchestrate/ledger.jsonl`)
|
|
100
175
|
|
|
@@ -138,4 +213,8 @@ a false claim.
|
|
|
138
213
|
- Ending a run without a `run_end` ledger line
|
|
139
214
|
- Marking a step done on the subagent's say-so, without your own verify command
|
|
140
215
|
- A 4th rework attempt on the same step (cap is 3 — stop and gate)
|
|
216
|
+
- A second rework attempt with no `investigate` when the failure isn't understood
|
|
217
|
+
- Appending to `taste/*` without reading it first (duplicate/contradiction risk)
|
|
218
|
+
- Dispatching a design/build skill in an existing codebase while `registry/*`
|
|
219
|
+
is empty (first-run preflight skipped)
|
|
141
220
|
- Marking the run complete without every step's `verify` evidence
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smoke-test
|
|
3
|
+
description: Use when the deliverable is a runnable app or service and its real user flows must be proven working from the OUTSIDE (browser/HTTP/CLI) before acceptance — unit tests passing is not that proof.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: [Read, Bash, Grep, Glob]
|
|
6
|
+
metadata:
|
|
7
|
+
contract:
|
|
8
|
+
inputs: [run_instructions, flows, qa_feedback?]
|
|
9
|
+
reads: [registry/app]
|
|
10
|
+
outputs: [smoke_report, verify_evidence]
|
|
11
|
+
authority: "Start and stop the app locally; drive it via browser automation, HTTP, or CLI. Read-only on source. No deploy, no external spend, no mutations outside the app's own local state."
|
|
12
|
+
verify: "self — this skill PRODUCES the acceptance evidence; every flow verdict points at a captured artifact."
|
|
13
|
+
accept:
|
|
14
|
+
when: "never — the evidence feeds final acceptance; it does not replace it."
|
|
15
|
+
timing: deferred
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Smoke Test (Prove It Works From the Outside)
|
|
19
|
+
|
|
20
|
+
Unit tests prove functions; a smoke test proves the PRODUCT. Launch the real
|
|
21
|
+
app and walk the real flows the user will walk.
|
|
22
|
+
|
|
23
|
+
**Core principle:** A flow is "passed" only when you drove it yourself and
|
|
24
|
+
captured the evidence. "The tests are green so it probably works" is a claim,
|
|
25
|
+
not a smoke test.
|
|
26
|
+
|
|
27
|
+
## The Iron Law
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
UNTESTED IS NOT PASSED. Every flow ends in exactly one of:
|
|
31
|
+
passed (with evidence) | failed (with evidence) | untested (with the reason)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
1. **Discover how to run it.** `registry/app` first; else the project's
|
|
37
|
+
manifest (`package.json` scripts, `Makefile`, `README`). If the launch
|
|
38
|
+
method is genuinely undocumented and unguessable, report `untested:
|
|
39
|
+
cannot launch` — do not invent a server.
|
|
40
|
+
2. **Launch in the background, capture logs.** Redirect stdout/stderr to
|
|
41
|
+
`.orchestrate/verify/smoke-server.log`. Record the PID. Pick a free port if
|
|
42
|
+
configurable (avoid colliding with anything already running).
|
|
43
|
+
3. **Wait for readiness, bounded.** Poll the health endpoint / port / ready
|
|
44
|
+
line for up to ~60s. Not ready → flow verdicts are `failed: app did not
|
|
45
|
+
start`, attach the server log, skip to cleanup.
|
|
46
|
+
4. **Exercise EVERY listed flow** with the best driver available, in order of
|
|
47
|
+
fidelity:
|
|
48
|
+
- **Browser automation** (a Playwright/Chrome MCP tool, if available in
|
|
49
|
+
this session) — for UI flows: navigate, interact, assert on rendered
|
|
50
|
+
state, screenshot.
|
|
51
|
+
- **HTTP** (`curl`) — assert status code AND response content (a 200
|
|
52
|
+
serving an error page is a fail; check for a string the flow implies).
|
|
53
|
+
- **CLI** — invoke the command, assert exit code and output.
|
|
54
|
+
Use the highest-fidelity driver the flow needs: an interactive UI flow
|
|
55
|
+
"verified" by curling `/` is `untested`, not `passed`.
|
|
56
|
+
5. **Capture evidence per flow** to `.orchestrate/verify/smoke-<flow-slug>.log`
|
|
57
|
+
(the exact command/steps + relevant output tail, or the screenshot path).
|
|
58
|
+
6. **ALWAYS clean up** — kill the processes you started (and only those),
|
|
59
|
+
remove temp state you created. Cleanup runs even when flows fail.
|
|
60
|
+
|
|
61
|
+
## Output: `smoke_report`
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
# Smoke Report — <app> @ <commit>
|
|
65
|
+
|
|
66
|
+
| Flow | Verdict | Evidence |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| signup happy path | passed | .orchestrate/verify/smoke-signup.log |
|
|
69
|
+
| checkout | failed — 500 on POST /pay | .orchestrate/verify/smoke-checkout.log |
|
|
70
|
+
| admin export | untested — needs OAuth I can't complete | (reason) |
|
|
71
|
+
|
|
72
|
+
Server log: .orchestrate/verify/smoke-server.log
|
|
73
|
+
Started/stopped: <pid(s)>, cleaned up: yes
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Red flags — stop
|
|
77
|
+
|
|
78
|
+
- Reporting `passed` for a flow you did not drive
|
|
79
|
+
- A UI flow "verified" with a single `curl /` status check
|
|
80
|
+
- Conflating "the app is broken" with "my harness is broken" — say which
|
|
81
|
+
- Leaving the server (or any process you spawned) running after the report
|
|
82
|
+
- Only testing the happy path when `flows` lists error/edge flows
|
|
83
|
+
|
|
84
|
+
## Done
|
|
85
|
+
|
|
86
|
+
Every flow has a verdict + evidence artifact; processes cleaned up. `failed`
|
|
87
|
+
and `untested` are honest, valid results — report them verbatim, never rounded
|
|
88
|
+
up. The report feeds the orchestrator's verify gate and final acceptance.
|