orchestrix-skills 0.1.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-skills",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Capability-first AI development skill graph — Anthropic-native skills that run in any agent runtime.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,6 +4,7 @@ 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: 3
7
8
  contract:
8
9
  inputs: [intent, constraints?]
9
10
  reads: [skill-registry, taste/*]
@@ -38,12 +39,27 @@ no step above intent.
38
39
  3. **Wire (emergent, not hardcoded).** Build the path by matching one skill's
39
40
  `outputs` to the next skill's `inputs`. Skills do not know each other; only
40
41
  you do. Do not assume a fixed pipeline — wire what this intent needs.
41
- 4. **Dispatch one step.** Hand the skill exactly the `inputs` it declares, as
42
- files. Run it as a fresh subagent for isolation. Choose the cheapest model
43
- that can do the step.
44
- 5. **Verify (gate).** Run the skill's `verify`. If it fails, re-dispatch the
45
- **same** skill with the failure as feedback (see Rework). If it passes,
46
- continue.
42
+ 4. **Dispatch.** Hand the skill exactly the `inputs` it declares, as files. Run
43
+ it as a fresh subagent for isolation. Choose the cheapest model that can do
44
+ the step. **Dispatch independent steps in PARALLEL** (whose `inputs` don't
45
+ depend on each other) as concurrent FOREGROUND subagents awaited together in
46
+ the same turn, for speed. Keep dependent steps sequential. NEVER fire-and-forget
47
+ a background subagent and end the turn waiting to be woken — run foreground and
48
+ await; there is no reliable async wake.
49
+ 5. **Verify (gate) — executable, not prose.** Prove the skill's `verify` with a
50
+ REAL command you run yourself via Bash, and capture the proof:
51
+
52
+ ```
53
+ .orchestrate/verify/step-<n>-attempt-<k>.log ← exact command + exit code + output tail
54
+ ```
55
+
56
+ The command comes from the step's nature (test runner, build, `git fsck`,
57
+ `test -f`, a curl against the running app …) — pick the one that would FAIL
58
+ if the claim were false. The subagent's own success report is NOT
59
+ verification. A prose-only verify is acceptable only when no command can
60
+ prove the claim (e.g. judging tone) — say so in the log file. If verify
61
+ fails, re-dispatch the **same** skill with the failure as feedback (see
62
+ Rework). If it passes, continue.
47
63
  6. **Accept (gate).** Apply the rule below. Then continue — do not pause to ask
48
64
  "should I keep going?" mid-run.
49
65
  7. **Repeat** 3–6 until the intent is fulfilled.
@@ -61,25 +77,52 @@ no step above intent.
61
77
 
62
78
  You are the teeth. The fields are only data; you enforce them.
63
79
 
64
- ## Rework is a loop, not a skill
80
+ ## Rework is a loop, not a skill — and the loop is BOUNDED
65
81
 
66
82
  A failed `verify` or a `changes_requested` review is not a separate "fix" step.
67
83
  Re-dispatch the same skill with the feedback as an input (e.g. `qa_feedback`).
68
84
  Same capability, new input.
69
85
 
86
+ **Hard cap: 3 attempts per step.** If a step's verify still fails on attempt 3,
87
+ STOP the run — do not burn a 4th attempt. Write a `gate` event to the ledger
88
+ (`{"e":"gate","kind":"rework_exhausted","question":"step <n> (<skill>) failed 3
89
+ attempts: <one-line why>"}`), summarize the three failures for the human, and
90
+ report AWAIT. A step that cannot pass its own verify after three tries needs a
91
+ human decision (wrong approach, wrong spec, or wrong verify), not more tokens.
92
+
70
93
  ## Metabolism
71
94
 
72
95
  When the human corrects something at final acceptance ("not on-brand", "wrong
73
96
  tone"), write the correction back into the relevant `taste/*` knowledge base, so
74
97
  the next run reads the improved taste. The run teaches the organization.
75
98
 
99
+ ## The ledger (`.orchestrate/ledger.jsonl`)
100
+
101
+ The ledger is the run's durable state — for YOU (recover after compaction or an
102
+ interrupted session: trust it and `git log`, not memory) and for MACHINES (the
103
+ platform renders it as live progress). It is append-only JSONL: one JSON event
104
+ per line, appended with `Bash` (`echo '<json>' >> .orchestrate/ledger.jsonl`).
105
+ Never rewrite or delete lines. Timestamps: `date -u +%FT%TZ`.
106
+
107
+ Events and when to write them:
108
+
109
+ | Event | When | Shape |
110
+ | ----- | ---- | ----- |
111
+ | `run_start` | right after binding intent | `{"e":"run_start","run":"r-<yyyymmdd>-<slug>","intent":"...","ts":"..."}` |
112
+ | `plan` | after wiring the graph, and EVERY time the graph changes | `{"e":"plan","run":"...","steps":[{"n":1,"skill":"research","title":"..."}, …]}` — full current plan; latest `plan` line wins; steps may be added, never removed |
113
+ | `step` | immediately BEFORE each dispatch, and again after its verify | `{"e":"step","run":"...","n":3,"skill":"implement","status":"dispatched\|done\|failed","attempt":1,"evidence":"<file or one-line result>","ts":"..."}` — rework = same `n`, next `attempt` |
114
+ | `gate` | when stopping at a human gate | `{"e":"gate","run":"...","kind":"inline_accept","question":"...","ts":"..."}` |
115
+ | `run_end` | at delivery or abandonment | `{"e":"run_end","run":"...","result":"delivered\|paused\|abandoned","ts":"..."}` |
116
+
117
+ A step recorded `done` is done — do not re-dispatch it. `evidence` on a `done`
118
+ step is required and should be the step's verify log path
119
+ (`.orchestrate/verify/step-<n>-attempt-<k>.log`); a `done` with no evidence is
120
+ a false claim.
121
+
76
122
  ## Context discipline (stay lean)
77
123
 
78
124
  - **Files, not paste.** Move artifacts between steps as files. Never paste a
79
125
  step's full output into your context — it would be re-read every later turn.
80
- - **Ledger.** Append each finished step to a progress ledger file
81
- (`.orchestrate/ledger.md`). After a compaction, trust the ledger and `git
82
- log`, not memory. A step recorded done is done — do not re-dispatch it.
83
126
  - **Cheapest model per step.** Mechanical step → cheap model. Judgment step →
84
127
  capable model. State the model explicitly on every dispatch.
85
128
  - **Keep your own context small.** You coordinate; the leaves do the heavy work.
@@ -91,4 +134,8 @@ log`, not memory. A step recorded done is done — do not re-dispatch it.
91
134
  - Hardcoding a fixed skill order instead of wiring outputs→inputs
92
135
  - Pasting a step's full output into your context instead of handing a file
93
136
  - Re-dispatching a step the ledger already marks done
137
+ - Dispatching a step without first writing its `dispatched` ledger line
138
+ - Ending a run without a `run_end` ledger line
139
+ - Marking a step done on the subagent's say-so, without your own verify command
140
+ - A 4th rework attempt on the same step (cap is 3 — stop and gate)
94
141
  - Marking the run complete without every step's `verify` evidence