cyber-sdd 0.0.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/.claude-plugin/plugin.json +17 -0
- package/.codex-plugin/plugin.json +17 -0
- package/.plugin/plugin.json +17 -0
- package/README.md +159 -0
- package/agents/sdd-automaton.md +97 -0
- package/agents/sdd-impl-judge.md +214 -0
- package/agents/sdd-scanner.md +120 -0
- package/agents/sdd-spec-judge.md +224 -0
- package/agents/sdd-warden.md +101 -0
- package/package.json +24 -0
- package/skills/align-spec/README.md +20 -0
- package/skills/align-spec/SKILL.md +111 -0
- package/skills/align-spec/scripts/align-spec.mts +187 -0
- package/skills/architect-impl-governance/README.md +46 -0
- package/skills/architect-impl-governance/SKILL.md +45 -0
- package/skills/architect-spec-governance/README.md +48 -0
- package/skills/architect-spec-governance/SKILL.md +59 -0
- package/skills/blast-estimate/README.md +47 -0
- package/skills/blast-estimate/SKILL.md +133 -0
- package/skills/blast-estimate/scripts/blast-estimate.mts +583 -0
- package/skills/builder-impl-governance/README.md +47 -0
- package/skills/builder-impl-governance/SKILL.md +47 -0
- package/skills/builder-spec-governance/README.md +49 -0
- package/skills/builder-spec-governance/SKILL.md +36 -0
- package/skills/check-partition-quality/README.md +22 -0
- package/skills/check-partition-quality/SKILL.md +51 -0
- package/skills/check-partition-quality/scripts/check-partition-quality.mts +336 -0
- package/skills/check-plan-safety/README.md +17 -0
- package/skills/check-plan-safety/SKILL.md +60 -0
- package/skills/check-plan-safety/scripts/check-plan-safety.mts +145 -0
- package/skills/check-project-specs/README.md +19 -0
- package/skills/check-project-specs/SKILL.md +69 -0
- package/skills/check-project-specs/scripts/check-project-specs.mts +217 -0
- package/skills/check-scenario-overlap/README.md +19 -0
- package/skills/check-scenario-overlap/SKILL.md +74 -0
- package/skills/check-scenario-overlap/scripts/check-scenario-overlap.mts +249 -0
- package/skills/check-spec-structure/README.md +17 -0
- package/skills/check-spec-structure/SKILL.md +66 -0
- package/skills/check-spec-structure/scripts/check-spec-structure.mts +346 -0
- package/skills/collision-ladder/README.md +18 -0
- package/skills/collision-ladder/SKILL.md +83 -0
- package/skills/collision-ladder/scripts/collision-ladder.mts +657 -0
- package/skills/combat-log-governance/README.md +13 -0
- package/skills/combat-log-governance/SKILL.md +257 -0
- package/skills/concept-index/README.md +13 -0
- package/skills/concept-index/SKILL.md +38 -0
- package/skills/concept-index/scripts/concept-index.mts +245 -0
- package/skills/discover-plans/README.md +16 -0
- package/skills/discover-plans/SKILL.md +74 -0
- package/skills/discover-plans/scripts/discover-plans.mts +212 -0
- package/skills/discover-specs/README.md +15 -0
- package/skills/discover-specs/SKILL.md +76 -0
- package/skills/discover-specs/scripts/discover-specs.mts +396 -0
- package/skills/doctrine-loop/README.md +15 -0
- package/skills/doctrine-loop/SKILL.md +97 -0
- package/skills/formation-loop/README.md +17 -0
- package/skills/formation-loop/SKILL.md +140 -0
- package/skills/gate-validation-governance/README.md +12 -0
- package/skills/gate-validation-governance/SKILL.md +87 -0
- package/skills/impl-producer-governance/README.md +48 -0
- package/skills/impl-producer-governance/SKILL.md +85 -0
- package/skills/init/README.md +27 -0
- package/skills/init/SKILL.md +68 -0
- package/skills/init/scripts/wire-statusline.mts +276 -0
- package/skills/lifecycle-governance/README.md +11 -0
- package/skills/lifecycle-governance/SKILL.md +168 -0
- package/skills/manage/README.md +9 -0
- package/skills/manage/SKILL.md +62 -0
- package/skills/manage-ignore/README.md +19 -0
- package/skills/manage-ignore/SKILL.md +52 -0
- package/skills/manage-ignore/scripts/manage-ignore.mts +294 -0
- package/skills/manage-scenario-bridge/README.md +20 -0
- package/skills/manage-scenario-bridge/SKILL.md +60 -0
- package/skills/manage-scenario-bridge/scripts/manage-scenario-bridge.mts +156 -0
- package/skills/manage-spec-anchors/README.md +18 -0
- package/skills/manage-spec-anchors/SKILL.md +56 -0
- package/skills/manage-spec-anchors/scripts/manage-spec-anchors.mts +328 -0
- package/skills/mission-graph/README.md +15 -0
- package/skills/mission-graph/SKILL.md +67 -0
- package/skills/mission-graph/scripts/mission-graph.mts +844 -0
- package/skills/oracle-spec-governance/README.md +45 -0
- package/skills/oracle-spec-governance/SKILL.md +45 -0
- package/skills/ownership-governance/README.md +65 -0
- package/skills/ownership-governance/SKILL.md +104 -0
- package/skills/pause-mission/README.md +18 -0
- package/skills/pause-mission/SKILL.md +112 -0
- package/skills/place-node/README.md +12 -0
- package/skills/place-node/SKILL.md +47 -0
- package/skills/place-node/scripts/place-node.mts +157 -0
- package/skills/plan-retirement/README.md +32 -0
- package/skills/plan-retirement/SKILL.md +90 -0
- package/skills/plan-retirement/scripts/retire-plans.mts +196 -0
- package/skills/plugin-contract-governance/README.md +12 -0
- package/skills/plugin-contract-governance/SKILL.md +112 -0
- package/skills/remediation-governance/README.md +46 -0
- package/skills/remediation-governance/SKILL.md +78 -0
- package/skills/resolve-governances/README.md +18 -0
- package/skills/resolve-governances/SKILL.md +50 -0
- package/skills/resolve-governances/scripts/resolve-governances.mts +515 -0
- package/skills/resolve-tracking/SKILL.md +64 -0
- package/skills/resolve-tracking/scripts/resolve-tracking.mts +213 -0
- package/skills/resume-mission/README.md +12 -0
- package/skills/resume-mission/SKILL.md +53 -0
- package/skills/scaffold-project-spec/README.md +7 -0
- package/skills/scaffold-project-spec/SKILL.md +192 -0
- package/skills/sdd/README.md +7 -0
- package/skills/sdd/SKILL.md +92 -0
- package/skills/solution-producer-governance/README.md +9 -0
- package/skills/solution-producer-governance/SKILL.md +44 -0
- package/skills/spec-format-governance/README.md +73 -0
- package/skills/spec-format-governance/SKILL.md +114 -0
- package/skills/spec-gate/README.md +26 -0
- package/skills/spec-gate/SKILL.md +201 -0
- package/skills/spec-gate/scripts/check-spec-state.mts +601 -0
- package/skills/spec-gate/scripts/check-suite.mts +501 -0
- package/skills/spec-gate/scripts/classify-edit-class.mts +411 -0
- package/skills/spec-producer-governance/README.md +7 -0
- package/skills/spec-producer-governance/SKILL.md +86 -0
- package/skills/spec-structure-governance/README.md +40 -0
- package/skills/spec-structure-governance/SKILL.md +169 -0
- package/skills/ssa-lowering/README.md +26 -0
- package/skills/ssa-lowering/SKILL.md +181 -0
- package/skills/start-mission/README.md +7 -0
- package/skills/start-mission/SKILL.md +115 -0
- package/skills/suite-format-governance/README.md +75 -0
- package/skills/suite-format-governance/SKILL.md +299 -0
- package/skills/suite-format-governance/references/rubric.md +313 -0
- package/skills/touch-set-correction/README.md +16 -0
- package/skills/touch-set-correction/SKILL.md +67 -0
- package/skills/touch-set-correction/scripts/touch-set-correction.mts +418 -0
- package/skills/verify-scenarios/README.md +17 -0
- package/skills/verify-scenarios/SKILL.md +109 -0
- package/skills/verify-scenarios/scripts/verify-scenarios.mts +386 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# collision-ladder
|
|
2
|
+
|
|
3
|
+
The concrete engine for **collision-ladder** — a read-only, pairwise collision classifier that, at a
|
|
4
|
+
**known** node-level collision between two Missions, descends the finer-than-node ladder (file →
|
|
5
|
+
region → semantic) to classify the clash **hard** (must serialize) or **soft** (can run in parallel),
|
|
6
|
+
plus the shared-thin-file **hard→soft downgrade** + smell flag. It reuses the sibling
|
|
7
|
+
[`touch-set-correction`](../touch-set-correction/SKILL.md) composition (`resolve-governances` +
|
|
8
|
+
`gherkin-cli diff`) and adds a `git diff -U0` region source. Built for the Op2 second-bullet of the
|
|
9
|
+
cyberfleet-batch change request; see
|
|
10
|
+
[`.agents/specs/sdd/collision-ladder/README.md`](../../../../.agents/specs/sdd/collision-ladder/README.md)
|
|
11
|
+
for the authoritative behavior description and
|
|
12
|
+
[`collision-ladder.feature`](../../../../.agents/specs/sdd/collision-ladder/collision-ladder.feature)
|
|
13
|
+
for the frozen 18-scenario contract.
|
|
14
|
+
|
|
15
|
+
- **Skill contract:** [`SKILL.md`](./SKILL.md)
|
|
16
|
+
- **Script:** [`scripts/collision-ladder.mts`](./scripts/collision-ladder.mts)
|
|
17
|
+
- **Tests:** [`scripts/collision-ladder.test.mts`](./scripts/collision-ladder.test.mts)
|
|
18
|
+
(`node:test`) — one test per frozen scenario, titled `scenario: <verbatim frozen scenario name>`.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: collision-ladder
|
|
3
|
+
description: "Internal skill: at a known node-level collision between two missions, descends the finer-than-node ladder (file → region → semantic) to classify the clash hard or soft — a read-only downgrade-only disambiguator, not triggered by users directly."
|
|
4
|
+
user-invocable: false
|
|
5
|
+
metadata:
|
|
6
|
+
internal: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Collision Ladder
|
|
10
|
+
|
|
11
|
+
The concrete engine for **collision-ladder** — the Op2 second-bullet of the cyberfleet-batch
|
|
12
|
+
self-hosting-kernel (issue #189). The shared work list ([`mission-graph`](../mission-graph/README.md))
|
|
13
|
+
holds two Missions apart whenever they touch the **same work area** (a node collision), conservatively
|
|
14
|
+
serializing *any* same-area overlap. Most such overlaps are false — the area holds many files and the
|
|
15
|
+
Missions usually touch **different** ones, or the same file in **different spots**. This engine is the
|
|
16
|
+
disambiguator: given a **known** node collision between two Missions, it **descends a ladder of finer
|
|
17
|
+
grains** — file → region → semantic — and stops at the first grain that tells a **hard** clash (must
|
|
18
|
+
serialize) from a **soft** one (can run in parallel, reconciled by rebase).
|
|
19
|
+
|
|
20
|
+
It runs **rarely**, only on the colliding pair, only to justify **downgrading a suspected false-hard**
|
|
21
|
+
— never as the baseline signal, never to *find* a collision (that is the work list's job).
|
|
22
|
+
|
|
23
|
+
The ladder (descend only until classifiable, then stop):
|
|
24
|
+
|
|
25
|
+
- **file** — the two Missions' changed files under the node are disjoint ⇒ **soft** (artifact-neutral,
|
|
26
|
+
highest confidence). The common case.
|
|
27
|
+
- **region** — for each **shared** file, both sides' touched line-hunks are known and disjoint ⇒
|
|
28
|
+
**soft** (textual). Overlapping — or either side's hunks unknown — descends.
|
|
29
|
+
- **semantic**, split by artifact-type (keyed structurally off the path):
|
|
30
|
+
- **`.feature`** (behavioral prose) → the **scenario**: different scenarios ⇒ **soft**, the same
|
|
31
|
+
scenario ⇒ **hard** (freeze-anchored, the same `gherkin-cli diff` the sibling reuses).
|
|
32
|
+
- **code** → the **symbol** — the **★ deferred capstone** (issue #189's third bullet): stays
|
|
33
|
+
**hard**, flagged `symbol-rung-deferred`.
|
|
34
|
+
- **non-behavioral prose** (governance / reference, no suite) → **no finer anchor**; stay **hard**,
|
|
35
|
+
reason `no-anchor`.
|
|
36
|
+
|
|
37
|
+
The **node rollup** is **hard if any shared file is hard**, else soft; it records the decisive rung and
|
|
38
|
+
a **confidence that decays down the ladder** (a `file`-rung soft outranks a `semantic`-rung soft).
|
|
39
|
+
|
|
40
|
+
**The shared-thin-file downgrade.** A file touched by **many** Missions (a CLI router, barrel, registry)
|
|
41
|
+
is the case the work list most over-serializes. The ladder's descent **is** the downgrade — a shared-thin
|
|
42
|
+
file changed in disjoint regions (or different scenarios) downgrades **hard→soft** instead of serializing.
|
|
43
|
+
A file whose touching-mission **degree** reaches a threshold (default 3) is flagged `sharedThin` and
|
|
44
|
+
surfaced as an **architectural smell** to consider splitting (surfacing only — it never performs the split).
|
|
45
|
+
|
|
46
|
+
It **composes** the sibling [`touch-set-correction`](../touch-set-correction/README.md)'s
|
|
47
|
+
`collectChangedFiles` (which itself composes `resolve-governances` for artifact-type and the pinned
|
|
48
|
+
`gherkin-cli@0.0.2 diff` for changed scenarios — never a reimplemented differ) and adds one finer source,
|
|
49
|
+
`git diff -U0` line-hunks (the region rung).
|
|
50
|
+
|
|
51
|
+
Pure derivations (`classify`, `classifyFile`, `hunksDisjoint`, `isFeature`, `isCode`, `confidenceRank`,
|
|
52
|
+
the render helper) take and return plain data — no fs/network access — kept apart from a thin IO seam
|
|
53
|
+
(`readFileHunks`, `collectMissionTouch`) that shells out to `git diff -U0` and reuses the correction
|
|
54
|
+
engine's composition.
|
|
55
|
+
|
|
56
|
+
## Run it
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# constructed input (a ClassifyInput JSON) — the primary, tested path:
|
|
60
|
+
node "<skill>/scripts/collision-ladder.mts" --input <file|-> [--format toon|json]
|
|
61
|
+
|
|
62
|
+
# sourced from two mission git ranges for one colliding node:
|
|
63
|
+
node "<skill>/scripts/collision-ladder.mts" --from-git --node <project/capability> \
|
|
64
|
+
--x <base..head> --y <base..head> [--root .] \
|
|
65
|
+
[--layout 'sdd:.agents/specs/sdd,plugins/sdd/skills']... \
|
|
66
|
+
[--shared-thin-threshold 3] [--format toon|json]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- A **ClassifyInput** is `{ node, x, y, degrees?, sharedThinThreshold? }`, where `x`/`y` are each a
|
|
70
|
+
`MissionTouch` (`{ mission, files }`) and every `file` is `{ path, artifactType, hunks, changedScenarios }`
|
|
71
|
+
(`hunks: null` means the line-hunks were not recorded — the region rung will not clear it).
|
|
72
|
+
- Default output is **TOON**; `--format json` emits the full `LadderVerdict`: `node`, the hard-or-soft
|
|
73
|
+
`collision`, the decisive `rung`, the `confidence`, the per-shared-file `sharedFiles`, the shared-thin
|
|
74
|
+
`smells`, and the `deferrals` (files whose downgrade awaits the ★ symbol rung).
|
|
75
|
+
|
|
76
|
+
## Boundaries
|
|
77
|
+
|
|
78
|
+
**Read-only w.r.t. the mission graph** — it never writes to it and never schedules; it *returns* a
|
|
79
|
+
verdict the scheduler consumes. It does **not** detect a collision (the mission-graph WAW-mutex does —
|
|
80
|
+
this runs only *after* one is found), do **★ SSA lowering** or infer **symbol-level** produce/consume
|
|
81
|
+
dependencies (issue #189's capstone — an overlapping-region code file stays hard, flagged
|
|
82
|
+
`symbol-rung-deferred`), descend past the scenario grain, or decide whether to **split** a shared-thin
|
|
83
|
+
file (it surfaces the smell; the architect decides). It classifies; it does not schedule.
|