Pickle Dot
Convert a PRD into an attractor-compatible DOT digraph.
Claude CodeGeneric
Convert a PRD into an attractor-compatible DOT digraph.
Persona via CLAUDE.md. **SPEAK BEFORE ACTING**.
Attractor = **convergence basin**, not task list. Failures route back toward the basin. Linear chains forbidden unless zero failure modes.
## Step 1: Acquire PRD, Flags & Resolve Working Dir
`$ARGUMENTS`: extract flags first, remainder is the PRD source.
**Flags** (all optional):
- `--provider <name>` — `anthropic` (default), `openai`, `qwen`, `gemini`, `deepseek`, `ollama`, `vllm`
- `--review-provider <name>` — separate provider for review/critical nodes (`.review`, `.critical` classes). Enables mixed-provider workflows (e.g., `--provider qwen --review-provider anthropic` = Qwen for impl, Opus for adversarial review)
- `--models default=<id>,review=<id>` — model IDs for two semantic tiers
- `--model <id>` — shorthand: one model for both tiers
- `--isolated` — skip workspace prompt, use isolated workspace mode
- `--shared` — skip workspace prompt, use shared mode (default)
- `--exit-validation` — prefer `exit_validation` graph attribute over a separate `verify_final` tool node for simple pipelines (single test command, no delta logic)
- `--multimodal` — enable `attachments_context_key` on relevant nodes for PRDs referencing screenshots, mockups, or images
- `--backend <name>` — execution backend: `claude-code` (default), `llm`, `mastra`, `qwen-code`, `none`. Passed through to `/attract` on submission
- `--builder` — enable the BuilderSpec codegen path (Phase 1 opt-in; default remains prompt-only until Phase 2 rollout)
- `--legacy` — explicit prompt-only generation path; identical to default, use to bypass `--builder` if set globally
**Provider defaults** (when `--models` not given):
| Provider | Default tier | Review tier |
|----------|-------------|-------------|
| `anthropic` | `claude-sonnet-4-6` | `claude-opus-4-6` |
| `openai` | `gpt-4.1` | `o3` |
| `qwen` | `qwen-plus` | `qwen-max` |
| `gemini` | `gemini-2.5-flash` | `gemini-2.5-pro` |
| `deepseek` | `deepseek-chat` | `deepseek-reasoner` |
| `ollama` | `qwen3:32b` | `qwen3:32b` |
| `vllm` | *(ask user)* | *(ask user)* |
**PRD source**: path (has `/` or `.md`) → read file. Text → use directly. Empty → ask user.
**Working directory**: attractor runs in Docker, project mounted at `/repos/`. Use `git rev-parse --show-toplevel` to determine mount path. If not a git repo or ambiguous, **ask the user**: "What path will this repo be mounted at inside `/repos/`?" All `tool_command` paths use `cd ${WORKING_DIR} &&`. **Never** use absolute local paths.
**Spec file** (Layer 3 — Spec-Driven Acceptance): After resolving working dir, determine the PRD file path for `spec_file`:
- If PRD was a file path → use that path remapped to workspace (e.g., `/workspace/<run-id>/prd.md` for isolated, `/repos/<repo>/prd.md` for shared)
- If PRD was inline text → write it to `${WORKING_DIR}/prd.md` and reference that path
- Emit `spec_file` as a graph attribute in the BuilderSpec. The engine interpolates `$spec_file` in node prompts.
**Workspace isolation**: After resolving the working directory, determine workspace mode:
- If `--isolated` flag → use isolated mode
- If `--shared` flag → use shared mode
- Otherwise → defer to Step 2b checklist (recommend isolated for greenfield/risky, shared for iterative/quick)
**If isolated**: set `workspace: "isolated"` in BuilderSpec and populate `workspaceOpts`:
1. `workspaceOpts.repoUrl` — derive from `git remote get-url origin`. **Must be HTTPS** — validator rule 22 (`workspace_config`) rejects SSH URLs. Convert SSH format: `git@github.com:org/repo.git` → `https://github.com/org/repo.git`.
2. `workspaceOpts.repoBranch` — current branch name (e.g., `"main"`)
3. `workspaceOpts.cleanup` — **always `"preserve"` by default**. Use `"delete"` only when the pipeline has a `commit_and_push` node.
4. **MANDATORY for isolated**: at least one phase must push verified code. The builder auto-emits a `commit_and_push` tool node when `workspace: "isolated"`. Without this, code is lost on cleanup.
**If shared**: omit `workspace`, `workspaceOpts` from BuilderSpec.
## Step 2: Analyze PRD
Extract: slug, goal, tasks, acceptance criteria.
**Detect which conditional patterns apply** (read pattern reference for details):
| Signal in PRD | Pattern to emit |
|---------------|-----------------|
| Security/auth/data/crypto surface | 8 (security scan), 17 (red team) — recommend in Step 2b |
| Quantitative target with measurable metric (see microverse detection below) | 20 (microverse) — replaces standard impl→verify for that phase |
| Long-running external process ("wait for", "monitor", "poll", deploy, migration, CI wait) | 24 (manager loop) — supervisor polling node |
| High-complexity phase (>3 files, cross-cutting) | 18 (competing impls) — recommend in Step 2b |
| Coverage requirements | 9 (coverage gate) |
| Multiple independent workstreams | 4 (fan-out/fan-in) |
| Phase prompt spans 2+ layers, test categories, or UI pages | 31 (node scope decomposition) — split per heuristic table. Skip if phase uses Pattern 18 |
| Convergence language ("converge until", "iterate until clean", "review until zero findings", "monotonic improvement", "rollback on regression", "Lyapunov") | 32 (iterate convergence) — replaces standard endgame for that phase. NOT triggered by "iterate" alone, "quality gate" alone, or "adversarial" alone. |
**Plan review teams** per phase:
1. `correctness` + `patterns` (always)
2. + `architecture` if >5 files or new modules
3. + `security` if auth/data/crypto
4. + `performance` if hot paths
5. + `resources` if new I/O code (streams, file handles, spawned processes, database connections)
6. + `concurrency` if parallel execution, shared state, fan-out nodes, async coordination, or multiple processes accessing same files/databases
7. + `error-handling` if error recovery paths, retries, fault tolerance, or external service calls
8. Default: 2 consecutive clean passes. **Maximum**: 3 passes for any single phase (>3 ha
Maintain Pickle Dot?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Pickle Dot on getagentictools](https://getagentictools.com/loops/gregorydickson-pre-loop-resolve-validator-cli-reuse-the-attractor-root-detection?ref=badge)