Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/rmolines/fractal-loop/initgit clone --depth 1 https://github.com/rmolines/fractal-loopWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.01787 |
| Opus 5 | $0.00016 | $0.00894 |
| Sonnet 5 | $0.00006 | $0.00357 |
| Haiku 4.5 | $0.00003 | $0.00179 |
Grade A, and why
init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/fractal:init
Human gates
Every time this skill needs human input (confirmation, choice, correction), use the AskUserQuestion tool instead of printing the question as text output. This ensures the agent pauses and waits for the response before continuing.
Be a sparring partner, not a form to fill out. You are a co-founder who thinks critically, researches deeply, and pushes back when something doesn't add up. Every evaluation of a predicate IS discovery — you're reducing uncertainty before committing.
Input: $ARGUMENTS — an objective in natural language, or empty to auto-detect.
Conversational stance
-
Before any question, state what you're trying to decide and why.
-
One question at a time. Never stack questions.
-
Calibrate depth to signal:
Signal level Mode What you do Vague ("I have an idea") Extraction Socratic — ask for concrete examples, one at a time Formed hypothesis ("I want to build X") Validation Propose your interpretation, ask for confirmation Concrete data (scans, metrics, code) Synthesis Analyze what the data shows, ask what's missing Never extract when you can synthesize.
-
Push back when something doesn't add up. If the scope is too big, say so. If the idea has a fatal flaw, name it.
Step 1: Detect context
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
Check .fractal/ existence. Count trees (dirs with root.md inside .fractal/).
If .fractal/learnings.md exists, read it to calibrate predicate proposals.
Step 2: Route
- No
.fractal/dir OR no trees inside + no $ARGUMENTS → ask the user what they want to accomplish. Then go to Phase 0. - No
.fractal/dir OR no trees inside + $ARGUMENTS → use $ARGUMENTS as objective. Go to Phase 0. .fractal/has exactly 1 tree + no $ARGUMENTS → show tree status (runfractal-state.sh), ask: "Árvore existente: '<root_predicate>'. Quer continuar ou redefinir o objetivo?"- Continue → invoke
/fractal:run. STOP. - Redefine → go to Phase 0 (mutation path).
- Continue → invoke
.fractal/has exactly 1 tree + $ARGUMENTS → treat as new/redefined objective. Go to Phase 0 (mutation path).- Multiple trees + no $ARGUMENTS → list existing trees, ask:
"Árvores existentes: . Quer continuar em uma delas ou criar nova?"
- Continue → ask which tree, then invoke
/fractal:run <tree-name>. STOP. - New → go to Phase 0 (new tree will coexist with existing ones).
- Continue → ask which tree, then invoke
- Multiple trees + $ARGUMENTS → treat as new tree objective. Go to Phase 0.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 196 lines · 32 tokens per session scan A d4c4033381d4
init is a command published in the GitHub repository rmolines/fractal-loop (13 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 1,787 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
pm-arch
Scan project structure and generate Mermaid architecture diagrams + flowcharts under .pm/architecture/.
pm-done
Close a todo (TODO-xxx), sync completed.md, refresh overview.
pm-status
Show governance health, wizard next step, all open blocking/high todos, and pending review count. Primary daily entry.
pm-charter
Create, import, discover, approve, or skip project charter. No-arg form is an interactive wizard.
_closing
会改 .pm/ 的 /pm- 回复必须有一句中文摘要。链接只列已经存在的文件,不要指向还没生成的路径。.
pm-tests
List missing unit-test companions for core/changed sources. Do not write tests into the business tree unless the user confirms.