feat: brownfield awareness across product, roadmap, and architecture#137
feat: brownfield awareness across product, roadmap, and architecture#137dustyo-O wants to merge 1 commit into
Conversation
…commands Detect existing codebases during onboarding and explore them before the interactive interview. Each command owns a focused exploration domain — product (purpose/audience/features), roadmap (existing capabilities), architecture (tech stack) — and triages findings with the user via accept/correct/reject. Accepted findings accumulate in context/product/brownfield.md so downstream commands avoid duplicate questions. /awos:hire removes the file after onboarding completes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a brownfield awareness pipeline to AWOS onboarding: ChangesBrownfield Awareness Onboarding Flow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
commands/hire.md (1)
17-24:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winConsider declaring brownfield.md as Optional Input for consistency.
Step 10 checks and deletes
context/product/brownfield.md, but the file is not declared in the INPUTS & OUTPUTS section. While hire.md doesn't read the file's content (unlike roadmap.md and architecture.md), adding an Optional Input declaration would maintain consistency across all brownfield-aware commands and signal that this file is expected to exist before cleanup.
[minor_issue]📋 Suggested addition to INPUTS & OUTPUTS
- **Prerequisite Input:** `context/product/architecture.md` (The technology stack decisions). - **Optional Input:** The latest `technical-considerations.md` from the highest-numbered `context/spec/*/` directory. +- **Optional Input:** `context/product/brownfield.md` (produced by `/awos:product` and extended by `/awos:roadmap` and `/awos:architecture`; deleted at the end of onboarding). - **Template File:** `.awos/templates/agent-template.md` (The agent file structure). - **Output:** New or updated agent files in `.claude/agents/`.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@commands/hire.md` around lines 17 - 24, Add a declaration for context/product/brownfield.md as an Optional Input in the INPUTS & OUTPUTS section of hire.md for consistency. Even though hire.md does not read the content of this file (unlike other commands), declaring it as an Optional Input is important because Step 10 references and deletes the file. This maintains consistency with other brownfield-aware commands and signals that the file is expected to exist before cleanup operations occur.Source: Learnings
commands/roadmap.md (1)
20-25:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
context/product/brownfield.mdto INPUTS & OUTPUTS declarations.All three commands that read or check the brownfield file should declare it in their INPUTS sections for contract completeness and clarity. Per the PR 130 learning and the pattern demonstrated in hire.md's "Optional Input" syntax (which
hire.mdcurrently uses fortechnical-considerations.md), missing declarations obscure the data flow.
commands/roadmap.md#L20-L25: Add- **Optional Input:** context/product/brownfield.md (produced by /awos:product).after the Prerequisite Input line.commands/architecture.md#L17-L23: Add the same Optional Input declaration after Prerequisite Input 2.commands/hire.md#L17-L24: Add- **Optional Input:** context/product/brownfield.md (produced and extended by /awos:product, /awos:roadmap, and /awos:architecture; deleted at the end of onboarding).as a new line.[major_issue]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@commands/roadmap.md` around lines 20 - 25, Add declarations for context/product/brownfield.md to the INPUTS & OUTPUTS sections across three files to properly document data flow and dependencies. In commands/roadmap.md (lines 20-25), add an Optional Input declaration for context/product/brownfield.md after the Prerequisite Input line. In commands/architecture.md (lines 17-23), add the same Optional Input declaration after Prerequisite Input 2. In commands/hire.md (lines 17-24), add an Optional Input declaration for context/product/brownfield.md with expanded lifecycle details. Use the "Optional Input" syntax format with parenthetical notes about which commands produce or extend the file, following the pattern already established in hire.md for technical-considerations.md.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@commands/hire.md`:
- Around line 17-24: Add a declaration for context/product/brownfield.md as an
Optional Input in the INPUTS & OUTPUTS section of hire.md for consistency. Even
though hire.md does not read the content of this file (unlike other commands),
declaring it as an Optional Input is important because Step 10 references and
deletes the file. This maintains consistency with other brownfield-aware
commands and signals that the file is expected to exist before cleanup
operations occur.
In `@commands/roadmap.md`:
- Around line 20-25: Add declarations for context/product/brownfield.md to the
INPUTS & OUTPUTS sections across three files to properly document data flow and
dependencies. In commands/roadmap.md (lines 20-25), add an Optional Input
declaration for context/product/brownfield.md after the Prerequisite Input line.
In commands/architecture.md (lines 17-23), add the same Optional Input
declaration after Prerequisite Input 2. In commands/hire.md (lines 17-24), add
an Optional Input declaration for context/product/brownfield.md with expanded
lifecycle details. Use the "Optional Input" syntax format with parenthetical
notes about which commands produce or extend the file, following the pattern
already established in hire.md for technical-considerations.md.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 438997d6-cf8b-4f35-934c-c4a9b9cbe1c9
📒 Files selected for processing (7)
CLAUDE.mdREADME.mdcommands/architecture.mdcommands/hire.mdcommands/product.mdcommands/roadmap.mdtests/lint-prompts.test.js
Summary
/awos:productdetects brownfield projects (source code indicators likesrc/,package.json, etc.) during Creation Mode, runs an Explore agent focused on purpose/audience/features, triages each finding with user (accept / correct / reject), writes accepted findings tocontext/product/brownfield.md/awos:roadmapreads brownfield.md, runs a focused Explore for existing capabilities (passing prior findings via<existing_findings>to avoid duplicates), appends## Capabilitiessection/awos:architecturereads brownfield.md, runs a focused Explore for tech stack, appends## Technologysection/awos:hireremoves brownfield.md after onboarding — all knowledge is absorbed into product-definition.md, roadmap.md, architecture.mdSupersedes the approaches on
feat/scan-commandandfeat/scan-embedded— no new files, no new commands, no new templates.Design decisions
/awos:productrun only. Re-running in Update Mode skips it intentionally — by thencontext/spec/holds feature knowledge and brownfield.md would be redundant.<existing_findings>tags to avoid re-discovering the same things.Test plan
npm test— 84/84 pass (6 new brownfield contract tests)npx prettier . --check— clean/awos:producton a brownfield project, verify exploration + triage + brownfield.md creation/awos:roadmapafter, verify it reads brownfield.md and explores capabilities without duplicating product findings/awos:architectureafter, verify it reads brownfield.md and explores tech stack/awos:hireafter, verify brownfield.md is deleted🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Tests