arccrew 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. arccrew-0.1.0/.claude/commands/add-agent.md +69 -0
  2. arccrew-0.1.0/.claude/commands/add-api-endpoint.md +11 -0
  3. arccrew-0.1.0/.claude/commands/add-mcp-pipeline.md +11 -0
  4. arccrew-0.1.0/.claude/commands/add-prompt.md +20 -0
  5. arccrew-0.1.0/.claude/commands/add-retry-loop.md +11 -0
  6. arccrew-0.1.0/.claude/commands/add-review-gate.md +11 -0
  7. arccrew-0.1.0/.claude/commands/add-state-field.md +11 -0
  8. arccrew-0.1.0/.claude/commands/add-supervisor.md +11 -0
  9. arccrew-0.1.0/.claude/commands/add-tool.md +26 -0
  10. arccrew-0.1.0/.claude/commands/analyze-release.md +63 -0
  11. arccrew-0.1.0/.claude/commands/build-agents.md +130 -0
  12. arccrew-0.1.0/.claude/commands/configure-claude.md +11 -0
  13. arccrew-0.1.0/.claude/commands/configure-gemini.md +11 -0
  14. arccrew-0.1.0/.claude/commands/configure-openai.md +11 -0
  15. arccrew-0.1.0/.claude/commands/debug-pipeline.md +11 -0
  16. arccrew-0.1.0/.claude/commands/enable-langsmith.md +11 -0
  17. arccrew-0.1.0/.claude/commands/enable-otel.md +70 -0
  18. arccrew-0.1.0/.claude/commands/release-pr.md +96 -0
  19. arccrew-0.1.0/.claude/commands/switch-provider.md +11 -0
  20. arccrew-0.1.0/.claude/commands/write-tests.md +32 -0
  21. arccrew-0.1.0/.env.example +63 -0
  22. arccrew-0.1.0/.github/workflows/publish.yml +36 -0
  23. arccrew-0.1.0/.github/workflows/test.yml +31 -0
  24. arccrew-0.1.0/.gitignore +36 -0
  25. arccrew-0.1.0/.pre-commit-config.yaml +6 -0
  26. arccrew-0.1.0/CHANGELOG.md +47 -0
  27. arccrew-0.1.0/CLAUDE.md +153 -0
  28. arccrew-0.1.0/LICENSE +21 -0
  29. arccrew-0.1.0/PKG-INFO +380 -0
  30. arccrew-0.1.0/README.md +334 -0
  31. arccrew-0.1.0/arccrew/__init__.py +41 -0
  32. arccrew-0.1.0/arccrew/agents/__init__.py +3 -0
  33. arccrew-0.1.0/arccrew/agents/base.py +371 -0
  34. arccrew-0.1.0/arccrew/api/__init__.py +0 -0
  35. arccrew-0.1.0/arccrew/api/app.py +94 -0
  36. arccrew-0.1.0/arccrew/api/deps.py +65 -0
  37. arccrew-0.1.0/arccrew/api/middleware/__init__.py +0 -0
  38. arccrew-0.1.0/arccrew/api/middleware/auth.py +70 -0
  39. arccrew-0.1.0/arccrew/api/middleware/rate_limit.py +61 -0
  40. arccrew-0.1.0/arccrew/api/routes/__init__.py +0 -0
  41. arccrew-0.1.0/arccrew/api/routes/auth.py +49 -0
  42. arccrew-0.1.0/arccrew/api/routes/pipeline.py +233 -0
  43. arccrew-0.1.0/arccrew/api/routes/ws.py +112 -0
  44. arccrew-0.1.0/arccrew/api/schemas.py +86 -0
  45. arccrew-0.1.0/arccrew/cli/__init__.py +0 -0
  46. arccrew-0.1.0/arccrew/cli/main.py +415 -0
  47. arccrew-0.1.0/arccrew/config.py +136 -0
  48. arccrew-0.1.0/arccrew/llm.py +77 -0
  49. arccrew-0.1.0/arccrew/mcp_server.py +247 -0
  50. arccrew-0.1.0/arccrew/models/__init__.py +3 -0
  51. arccrew-0.1.0/arccrew/models/base.py +63 -0
  52. arccrew-0.1.0/arccrew/observability.py +67 -0
  53. arccrew-0.1.0/arccrew/orchestrator/__init__.py +5 -0
  54. arccrew-0.1.0/arccrew/orchestrator/graph.py +195 -0
  55. arccrew-0.1.0/arccrew/orchestrator/prompt_manager.py +158 -0
  56. arccrew-0.1.0/arccrew/orchestrator/state.py +58 -0
  57. arccrew-0.1.0/arccrew/prompts/base.md +54 -0
  58. arccrew-0.1.0/arccrew/templates/project/.env.example +60 -0
  59. arccrew-0.1.0/arccrew/templates/project/.gitignore +20 -0
  60. arccrew-0.1.0/arccrew/templates/project/CLAUDE.md +139 -0
  61. arccrew-0.1.0/arccrew/templates/project/README.md +60 -0
  62. arccrew-0.1.0/arccrew/templates/project/agents/.gitkeep +0 -0
  63. arccrew-0.1.0/arccrew/templates/project/agents/__init__.py +0 -0
  64. arccrew-0.1.0/arccrew/templates/project/pipeline.py +48 -0
  65. arccrew-0.1.0/arccrew/templates/project/prompts/global.md +15 -0
  66. arccrew-0.1.0/arccrew/templates/project/requirements.txt +1 -0
  67. arccrew-0.1.0/arccrew/templates/project/tests/__init__.py +0 -0
  68. arccrew-0.1.0/arccrew/templates/project/tests/test_agents.py +9 -0
  69. arccrew-0.1.0/arccrew/templates/project/tools/__init__.py +0 -0
  70. arccrew-0.1.0/arccrew/templates/project/tools/my_tools.py +49 -0
  71. arccrew-0.1.0/arccrew/templates/skills/add-agent/SKILL.md +279 -0
  72. arccrew-0.1.0/arccrew/templates/skills/add-agent/command.md +69 -0
  73. arccrew-0.1.0/arccrew/templates/skills/add-api-endpoint/SKILL.md +221 -0
  74. arccrew-0.1.0/arccrew/templates/skills/add-api-endpoint/command.md +11 -0
  75. arccrew-0.1.0/arccrew/templates/skills/add-mcp-pipeline/SKILL.md +192 -0
  76. arccrew-0.1.0/arccrew/templates/skills/add-mcp-pipeline/command.md +11 -0
  77. arccrew-0.1.0/arccrew/templates/skills/add-prompt/SKILL.md +214 -0
  78. arccrew-0.1.0/arccrew/templates/skills/add-prompt/command.md +20 -0
  79. arccrew-0.1.0/arccrew/templates/skills/add-retry-loop/SKILL.md +224 -0
  80. arccrew-0.1.0/arccrew/templates/skills/add-retry-loop/command.md +11 -0
  81. arccrew-0.1.0/arccrew/templates/skills/add-review-gate/SKILL.md +232 -0
  82. arccrew-0.1.0/arccrew/templates/skills/add-review-gate/command.md +11 -0
  83. arccrew-0.1.0/arccrew/templates/skills/add-state-field/SKILL.md +257 -0
  84. arccrew-0.1.0/arccrew/templates/skills/add-state-field/command.md +11 -0
  85. arccrew-0.1.0/arccrew/templates/skills/add-supervisor/SKILL.md +196 -0
  86. arccrew-0.1.0/arccrew/templates/skills/add-supervisor/command.md +11 -0
  87. arccrew-0.1.0/arccrew/templates/skills/add-tool/SKILL.md +271 -0
  88. arccrew-0.1.0/arccrew/templates/skills/add-tool/command.md +26 -0
  89. arccrew-0.1.0/arccrew/templates/skills/build-agents/SKILL.md +283 -0
  90. arccrew-0.1.0/arccrew/templates/skills/build-agents/command.md +130 -0
  91. arccrew-0.1.0/arccrew/templates/skills/configure-claude/SKILL.md +175 -0
  92. arccrew-0.1.0/arccrew/templates/skills/configure-claude/command.md +11 -0
  93. arccrew-0.1.0/arccrew/templates/skills/configure-gemini/SKILL.md +129 -0
  94. arccrew-0.1.0/arccrew/templates/skills/configure-gemini/command.md +11 -0
  95. arccrew-0.1.0/arccrew/templates/skills/configure-openai/SKILL.md +170 -0
  96. arccrew-0.1.0/arccrew/templates/skills/configure-openai/command.md +11 -0
  97. arccrew-0.1.0/arccrew/templates/skills/debug-pipeline/SKILL.md +242 -0
  98. arccrew-0.1.0/arccrew/templates/skills/debug-pipeline/command.md +11 -0
  99. arccrew-0.1.0/arccrew/templates/skills/enable-langsmith/SKILL.md +148 -0
  100. arccrew-0.1.0/arccrew/templates/skills/enable-langsmith/command.md +11 -0
  101. arccrew-0.1.0/arccrew/templates/skills/enable-otel/SKILL.md +70 -0
  102. arccrew-0.1.0/arccrew/templates/skills/enable-otel/command.md +70 -0
  103. arccrew-0.1.0/arccrew/templates/skills/switch-provider/SKILL.md +182 -0
  104. arccrew-0.1.0/arccrew/templates/skills/switch-provider/command.md +11 -0
  105. arccrew-0.1.0/arccrew/templates/skills/write-tests/SKILL.md +295 -0
  106. arccrew-0.1.0/arccrew/templates/skills/write-tests/command.md +32 -0
  107. arccrew-0.1.0/arccrew/tools/__init__.py +4 -0
  108. arccrew-0.1.0/arccrew/tools/agent_tools.py +97 -0
  109. arccrew-0.1.0/arccrew/tools/workspace.py +121 -0
  110. arccrew-0.1.0/arccrew/utils/__init__.py +1 -0
  111. arccrew-0.1.0/arccrew/utils/helpers.py +123 -0
  112. arccrew-0.1.0/cli.py +13 -0
  113. arccrew-0.1.0/examples/researcher_writer/__init__.py +1 -0
  114. arccrew-0.1.0/examples/researcher_writer/agents/__init__.py +6 -0
  115. arccrew-0.1.0/examples/researcher_writer/agents/researcher.py +47 -0
  116. arccrew-0.1.0/examples/researcher_writer/agents/writer.py +55 -0
  117. arccrew-0.1.0/examples/researcher_writer/pipeline.py +244 -0
  118. arccrew-0.1.0/examples/researcher_writer/prompts/researcher.md +26 -0
  119. arccrew-0.1.0/examples/researcher_writer/prompts/writer.md +25 -0
  120. arccrew-0.1.0/mcp.json.example +14 -0
  121. arccrew-0.1.0/pyproject.toml +77 -0
  122. arccrew-0.1.0/pytest.ini +8 -0
  123. arccrew-0.1.0/requirements.txt +44 -0
  124. arccrew-0.1.0/ruff.toml +7 -0
  125. arccrew-0.1.0/tests/__init__.py +0 -0
  126. arccrew-0.1.0/tests/test_base_agent.py +302 -0
  127. arccrew-0.1.0/tests/test_cli.py +198 -0
  128. arccrew-0.1.0/tests/test_config.py +146 -0
  129. arccrew-0.1.0/tests/test_graph.py +72 -0
  130. arccrew-0.1.0/tests/test_helpers.py +112 -0
  131. arccrew-0.1.0/tests/test_observability.py +117 -0
  132. arccrew-0.1.0/tests/test_prompt_manager.py +118 -0
  133. arccrew-0.1.0/tests/test_state.py +105 -0
  134. arccrew-0.1.0/tests/test_tools.py +111 -0
