cli-pipeline
Skill4 starsChanged 8 months agoMITView on GitHub
StackMoss CLI architecture — command scaffolding, state machine transitions, and pipeline orchestration. Use when working on CLI commands, state logic, or the core pipeline.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- intake-engineSkill
- stretch-testingSkill
- template-engineSkill
- skill-creatorSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 26
MIGRATING: Read-only on repo, write only to .agents/, no code execution
- Distinctive: line 30
Every CLI command MUST follow this structure:
- Distinctive: line 43
No critical hypothesis with confidence < 80%
- Distinctive: line 48
Never recommend pushing or committing secret-bearing diffs.
- Distinctive: line 60
Use LLM for any logic/routing decisions (deterministic only)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLI Pipeline Skill
When to Use
- Implementing or modifying a CLI command (
new,inject,resolve,promote,run,check,patch apply,upgrade) - Working on the 3-state machine (GLOBAL → MIGRATING → OPERATIONAL)
- Designing command argument parsing or validation
- Building the Patch Proposal pipeline
Architecture Rules
State Machine (3 states)
GLOBAL ──[inject]──▶ MIGRATING ──[resolve + promote]──▶ OPERATIONAL
│
[upgrade] merge CONSTITUTION only
[patch apply] replace-only + budget gateEach state has strict permission boundaries:
- GLOBAL: Template-only, no project knowledge
- MIGRATING: Read-only on repo, write only to
.agents/, no code execution - OPERATIONAL: Research locked, learn only from operational experience
Command Pattern
Every CLI command MUST follow this structure:
src/commands/<name>.ts
├── parseArgs() → validate CLI arguments
├── checkState() → verify current state allows this command
├── execute() → main logic
└── report() → user-facing outputPromote Criteria (hard gates)
promote --confirm only succeeds when ALL true:
MIGRATION_REPORT.mdhas zero open questions- At least 1 command in
[DEV-ENV]verified - No critical hypothesis with confidence < 80%
- User typed
--confirmflag explicitly
Secret Handling
- Redact tokens, passwords, API keys, credentials, and private keys before persisting command output or stderr into patch proposals or repo files.
- Never recommend pushing or committing secret-bearing diffs.
Authority Sources (read before implementing)
- BRD §6: State Machine definitions → BRD
- BRD §7: CLI Commands (full list)
- BRD §12: Patch Proposal Flow + Trigger Rules
- BRD §13: Phase B Migration
- BRD §14: Upgrade isolation
Do NOT
- Skip state validation before executing a command
- Allow
promotewithout hard criteria being met - Use LLM for any logic/routing decisions (deterministic only)
- Auto-execute destructive operations
- Persist raw secrets from stderr, env dumps, or commands into
.stackmoss/,team.md, or generated instructions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

