- Add grill: calibrated plan stress-testing before speccing - Add spec: sole mutator of SPEC.md with format specification - Add caveman: token-compression dialect for invariants and tasks - Add review: adversarial pre-implementation refutation of spec - Add build: single-threaded plan-to-execute loop with external oracles - Add check: read-only drift detector comparing code vs invariants - Add backprop: bug-to-spec feedback loop binding regression tests - Add deepen: complexity reduction and interface shrinking pass - Format all skills to 5-phase Skill Architect anatomy with System One balance - Synchronize symlinks across OpenCode, Codex, and Claude Code
101 lines
2.9 KiB
Markdown
101 lines
2.9 KiB
Markdown
---
|
|
name: caveman
|
|
description: >
|
|
Token-compression encoding dialect for SPEC.md and spec-adjacent writes (~75% reduction vs prose).
|
|
Preserves code identifiers and invariants verbatim while dropping filler and using formal symbols.
|
|
Use when writing or editing SPEC.md, when asked to "caveman", "compress this", or "be brief".
|
|
concerns: [system-one-balance]
|
|
---
|
|
|
|
# Caveman — Spec Encoding
|
|
|
|
Applies to `SPEC.md` writes, spec-referencing text, and backprop entries.
|
|
Does NOT apply to code, error strings, commit messages, or PR descriptions.
|
|
|
|
---
|
|
|
|
## Phase 0: Setup and Protocols
|
|
|
|
1. **Grammar Invariants**:
|
|
- Drop articles (a, an, the).
|
|
- Drop filler (just, really, basically, simply, actually).
|
|
- Drop auxiliary verbs where fragments work (is, are, was, were, being).
|
|
- Drop pleasantries and hedging ("might", "perhaps", "could be worth").
|
|
- Short synonyms: fix > implement, big > extensive, run > execute.
|
|
2. **Symbol Table**:
|
|
- `→` leads to / becomes / on `<x>`
|
|
- `∴` therefore / fix
|
|
- `∀` for all / every
|
|
- `∃` exists / some
|
|
- `!` must / required
|
|
- `?` may / optional / unknown
|
|
- `⊥` never / forbidden / nil
|
|
- `≠` not equal
|
|
- `∈` in, `∉` not in
|
|
- `≤` at most, `≥` at least
|
|
- `&` and, `|` or
|
|
- `§` section reference
|
|
3. **Preserve Verbatim**:
|
|
- Never compress code blocks, paths (`src/auth/mw.go`), URLs, identifiers (`function_name`), numbers/versions, error strings, SQL/JSON/YAML, or quoted strings.
|
|
|
|
---
|
|
|
|
## Phase 1: Ingest and Check
|
|
|
|
1. Confirm target document: `SPEC.md` section, backprop row, or prompt.
|
|
2. Verify target is spec or technical invariant, NOT human prose, code, or commit messages.
|
|
3. If user asks for prose explanation, switch to standard English.
|
|
|
|
---
|
|
|
|
## Phase 2: Processing (Core Logic)
|
|
|
|
Encode into canonical Caveman shapes:
|
|
|
|
### 1. Invariant (§V)
|
|
```text
|
|
V<n>: <subject> <relation> <condition>
|
|
V1: ∀ req → auth check before handler
|
|
V2: token expiry ≤ current_time → reject
|
|
```
|
|
|
|
### 2. Bug Row (§B pipe table)
|
|
```text
|
|
id|date|cause|fix
|
|
B1|2026-04-20|token `<` not `≤`|V2
|
|
```
|
|
|
|
### 3. Task Row (§T pipe table)
|
|
```text
|
|
id|status|task|cites
|
|
T3|x|add auth mw|V1,I.api
|
|
```
|
|
*Status: `x` done, `~` wip, `.` todo. Escape literal `|` as `\|`.*
|
|
|
|
### 4. Interface (§I)
|
|
```text
|
|
<kind>: <name> → <shape>
|
|
api: POST /x → 200 {id:string}
|
|
cmd: `foo bar <arg>` → stdout JSON
|
|
env: FOO_KEY ! set
|
|
```
|
|
|
|
---
|
|
|
|
## Phase 3: The System One Balance Pass
|
|
|
|
- **Compression, Not Amputation**:
|
|
- If cutting a word loses an invariant or factual boundary, keep the word.
|
|
- Never sacrifice precision for token brevity.
|
|
- Fail open to standard English when ambiguous.
|
|
|
|
---
|
|
|
|
## Phase 4: Output Execution & Verification
|
|
|
|
1. Output compressed text in valid Markdown.
|
|
2. Verify:
|
|
- All code tokens, identifiers, and paths are intact.
|
|
- All symbols use standard UTF-8 characters (`→`, `∀`, `⊥`, `!`).
|
|
- Pipe tables parse cleanly with balanced delimiters.
|