@gonrocca/zero-pi 0.1.10 → 0.1.12

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.
@@ -1,82 +1,82 @@
1
- ---
2
- description: SDD plan phase — turn findings into requirements, design, and an ordered task list
3
- ---
4
-
5
- You run the **plan** phase of a zero SDD pipeline.
6
-
7
- **Locating artifacts.** If you are invoked with a feature slug, operate on
8
- `.sdd/<slug>/`. With no slug and exactly one candidate run on disk, use it; with
9
- no slug and an ambiguous target, ask which run before acting. You write four
10
- artifacts into that directory — `proposal.md`, `spec.md`, `design.md`, and
11
- `tasks.md` (see *Artifacts*). If invoked standalone with the explore findings
12
- absent, gather the context you need first rather than failing. On a resumed run,
13
- sanity-check any `proposal.md`, `spec.md`, or `design.md` you depend on — if one
14
- is obviously incomplete (truncated mid-write), rebuild it instead of trusting
15
- it.
16
-
17
- Using the explore findings, write the plan: the requirements (what must be
18
- true), the design (how it will be built), and an ordered list of small,
19
- independently verifiable tasks.
20
-
21
- Do not write implementation code in this phase — only the plan. Keep each task
22
- scoped tightly enough that the build phase can implement and check it on its
23
- own. `plan` stays a single phase — read the store, write all four artifacts in
24
- this one pass.
25
-
26
- ## Reading the canonical store
27
-
28
- The project keeps a **canonical spec store** at `.sdd/specs/requirements.md` —
29
- the accumulated, accepted requirements of every prior run. Read it as the
30
- baseline before writing this run's requirements.
31
-
32
- - **Absent** (`.sdd/specs/` or the file does not exist) → treat it as an empty
33
- store: every requirement this run proposes is new, so the whole `spec.md`
34
- delta is `## ADDED`.
35
- - **Present and well-formed** → it is a `# ` title followed by `### REQ: <name>`
36
- blocks. Use the existing block names as the identities you may MODIFY or
37
- REMOVE.
38
- - **Unreadable or malformed** → surface the error and stop before producing a
39
- delta. Do **not** overwrite the store and do **not** guess — a bad store is a
40
- blocker for the human, not something `plan` repairs.
41
-
42
- ## Artifacts
43
-
44
- Write all four into `.sdd/<slug>/`:
45
-
46
- - **`proposal.md`** — the change intent: what this run adds or changes, its
47
- scope, and the rationale. Prose, no requirement blocks.
48
- - **`spec.md`** — the **delta** against the canonical store, never a full spec.
49
- Up to three `H2` sections — `## ADDED`, `## MODIFIED`, `## REMOVED` — each
50
- holding `### REQ: <stable-unique-name>` blocks (one named requirement: prose
51
- followed by an `Acceptance criteria:` list). `## ADDED` carries brand-new
52
- requirements; `## MODIFIED` carries the **complete** updated text of an
53
- existing block (full new body, not a diff); `## REMOVED` needs only the
54
- `### REQ:` name line. Any section may be empty or absent; a block name must be
55
- unique within and across the delta's sections and not collide with an existing
56
- store name unless it is the target of MODIFIED/REMOVED.
57
- - **`design.md`** — how it is built (unchanged from before).
58
- - **`tasks.md`** — the ordered task list, keeping its `## Review Workload`
59
- section (see below).
60
-
61
- Honour the prior-run lessons carried in the explore findings: when a past run
62
- was sent back with `replantear`, do not repeat the plan mistake it recorded.
63
-
64
- ## Review Workload Forecast
65
-
66
- Size every task against a fixed budget of **400 changed lines per task** — an
67
- internal, non-configurable default (borrowed from gentle-ai), so "small task"
68
- means the same number on every run.
69
-
70
- - Attach a `review: ~N changed lines` bullet to every task entry. `N` is always
71
- a whole number (added + modified + deleted), prefixed with `~`. It is never
72
- blank or non-numeric — if confidence is low, still record your best guess.
73
- - If a task's estimate exceeds 400, split it into smaller tasks that stay
74
- ordered and individually verifiable by the build phase, then re-number and
75
- re-estimate the pieces.
76
- - If a task genuinely cannot be split, keep it whole, flag it as an over-budget
77
- exception, and record a concrete reason.
78
- - Append a `## Review Workload` section to `tasks.md` after the task list: a
79
- budget line stating `400`, a per-task table/list (one row per task, exactly
80
- the tasks above it), the **bold total** computed as the literal sum of the
81
- per-task estimates, and the over-budget exceptions list — state "none" when
82
- there are no exceptions.
1
+ ---
2
+ description: SDD plan phase — turn findings into requirements, design, and an ordered task list
3
+ ---
4
+
5
+ You run the **plan** phase of a zero SDD pipeline.
6
+
7
+ **Locating artifacts.** If you are invoked with a feature slug, operate on
8
+ `.sdd/<slug>/`. With no slug and exactly one candidate run on disk, use it; with
9
+ no slug and an ambiguous target, ask which run before acting. You write four
10
+ artifacts into that directory — `proposal.md`, `spec.md`, `design.md`, and
11
+ `tasks.md` (see *Artifacts*). If invoked standalone with the explore findings
12
+ absent, gather the context you need first rather than failing. On a resumed run,
13
+ sanity-check any `proposal.md`, `spec.md`, or `design.md` you depend on — if one
14
+ is obviously incomplete (truncated mid-write), rebuild it instead of trusting
15
+ it.
16
+
17
+ Using the explore findings, write the plan: the requirements (what must be
18
+ true), the design (how it will be built), and an ordered list of small,
19
+ independently verifiable tasks.
20
+
21
+ Do not write implementation code in this phase — only the plan. Keep each task
22
+ scoped tightly enough that the build phase can implement and check it on its
23
+ own. `plan` stays a single phase — read the store, write all four artifacts in
24
+ this one pass.
25
+
26
+ ## Reading the canonical store
27
+
28
+ The project keeps a **canonical spec store** at `.sdd/specs/requirements.md` —
29
+ the accumulated, accepted requirements of every prior run. Read it as the
30
+ baseline before writing this run's requirements.
31
+
32
+ - **Absent** (`.sdd/specs/` or the file does not exist) → treat it as an empty
33
+ store: every requirement this run proposes is new, so the whole `spec.md`
34
+ delta is `## ADDED`.
35
+ - **Present and well-formed** → it is a `# ` title followed by `### REQ: <name>`
36
+ blocks. Use the existing block names as the identities you may MODIFY or
37
+ REMOVE.
38
+ - **Unreadable or malformed** → surface the error and stop before producing a
39
+ delta. Do **not** overwrite the store and do **not** guess — a bad store is a
40
+ blocker for the human, not something `plan` repairs.
41
+
42
+ ## Artifacts
43
+
44
+ Write all four into `.sdd/<slug>/`:
45
+
46
+ - **`proposal.md`** — the change intent: what this run adds or changes, its
47
+ scope, and the rationale. Prose, no requirement blocks.
48
+ - **`spec.md`** — the **delta** against the canonical store, never a full spec.
49
+ Up to three `H2` sections — `## ADDED`, `## MODIFIED`, `## REMOVED` — each
50
+ holding `### REQ: <stable-unique-name>` blocks (one named requirement: prose
51
+ followed by an `Acceptance criteria:` list). `## ADDED` carries brand-new
52
+ requirements; `## MODIFIED` carries the **complete** updated text of an
53
+ existing block (full new body, not a diff); `## REMOVED` needs only the
54
+ `### REQ:` name line. Any section may be empty or absent; a block name must be
55
+ unique within and across the delta's sections and not collide with an existing
56
+ store name unless it is the target of MODIFIED/REMOVED.
57
+ - **`design.md`** — how it is built (unchanged from before).
58
+ - **`tasks.md`** — the ordered task list, keeping its `## Review Workload`
59
+ section (see below).
60
+
61
+ Honour the prior-run lessons carried in the explore findings: when a past run
62
+ was sent back with `replantear`, do not repeat the plan mistake it recorded.
63
+
64
+ ## Review Workload Forecast
65
+
66
+ Size every task against a fixed budget of **400 changed lines per task** — an
67
+ internal, non-configurable default (borrowed from gentle-ai), so "small task"
68
+ means the same number on every run.
69
+
70
+ - Attach a `review: ~N changed lines` bullet to every task entry. `N` is always
71
+ a whole number (added + modified + deleted), prefixed with `~`. It is never
72
+ blank or non-numeric — if confidence is low, still record your best guess.
73
+ - If a task's estimate exceeds 400, split it into smaller tasks that stay
74
+ ordered and individually verifiable by the build phase, then re-number and
75
+ re-estimate the pieces.
76
+ - If a task genuinely cannot be split, keep it whole, flag it as an over-budget
77
+ exception, and record a concrete reason.
78
+ - Append a `## Review Workload` section to `tasks.md` after the task list: a
79
+ budget line stating `400`, a per-task table/list (one row per task, exactly
80
+ the tasks above it), the **bold total** computed as the literal sum of the
81
+ per-task estimates, and the over-budget exceptions list — state "none" when
82
+ there are no exceptions.
@@ -1,30 +1,30 @@
1
- ---
2
- description: SDD veredicto phase — adversarially review the build and record a verdict
3
- ---
4
-
5
- You run the **veredicto** phase of a zero SDD pipeline.
6
-
7
- **Locating artifacts.** If you are invoked with a feature slug, operate on
8
- `.sdd/<slug>/`. With no slug and exactly one candidate run on disk, use it; with
9
- no slug and an ambiguous target, ask which run before acting. Read the plan
10
- artifacts and the build result, then record your verdict. So the verdict
11
- survives for a future resume's proof check, make it recoverable through the
12
- orchestrator's existing run-trace machinery — the Cortex `zero-run/<slug>` save
13
- and the `~/.pi/zero-runs.jsonl` append. Do not write a separate verdict file;
14
- `.sdd/` artifacts stay plan state only.
15
-
16
- Review the build adversarially, with a fresh perspective. Check it against the
17
- plan's requirements, run the tests yourself, and look for gaps, regressions,
18
- and unmet acceptance criteria.
19
-
20
- Record exactly one verdict:
21
-
22
- - `pasa` — the build meets the plan; the run finishes successfully.
23
- - `corregir` — fixable defects remain; the build phase must re-run.
24
- - `replantear` — the plan itself is wrong; the plan phase must re-run.
25
-
26
- Never return `pasa` unless the evidence supports it.
27
-
28
- State the verdict's reasoning concretely — the specific defects for `corregir`,
29
- the specific plan flaw for `replantear`. The orchestrator persists that
30
- reasoning to the run's memory trace, so future runs depend on it being precise.
1
+ ---
2
+ description: SDD veredicto phase — adversarially review the build and record a verdict
3
+ ---
4
+
5
+ You run the **veredicto** phase of a zero SDD pipeline.
6
+
7
+ **Locating artifacts.** If you are invoked with a feature slug, operate on
8
+ `.sdd/<slug>/`. With no slug and exactly one candidate run on disk, use it; with
9
+ no slug and an ambiguous target, ask which run before acting. Read the plan
10
+ artifacts and the build result, then record your verdict. So the verdict
11
+ survives for a future resume's proof check, make it recoverable through the
12
+ orchestrator's existing run-trace machinery — the Cortex `zero-run/<slug>` save
13
+ and the `~/.pi/zero-runs.jsonl` append. Do not write a separate verdict file;
14
+ `.sdd/` artifacts stay plan state only.
15
+
16
+ Review the build adversarially, with a fresh perspective. Check it against the
17
+ plan's requirements, run the tests yourself, and look for gaps, regressions,
18
+ and unmet acceptance criteria.
19
+
20
+ Record exactly one verdict:
21
+
22
+ - `pasa` — the build meets the plan; the run finishes successfully.
23
+ - `corregir` — fixable defects remain; the build phase must re-run.
24
+ - `replantear` — the plan itself is wrong; the plan phase must re-run.
25
+
26
+ Never return `pasa` unless the evidence supports it.
27
+
28
+ State the verdict's reasoning concretely — the specific defects for `corregir`,
29
+ the specific plan flaw for `replantear`. The orchestrator persists that
30
+ reasoning to the run's memory trace, so future runs depend on it being precise.
@@ -1,54 +1,55 @@
1
1
  ---
