Autonomous Planning Recipes
Contenox plan mode turns a high-level goal into a sequence of verified steps. It's an agentic loop: it plans, you approve (or use --auto), and it executes using local tools.
Scaffolding a new project
Instead of manually creating directories and files, describe your project structure and let Contenox build it.
Create a plan for a new Go service:
contenox plan new "scaffold a new Go project named 'weather-api' with a cmd/ main.go, an internal/ weather package, and a Dockerfile"
Review and execute:
# See what it planned
contenox plan show
# Execute the first step
contenox plan next --shell
# Or run the whole plan autonomously
contenox plan next --auto --shell
Batch Documentation Generation
Generate README.md or DEVELOPMENT.md files for subdirectories by having the agent analyze each folder's contents.
contenox plan new "crawl the internal/ directory and create a README.md in each subdirectory explaining its purpose and main symbols"
How it works
Unlike run (stateless) or chat (conversational), plan is stateful and persistent:
- Generation: The model breaks your goal into discrete, actionable steps stored in a local SQLite database.
- State Management: Each step tracks its own status (
pending,running,completed,failed). - Tool-Augmented Execution: The executor uses the
chain-step-executor.jsonwhich is optimized for callinglocal_shellandlocal_fstools. - Verification: The model is instructed to verify the result of a tool call before marking a step as done.
Tips for Reliable Planning
- Enable Shell Access: Most plans require
--shellto actually perform work on the filesystem. - Granular Goals: If a plan feels too large, the model might miss details. Break complex projects into smaller plans.
- Interactive Correction: If a step fails, use
contenox plan retry <N>orcontenox plan replanto let the model adjust the remaining steps based on the new state. - Security: Always review the plan steps with
contenox plan showbefore running with--auto --shell.