Skip to content

Commit b1f7ed6

Browse files
sweverettclaude
andcommitted
add agent definitions, token tier, auto-refinement, config cmd
Layer 1.5: generate .claude/agents/ alongside skills during parallax init. 4 scientific agents (hypothesis-explorer, experiment-runner, literature-reviewer, result-validator) with model selection by token tier (pro/5x/20x/api). Auto-refinement via claude CLI, parallax config set token-tier, session-start skill, memory:project on hypothesis+experiment. Plan archival + verification rules in CLAUDE.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 93d16cb commit b1f7ed6

29 files changed

Lines changed: 1490 additions & 42 deletions

CLAUDE.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ See [VISION.md](docs/VISION.md) for full architecture. See [ROADMAP.md](docs/ROA
2727

2828
```
2929
src/parallax/ # Main package
30-
cli/ # Typer CLI commands (init, refine)
31-
core/ # Config, interview, renderer, workflow logic
30+
cli/ # Typer CLI commands (init, refine, config)
31+
core/ # Config, interview, renderer, refiner
3232
config.py # ProjectConfig dataclass
3333
interview.py # Structured init interview
3434
renderer.py # Template rendering + file generation
35+
refiner.py # Auto-refinement via Claude CLI
3536
db/ # SQLite models + queries (Layer 2)
3637
templates/ # string.Template files for parallax init output
38+
agents/ # Agent definition templates (hypothesis_explorer, etc.)
3739
hooks/ # Hook script templates (test_guard, lint_check, stop_check)
38-
skills/ # Skill templates (hypothesis, handoff, audit, experiment)
40+
skills/ # Skill templates (hypothesis, handoff, audit, experiment, session_start)
3941
tests/ # pytest (mirrors src structure)
4042
docs/ # VISION.md, ROADMAP.md, plans/
4143
.claude/hooks/ # Hook enforcement scripts for Parallax development
@@ -105,8 +107,13 @@ pixi run check # all of the above
105107
- Never add backward-compat shims — just change the code
106108
- Never create docs/READMEs unless explicitly requested
107109

108-
## Documentation Maintenance
110+
## Plan Completion & Verification
109111

112+
- **Archive the plan.** At the start of implementation, copy the plan file to `docs/plans/NNN_short-name.md` (next sequence number). The plan path is in the system message from plan mode.
113+
- Every plan's verification section is **mandatory**. At the end of implementation:
114+
1. **List all verification commands** from the plan so the user can run them independently
115+
2. **Execute each one** and report the result (pass/fail, key output) explicitly to the user
116+
- `pixi run check` is baseline; also run any CLI smoke tests or manual checks the plan specifies
110117
- At the end of every plan, verify README.md and other markdown docs reflect current state
111118
- If code changes affect documented behavior, update the relevant docs in the same PR
112119
- @README.md and other key docs should be reviewed before marking any plan complete

README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,26 @@ See [VISION.md](docs/VISION.md) for details.
3030

3131
```
3232
src/parallax/ # Main package
33-
cli/ # Typer CLI (init, refine)
34-
core/ # Config, interview, renderer
33+
cli/ # Typer CLI (init, refine, config)
34+
core/ # Config, interview, renderer, refiner
3535
db/ # SQLite models (Layer 2)
3636
templates/ # string.Template files for init output
37+
agents/ # Agent definition templates
38+
skills/ # Skill templates
39+
hooks/ # Hook script templates
3740
tests/ # pytest (mirrors src structure)
3841
docs/ # VISION.md, ROADMAP.md, plans/
3942
.claude/ # Skills (skill-name/SKILL.md) and hooks for development
4043
```
4144

45+
## Prerequisites
46+
47+
- [pixi](https://pixi.sh) -- package/environment management
48+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) -- required for auto-refinement during `parallax init`
49+
4250
## Installation
4351

44-
Requires [pixi](https://pixi.sh). Install via:
52+
Install pixi:
4553

4654
```bash
4755
# macOS / Linux
@@ -80,29 +88,44 @@ parallax init
8088
parallax init -t /path/to/project # target directory
8189
parallax init -y # accept defaults, skip optional
8290
parallax init -f # overwrite existing files
91+
parallax init --token-tier 5x # set model tier for agents
92+
parallax init --skip-refine # skip auto-refinement
8393

8494
# Post-init refinement
8595
parallax refine # print refinement instructions
8696
parallax refine --done # strip refinement comment blocks
97+
98+
# Post-init config changes
99+
parallax config set token-tier 5x # update agent model selection
87100
```
88101

89102
`parallax init` runs a structured interview generating:
90103
- **CLAUDE.md** -- project-specific AI agent guide
91104
- **PARALLAX.md** -- scientific workflow rules
92105
- **CONSTITUTION.md** -- core scientific principles
93-
- **.claude/skills/** -- hypothesis, handoff, audit, experiment skills
106+
- **.claude/skills/** -- hypothesis, handoff, audit, experiment, session-start skills
107+
- **.claude/agents/** -- hypothesis-explorer, experiment-runner, literature-reviewer, result-validator agents
94108
- **.claude/hooks/** -- test guard, lint check, stop check enforcement scripts
95109
- **.claude/settings.json** -- hook configuration referencing scripts above
96110

111+
Token tiers control agent model selection:
112+
- **pro** (default) -- conservative: haiku exploration, sonnet validation
113+
- **5x** -- balanced: opus exploration, sonnet runner
114+
- **20x** -- generous: opus for most tasks
115+
- **api** -- unconstrained: opus everywhere
116+
97117
## Current Status
98118

99119
Layer 1 (Convention System) functional. `parallax init`, `parallax refine`, hook enforcement, and skills all implemented.
100120

101121
What exists:
102-
- `parallax init`: structured interview + template rendering
122+
- `parallax init`: structured interview + template rendering + auto-refinement
103123
- `parallax refine`: post-init refinement workflow
124+
- `parallax config`: post-init configuration changes (token tier)
104125
- Hook enforcement: test guard (blocks test weakening), lint check (ruff feedback), stop check (uncommitted work reminder)
105-
- Full skill definitions: /hypothesis, /handoff, /audit, /experiment
126+
- Full skill definitions: /hypothesis, /handoff, /audit, /experiment, /session-start
127+
- Custom agent definitions: hypothesis-explorer, experiment-runner, literature-reviewer, result-validator
128+
- Token tier system: model selection per agent based on usage tier (pro/5x/20x/api)
106129
- CI pipeline (ruff, mypy --strict, pytest)
107130
- Integration test suite validating generated output
108131

docs/ROADMAP.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ Hooks/skills format could change upstream. No compatibility strategy. Should we
3939

4040
- [x] `parallax init` interview design + implementation
4141
- [x] Template files: PARALLAX.md, CLAUDE.md, CONSTITUTION.md, settings.json, skills
42-
- [x] Claude Code skills: `/hypothesis`, `/handoff`, `/audit`, `/experiment`
42+
- [x] Claude Code skills: `/hypothesis`, `/handoff`, `/audit`, `/experiment`, `/session-start`
4343
- [x] Hook scripts: test protection, lint check, stop check
44+
- [x] Custom agent definitions: hypothesis-explorer, experiment-runner, literature-reviewer, result-validator
45+
- [x] Token tier system: model selection per agent (pro/5x/20x/api)
46+
- [x] Auto-refinement via Claude CLI (`parallax init` invokes `claude -p`)
47+
- [x] `parallax config set token-tier` for post-init changes
48+
- [x] `memory: project` on hypothesis + experiment skills
4449
- [ ] CI enhancements: semantic version validation, doc staleness check
4550

4651
## Layer 2 Features (MVP-beta)
4752

48-
- [ ] SQLite schema for hypothesis lifecycle + test results
49-
- [ ] Git worktree integration for parallel hypotheses
53+
- [ ] SQLite schema for hypothesis lifecycle + test results (skill `memory: project` as short-term proxy)
54+
- [ ] Git worktree integration for parallel hypotheses (Claude Code handles plumbing natively; Parallax defines workflows)
5055
- [ ] Agent handoff summary system
5156
- [ ] Semantic versioning automation
5257
- [ ] Conversation/session logging

0 commit comments

Comments
 (0)