Skip to content
Draft
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
40 changes: 38 additions & 2 deletions skills/old-coder/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ implementation files:
reviews after the fact.
- The spec is append-only during the task. If implementation reveals the spec was
wrong, say so explicitly and revise it visibly — never silently drift.
- **Declare the isolation mechanism** (worktree / branch / none, and why) in the
spec, so the human can see and veto it before work starts. Pick it with the
detection chain in `references/setup.md`.

### 2. RED — prove each test can fail

Expand Down Expand Up @@ -161,7 +164,7 @@ such excuse: you chose them, so choose real bugs.
### 6. EVIDENCE — the only thing the human reads after code

End with a report the human can trust without opening a single source file
(template in `references/gauntlet.md`):
(template in `references/templates.md`):

- The approved spec, with each behavior mapped to the test that verifies it.
- Each gauntlet layer: the command run, and its actual result (pasted numbers,
Expand Down Expand Up @@ -268,7 +271,40 @@ until that file has been read in full and executed; missing or unreadable →
`not performed` finalizes only as a declared downgrade, like an unapproved
spec. On Tier 3 it needs no apology — say so and claim less.

## Setup
## Setup and configuration

Optional per-repo config lives in `.old-coder.toml` — `isolation`, `install`,
`commit`, `commit_args`, `tracker`, `artifacts`, `[commands]`. **Never block on
it.** Absent, use restrictive defaults (permission keys = `propose`,
`isolation` = `auto`, `artifacts` = `.old-coder`) and mention
`references/setup.md` once. It is gitignored by default so *grants* stay local;
a **tracked** copy is honored only where it tightens (`propose` yes, `allow` and
`isolation = "none"` ignored) — otherwise cloning a repo would hand its config
authority over your machine.

**Use the project's configured or detected commands**, not the ecosystem tables
in `references/gauntlet.md` — those are fallbacks for when nothing is found. A
guessed command produces confident, wrong evidence, which is the one failure
mode this skill exists to prevent.

The permission rule, once: **an operation proceeds if policy permits it AND (it
is reversible OR an approver is present).** Policy can grant standing
permission; it cannot manufacture a human. Writing tests and running the
gauntlet are reversible and proceed unattended. Installs, commits, and tracker
posts are not: they need the matching key set to `allow`, or an in-task
approval. **With `propose` and no approver present, skip the operation, record
the consequence in EVIDENCE, and continue** — never block on a human who is not
there. A run that halts on configuration produces neither code nor evidence.

**Isolation.** The invariant, not the mechanism: *do not mutate the user's
working tree to do your work.* Branch or worktree — pick with the detection
chain in `references/setup.md`, declare it in the SPEC. The trap: **a fresh
worktree contains no gitignored content**, so the gauntlet often cannot run
there until dependencies are rebuilt. Rebuild, or fall back to a branch and
record why. Never report green from a tree that never ran the suite — and where
the isolated tree and the tree the change lands in differ by ignored or
untracked content, say so in EVIDENCE, because a green run in a tree missing the
main tree's `.env` or build outputs is not evidence about the main tree.

If the project has no test runner, no linter, or no type checking, set up the
minimal standard toolchain for the language **first** (see
Expand Down
76 changes: 3 additions & 73 deletions skills/old-coder/references/gauntlet.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,77 +166,7 @@ into a vacuous pass. Prove each home-grown check can fail with a one-off
negative control (feed it a known-bad fixture; make its input unreadable) and
record the control in EVIDENCE's honest notes.

## Gherkin scenario template (for the SPEC step)

```gherkin
Feature: <capability in user language>
Scenario: <one concrete behavior>
Given <concrete starting state>
When <concrete action with concrete input>
Then <concrete observable outcome, exact values>

Scenario: <the error case>
Given ...
When <invalid/hostile input>
Then <exact error type/message/status, and what state must NOT change>
```

Each scenario maps 1:1 to at least one automated test; name the test after the
scenario so the evidence report's spec→test mapping is mechanical.

## Evidence report template (for the EVIDENCE step)

```markdown
## Evidence Report — <task name> (Tier <1|2|3>)

- Spec approval: <obtained from user | not obtained (autonomous run) —
confidence downgraded; spec is the artifact to review after the fact>
- Source state: <commit SHA | no git: sha256 tree hash> — persist the
computation as a script (e.g. tools/source_state.sh); a hash recipe written
in prose is working-directory-sensitive and will fail to reproduce
- Toolchain: <pinned versions file, e.g. requirements-dev.txt>
- Entry point: <single command that reruns every layer>
- Independent verification: <not performed | passed | failed | blocked>
**against the final source state** — a state no verifier saw is
`not performed` however many rounds preceded it (Tier 3; protocol in
`verifier.md`)

### Spec → Test mapping
Status is one of: **pass / fail / unverified / n-a**. A row mapped to
"skipped: <reason>" must carry unverified or n-a — never pass.

| Scenario | Test | Status |
|---|---|---|
| <scenario name> | <test file>::<test name> | pass |
| Must NOT: <negative constraint> | <test / layer / skipped: reason> | pass \| unverified |
## Templates

### Gauntlet (final fresh run)
| Layer | Command | Result |
|---|---|---|
| Tests | <cmd> | <N> passed, 0 failed |
| Types | <cmd> | 0 errors |
| Lint | <cmd> | 0 warnings |
| Changed-line coverage | <cmd> | <covered>/<total> changed lines (list any misses) |
| Mutation | <tool or "manual"> | <killed>/<total> killed |
| Property-based | <cmd> | <N> properties, <examples/property> examples each |
| Real execution | <cmd> | <observed output> |
| Supply chain | <cmd> | 0 known vulns; new deps: none (or list, each ↔ SPEC justification) |
| Suite health | <cmd> | randomized order (seed <n>), all passed |

### Independent verification (never omit; see verifier.md)
- Verifier: <host / model family>; fresh context; which inputs it received;
what correlation that breaks and what it does not.
- Rounds: <n> (cap <m>); verdict per round, each against the state it saw.
- Grading: who classified each finding behavioural vs description, and who
approved stopping.
- Attacked: <what was tried, not only what was found>.
- Findings: behavioural (fixed, then re-verified in a new context) vs
description/mapping (fixed and disclosed, no new round).
- Fixed after the last verified state, therefore unverified: <list | none>.

### Skipped layers
- <layer>: <reason> (or "none")

### Honest notes
- <failures hit during the task and how they were resolved; spec revisions; anything reducing confidence>
```
The Gherkin scenario template, the `SPEC.md` template, the `EVIDENCE.md`
template, and the tracker roll-up live in `templates.md`.
Loading