Some checks failed
CI / test (pull_request) Has been cancelled
- Restructure docs into topic-specific files to minimize context - Create docs/workflow.md (Git + Agent workflow) - Create docs/commands.md (Common failures + build commands) - Create docs/architecture.md (System design + data flow) - Create docs/testing.md (Test structure + guidelines) - Rewrite CLAUDE.md as concise hub with links to detailed docs - Update .gitignore to exclude data/ directory Benefits: - Reduced context size for AI assistants - Faster reference lookups - Better maintainability - Topic-focused documentation Closes #13 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2.9 KiB
2.9 KiB
Development Workflow
Git Workflow Policy
CRITICAL: All code changes MUST follow this workflow. Direct pushes to main are ABSOLUTELY PROHIBITED.
- Create Gitea Issue First — All features, bug fixes, and policy changes require a Gitea issue before any code is written
- Create Feature Branch — Branch from
mainusing formatfeature/issue-{N}-{short-description} - Implement Changes — Write code, tests, and documentation on the feature branch
- Create Pull Request — Submit PR to
mainbranch referencing the issue number - Review & Merge — After approval, merge via PR (squash or merge commit)
Never commit directly to main. This policy applies to all changes, no exceptions.
Agent Workflow
Modern AI development leverages specialized agents for concurrent, efficient task execution.
Parallel Execution Strategy
Use git worktree or subagents (via the Task tool) to handle multiple requirements simultaneously:
- Each task runs in independent context
- Parallel branches for concurrent features
- Isolated test environments prevent interference
- Faster iteration with distributed workload
Specialized Agent Roles
Deploy task-specific agents as needed instead of handling everything in the main conversation:
- Conversational Agent (main) — Interface with user, coordinate other agents
- Ticket Management Agent — Create/update Gitea issues, track task status
- Design Agent — Architectural planning, RFC documents, API design
- Code Writing Agent — Implementation following specs
- Testing Agent — Write tests, verify coverage, run test suites
- Documentation Agent — Update docs, docstrings, CLAUDE.md, README
- Review Agent — Code review, lint checks, security audits
- Custom Agents — Created dynamically for specialized tasks (performance analysis, migration scripts, etc.)
When to Use Agents
Prefer spawning specialized agents for:
- Complex multi-file changes requiring exploration
- Tasks with clear, isolated scope (e.g., "write tests for module X")
- Parallel work streams (feature A + bugfix B simultaneously)
- Long-running analysis (codebase search, dependency audit)
- Tasks requiring different contexts (multiple git worktrees)
Use the main conversation for:
- User interaction and clarification
- Quick single-file edits
- Coordinating agent work
- High-level decision making
Implementation
# Example: Spawn parallel test and documentation agents
task_tool(
subagent_type="general-purpose",
prompt="Write comprehensive tests for src/markets/schedule.py",
description="Write schedule tests"
)
task_tool(
subagent_type="general-purpose",
prompt="Update README.md with global market feature documentation",
description="Update README"
)
Use run_in_background=True for independent tasks that don't block subsequent work.