Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 30 additions & 16 deletions .specify/memory/constitution.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<!--
Sync Impact Report:
- Version: 1.2.0 → 1.2.1 (Phase-1 audit M4 — factual syncs; no principle changed)
- Change Type: PATCH — three factual corrections from the Phase-1 completed-items audit
(Roadmap/phase-1-review.md §5, M4): (1) Technology Stack: swift-system is a transitive
*production* dependency (HarnessKit's ProcessLauncher seam, via swift-subprocess's API surface),
not a test-only dep — the note now matches Package.swift; it rides in with the already-sanctioned
swift-subprocess, so the Principle VI sanctioned list is unchanged. (2) Package Architecture:
RenderKit restored to the layer-3 row (matches design §11 and the shipped DAG). (3) Principle VI:
the out-of-domain "onion/control credentials" phrase removed from the secrets rule (a copy-in
artifact); the MUST NOT is otherwise unchanged.
- Version: 1.2.1 → 1.3.0 (Principle VI — secret-scanner delivery amended; MINOR)
- Change Type: MINOR — Principle VI's sanctioned `betterleaks` companion changes from *per-platform
vendored* to *resolved from config/env/PATH*, with per-platform `.artifactbundle` vendoring
**deferred** (packaging infrastructure not yet available; tracked as a roadmap item). **Delivery
only:** the redact-before-write / fail-closed / detection-only-offline MUSTs are **unchanged** —
`capture` fails closed when `betterleaks` is unresolvable and records the resolved scanner version
in bundle provenance. Ripples design §6.1/§11/§13, AGENTS.md, Roadmap/phase-3, Specs/013–014.
No principle added, removed, or reweighted.
- Scope: skillet repository (/Users/csjones/Developer/skillet) — the SKILL.md Evaluation Toolkit, a public, open-source, multi-harness Swift CLI for eval-driven development (EDD) of agent skills
- Orientation: This constitution governs HOW WE DEVELOP skillet (engineering process and
Expand Down Expand Up @@ -250,7 +248,7 @@ single sanctioned way to launch processes keep the supply-chain and execution ri
markers; the raw secret never enters the repo.
- **MUST** fail closed: if the secret scanner cannot run, capture refuses to write rather than
emitting an unsanitized bundle, and offers a remedy.
- **MUST** run the bundled secret scanner detection-only and fully offline; its network validation
- **MUST** run the secret scanner detection-only and fully offline; its network validation
step MUST stay disabled.
- **MUST NOT** emit, log, or commit secrets, private keys, or tokens — not in output, error
messages, or the corpus.
Expand All @@ -264,9 +262,18 @@ single sanctioned way to launch processes keep the supply-chain and execution ri
nothing.
- **MUST NOT** auto-probe other applications' private caches or binaries (the harness ban policy).
- **MUST NOT** add a new runtime or development dependency without a constitutional amendment and
explicit justification. The sanctioned runtime/build deps are `swift-argument-parser`,
`swift-yaml`, `swift-subprocess`, the standard library, and the per-platform vendored
`betterleaks` companion; the cache MAY use the system SQLite library.
explicit justification. The sanctioned build/runtime **library** deps are `swift-argument-parser`,
`swift-yaml`, `swift-subprocess`, and the standard library; and `betterleaks` (MIT) is the
sanctioned **runtime binary** — a *resolved external executable*, not a SwiftPM build dep — for the
secret scanner, **resolved** from an explicit `[sanitize].scanner_path` / `SKILLET_BETTERLEAKS_BIN` /
`PATH` (detection-only, offline; skillet never invokes its network validation). Per-platform
vendoring via a SwiftPM `.artifactbundle` binary target is the intended delivery and is
**deferred** pending that packaging infrastructure (tracked as a roadmap item — secret-scanner
vendoring); until it lands, a resolvable `betterleaks` is a hard prerequisite for `capture`,
which **fails closed** without it, and the resolved version is recorded in each bundle's
`sanitization` provenance. The cache MAY use the system SQLite library.
*(Amended 2026-07-10 — delivery only; the redact-before-write / fail-closed / detection-only-offline
MUSTs above are unchanged. Rationale: `.artifactbundle` packaging not yet available.)*
- **SHOULD** estimate paid trials up front and confirm before spending (TTY) or require `--yes`
(scripts) — spend is visible and consented.
- **SHOULD** record redaction provenance (scanner, version, count) in bundle metadata.
Expand Down Expand Up @@ -375,7 +382,7 @@ binds them (e.g., the sanctioned-dependency list in Principle VI).
seam) and used by the `IntegrationTests` harness. Sanctioned as part of the `swift-subprocess`
adoption — no separate supply-chain entry, so the Principle VI list is unchanged
- **JSON / SARIF / frozen formats**: Foundation `Codable` (no added dependency)
- **Secret scanning**: vendored `betterleaks` (MIT), per platform/arch, offline detection-only
- **Secret scanning**: `betterleaks` (MIT), offline detection-only — **resolved** from config/env/`PATH` (per-platform `.artifactbundle` vendoring deferred; see Principle VI)
- **Cache**: system SQLite (cache only)
- **Testing**: Swift Testing / unit + property tests; golden fixtures; `HarnessReplay` fixtures.
One unit-test target per kit (each kit testable in isolation); an `IntegrationTests` target drives
Expand Down Expand Up @@ -475,11 +482,18 @@ constitution is the development-principle layer. They are kept in sync, not dupl