2
+ name: sdd-routing
2
3
  description: Route a natural-language request into the zero SDD pipeline when the user signals SDD intent
3
4
  ---
4
-
5
- # zero — Natural-language SDD routing
6
-
7
- zero's spec-driven development pipeline is normally started with the explicit
8
- `/forge <feature>` command. This skill adds one purely additive convenience:
9
- when the user **describes work** and **explicitly signals** that they want it
10
- run through the disciplined SDD pipeline, route the request into the `/forge`
11
- workflow instead of handling it ad-hoc.
12
-
13
- `/forge` stays the primary, deliberate entry point. This skill never replaces
14
- it — it only catches the case where the user expressed SDD intent in plain
15
- language rather than typing the command.
16
-
17
- ## When to route
18
-
19
- Route to `/forge` only when **both** of these hold:
20
-
21
- 1. The message describes **non-trivial work** — a feature, a refactor, a
22
- multi-step change worth a spec.
23
- 2. The message contains a **clear SDD intent signal** — an explicit phrase
24
- asking for the pipeline. Recognised signals (Spanish or English), and close
25
- equivalents:
26
- - "hacelo con sdd" / "do it with sdd"
27
- - "usá el pipeline" / "use the pipeline"
28
- - "con sdd" / "with sdd"
29
- - "andá con forge" / "run forge" / "go with forge"
30
- - "spec-driven" / "spec driven development"
31
-
32
- When both hold, invoke the `/forge` workflow with the user's described work as
33
- the feature request. Pass that described work **verbatim** — do not rephrase,
34
- summarize, translate, or interpret it. The existing `/forge` workflow does the
35
- rest: an ordinary SDD run with all four phases (explore, plan, build,
36
- veredicto), the round cap, and the veredicto verdict, exactly as an explicit
37
- `/forge` invocation behaves.
38
-
39
- ## When NOT to route — be conservative
40
-
41
- This skill must **not** hijack ordinary interaction. Do nothing (handle the
42
- request normally) when:
43
-
44
- - The message has **no clear SDD intent signal** — description of work alone is
45
- never enough.
46
- - The user asks a **question**, requests a **small or one-off fix**, or makes
47
- any routine request without an SDD signal.
48
- - The SDD intent is **ambiguous or uncertain** in any way.
49
-
50
- When in doubt, do nothing. Default to normal handling and leave the user to
51
- invoke `/forge` explicitly. A missed natural-language route is harmless — the
52
- user can still type `/forge`. A wrong route forces routine work through the
53
- heavy pipeline, which is not. Triggering only on a clear signal phrase is the
54
- rule; `/forge` remains the explicit primary entry point.
5
+
6
+ # zero — Natural-language SDD routing
7
+
8
+ zero's spec-driven development pipeline is normally started with the explicit
9
+ `/forge <feature>` command. This skill adds one purely additive convenience:
10
+ when the user **describes work** and **explicitly signals** that they want it
11
+ run through the disciplined SDD pipeline, route the request into the `/forge`
12
+ workflow instead of handling it ad-hoc.
13
+
14
+ `/forge` stays the primary, deliberate entry point. This skill never replaces
15
+ it — it only catches the case where the user expressed SDD intent in plain
16
+ language rather than typing the command.
17
+
18
+ ## When to route
19
+
20
+ Route to `/forge` only when **both** of these hold:
21
+
22
+ 1. The message describes **non-trivial work** — a feature, a refactor, a
23
+ multi-step change worth a spec.
24
+ 2. The message contains a **clear SDD intent signal** — an explicit phrase
25
+ asking for the pipeline. Recognised signals (Spanish or English), and close
26
+ equivalents:
27
+ - "hacelo con sdd" / "do it with sdd"
28
+ - "usá el pipeline" / "use the pipeline"
29
+ - "con sdd" / "with sdd"
30
+ - "andá con forge" / "run forge" / "go with forge"
31
+ - "spec-driven" / "spec driven development"
32
+
33
+ When both hold, invoke the `/forge` workflow with the user's described work as
34
+ the feature request. Pass that described work **verbatim** — do not rephrase,
35
+ summarize, translate, or interpret it. The existing `/forge` workflow does the
36
+ rest: an ordinary SDD run with all four phases (explore, plan, build,
37
+ veredicto), the round cap, and the veredicto verdict, exactly as an explicit
38
+ `/forge` invocation behaves.
39
+
40
+ ## When NOT to route — be conservative
41
+
42
+ This skill must **not** hijack ordinary interaction. Do nothing (handle the
43
+ request normally) when:
44
+
45
+ - The message has **no clear SDD intent signal** — description of work alone is
46
+ never enough.
47
+ - The user asks a **question**, requests a **small or one-off fix**, or makes
48
+ any routine request without an SDD signal.
49
+ - The SDD intent is **ambiguous or uncertain** in any way.
50
+
51
+ When in doubt, do nothing. Default to normal handling and leave the user to
52
+ invoke `/forge` explicitly. A missed natural-language route is harmless — the
53
+ user can still type `/forge`. A wrong route forces routine work through the
54
+ heavy pipeline, which is not. Triggering only on a clear signal phrase is the
55
+ rule; `/forge` remains the explicit primary entry point.
@@ -1,32 +1,33 @@
1
1
  ---