@@ -0,0 +1,69 @@
1
+ # Add Agent
2
+
3
+ Add a single new agent to an existing pipeline.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` fully — it shows existing agents, their state contracts, and the current flow.
10
+ Read `skills/add-prompt/SKILL.md` before writing any prompt file.
11
+
12
+ ## Step 1 — Fill gaps before proposing anything
13
+
14
+ Identify what cannot be confidently inferred from the request and `CLAUDE.md`.
15
+ Ask in a single focused message if any of these are unclear:
16
+
17
+ - **Placement**: where in the flow does this agent go? (after which agent, before which?)
18
+ - **Input**: what does it read from state? (which field from `context`, or directly from `tasks`?)
19
+ - **Output**: what should it produce? (fields, format — this becomes the JSON schema)
20
+ - **Volume**: how many items will it process per call? (needed for round estimation)
21
+
22
+ If everything is clear from `CLAUDE.md` and the request, skip this step.
23
+
24
+ ## Step 2 — Show a mini-blueprint and confirm
25
+
26
+ Before writing any code, show:
27
+
28
+ ```
29
+ ## New Agent: {AgentName}
30
+
31
+ **Role:** one sentence
32
+ **Placement:** after {PreviousAgent} → {AgentName} → {NextAgent}
33
+
34
+ **Data contract:**
35
+ Reads: {state field} — e.g. context.research (dict with keys: ...)
36
+ Writes: {state field} — e.g. context.plan (dict with keys: ...)
37
+ (last agent writes to: results)
38
+
39
+ **Tools:** [tool names] or "none (single LLM call)"
40
+ **Est. rounds:** ~N (N items × M tool calls × 2)
41
+ **MAX_ROUNDS needed:** yes/no — AGENTNAME_MAX_ROUNDS=X in .env
42
+
43
+ **Output schema:**
44
+ {"field1": "...", "field2": [...]}
45
+ ```
46
+
47
+ Ask: **"Does this look right?"** Wait for confirmation before writing any file.
48
+
49
+ ## Step 3 — Generate files
50
+
51
+ 1. **`agents/{agent}.py`** — extends `arccrew.BaseAgent`, imports from `arccrew` only
52
+ 2. **`prompts/{agent}.md`** — follow `skills/add-prompt/SKILL.md` rules exactly:
53
+ - Every tool named explicitly with when-to-call instructions
54
+ - Round budget hint if processing a list
55
+ - JSON schema matching the data contract above
56
+ - Closes with: `Output ONLY the JSON object. No explanation, no markdown, no text before or after.`
57
+ 3. **`pipeline.py`** — add `async def` node wrapper, update flow
58
+ 4. **`CLAUDE.md`** — add to "Agents in this project":
59
+ ```
60
+ - `AgentName` — one-line description → prompts/{agent}.md
61
+ ```
62
+
63
+ After creating the agent, show:
64
+ ```
65
+ Prompts active for {agent_name}:
66
+ 1. base.md — arccrew universal rules (do not edit)
67
+ 2. global.md — your project-wide rules (edit prompts/global.md)
68
+ 3. {agent}.md — this agent's role and output schema
69
+ ```
@@ -0,0 +1,11 @@
1
+ # Add API Endpoint
2
+
3
+ Register a pipeline with the FastAPI server to expose it over HTTP.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-api-endpoint/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, register the pipeline in `pipeline.py` using `pipeline_registry.register("name", create_pipeline)`, then provide the complete curl commands for calling the pipeline via `POST /api/run` with the appropriate `tasks` structure. Do not edit `arccrew`'s internal API files.
@@ -0,0 +1,11 @@
1
+ # Add MCP Pipeline
2
+
3
+ Register a pipeline as an MCP tool so it can be called from Claude Code, Cursor, or Claude Desktop.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-mcp-pipeline/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, register the pipeline in `pipeline.py` using `register_pipeline("name", create_pipeline)` from `arccrew.mcp_server`, provide the MCP client configuration (local stdio or remote URL), and show how to invoke the pipeline using natural language from the MCP client.
@@ -0,0 +1,20 @@
1
+ # Add Prompt
2
+
3
+ Create or update an agent prompt file.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-prompt/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, create or update `prompts/{agent}.md` following these rules:
12
+
13
+ - **Role statement** — one sentence: what this agent does and why
14
+ - **Tools** — list every tool the agent has access to by name. For each tool, say exactly when to call it and what argument to pass. Tools not mentioned by name will be silently ignored by the LLM.
15
+ - If a tool must be called for every item in a list: "Call `tool_name` for EVERY item before adding it to your output."
16
+ - **Round budget** — if the agent processes N items, add: "You have ~X rounds. Process all items efficiently — one `tool_name` call per item is enough."
17
+ - **Numbered instructions** — step-by-step, specific, no ambiguity
18
+ - **JSON output schema** — show the exact structure with real key names and example values. Close with the literal line: `Output ONLY the JSON object. No explanation, no markdown, no text before or after.`
19
+
20
+ Do not edit `prompts/global.md` (project-wide rules) or the arccrew base prompt (bundled in the library).
@@ -0,0 +1,11 @@
1
+ # Add Retry Loop
2
+
3
+ Add a verification and retry loop to an existing pipeline.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-retry-loop/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, create the verifier agent class and its prompt, update `pipeline.py` to use the `create_pipeline()` factory with `verify_node` and `retry_from` parameters (or add manual conditional edges), and update the worker agent to read `retry_history` for self-correction on subsequent attempts.
@@ -0,0 +1,11 @@
1
+ # Add Review Gate
2
+
3
+ Add a reviewer approval gate that can reject and retry the upstream worker.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-review-gate/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, create the reviewer agent using `generate()` (no tools), write its prompt with clear approval criteria and JSON schema, update `pipeline.py` to use `create_pipeline()` with `review_node` and `retry_from` parameters, and ensure the worker reads `retry_history` to address reviewer feedback on retries.
@@ -0,0 +1,11 @@
1
+ # Add State Field
2
+
3
+ Add custom state fields to extend PipelineState for a pipeline.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-state-field/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, create or update `my_project/state.py` with the appropriate fields and reducers, update `pipeline.py` to use the new state class in `StateGraph(MyState)`, and update any agent `execute()` methods that need to read or write the new fields.
@@ -0,0 +1,11 @@
1
+ # Add Supervisor
2
+
3
+ Set up the supervisor orchestration pattern for a pipeline.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-supervisor/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, create sub-agents using `create_react_agent`, write the supervisor prompt that specifies each agent's role and the ordering rules, assemble the pipeline with `create_supervisor`, and add an API-compatible wrapper if the pipeline needs to be registered with the HTTP API.
@@ -0,0 +1,26 @@
1
+ # Add Tool
2
+
3
+ Add a new `@tool` function that agents can use during their ReAct loop.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/add-tool/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above:
12
+
13
+ 1. **Create the `@tool` function** in `tools/my_tools.py` (or a new file under `tools/`). Write a complete docstring that tells the LLM when and how to call it — the docstring IS the LLM's API contract. Return error strings (prefixed `"ERROR:"`) instead of raising exceptions.
14
+
15
+ 2. **Expose via a getter function** so agents import cleanly (`get_my_tools() -> list`).
16
+
17
+ 3. **Update the agent's `execute()`** to pass the tool to `run_react(tools=[...])`:
18
+ ```python
19
+ tools=get_research_tools() + create_workspace_tools(Path("workspace")) + get_my_tools()
20
+ ```
21
+
22
+ 4. **Update `prompts/{agent}.md`** — this step is mandatory and the most commonly missed. The LLM will silently ignore any tool that is not mentioned by name in the prompt. Add an explicit instruction like:
23
+ ```
24
+ Call `tool_name` to do X. Pass {argument} as the parameter. Use the result to Y.
25
+ ```
26
+ If the tool should be called for every item in a list, say so literally: "Call `tool_name` for EVERY item before adding it to your output."
@@ -0,0 +1,63 @@
1
+ # Analyze Release
2
+
3
+ Analyze commits since the last git tag and recommend the next version bump.
4
+
5
+ ---
6
+
7
+ ## Steps
8
+
9
+ 1. Run: `git describe --tags --abbrev=0` to find the last tag (e.g. `v0.1.0`).
10
+ If no tags exist, use `git log --oneline` from the beginning.
11
+
12
+ 2. Run: `git log {last_tag}..HEAD --oneline` to get all commits since the last tag.
13
+
14
+ 3. Categorize each commit using Conventional Commits:
15
+
16
+ | Prefix | Category | Version impact |
17
+ |---|---|---|
18
+ | `feat!:` or `BREAKING CHANGE:` | Breaking | MAJOR bump |
19
+ | `feat:` | New feature | MINOR bump |
20
+ | `fix:` | Bug fix | PATCH bump |
21
+ | `perf:` | Performance | PATCH bump |
22
+ | `refactor:` | Refactor | no bump |
23
+ | `docs:` | Documentation | no bump |
24
+ | `chore:` | Maintenance | no bump |
25
+ | `test:` | Tests | no bump |
26
+ | `ci:` | CI/CD | no bump |
27
+
28
+ 4. Apply SemVer rules:
29
+ - Any BREAKING CHANGE → MAJOR bump (`x.0.0`)
30
+ - No breaking change, but has `feat:` → MINOR bump (`0.x.0`)
31
+ - No feat, but has `fix:` or `perf:` → PATCH bump (`0.0.x`)
32
+ - Only docs/chore/refactor → no release needed
33
+
34
+ 5. Read `pyproject.toml` to find the current version.
35
+
36
+ 6. Output a clear analysis:
37
+
38
+ ```
39
+ Last tag: v0.1.0
40
+ Current version in pyproject.toml: 0.1.0
41
+
42
+ Commits since v0.1.0:
43
+
44
+ MINOR (feat):
45
+ - feat: add global.md 3-layer prompt support
46
+ - feat: arccrew init CLI command
47
+
48
+ PATCH (fix):
49
+ - fix: PromptManager cache not invalidated on reload
50
+
51
+ No bump (chore/docs/refactor):
52
+ - docs: update README
53
+ - chore: update dependencies
54
+
55
+ Recommendation: v0.2.0 (MINOR — new features, no breaking changes)
56
+
57
+ Reasoning: Two new features warrant a MINOR bump. No breaking API changes detected.
58
+
59
+ Ready to release? Run /release-pr to create the release branch and PR.
60
+ ```
61
+
62
+ 7. Ask the user to confirm or adjust the recommendation before proceeding.
63
+ If the user identifies a breaking change not captured in commits, recalculate.
@@ -0,0 +1,130 @@
1
+ # Build Agents — arccrew
2
+
3
+ Build a complete multi-agent pipeline based on the user's description.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read these files fully before writing any code:
10
+ - `CLAUDE.md` — project structure, existing agents, conventions
11
+ - `skills/build-agents/SKILL.md` — pipeline patterns, state, agent code examples
12
+ - `skills/add-tool/SKILL.md` — how to create `@tool` functions correctly
13
+ - `skills/add-prompt/SKILL.md` — how to write agent prompts that actually work
14
+
15
+ ## Step 1 — Fill gaps before writing the blueprint
16
+
17
+ Read the user's request and identify anything that cannot be confidently inferred.
18
+ Ask ONLY about blocking unknowns — one focused message, not an interview.
19
+
20
+ Common blocking unknowns (ask if unclear):
21
+ - **Input shape**: what does `tasks[0].description` look like? (free text, JSON, specific fields?)
22
+ - **Output shape**: what should the final result contain? (fields, format, who consumes it?)
23
+ - **Volume**: how many items will an agent process per call? (affects round estimation)
24
+ - **Custom tools**: does any step need external data or computation not covered by `web_search` or workspace tools?
25
+
26
+ If everything can be inferred from the description, skip this step and go straight to Step 2.
27
+ Never ask about things that have sensible defaults (model, max_rounds, state reducers).
28
+
29
+ ## Step 2 — Present the blueprint (REQUIRED before any code)
30
+
31
+ Present a **Pipeline Blueprint** for the user to confirm. Show the data contract for every
32
+ agent — what it reads from state and what it writes back. This makes silent data-flow bugs
33
+ visible before a single line of code is written.
34
+
35
+ Estimate ReAct rounds per agent:
36
+ - Each tool call = ~2 rounds (call + result read)
37
+ - Formula: N items × M tool calls per item × 2 = estimated rounds
38
+ - > 10 rounds: recommend `AGENTNAME_MAX_ROUNDS` in `.env`
39
+ - > 20 rounds: suggest splitting the agent
40
+
41
+ ```
42
+ ## Pipeline Blueprint: {Pipeline Name}
43
+
44
+ **What it does:** one sentence
45
+
46
+ **Input:** what tasks[0].description contains (free text / JSON fields / etc.)
47
+
48
+ **Agents ({n} total):**
49
+ | Agent | Role | Reads from state | Tools | Est. rounds | Writes to state |
50
+ |-------|------|-----------------|-------|-------------|-----------------|
51
+ | AgentA | ... | tasks[idx].description | web_search | ~6 | context.research |
52
+ | AgentB | ... | context.research | none (LLM only) | ~2 | context.plan |
53
+ | AgentC | ... | context.plan | validate_post | ~8 | results |
54
+
55
+ **Flow:** AgentA → AgentB → AgentC → __end__
56
+
57
+ **Workload notes:** (round budget warnings, MAX_ROUNDS recommendations)
58
+
59
+ **Custom tools needed:**
60
+ - `tool_name(param: type) -> str` — what it does · file: tools/x.py
61
+ - (none if not needed)
62
+
63
+ **Custom state fields needed:**
64
+ - `field_name: dict` — why · reducer: _take_last_dict
65
+ - (none if not needed)
66
+
67
+ **Expected output** (what results[] contains):
68
+ [{"task_index": 0, "field1": "...", "field2": [...]}]
69
+
70
+ **Example curl:**
71
+ curl -X POST http://localhost:8000/api/run \
72
+ -H "Content-Type: application/json" \
73
+ -d '{"pipeline": "name", "tasks": [{"description": "example matching input shape above"}]}'
74
+ ```
75
+
76
+ Ask: **"Does this look right? I'll generate all the files."**
77
+ Wait for confirmation before proceeding to Step 3.
78
+
79
+ ## Step 3 — Generate all files
80
+
81
+ Apply the rules from the SKILL.md files read in Step 0:
82
+
83
+ | What to create | Rules from |
84
+ |----------------|------------|
85
+ | `tools/{custom}.py` | `skills/add-tool/SKILL.md` |
86
+ | `prompts/{agent}.md` | `skills/add-prompt/SKILL.md` |
87
+ | `agents/{agent}.py`, `pipeline.py`, `state.py` | `skills/build-agents/SKILL.md` |
88
+
89
+ Files to generate:
90
+ 1. `tools/{custom}.py` — only if custom tools are needed
91
+ 2. `prompts/{agent}.md` — one per agent
92
+ 3. `agents/{agent}.py` — one per agent
93
+ 4. `pipeline.py` — graph wiring + registration (API + MCP)
94
+ 5. `state.py` — only if custom state fields are needed
95
+
96
+ ## Non-negotiable rules
97
+
98
+ - Imports from `arccrew` only — never `src.*`
99
+ - `prompts/base.md` — never create or edit (library file)
100
+ - `prompts/global.md` — create if missing, never overwrite if exists
101
+ - Last agent MUST update `"results": [{"task_index": idx, **data}]` — this is what the API returns
102
+ - `async def` node wrappers in `pipeline.py` — never `lambda s: agent.execute(s)`
103
+ - Register pipeline in `pipeline.py`: both `pipeline_registry` and `register_pipeline`
104
+
105
+ ## After generating
106
+
107
+ Update `CLAUDE.md` "Agents in this project":
108
+ ```
109
+ - `AgentName` — one-line description → prompts/{agent}.md
110
+ ```
111
+
112
+ Show the user:
113
+ ```
114
+ Created:
115
+ tools/{custom}.py (if any)
116
+ agents/{agent1}.py
117
+ agents/{agent2}.py
118
+ prompts/{agent1}.md
119
+ prompts/{agent2}.md
120
+ pipeline.py
121
+
122
+ .env recommendations:
123
+ AGENTNAME_MAX_ROUNDS=25 (if agent has heavy workload)
124
+
125
+ Run:
126
+ arccrew serve
127
+ curl -X POST http://localhost:8000/api/run \
128
+ -H "Content-Type: application/json" \
129
+ -d '{"pipeline": "{name}", "tasks": [{"description": "your task"}]}'
130
+ ```
@@ -0,0 +1,11 @@
1
+ # Configure Claude
2
+
3
+ Configure Anthropic Claude as the LLM provider.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/configure-claude/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, set `ANTHROPIC_API_KEY` and the correct Claude model string in `.env`, configure any per-agent Haiku/Sonnet/Opus overrides in `.env` (e.g. `RESEARCHER_MODEL=anthropic/claude-sonnet-4-6`), and adjust `LLM_MAX_TOKENS` or `LLM_TEMPERATURE` if the request calls for it. No code changes needed — arccrew reads these from the environment automatically.
@@ -0,0 +1,11 @@
1
+ # Configure Gemini
2
+
3
+ Configure Google Gemini models as the LLM provider.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/configure-gemini/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, set `GOOGLE_API_KEY` and the correct Gemini model string in `.env` (e.g. `AGENT_MODEL=google_genai/gemini-2.0-flash`). No code changes needed — `langchain-google-genai` reads `GOOGLE_API_KEY` directly from the environment. Specify which agents benefit from Gemini's large context window.
@@ -0,0 +1,11 @@
1
+ # Configure OpenAI
2
+
3
+ Configure OpenAI models as the LLM provider.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/configure-openai/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, set `OPENAI_API_KEY` and the correct model string in `.env` (e.g. `AGENT_MODEL=openai/gpt-4o`), configure any per-agent overrides, and note that o-series reasoning models require `LLM_TEMPERATURE=1.0`. No code changes needed — arccrew reads these from the environment automatically.
@@ -0,0 +1,11 @@
1
+ # Debug Pipeline
2
+
3
+ Diagnose and fix a broken or misbehaving pipeline.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/debug-pipeline/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, work through the diagnostic steps in order: run `arccrew check`, then run the pipeline with `--debug` flag or add `LOG_LEVEL=DEBUG` to `.env`, identify the failure pattern from the common failures table in the SKILL.md, and apply the appropriate fix to the prompt, tool, graph wiring, or state field.
@@ -0,0 +1,11 @@
1
+ # Enable LangSmith
2
+
3
+ Enable LangSmith tracing for observability into pipeline runs.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/enable-langsmith/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, add `LANGSMITH_API_KEY`, `LANGSMITH_PROJECT`, and `LANGSMITH_TRACING=true` to `.env`. arccrew picks these up automatically on startup — no code changes needed. Show how to use LangSmith traces to compare model performance or diagnose agent failures.
@@ -0,0 +1,70 @@
1
+ # Enable OpenTelemetry — arccrew
2
+
3
+ Set up OpenTelemetry tracing to send pipeline spans to Grafana, Datadog, Jaeger, or any OTLP-compatible backend.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ ## When to use this instead of LangSmith
10
+
11
+ - Client environment cannot send data to external SaaS (compliance, PII, air-gapped)
12
+ - You already have Grafana, Datadog, or Jaeger running
13
+ - You want traces in the same system as your infra metrics
14
+
15
+ Use **LangSmith** (`/enable-langsmith`) when you want a managed UI with LLM-specific features (token counts, cost, prompt diffs).
16
+
17
+ ## Steps
18
+
19
+ 1. Install the OTel exporter:
20
+ ```bash
21
+ pip install arccrew[otel]
22
+ ```
23
+
24
+ 2. Add to `.env`:
25
+ ```bash
26
+ OTEL_ENABLED=true
27
+ OTEL_ENDPOINT=http://localhost:4317 # your OTLP/gRPC endpoint
28
+ OTEL_SERVICE_NAME=my-pipeline
29
+ ```
30
+
31
+ 3. Restart the server — tracing activates automatically:
32
+ ```bash
33
+ arccrew serve
34
+ ```
35
+
36
+ ## What gets traced
37
+
38
+ Every agent execution produces two span types:
39
+ - `agent.run_react` — attributes: `agent.name`, `max_rounds`
40
+ - `agent.reason` — attribute: `agent.name`
41
+
42
+ Spans are nested under whatever root span your OTLP backend provides.
43
+
44
+ ## Verify it works
45
+
46
+ Look for this in the startup logs:
47
+ ```
48
+ [OTel] Exporting traces to http://localhost:4317
49
+ [OTel] Tracing initialized — service: my-pipeline
50
+ ```
51
+
52
+ If you see `[OTel] opentelemetry-sdk not installed` instead, run `pip install arccrew[otel]`.
53
+
54
+ ## Common backends
55
+
56
+ | Backend | OTLP endpoint (default) |
57
+ |---|---|
58
+ | Grafana + Tempo | `http://localhost:4317` |
59
+ | Jaeger | `http://localhost:4317` |
60
+ | Datadog Agent | `http://localhost:4317` |
61
+ | Honeycomb | `https://api.honeycomb.io:443` (with API key header) |
62
+
63
+ For backends that require auth headers, configure them at the collector level — arccrew sends plain OTLP.
64
+
65
+ ## Disable tracing
66
+
67
+ ```bash
68
+ # .env
69
+ OTEL_ENABLED=false
70
+ ```
@@ -0,0 +1,96 @@
1
+ # Release PR
2
+
3
+ Create a release branch, bump the version, update CHANGELOG, and open a GitHub PR.
4
+
5
+ **Version to release:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ > Run `/analyze-release` first if you haven't determined the version yet.
10
+
11
+ ## Steps
12
+
13
+ ### 1. Validate input
14
+
15
+ If $ARGUMENTS is empty, ask: "What version should this release be? (e.g. 0.2.0)"
16
+ Strip any `v` prefix from the input — work with bare semver (e.g. `0.2.0`).
17
+
18
+ ### 2. Get commits for changelog
19
+
20
+ Run: `git describe --tags --abbrev=0` to find the last tag.
21
+ Run: `git log {last_tag}..HEAD --oneline` to get commits to include.
22
+
23
+ Categorize commits exactly as in `/analyze-release`.
24
+
25
+ ### 3. Create release branch
26
+
27
+ ```bash
28
+ git checkout -b release/v{version}
29
+ ```
30
+
31
+ ### 4. Bump version in pyproject.toml
32
+
33
+ Edit `pyproject.toml` — update `version = "..."` to the new version.
34
+
35
+ ### 5. Update CHANGELOG.md
36
+
37
+ If `CHANGELOG.md` doesn't exist, create it with this header:
38
+ ```markdown
39
+ # Changelog
40
+
41
+ All notable changes to arccrew are documented here.
42
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
43
+ ```
44
+
45
+ Prepend the new release block (after the header):
46
+
47
+ ```markdown
48
+ ## [0.2.0] — 2026-03-25
49
+
50
+ ### Added
51
+ - feat: add global.md 3-layer prompt support
52
+ - feat: arccrew init CLI command
53
+
54
+ ### Fixed
55
+ - fix: PromptManager cache not invalidated on reload
56
+ ```
57
+
58
+ Only include categories that have commits. Omit empty sections.
59
+
60
+ ### 6. Commit the changes
61
+
62
+ ```bash
63
+ git add pyproject.toml CHANGELOG.md
64
+ git commit -m "chore: release v{version}"
65
+ ```
66
+
67
+ ### 7. Push and create GitHub PR
68
+
69
+ Push the branch and create a PR via the GitHub MCP tool with:
70
+ - **Title:** `Release v{version}`
71
+ - **Base branch:** `main`
72
+ - **Body:** the full changelog block for this release, plus:
73
+
74
+ ```
75
+ ## Release checklist
76
+ - [ ] Version bumped in pyproject.toml
77
+ - [ ] CHANGELOG updated
78
+ - [ ] All tests passing
79
+
80
+ ## After merging
81
+ The CI/CD workflow will automatically publish v{version} to PyPI.
82
+ ```
83
+
84
+ ### 8. Show the user
85
+
86
+ ```
87
+ Release PR created: {PR_URL}
88
+
89
+ After merging:
90
+ - GitHub Actions will tag the commit and publish to PyPI automatically
91
+ - Tag: v{version}
92
+
93
+ To publish manually instead:
94
+ git tag v{version}
95
+ git push origin v{version}
96
+ ```
@@ -0,0 +1,11 @@
1
+ # Switch Provider
2
+
3
+ Switch the LLM provider for this project.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/switch-provider/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, update `AGENT_MODEL` in `.env` with the correct model string for the target provider, install the required provider package if needed, specify any per-agent overrides, and verify the API key for that provider is set. No code changes needed — arccrew resolves the provider from the model string automatically.
@@ -0,0 +1,32 @@
1
+ # Write Tests
2
+
3
+ Write tests for agents, tools, or pipelines.
4
+
5
+ **User request:** $ARGUMENTS
6
+
7
+ ---
8
+
9
+ Read `CLAUDE.md` and `skills/write-tests/SKILL.md` fully before doing anything.
10
+
11
+ Based on the description above, create the appropriate test file(s) in `tests/` following the existing patterns in `test_base_agent.py` and `test_tools.py`.
12
+
13
+ **For `@tool` functions** — test directly without mocking (they are pure functions or async):
14
+ - Happy path with valid input
15
+ - Error path: what does it return when the input is bad or the external call fails? (must return `"ERROR: ..."` string, never raise)
16
+ - Edge cases: empty string, None, very long input, unexpected types
17
+
18
+ **For agent logic** — mock the LLM, test the agent's state handling:
19
+ - Does `execute()` read the right keys from state?
20
+ - Does it return a `Command` with the expected `goto` and `update` keys?
21
+ - Does `extract_json` fallback work when the LLM returns prose? Test with `{"raw": result}` fallback.
22
+ - Is `"results"` populated on the last agent? (`results: []` in the API response is a common failure)
23
+
24
+ **For the pipeline end-to-end** — use a real but cheap model (haiku) with a small input:
25
+ - Use N=1 or N=2 items, never the full production N — this catches round exhaustion early
26
+ - Assert that `response["results"]` is non-empty
27
+ - Assert that the JSON keys you expect actually exist in the result
28
+
29
+ **Specific cases to always cover:**
30
+ - `extract_json` on valid JSON, JSON inside markdown fences, and plain text (should return `{}`)
31
+ - Tool returning `"ERROR: ..."` string — does the agent handle it gracefully and not crash?
32
+ - State field missing from input — does the agent default safely or raise a clear error?