Skip to content

Conversation

@jlhood
Copy link
Collaborator

@jlhood jlhood commented Jan 29, 2026

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-generator
  • scratchpad/{project_name}/ - Code-assist working files (don't pin)

SOP Updates

pdd.sop.md:

  • Add project_name parameter to create project-specific subdirectories
  • Default project_dir now .agents/planning/{project_name}
  • Change Q → Kiro in context add instruction

codebase-summary.sop.md:

  • Default output_dir now .agents/summary
  • Default consolidate changed from false to true
  • Add merge behavior for existing consolidated files (preserves manual edits)

code-task-generator.sop.md:

  • Default output_dir now .agents/tasks/{project_name}
  • Add project_name parameter

code-assist.sop.md:

  • Default documentation_dir now .agents/scratchpad/{project_name}
  • Add project_name parameter
  • Simplify internal paths (remove redundant /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.

- 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
@jlhood jlhood requested a review from Unshure January 30, 2026 00:46
Copy link
Member

@Unshure Unshure left a 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
Copy link
Member

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}/

Copy link
Collaborator Author

@jlhood jlhood Jan 30, 2026

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:

  1. 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.
    1. summary/ docs are written by codebase-summary SOP and are super useful for both humans and agents. I recommend always checking this into source code
    2. planning/ docs are written by the pdd SOP and can be useful to commit to capture important decisions, designs, alternatives considered, etc that usually get lost in traditional software processes.
    3. 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.
    4. 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
  2. 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 run pdd, code-task-generator and code-assist in 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
@jlhood
Copy link
Collaborator Author

jlhood commented Jan 30, 2026

nit: We may want to add .agents to the gitignore too: https://github.com/strands-agents/agent-sop/blob/main/.gitignore

I added .agents/scratchpad to fit with our own guidance

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants