-
Notifications
You must be signed in to change notification settings - Fork 73
refactor(sops): reorganize .agents/ directory structure and update defaults #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Update all SOPs to use .agents/ as the default root directory
- pdd.sop.md: Add project_name parameter, use .agents/planning/{project_name}
- codebase-summary.sop.md: Change consolidate default to true, add merge
behavior for existing consolidated files
- code-assist.sop.md: Update documentation_dir default to .agents/planning
- code-task-generator.sop.md: Update output_dir default to .agents/planning
🤖 Assisted by AI
…rom transient files
- .agents/planning/{project_name}/ - PDD outputs (pin these)
- .agents/tasks/{project_name}/ - code tasks from code-task-generator
- .agents/scratchpad/{project_name}/ - code-assist working files (don't pin)
This allows users to pin planning docs without cluttering context with
transient implementation artifacts.
🤖 Assisted by AI
Unshure
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We may want to add .agents to the gitignore too: https://github.com/strands-agents/agent-sop/blob/main/.gitignore
| - **step_number** (optional): For PDD plans only - specific step to process. If not provided, automatically determines the next uncompleted step from the checklist. | ||
| - **output_dir** (optional, default: ".sop/planning"): Directory where the code task file will be created | ||
| - **task_name** (optional): For descriptions only - specific task name. If not provided, will be generated from the description. | ||
| - **output_dir** (optional, default: ".agents/tasks/{project_name}"): Directory where the code task file will be created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to parse out why the project_name is under .agents/tasks is a bit unintuitive at first glance. Maybe we can update the readme or something to mention the expected filesystem structure when using these sops?
.agents/
├── planning/
│ └── {project_name}/
├── tasks/
│ └── {project_name}/
└── scratchpad/
└── {project_name}/
└── {task_name}/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think it's easy to look at this and wonder why it isn't .agents/{project_name}/*. My reasoning is:
- The dir hierarchy is organized in terms of level of persistence of each set of artifacts, i.e., separating into dirs by what users are likely to want to commit.
summary/docs are written bycodebase-summarySOP and are super useful for both humans and agents. I recommend always checking this into source codeplanning/docs are written by thepddSOP and can be useful to commit to capture important decisions, designs, alternatives considered, etc that usually get lost in traditional software processes.tasks/docs are written by code-task-generator and users might want to commit them to source code, but they can also be written to issues in an issue tracker.scratchpad/is just for the agent to write notes (code-assist writes all its files to this dir) and should generally be added to .gitignore
- The PDD family of agent SOPs is highly flexible and can be used across tasks of varying complexity/ambiguity. This means for lower complexity tasks, you may only run code-assist which only writes to
scratchpad/. For larger changes/features, you will likely runpdd,code-task-generatorandcode-assistin which case you'll have docs in all of the corresponding dirs, but for smaller more straightforward tasks, you may only run code-assist. In the latter case, you wouldn't want top-level project folders created.
Open to feedback but logging my rationale here and will update the README to reflect it to help users understand the layout.
Addresses PR feedback to document the filesystem layout and rationale for organizing artifacts by persistence level. 🤖 Assisted by AI
Change consolidate_target to consolidate_targets parameter to allow generating multiple consolidated files (e.g., AGENTS.md and README.md) in a single run. Default remains ["AGENTS.md"]. 🤖 Assisted by AI
I added |
Save HEAD commit to .last_commit on every run so subsequent update_mode runs have a baseline to diff against. 🤖 Assisted by AI
Helps with identification and sorting of project folders. 🤖 Assisted by AI
Issue #, if available:
Description of changes:
Reorganizes the default directory structure for Agent SOPs to separate reference documentation (worth pinning in context) from transient working files.
Changes
Directory Structure
New
.agents/layout:planning/{project_name}/- PDD outputs (pin these with/context add)tasks/{project_name}/- Code tasks from code-task-generatorscratchpad/{project_name}/- Code-assist working files (don't pin)SOP Updates
pdd.sop.md:
project_nameparameter to create project-specific subdirectoriesproject_dirnow.agents/planning/{project_name}codebase-summary.sop.md:
output_dirnow.agents/summaryconsolidatechanged fromfalsetotruecode-task-generator.sop.md:
output_dirnow.agents/tasks/{project_name}project_nameparametercode-assist.sop.md:
documentation_dirnow.agents/scratchpad/{project_name}project_nameparameter/implementation/subdirectory)Motivation
Previously, all SOP artifacts went into a single directory, causing context pollution when users pinned planning docs with glob patterns. This separation allows pinning reference docs without including transient implementation artifacts.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.