## Version History

**Version**: 1.2.1
**Version**: 1.3.0
**Ratified**: 2026-06-18
**Last Amended**: 2026-07-01
**Last Amended**: 2026-07-10

**Changelog**:
- **1.3.0** (2026-07-10): MINOR amendment (Principle VI, secret-scanner **delivery only**) — the sanctioned
`betterleaks` companion changes from *per-platform vendored* to **resolved from config/env/`PATH`**, with
per-platform `.artifactbundle` vendoring **deferred** pending SwiftPM binary-artifact packaging (tracked as a
roadmap item). The redact-before-write / fail-closed / detection-only-offline MUSTs are **unchanged**;
`capture` fails closed when `betterleaks` is unresolvable, and records the resolved scanner version in bundle
provenance. Rationale: `.artifactbundle` infrastructure not yet available; ships the security control now
(secure-by-default) rather than deferring `capture`. Ripples design §6.1/§13 (Specs/013, Specs/014).
- **1.2.1** (2026-07-01): PATCH amendment — factual syncs from the Phase-1 completed-items audit
(M4, Roadmap/phase-1-review.md §5): the Technology Stack note now records `swift-system` as a
transitive *production* dependency (HarnessKit's `ProcessLauncher` seam, via the sanctioned
Expand Down
35 changes: 23 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Contributing, security disclosure, and code of conduct are handled at the org le
`skillet init --json`, `skillet doctor [<skill>...] [--json]` (free $0 preflight; exit 3 + remedy on failure),
`skillet lint [--json]`, `skillet score <path> [--format tty|json|sarif]` (free, model-free deterministic scorers over produced text → SARIF 2.1.0; a reporter, not a gate — exit 0 even with findings, exit 4 on a corrupt config), `skillet harness list`, `skillet harness info [--json]`,
`skillet run [<skill>] [--axis behavior|trigger|all] [--ab] [--judge text-judge|grounded-judge] [--runs <k>] [--dry-run] [--yes] [--no-input] [--keep-workspace]` (paid: shells `claude`, resolved via `SKILLET_CLAUDE_CODE_BIN` env → `harness.claude-code.path` in `skillet.yaml` → `PATH` — behavioral trials add the judge; trigger trials are judge-free single calls; `--ab` doubles behavioral trials with a provably skill-free baseline arm, both arms judged; `--judge grounded-judge` reads produced-file contents to catch created-but-wrong, larger grading requests — gated by the combined spend estimate),
`skillet capture --skill <s> --slug <x> [--session <ref>] [--target-dir <path>] [--date <YYYY-MM-DD>] [--force] [--fail-on-secret] [--secret-scanner-path <p>]` (records the newest claude-code session — or `--session` — as a **secret-scrubbed**, scored evidence bundle under `<skills_root>/<skill>/evaluations/sessions/`; **always redacts** — there is no `--no-sanitize` — and **fails closed** if `betterleaks` can't run; `--fail-on-secret` exits 1 for CI, the bundle still written scrubbed),
`skillet --help`, `skillet --version`. Hidden test seams on `run`: `--replay` (offline adapter+judge),
`--replay-map <json>` (with-arm canned verdicts), `--replay-baseline-map <json>` (baseline-arm canned
verdicts; defaults to fail-all so a replayed `--ab` shows a deterministic positive Δ).
Expand All @@ -63,7 +64,7 @@ Contributing, security disclosure, and code of conduct are handled at the org le
Historical note: the 2026-06 macOS-only CI failures were an upstream Swift C++-interop bug, fixed
in swift-yaml (diagnosis + repro live in its `Projects/`); no Swift-version floor beyond Swift 6.

`init`, `doctor`, `lint`, `run`, `harness list`/`info`, and the claude-code adapter (parse + resolution + probe + live `run`) are built; `capture`/`next`/… are not yet — see Planned.
`init`, `doctor`, `lint`, `score`, `run`, `harness list`/`info`, `capture` (scrubbed, scored session bundles — F26/F32), and the claude-code adapter (parse + resolution + probe + live `run` + session capture) are built; `friction`/`next`/… are not yet — see Planned.

## Binding conventions

Expand All @@ -75,8 +76,9 @@ from the first commit.
- **Sanctioned dependencies only** (adding any other requires a constitutional amendment):
`swift-argument-parser`, `swift-yaml` (YAML 1.2 — config + evidence frontmatter; *not* Yams, and
there is **no TOML dependency**), `swift-subprocess`, plus the standard library. JSON/SARIF/frozen
formats use Foundation `Codable` (no added dependency). Secret scanning uses a vendored
`betterleaks` (MIT) companion. The cache MAY use system SQLite.
formats use Foundation `Codable` (no added dependency). Secret scanning uses `betterleaks` (MIT),
**resolved** from the `sanitize` config / `SKILLET_BETTERLEAKS_BIN` / `PATH` (per-platform
`.artifactbundle` vendoring deferred — constitution v1.3.0). The cache MAY use system SQLite.
- **Dependency notes (implementation reality):** `swift-yaml` has **no tagged release**, so it is
**pinned by revision** (`048f714f…`). Its `YAML` product needs **C++ interop**, which is **viral to
direct importers** — so it is confined to the isolated **`ConfigYAML`** target
Expand Down Expand Up @@ -120,8 +122,13 @@ from the first commit.
modified is the explicit, opt-in `suggest --apply` content-anchored path, which refuses a dirty
tree and stops short of the commit. `iterate` operates only in throwaway worktrees.
- **Never emit, log, or commit secrets** (credentials, tokens, keys) — not in output, errors, or
the corpus. `capture` redacts before writing and **fails closed** if the scanner can't run. Run
the scanner offline/detection-only; never enable its network validation.
the corpus. `capture` **always** redacts before writing (there is **no `--no-sanitize`** opt-out —
silence a false-positive *file* with `sanitize.exempt_paths` (a glob/whole-segment list; drops findings
whose path matches), or a false-positive *value* that recurs across artifacts (the diff, trace) with
betterleaks' own allowlist in `.betterleaks.toml`) and **fails closed** if the scanner can't run. Resolve the scanner via `--secret-scanner-path` /
`SKILLET_BETTERLEAKS_BIN` / `sanitize.scanner_path` / `PATH`; `--fail-on-secret` exits 1 for CI
(the bundle is still written scrubbed). Run the scanner offline/detection-only; never enable its
network validation.
- **No telemetry; no network calls** except to providers the user explicitly configured.
- **Do not add a dependency** (runtime or dev) without a constitutional amendment.
- **Do not break a frozen format, bundle field, exit code, or `--json` schema** without a major
Expand All @@ -136,9 +143,10 @@ Treat everything in this section as a target to build toward, not as existing fu
**except** what Phase 1 already shipped (now COMPLETE): the `EDDCore`, `TraceKit`, `HarnessKit`,
`LintKit`, `JudgeKit`, `RunKit`, `ProjectKit`, `RenderKit`, and `ConfigYAML` kits + the `skillet`
executable with `init`/`doctor`/`lint`/`run`/`harness` (see the status banner + Commands above; `doctor`
is Phase 2's first shipped feature). The kits and commands still *planned* are the remaining Phase 2+
ones — `ScoreKit`/`CorpusKit`/`AnalysisKit`/`IterateKit`
and `capture`/`friction`/`triage`/`next`/`suggest`/`iterate`/`baseline`/`report`/… .
is Phase 2's first shipped feature). Phase 2 also shipped `ScoreKit` + `score`; Phase 3 has shipped
`CorpusKit` + `SanitizerKit` + `capture` (F26/F32). The kits and commands still *planned* are the
remaining Phase 3+ ones — `AnalysisKit`/`IterateKit`
and `friction`/`triage`/`next`/`suggest`/`iterate`/`baseline`/`report`/… .

### Package architecture (design §11)

Expand All @@ -147,17 +155,20 @@ skillet (Package.swift, Swift 6, strict concurrency)
EDDCore (pure)
→ TraceKit
→ { HarnessKit, JudgeKit, ScoreKit, LintKit, CorpusKit, ProjectKit }
→ AnalysisKit / RunKit / IterateKit / RenderKit
→ skillet (executable) (swift-argument-parser; ALL commands + wiring, ~≤50 lines
each; NO separate skilletCLI library target)
→ AnalysisKit / RunKit / IterateKit / RenderKit / SanitizerKit (SanitizerKit → CorpusKit + HarnessKit)
→ skillet (executable) (swift-argument-parser; ALL commands + wiring — thin adapters
that delegate to the kits; NO separate skilletCLI library target)
```

`EDDCore` (domain types · gates engine · scorer↔judge contradiction join · pass^k aggregation ·
golden-tested boundary codecs) is pure/synchronous; effectful kits sit above it. The `skillet`
executable is the top wiring layer (no `skilletCLI` library); `ProjectKit` is the filesystem-effect
home for discovery / config I/O / `init` scaffolding, kept out of the executable so it stays
unit-testable. Business logic lives in the kits (one unit-test target each); the CLI surface is
tested via an `IntegrationTests` target that runs the built binary. CorpusKit is a Phase-3 kit.
tested via an `IntegrationTests` target that runs the built binary. Commands are wiring, not a fixed
line budget — orchestration-heavy ones (`run`, `capture`, `doctor`) are the largest, and the reusable
logic they call is extracted into kits (e.g. `GitDiffProvider`, `BodyExtractor`) so it's unit-tested there. `CorpusKit` (bundle assembly +
frozen writer) and `SanitizerKit` (betterleaks-backed secret redaction) are the Phase-3 evidence kits.

### Command surface (design §6) — lights up across phases

Expand Down
12 changes: 12 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ let package = Package(
// Free, model-free deterministic output scorers → SARIF (F17). Reads produced text via ProjectKit's
// SafeFile; emits EDDCore's SarifDocument / ScoreReport. No network, no subprocess.
.target(name: "ScoreKit", dependencies: ["EDDCore", "ProjectKit"]),
// Session-bundle write/read owner (F26): the `BundleText` value (carries the structured Trace),
// the async `Sanitizer` seam + no-op test double, the `Redactable` recursive-scrub protocol, and
// the bundle writer (enforced-path: requires a scan report). Pure + ProjectKit filesystem.
.target(name: "CorpusKit", dependencies: ["EDDCore", "TraceKit", "ProjectKit"]),
.target(
name: "HarnessKit",
dependencies: [
Expand All @@ -73,6 +77,10 @@ let package = Package(
// The runner (F7): the per-trial sandbox lifecycle + the run/judge/aggregate loop. The
// orchestrator that wires the harness adapter + judge over the pure pass^k core.
.target(name: "RunKit", dependencies: ["EDDCore", "TraceKit", "HarnessKit", "JudgeKit", "ProjectKit"]),
// Secret-scanning sanitizer (F26/F32): runs `betterleaks` over gathered text via HarnessKit's
// sanctioned launcher (stdin, in-memory — raw secrets never touch disk), parses its PascalCase
// JSON report, and value-redacts (span-merge). Parser + redactor are library-testable in isolation.
.target(name: "SanitizerKit", dependencies: ["EDDCore", "HarnessKit", "CorpusKit"]),

// Isolated YAML config seam: swift-yaml + C++ interop live ONLY here. It exposes a pure-Swift
// API (decodes into EDDCore's pure SkilletConfig), so consumers stay interop-free.
Expand All @@ -99,6 +107,8 @@ let package = Package(
"HarnessKit",
"JudgeKit",
"RunKit",
"CorpusKit", // F26: bundle writer, transcript render, scrub seam
"SanitizerKit", // F32: the real BetterleaksSanitizer (capture is exposure-gated on it)
// Config loading. Importing ConfigYAML pulls in C++ interop (viral to direct
// importers), so this leaf target is .Cxx too; the kits + pure core stay interop-free.
"ConfigYAML"
Expand All @@ -116,6 +126,8 @@ let package = Package(
.testTarget(name: "JudgeKitTests", dependencies: ["JudgeKit"]),
.testTarget(name: "RunKitTests", dependencies: ["RunKit", "ProjectKit"]),
.testTarget(name: "ScoreKitTests", dependencies: ["ScoreKit"]),
.testTarget(name: "SanitizerKitTests", dependencies: ["SanitizerKit"]),
.testTarget(name: "CorpusKitTests", dependencies: ["CorpusKit"]),
// Consumer of ConfigYAML — must also enable C++ interop (it's viral to direct importers).
.testTarget(name: "ConfigYAMLTests", dependencies: ["ConfigYAML"], swiftSettings: [.interoperabilityMode(.Cxx)]),

Expand Down
4 changes: 4 additions & 0 deletions ROADMAP-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The roadmap's versioned change log, extracted from `ROADMAP.md` on 2026-07-04 (v
stays lean. Latest first; every version is a linkable heading; historical entries are never rewritten.
Companion: [`skillet-design-changelog.md`](skillet-design-changelog.md).

## v1.18.0 — 2026-07-11

MINOR — **F26 + F32 SHIPPED: `skillet capture` — record a session as scrubbed, scored evidence** ([Specs/013](Specs/013-capture-session-evidence/plan.md) + [Specs/014](Specs/014-capture-secret-sanitization/plan.md); design → v0.51). `skillet capture --skill <s> --slug <x>` locates the newest claude-code session (or `--session <ref>`), normalizes it to a `Trace`, renders a transcript, captures the workspace `git diff` + produced file bodies, **redacts secrets in place** (`betterleaks`, resolved from flag/env/config/`PATH`; **fail-closed** if it can't run — constitution VI), runs the deterministic scorers over the redacted bodies, and writes the frozen bundle to `evaluations/<skill>/sessions/<date>-<slug>.*` (+ additive `.trace.json`). New libraries **`CorpusKit`** (bundle assembly + frozen writer) and **`SanitizerKit`** (`betterleaks` parser + span-merge redactor); `session-meta.json` → schema 2 with optional `sanitization` provenance; `--fail-on-secret` exits 1 for CI (bundle written scrubbed either way). Release-coupled — capture is exposure-gated on the real scanner, so there is never an un-scrubbed write path. The session-selection surface is `--session <ref>` overriding an implicit newest default (no `--last` flag — a no-op-default removed). 440 tests green; staged, pending commit. Phase 3 remains IN PROGRESS (F27/F28/F30/F31 remain).

## v1.17.0 — 2026-07-09

MINOR — **F17 SHIPPED: deterministic scorers → SARIF** ([Specs/012](Specs/012-deterministic-scorers/plan.md); design → v0.49). New `skillet score <path> [--format tty|json|sarif]` — free, model-free checks over produced text emitting standard SARIF 2.1.0; a reporter, not a gate. Adds `ScoreKit` (S001–S007 + S000), `scorers:` config block, `SarifDocument`/`ScoreReport` frozen boundary formats, RenderKit human table, and ProjectKit safe-read/confinement ownership. 390 tests green. Phase 2 remains IN PROGRESS.
Expand Down
Loading