1.6 KiB
1.6 KiB
Inline Pipelines → scripts/ From Turn 1
Load when: about to write an inline for i in …; do … python3 -c …; done or a cat … | python3 -c "import json,sys; …" to inspect state.
If you catch yourself writing an inline for i in …; do … python3 -c …; done or cat … | python3 -c "import json,sys; d=json.load(sys.stdin); …" to inspect state (task store, team config, iteration outputs, batch results, etc.), stop and extract it to scripts/. Recurring inspections belong in a named script that other agents (and future-you) can call by one word.
Concrete triggers
- You're about to paste the same
python3 -cheredoc into Bash a second time — write the script instead. - You're iterating over a directory of JSON files (tasks, iter batches, objectives) in a one-liner — script it.
- You're parsing a config file (
~/.claude/teams/*/config.json,.project/objectives/*.mdfrontmatter,turn_stats.jsonl) ad-hoc — script it.
Canonical patterns already in the repo
scripts/team_members.sh <team-name>— list non-lead members of any teamscripts/regression_tests_status.sh— team + tasks + test-file disk presence for the regression-tests wavetools/objectives-report.py— dashboard regeneration from.project/objectives/*.mdfrontmattertools/autoplay-report.py— batch result analysistools/autoplay-batch.sh— batch dispatch
Rule: if your pipeline would be reused next turn / next cycle / next wave, it's a script. An agent that paste-repeats an inline pipeline is training future agents to do the same.