mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 16:01:54 +00:00
2.9 KiB
2.9 KiB
CLAUDE.md — Generic Agent Execution Workflow
This guide defines an execution flow that works across repositories and tech stacks.
Default workflow
- Load baseline context
AGENTS.mdCONTRIBUTING.mdKNOWN_ISSUES.mddocs/agent-handoffs/README.md- Recent notes in
docs/agent-handoffs/learnings/anddocs/agent-handoffs/incidents/
- Clarify the task
- Restate the requested outcome.
- Identify constraints, risks, and assumptions.
- Plan minimal changes
- Keep scope tight.
- Avoid touching unrelated files.
- Implement
- Apply small, reversible edits.
- Favor readability and maintainability.
- Validate
- Run relevant checks for impacted files.
- Capture exact commands and outcomes.
- Document and hand off
- Summarize what changed and why.
- Record reusable learnings/incidents when appropriate.
Working files for session state
Use the following folders as lightweight coordination artifacts:
src/context/— Current objective, scope, constraints.src/todo/— Task checklist and blockers.src/decisions/— Important design/implementation choices.src/test_logs/— Validation commands and results.src/issues/— Investigations or audits that may become tracked issues.
Recommended content templates
Context note template
- Goal
- Scope
- Constraints
- Open questions
Todo note template
- Pending tasks
- Completed tasks
- Blocked tasks
Decision note template
- Decision
- Alternatives considered
- Rationale
- Consequences/follow-ups
Test log template
- Command
- Result (pass/fail/warn)
- Notes (environmental limits, retries, artifacts)
Knowledge-sharing protocol
Where to write durable knowledge
docs/agent-handoffs/learnings/for reusable successes.docs/agent-handoffs/incidents/for failures and mitigations.KNOWN_ISSUES.mdfor active, reproducible unresolved issues.
File naming
Use YYYY-MM-DD-short-topic.md.
Required structure for learning/incident notes
- Context
- Observation
- Action taken
- Validation performed
- Recommendation for next agents
Quality checklist before completion
- Scope matches request.
- Documentation remains repository-agnostic unless explicitly needed.
- No unsupported claims about testing.
- Assumptions and limitations are called out.
- Changes are easy to revert.
Anti-patterns to avoid
- Embedding product/company-specific guidance in baseline docs.
- Large refactors when a focused change is sufficient.
- Skipping validation without recording why.
- Creating duplicate notes when an update would suffice.
Customization policy
This file should stay generic until real repository-specific patterns emerge. When customizing:
- Add a clearly labeled section:
Repository-specific overrides. - Keep generic workflow unchanged.
- Include evidence (commands, failures, repeated incidents) for each override.