2
+ name: skill-loop
2
3
  description: zero's skill auto-learning loop — distill, store, surface, and refine reusable skills
3
4
  ---
4
-
5
- # zero — Skill Auto-Learning
6
-
7
- zero gives the agent a closed learning loop so solutions are reused, not
8
- re-derived.
9
-
10
- ## Distill
11
-
12
- When a substantial task completes, **distill** a reusable skill from it: capture
13
- the solution pattern, the ordered steps, and the non-obvious gotchas into a
14
- single skill document. If the task did only routine or one-off work with no
15
- reusable pattern, do not create a skill.
16
-
17
- ## Store
18
-
19
- Store each learned skill in the per-user skill library so it persists across
20
- sessions and is available to every agent zero has configured.
21
-
22
- ## Surface
23
-
24
- When a new task begins, surface the stored skills relevant to it — match by the
25
- skill's subject and description — so the agent consults a known solution before
26
- re-deriving one. Surface nothing when no stored skill is relevant.
27
-
28
- ## Refine
29
-
30
- When a run re-applies an existing skill, **refine** that skill rather than
31
- create a duplicate: merge new gotchas and steps without repeating what is
32
- already there, and prefer the newer learning when it contradicts the old.
5
+
6
+ # zero — Skill Auto-Learning
7
+
8
+ zero gives the agent a closed learning loop so solutions are reused, not
9
+ re-derived.
10
+
11
+ ## Distill
12
+
13
+ When a substantial task completes, **distill** a reusable skill from it: capture
14
+ the solution pattern, the ordered steps, and the non-obvious gotchas into a
15
+ single skill document. If the task did only routine or one-off work with no
16
+ reusable pattern, do not create a skill.
17
+
18
+ ## Store
19
+
20
+ Store each learned skill in the per-user skill library so it persists across
21
+ sessions and is available to every agent zero has configured.
22
+
23
+ ## Surface
24
+
25
+ When a new task begins, surface the stored skills relevant to it — match by the
26
+ skill's subject and description — so the agent consults a known solution before
27
+ re-deriving one. Surface nothing when no stored skill is relevant.
28
+
29
+ ## Refine
30
+
31
+ When a run re-applies an existing skill, **refine** that skill rather than
32
+ create a duplicate: merge new gotchas and steps without repeating what is
33
+ already there, and prefer the newer learning when it contradicts the old.
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "zero-sdd",
4
+ "vars": {
5
+ "cyan": "#50d2ff",
6
+ "blue": "#7497ff",
7
+ "mint": "#4fddab",
8
+ "amber": "#eebe5c",
9
+ "rose": "#ff6a7a",
10
+ "violet": "#af8aff",
11
+ "steel": "#8f98a8",
12
+ "dimSteel": "#5f6878",
13
+ "panel": "#171b22",
14
+ "selected": "#26313d",
15
+ "okPanel": "#17251f",
16
+ "errPanel": "#2a171b"
17
+ },
18
+ "colors": {
19
+ "accent": "cyan",
20
+ "border": "blue",
21
+ "borderAccent": "amber",
22
+ "borderMuted": "dimSteel",
23
+ "success": "mint",
24
+ "error": "rose",
25
+ "warning": "amber",
26
+ "muted": "steel",
27
+ "dim": "dimSteel",
28
+ "text": "",
29
+ "thinkingText": "steel",
30
+ "selectedBg": "selected",
31
+ "userMessageBg": "panel",
32
+ "userMessageText": "",
33
+ "customMessageBg": "panel",
34
+ "customMessageText": "",
35
+ "customMessageLabel": "amber",
36
+ "toolPendingBg": "panel",
37
+ "toolSuccessBg": "okPanel",
38
+ "toolErrorBg": "errPanel",
39
+ "toolTitle": "cyan",
40
+ "toolOutput": "steel",
41
+ "mdHeading": "amber",
42
+ "mdLink": "cyan",
43
+ "mdLinkUrl": "dimSteel",
44
+ "mdCode": "mint",
45
+ "mdCodeBlock": "",
46
+ "mdCodeBlockBorder": "blue",
47
+ "mdQuote": "steel",
48
+ "mdQuoteBorder": "dimSteel",
49
+ "mdHr": "dimSteel",
50
+ "mdListBullet": "amber",
51
+ "toolDiffAdded": "mint",
52
+ "toolDiffRemoved": "rose",
53
+ "toolDiffContext": "steel",
54
+ "syntaxComment": "dimSteel",
55
+ "syntaxKeyword": "violet",
56
+ "syntaxFunction": "cyan",
57
+ "syntaxVariable": "amber",
58
+ "syntaxString": "mint",
59
+ "syntaxNumber": "rose",
60
+ "syntaxType": "blue",
61
+ "syntaxOperator": "violet",
62
+ "syntaxPunctuation": "steel",
63
+ "thinkingOff": "dimSteel",
64
+ "thinkingMinimal": "steel",
65
+ "thinkingLow": "blue",
66
+ "thinkingMedium": "cyan",
67
+ "thinkingHigh": "violet",
68
+ "thinkingXhigh": "rose",
69
+ "bashMode": "amber"
70
+ },
71
+ "export": {
72
+ "pageBg": "#111419",
73
+ "cardBg": "#171b22",
74
+ "infoBg": "#22202a"
75
+ }
76
+ }