cyber-sdd 0.3.1 → 0.4.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "homepage": "https://github.com/cyberuni/cyber-sdd",
9
9
  "repository": "https://github.com/cyberuni/cyber-sdd",
10
- "version": "0.3.1",
10
+ "version": "0.4.0",
11
11
  "skills": "./skills",
12
12
  "agents": [
13
13
  "./agents/sdd-automaton.md",
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "homepage": "https://github.com/cyberuni/cyber-sdd",
9
9
  "repository": "https://github.com/cyberuni/cyber-sdd",
10
- "version": "0.3.1",
10
+ "version": "0.4.0",
11
11
  "skills": "./skills",
12
12
  "agents": [
13
13
  "./agents/sdd-automaton.md",
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "homepage": "https://github.com/cyberuni/cyber-sdd",
9
9
  "repository": "https://github.com/cyberuni/cyber-sdd",
10
- "version": "0.3.1",
10
+ "version": "0.4.0",
11
11
  "skills": "./skills",
12
12
  "agents": [
13
13
  "./agents/sdd-automaton.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyber-sdd",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Spec-Driven Development. Scaffold, validate, and maintain behavioral specs (spec.md + .feature files) for software features.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,47 @@ A CR is the **unit of change-intent** (git-PR-shaped); the mission loop is the w
13
13
 
14
14
  > **Advise a capable model (e.g. Opus) on entry.** The explore grill runs in this session, so its quality tracks the session model. Surface this **before** the grill so the user can switch if needed. (The harness cannot switch the session model on your behalf.)
15
15
 
16
- Load `sdd:lifecycle-governance` (status enum, the freeze re-open transition), `sdd:ownership-governance` (who writes each field), `sdd:spec-format-governance` + `sdd:suite-format-governance` (the node skeleton + suite bars), `sdd:spec-producer-governance` (the grilling procedure run inline), `sdd:impl-producer-governance` (what the spawned builder loads), `sdd:gate-validation-governance` (legal gate-state tuples), `sdd:remediation-governance` (how a producer answers a `change` verdict at either gate), and `sdd:combat-log-governance` (the provenance shapes). The autonomy bar is baked in (below).
16
+ ## Governances — load before you start
17
+
18
+ You are **bound by** these bars, not merely aware of them. Read the **entry set** now, before
19
+ Step 1 — each one governs every mission, so deferring it means acting unbound:
20
+
21
+ | Governance | What it binds |
22
+ |---|---|
23
+ | `sdd:lifecycle-governance` | the status enum and the freeze re-open transition |
24
+ | `sdd:ownership-governance` | who writes each field |
25
+ | `sdd:spec-format-governance` | the node skeleton |
26
+ | `sdd:suite-format-governance` | the suite bars |
27
+ | `sdd:spec-producer-governance` | the grilling procedure you run inline |
28
+ | `sdd:combat-log-governance` | the provenance shapes you write |
29
+ | `sdd:gate-validation-governance` | the legal gate-state tuples you derive at both gates |
30
+
31
+ The rest are **named now, read at the decision that invokes them** — each governs one moment rather
32
+ than the run: `sdd:remediation-governance` (answering a `change` verdict — only when a judge returns
33
+ one) and `sdd:impl-producer-governance` (what the spawned builder loads — at deliver). Naming them
34
+ here is not loading them; load the body when you reach that moment.
35
+
36
+ **Why `gate-validation` sits in the entry set although it fires only at a gate.** Every mission
37
+ reaches a gate, and the set you declare is read downstream: the spec-judge's pre-flight derives its
38
+ expected set from its **own** fixed-universal floor — which carries `gate-validation` — and checks it
39
+ against the `producer_governances_declared` relay of your inline spec-producer's declaration
40
+ (`sdd:sdd-spec-judge`). Deferring it makes that pre-flight fail by construction on a producer that
41
+ did nothing wrong. Reach, not phase, decides the split.
42
+
43
+ **Declare what you loaded.** On entry, state your own `governances_loaded` set — the same shape the
44
+ spec-producer declares and you already relay as `producer_governances_declared`. The declaration is
45
+ the conductor's, about the conductor: it makes a skipped load **visible instead of silent**. Declare
46
+ the entry set at entry, and each deferred governance when you load it. Declare it **as it is** —
47
+ never list a governance you did not read. Your declaration and the `producer_governances_declared`
48
+ set you relay are **recorded separately; neither replaces the other** — one is what *you* loaded, the
49
+ other is what the producer declared passing through you.
50
+
51
+ The partition covers the conductor's **fixed-universal** bars only. A **resolved-actor** bar — one
52
+ `resolve-governances` names per artifact-type, such as `sdd:spec-structure-governance` at placement —
53
+ is neither entry-set nor deferred: it is resolved and loaded per touched file (Step 2), under the
54
+ digest discipline there.
55
+
56
+ The autonomy bar is baked in (below).
17
57
 
18
58
  ## Step 1 — intake: open the CR and scaffold the plan
19
59
 
@@ -32,7 +72,7 @@ Run authoring **in-session** as the conductor. Explore **builds the implementati
32
72
 
33
73
  **If plan mode is active, run the `### Plan-mode preview` (end of this step) instead of the live grill loop** — same reasoning, no repo writes, no build-to-learn spikes; the phase ends at **ExitPlanMode**, not the spec gate.
34
74
 
35
- **Resolution first.** Run `resolve-governances` over **only** the project registry `.agents/universal-plugin.json` (never scan plugin dirs), passing the current project's anchors (`--project`, plus `--project-root` in a monorepo — you know the project from `discover-specs` / context). For **each touched file's** `artifact-type` it names each production-chain role's agent (a plugin delegate or the SDD default) plus the resolved-actor bar **candidates bucketed by tier** (`project` / `project-root` / `plugin` / `sdd`). It does **not** compose — **load each candidate and compose them yourself** by precedence `sdd-default < plugin < project-root < project` (most-specific wins on conflict; a governance's own `compose: replace` supersedes its bar's lower-precedence candidates); the fixed-universal governances are loaded from the role/agent definition (the matcher does not emit them) — their **names** up front as a compact digest, each **body lazily** only at the gate/decision that invokes it (`gate-validation`/`lifecycle` at a gate, `suite-format` when authoring a `.feature`; `sdd` governance-resolution), so a one-line change never reads all six. A required role with no real delegate **fails closed**. A **resolved** delegate that **recuses** from a subject (produces nothing, declaring it outside its domain — e.g. a plugin bound by artifact-type meets a subject its lens does not fit) is **not** a fail-closed: **re-resolve that one unit's chain to the SDD defaults** (default producer + SDD-default bars + judge) and proceed, recording the recusal as a combat-log line (never a halt); other units keep their squad (`sdd:lifecycle-governance`). A domain claimed by two plugins → ask (answered live in-session).
75
+ **Resolution first.** Run `resolve-governances` over **only** the project registry `.agents/universal-plugin.json` (never scan plugin dirs), passing the current project's anchors (`--project`, plus `--project-root` in a monorepo — you know the project from `discover-specs` / context). For **each touched file's** `artifact-type` it names each production-chain role's agent (a plugin delegate or the SDD default) plus the resolved-actor bar **candidates bucketed by tier** (`project` / `project-root` / `plugin` / `sdd`). It does **not** compose — **load each candidate and compose them yourself** by precedence `sdd-default < plugin < project-root < project` (most-specific wins on conflict; a governance's own `compose: replace` supersedes its bar's lower-precedence candidates); the fixed-universal governances are loaded from the role/agent definition (the matcher does not emit them) — the **entry set** is already read (above), and the **deferred** ones are read at the decision that invokes them (`remediation` on a `change` verdict, `impl-producer` at deliver), so a one-line change never reads the deferred bodies it never reaches. A required role with no real delegate **fails closed**. A **resolved** delegate that **recuses** from a subject (produces nothing, declaring it outside its domain — e.g. a plugin bound by artifact-type meets a subject its lens does not fit) is **not** a fail-closed: **re-resolve that one unit's chain to the SDD defaults** (default producer + SDD-default bars + judge) and proceed, recording the recusal as a combat-log line (never a halt); other units keep their squad (`sdd:lifecycle-governance`). A domain claimed by two plugins → ask (answered live in-session).
36
76
 
37
77
  For each unit the CR touches:
38
78
 
@@ -69,7 +109,7 @@ Run **only** when plan mode is active (the harness blocks every write except the
69
109
 
70
110
  On entering the gate, overwrite the statusline file with `spec gate` (same opt-in, best-effort write as explore — skip when plan mode escaped this step via ExitPlanMode).
71
111
 
72
- Run the spec gate as an **internal step** (not a user-invocable skill). Judge each touched unit suite against `sdd:suite-format-governance` (untagged scenarios boolean; `@rubric` well-formed) and the spec-format bars; load `sdd:lifecycle-governance` + `sdd:ownership-governance` + `sdd:gate-validation-governance` for the legal state tuple. **Never advance** with judge failures, open markers, or a suite that does not cover the spec. On a **change** verdict the findings are **evidence, not a work order**: substantiate each before acting, state the **rule** each instantiates and sweep for its other instances, re-derive every correction against the rule **governing the artifact** rather than against the finding alone, and account for each finding's **provenance** — a finding naming an artifact the previous round's commits changed is a **regression**, which stops the loop for a re-plan instead of another round (`sdd:remediation-governance`). ("Regression" here is finding provenance, distinct from the grill loop's convergence above.) On **approve**: **freeze** each touched `.feature` via its `@frozen` tag, record a per-CR `gate` line in **your own shard** in the `ledger/` directory sibling to `spec.md`, and set `status: approved`. `spec.md` stays in sync, never frozen.
112
+ Run the spec gate as an **internal step** (not a user-invocable skill). Judge each touched unit suite against `sdd:suite-format-governance` (untagged scenarios boolean; `@rubric` well-formed) and the spec-format bars; apply `sdd:lifecycle-governance` + `sdd:ownership-governance` + `sdd:gate-validation-governance` — all three already read at entry — for the legal state tuple. **Never advance** with judge failures, open markers, or a suite that does not cover the spec. On a **change** verdict the findings are **evidence, not a work order**: substantiate each before acting, state the **rule** each instantiates and sweep for its other instances, re-derive every correction against the rule **governing the artifact** rather than against the finding alone, and account for each finding's **provenance** — a finding naming an artifact the previous round's commits changed is a **regression**, which stops the loop for a re-plan instead of another round (`sdd:remediation-governance`). ("Regression" here is finding provenance, distinct from the grill loop's convergence above.) On **approve**: **freeze** each touched `.feature` via its `@frozen` tag, record a per-CR `gate` line in **your own shard** in the `ledger/` directory sibling to `spec.md`, and set `status: approved`. `spec.md` stays in sync, never frozen.
73
113
 
74
114
  ## Step 3 — deliver: build to keep
75
115