-
Notifications
You must be signed in to change notification settings - Fork 7
Add support for multi-repository awareness/context #77
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?
Changes from all commits
a6b6876
68623d0
ee214bd
5c03bb6
f3d5e12
32ebaab
22bfc81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| node_modules | ||
| .awos | ||
| .claude |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Important: Do NOT Run the Installer | ||
|
|
||
| **Never run `npx @provectusinc/awos` when contributing to this repository.** That command is for end users setting up AWOS in their own projects. | ||
|
|
||
| ## What This Repository Is | ||
|
|
||
| AWOS (Agentic Workflow Operating System) is a framework for spec-driven development using AI agents. It consists of: | ||
|
|
||
| 1. **An Installer** (`src/`) - Node.js CLI that copies framework files to user projects | ||
| 2. **AI Agent Prompts** (`commands/`, `subagents/`) - Markdown files that define agent behaviors | ||
| 3. **Document Templates** (`templates/`) - Structured templates for specifications and planning | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| ``` | ||
| awos/ | ||
| ├── index.js # Entry point (delegates to src/) | ||
| ├── src/ # Installer source code (Node.js) | ||
| │ ├── config/ # Setup configuration and constants | ||
| │ ├── core/ # Main orchestration logic | ||
| │ ├── services/ # File copying and directory creation | ||
| │ ├── migrations/ # Version migration system | ||
| │ └── utils/ # Logging and pattern matching | ||
| ├── commands/ # AWOS command prompts (→ .awos/commands/) | ||
| ├── templates/ # Document templates (→ .awos/templates/) | ||
| ├── subagents/ # Specialized coding agent prompts (→ .awos/subagents/) | ||
| ├── claude/ # User customization layer (→ .claude/) | ||
| └── context/ # Created in user projects for specs | ||
| ``` | ||
|
|
||
| ## Testing Changes | ||
|
|
||
| Test in a separate project directory: | ||
|
|
||
| ```bash | ||
| # Create/navigate to test project | ||
| cd ~/my-test-project | ||
|
|
||
| # Run installer from local clone | ||
| npx /path/to/awos/index.js | ||
|
|
||
| # Test with force overwrite | ||
| npx /path/to/awos/index.js --force-overwrite | ||
|
|
||
| # Preview changes without applying | ||
| npx /path/to/awos/index.js --dry-run | ||
| ``` | ||
|
|
||
| ## Key Architecture Concepts | ||
|
|
||
| ### File Copy Behavior | ||
|
|
||
| Defined in `src/config/setup-config.js`: | ||
|
|
||
| - `.awos/` files: Always overwritten (framework internals) | ||
| - `.claude/` files: Only overwritten with `--force-overwrite` (user customizations) | ||
|
|
||
| ### Migration System | ||
|
|
||
| For restructuring files in existing installations: | ||
|
|
||
| - Migration files: `src/migrations/NNN-description.json` | ||
| - Preconditions: `require_any`, `require_all`, `skip_if_any`, `error_if_any` | ||
| - Operations: `move`, `copy`, `delete` | ||
| - Version tracked in: `.awos/.migration-version` | ||
|
|
||
| ### Command Workflow Pattern | ||
|
|
||
| Each command prompt follows: ROLE → TASK → INPUTS/OUTPUTS → PROCESS | ||
|
|
||
| Sequential workflow: `/awos:product` → `/awos:roadmap` → `/awos:architecture` → `/awos:spec` → `/awos:tech` → `/awos:tasks` → `/awos:implement` | ||
|
|
||
| ### Agent Delegation Rule | ||
|
|
||
| The `/awos:implement` command delegates to subagents - it never writes code directly. | ||
|
|
||
| ## Code Formatting | ||
|
|
||
| ```bash | ||
| npx prettier --write . | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| name: repo-scanner | ||
| description: Use this agent to scan repositories and answer questions about their contents. Supports both local filesystem repos and GitHub repos (via MCP). Accepts repo_type (local/github), repo_path, and a question to answer. Iteratively scans files until it can provide a comprehensive answer with references. Always instruct the agent to read the `.awos/subagents/repo-scanner.md` file before proceeding. | ||
| model: haiku | ||
| color: cyan | ||
| --- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| description: Manages the multi-repository registry — links related repos for cross-project context. | ||
| --- | ||
|
|
||
| Refer to the instructions located in this file: .awos/commands/registry.md |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,14 +26,72 @@ Your task is to manage the architecture file located at `context/product/archite | |||||||||
| # PROCESS | ||||||||||
|
|
||||||||||
| Follow this logic precisely. | ||||||||||
| When you need user input on a decision: | ||||||||||
|
|
||||||||||
| ### Step 1: Prerequisite Checks | ||||||||||
| - Use **AskUserQuestion** tool with clear, clickable options | ||||||||||
| - Never present numbered lists requiring manual number entry | ||||||||||
|
|
||||||||||
| ### Step 1: Load Cross-Repository Context | ||||||||||
|
|
||||||||||
| 1. **Read Registry:** Use the Read tool to check if `context/registry.md` exists. | ||||||||||
| - If it doesn't exist, skip to Step 2 (no error, no message). | ||||||||||
| - If it exists, read and parse its contents to understand: | ||||||||||
| - What repositories are registered (names, types, paths etc.) | ||||||||||
| - Their status (`active` or `stale`) | ||||||||||
| - Relationships and dependencies between repos and this project | ||||||||||
| - AWOS-enabled status and available context | ||||||||||
| - Tech stack information from registry entries | ||||||||||
|
|
||||||||||
| 2. **Determine Context Needs:** Based on architecture planning needs, identify which registered repos are relevant: | ||||||||||
| - **Direct dependencies:** Repos this project depends on or will integrate with | ||||||||||
| - **Shared ecosystem:** Repos with tech stack decisions that should be consistent | ||||||||||
| - **Common libraries:** Shared dependencies or internal packages | ||||||||||
| - **API contracts:** Services this project will call or expose to | ||||||||||
| - **Infrastructure patterns:** Deployment, monitoring, or security approaches to align with | ||||||||||
| - **Skip stale repos:** Do not fetch context from repos marked as `stale` | ||||||||||
|
|
||||||||||
| 3. **Fetch AWOS Context (if enabled):** For AWOS-enabled repos where deeper architecture context would help: | ||||||||||
|
|
||||||||||
| Use the Task tool to delegate to the `repo-scanner` subagent. Pass: | ||||||||||
| - `repo_type`: `local` or `github` (from registry entry) | ||||||||||
| - `repo_path`: filesystem path or `owner/repo` (from registry entry) | ||||||||||
| - `question`: "Read the `context/product` directory and summarize the architecture decisions, tech stack, infrastructure choices, and any integration patterns." | ||||||||||
|
|
||||||||||
| **Note:** Only scan repos that are both AWOS-enabled AND relevant to architecture decisions. Skip repos that are informational only. | ||||||||||
|
|
||||||||||
| 4. **Fetch Additional Context (if needed):** If needed more context or clarifying questions: | ||||||||||
|
||||||||||
| 4. **Fetch Additional Context (if needed):** If needed more context or clarifying questions: | |
| 4. **Fetch Additional Context (if needed):** If more context is needed or clarifying questions arise: |
Copilot
AI
Dec 10, 2025
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.
The note says "This step can be repeated throughout implementation" but the context here is about the /awos:architecture command which is about architecture definition, not implementation. The wording should be "This step can be repeated throughout the process" or "This step can be repeated as needed" to match the actual command's purpose.
| Iterate with scanner until you get all necessary information.**This step can be repeated throughout implementation** whenever the subagent needs additional context about related repos. | |
| Iterate with scanner until you get all necessary information.**This step can be repeated as needed** whenever the subagent needs additional context about related repos. |
Copilot
AI
Dec 10, 2025
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.
The sentence fragment "Iterate with scanner until you get all necessary information.This step can be repeated throughout implementation" has misplaced bold formatting markers. The period should come before the bold text starts, and the sentence should be properly separated.
| Iterate with scanner until you get all necessary information.**This step can be repeated throughout implementation** whenever the subagent needs additional context about related repos. | |
| Iterate with scanner until you get all necessary information. **This step can be repeated throughout implementation** whenever the subagent needs additional context about related repos. |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -37,26 +37,83 @@ Your primary task is to **fill in** a product definition template using a guided | |||||||||
| # PROCESS | ||||||||||
|
|
||||||||||
| Follow this logic precisely. | ||||||||||
| When you need user input on a decision: | ||||||||||
|
|
||||||||||
| ### Step 1: Mode Detection | ||||||||||
| - Use **AskUserQuestion** tool with clear, clickable options | ||||||||||
| - Never present numbered lists requiring manual number entry | ||||||||||
|
|
||||||||||
| ### Step 1: Load Cross-Repository Context | ||||||||||
|
|
||||||||||
| 1. **Read Registry:** Use the Read tool to check if `context/registry.md` exists. | ||||||||||
| - If it doesn't exist, skip to Step 2 (no error, no message). | ||||||||||
| - If it exists, read and parse its contents to understand: | ||||||||||
| - What repositories are registered (names, types, paths etc.) | ||||||||||
| - Their status (`active` or `stale`) | ||||||||||
| - Relationships and dependencies between repos and this project | ||||||||||
| - AWOS-enabled status and available context | ||||||||||
| - Product vision and roadmap information from registry entries | ||||||||||
|
|
||||||||||
| 2. **Determine Context Needs:** Based on product definition needs, identify which registered repos are relevant: | ||||||||||
| - **Product positioning:** Repos with product definitions that inform this project's positioning | ||||||||||
| - **Related functionality:** Repos with features that affect scope decisions | ||||||||||
| - **Target audience overlap:** Repos serving similar or complementary user bases | ||||||||||
| - **Integration points:** Repos this product will integrate with, extend or use | ||||||||||
| - **Dependencies:** Repos that impact target audience or features | ||||||||||
| - **Skip stale repos:** Do not fetch context from repos marked as `stale` | ||||||||||
|
|
||||||||||
| 3. **Fetch AWOS Context (if enabled):** For AWOS-enabled repos where deeper product context would help: | ||||||||||
|
|
||||||||||
| Use the Task tool to delegate to the `repo-scanner` subagent. Pass: | ||||||||||
| - `repo_type`: `local` or `github` (from registry entry) | ||||||||||
| - `repo_path`: filesystem path or `owner/repo` (from registry entry) | ||||||||||
| - `question`: "Read the `context/product` directory and summarize the product vision, target audience, core features, and roadmap phases." | ||||||||||
|
|
||||||||||
| **Note:** Only scan repos that are both AWOS-enabled AND relevant to product decisions. Skip repos that are informational only. | ||||||||||
|
|
||||||||||
| 4. **Fetch Additional Context (if needed):** If needed more context or clarifying questions: | ||||||||||
|
||||||||||
| 4. **Fetch Additional Context (if needed):** If needed more context or clarifying questions: | |
| 4. **Fetch Additional Context (if needed):** If more context is needed or clarifying questions arise: |
Copilot
AI
Dec 10, 2025
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.
The sentence fragment "Iterate with scanner until you get all necessary information.This step can be repeated throughout implementation" has misplaced bold formatting markers. The period should come before the bold text starts, and the sentence should be properly separated: "Iterate with scanner until you get all necessary information. This step can be repeated throughout implementation whenever..."
| Iterate with scanner until you get all necessary information.**This step can be repeated throughout implementation** whenever the subagent needs additional context about related repos. | |
| Iterate with scanner until you get all necessary information. **This step can be repeated throughout implementation** whenever the subagent needs additional context about related repos. |
Copilot
AI
Dec 10, 2025
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.
The note says "This step can be repeated throughout implementation" but the context here is about the /awos:product command which is about product definition, not implementation. The wording should be "This step can be repeated throughout the process" or "This step can be repeated as needed" to match the actual command's purpose.
| Iterate with scanner until you get all necessary information.**This step can be repeated throughout implementation** whenever the subagent needs additional context about related repos. | |
| Iterate with scanner until you get all necessary information. **This step can be repeated throughout the process** whenever the subagent needs additional context about related repos. |
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.
The agent description is very long and includes detailed instructions that belong in the agent file itself. Agent descriptions should be concise summaries. The instruction "Always instruct the agent to read the
.awos/subagents/repo-scanner.mdfile before proceeding" is an implementation detail that clutters the metadata. Consider shortening to: "Scans repositories and answers questions about their contents. Supports both local filesystem and GitHub repos (via MCP)."