From 7dae6d001330ae6189b6f2e29be5cdd94e324a1c Mon Sep 17 00:00:00 2001 From: santoshrout Date: Tue, 10 Mar 2026 23:28:57 +0800 Subject: [PATCH] Add GitHub Copilot platform support and add Gemini to README Adds Copilot as a supported platform with copilot-integration/ directory generation, agent instruction files, and documentation. Also adds Gemini references that were missing from README. Co-Authored-By: Atreya Kamat Co-Authored-By: Claude Opus 4.6 --- .github/workflows/pr-check.yml | 17 +++ README.md | 34 +++-- _sam/docs/SAM_COPILOT_GUIDE.md | 60 +++++++++ _sam/docs/SAM_COPILOT_USAGE.md | 71 ++++++++++ bin/cli.js | 159 ++++++++++++++++++++++- templates/_sam/docs/SAM_COPILOT_GUIDE.md | 60 +++++++++ templates/_sam/docs/SAM_COPILOT_USAGE.md | 71 ++++++++++ 7 files changed, 454 insertions(+), 18 deletions(-) create mode 100644 _sam/docs/SAM_COPILOT_GUIDE.md create mode 100644 _sam/docs/SAM_COPILOT_USAGE.md create mode 100644 templates/_sam/docs/SAM_COPILOT_GUIDE.md create mode 100644 templates/_sam/docs/SAM_COPILOT_USAGE.md diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index b1986d0..70fa64e 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -41,6 +41,21 @@ jobs: test -d ./test-output-antigravity/.agent/skills echo "Antigravity platform: OK" + - name: Smoke test - Gemini platform + run: | + node bin/cli.js --platform gemini ./test-output-gemini + test -d ./test-output-gemini/_sam + test -d ./test-output-gemini/.gemini/skills + echo "Gemini platform: OK" + + - name: Smoke test - Copilot platform + run: | + node bin/cli.js --platform copilot ./test-output-copilot + test -d ./test-output-copilot/_sam + test -d ./test-output-copilot/copilot-integration + test -f ./test-output-copilot/copilot-integration/instructions.md + echo "Copilot platform: OK" + - name: Smoke test - All platforms run: | node bin/cli.js --platform all ./test-output-all @@ -48,6 +63,8 @@ jobs: test -d ./test-output-all/.claude/commands/sam test -d ./test-output-all/.cursor/rules test -d ./test-output-all/.agent/skills + test -d ./test-output-all/.gemini/skills + test -d ./test-output-all/copilot-integration echo "All platforms: OK" - name: Verify templates in sync diff --git a/README.md b/README.md index ddb2f05..6d52eec 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Downloads](https://img.shields.io/npm/dm/sam-agents.svg)](https://www.npmjs.com/package/sam-agents) -**Autonomous TDD agent system for Claude Code, Cursor, and Antigravity.** +**Autonomous TDD agent system for Claude Code, Cursor, Gemini CLI, GitHub Copilot, and Antigravity.** SAM orchestrates a team of specialized AI agents that transform your PRD into working, tested code using strict Test-Driven Development (RED-GREEN-REFACTOR). @@ -18,6 +18,8 @@ npx sam-agents npx sam-agents --platform claude # Claude Code npx sam-agents --platform cursor # Cursor IDE npx sam-agents --platform antigravity # Google Antigravity +npx sam-agents --platform gemini # Gemini CLI +npx sam-agents --platform copilot # GitHub Copilot npx sam-agents --platform all # All platforms ``` @@ -27,6 +29,8 @@ npx sam-agents --platform all # All platforms |----------|-----------------|--------------| | **Claude Code** | `npx sam-agents --platform claude` | `/sam:` commands | | **Cursor** | `npx sam-agents --platform cursor` | `@agent` mentions | +| **Gemini CLI** | `npx sam-agents --platform gemini` | `.gemini/skills/` | +| **GitHub Copilot** | `npx sam-agents --platform copilot` | `copilot-integration/` | | **Antigravity** | `npx sam-agents --platform antigravity` | `/sam-` skills | ## Why SAM? @@ -37,20 +41,20 @@ npx sam-agents --platform all # All platforms | **BYOA** | Use your own AI subscription | Pay per API call (5-10x cost) | | **Transparency** | Watch agents work in real-time | Black box | | **Autonomous** | Minimal intervention after PRD | Constant hand-holding | -| **Multi-Platform** | Claude Code + Cursor + Antigravity | Single platform lock-in | +| **Multi-Platform** | Claude Code + Cursor + Gemini + Copilot + Antigravity | Single platform lock-in | ## Available Agents -| Agent | Role | Claude Code | Cursor | Antigravity | -|-------|------|-------------|--------|-------------| -| **SAM** | Orchestrator | `/sam:core:agents:sam` | `@sam` | `/sam-orchestrator` | -| **Atlas** | System Architect | `/sam:sam:agents:atlas` | `@atlas` | `/sam-atlas` | -| **Titan** | Test Architect (RED) | `/sam:sam:agents:titan` | `@titan` | `/sam-titan` | -| **Dyna** | Developer (GREEN) | `/sam:sam:agents:dyna` | `@dyna` | `/sam-dyna` | -| **Argus** | Code Reviewer (REFACTOR) | `/sam:sam:agents:argus` | `@argus` | `/sam-argus` | -| **Cosmo** | CSS Reviewer (web apps) | `/sam:sam:agents:cosmo` | `@cosmo` | `/sam-cosmo` | -| **Sage** | Technical Writer | `/sam:sam:agents:sage` | `@sage` | `/sam-sage` | -| **Iris** | UX Designer | `/sam:sam:agents:iris` | `@iris` | `/sam-iris` | +| Agent | Role | Claude Code | Cursor | Gemini | Copilot | Antigravity | +|-------|------|-------------|--------|--------|---------|-------------| +| **SAM** | Orchestrator | `/sam:core:agents:sam` | `@sam` | `sam-orchestrator` | `Act as sam-orchestrator` | `/sam-orchestrator` | +| **Atlas** | System Architect | `/sam:sam:agents:atlas` | `@atlas` | `sam-atlas` | `Act as sam-atlas` | `/sam-atlas` | +| **Titan** | Test Architect (RED) | `/sam:sam:agents:titan` | `@titan` | `sam-titan` | `Act as sam-titan` | `/sam-titan` | +| **Dyna** | Developer (GREEN) | `/sam:sam:agents:dyna` | `@dyna` | `sam-dyna` | `Act as sam-dyna` | `/sam-dyna` | +| **Argus** | Code Reviewer (REFACTOR) | `/sam:sam:agents:argus` | `@argus` | `sam-argus` | `Act as sam-argus` | `/sam-argus` | +| **Cosmo** | CSS Reviewer (web apps) | `/sam:sam:agents:cosmo` | `@cosmo` | `sam-cosmo` | `Act as sam-cosmo` | `/sam-cosmo` | +| **Sage** | Technical Writer | `/sam:sam:agents:sage` | `@sage` | `sam-sage` | `Act as sam-sage` | `/sam-sage` | +| **Iris** | UX Designer | `/sam:sam:agents:iris` | `@iris` | `sam-iris` | `Act as sam-iris` | `/sam-iris` | ## The TDD Pipeline @@ -58,6 +62,8 @@ npx sam-agents --platform all # All platforms |----------|---------| | Claude Code | `/sam:core:workflows:autonomous-tdd` | | Cursor | `@sam-tdd` | +| Gemini CLI | `sam-tdd-pipeline` | +| GitHub Copilot | `Run SAM TDD pipeline` | | Antigravity | `/sam-tdd-pipeline` | ### Pipeline Phases @@ -81,6 +87,8 @@ your-project/ │ └── core/workflows/ # TDD pipeline workflow ├── .claude/commands/sam/ # Claude Code skills ├── .cursor/rules/ # Cursor rules +├── .gemini/skills/ # Gemini CLI skills +├── copilot-integration/ # GitHub Copilot instructions └── .agent/skills/ # Antigravity skills ``` @@ -90,6 +98,8 @@ your-project/ - One of: - [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) - [Cursor](https://cursor.com) + - [Gemini CLI](https://github.com/google-gemini/gemini-cli) + - [GitHub Copilot](https://github.com/features/copilot) - [Google Antigravity](https://antigravity.google) ## Contributing diff --git a/_sam/docs/SAM_COPILOT_GUIDE.md b/_sam/docs/SAM_COPILOT_GUIDE.md new file mode 100644 index 0000000..fd4536d --- /dev/null +++ b/_sam/docs/SAM_COPILOT_GUIDE.md @@ -0,0 +1,60 @@ +# SAM Copilot Integration Guide + +## Overview +SAM (Smart Agent Manager) integrates with GitHub Copilot Chat, enabling developers to leverage autonomous TDD workflows within VS Code and other Copilot-enabled IDEs. + +## Installation + +```bash +npx sam-agents --platform copilot +``` + +This generates a `copilot-integration/` directory containing: +- `instructions.md` — High-level instructions for GitHub Copilot +- `agents/` — Detailed instruction files for every SAM agent +- `references/` — Project design standards and workflows + +## How It Works + +GitHub Copilot doesn't have a native plugin/skill system like Claude Code or Cursor. Instead, SAM generates markdown instruction files that you can reference in Copilot Chat conversations. + +### Invoking Agents + +In GitHub Copilot Chat, ask Copilot to adopt a SAM agent persona: + +``` +"Act as sam-atlas and review this PRD." +"Act as sam-titan and write failing tests for login.ts." +"Act as sam-dyna and implement the login feature to pass the tests." +"Act as sam-argus and review the code changes." +``` + +### Running the TDD Pipeline + +``` +"Run the SAM TDD pipeline for this feature." +``` + +Or point Copilot to the pipeline workflow: +``` +"Follow the instructions in copilot-integration/agents/sam-tdd-pipeline.md" +``` + +## Available Agents + +| Agent | Invocation | Role | +|-------|-----------|------| +| SAM Orchestrator | `Act as sam-orchestrator` | Pipeline coordinator | +| Atlas | `Act as sam-atlas` | System Architect | +| Titan | `Act as sam-titan` | Test Architect (RED) | +| Dyna | `Act as sam-dyna` | Developer (GREEN) | +| Argus | `Act as sam-argus` | Code Reviewer (REFACTOR) | +| Cosmo | `Act as sam-cosmo` | CSS Reviewer | +| Sage | `Act as sam-sage` | Technical Writer | +| Iris | `Act as sam-iris` | UX Designer | + +## Tips + +- Point Copilot to `copilot-integration/instructions.md` at the start of a session for full context +- Reference specific agent files for deep persona adoption +- Works best with GitHub Copilot Chat in VS Code diff --git a/_sam/docs/SAM_COPILOT_USAGE.md b/_sam/docs/SAM_COPILOT_USAGE.md new file mode 100644 index 0000000..448a0ae --- /dev/null +++ b/_sam/docs/SAM_COPILOT_USAGE.md @@ -0,0 +1,71 @@ +# SAM Copilot Usage Examples + +## Quick Start + +### 1. Install SAM for Copilot +```bash +npx sam-agents --platform copilot +``` + +### 2. Open Copilot Chat in VS Code + +### 3. Point Copilot to SAM Instructions +``` +Please read copilot-integration/instructions.md and follow the SAM agent system. +``` + +## Usage Examples + +### Architecture Review +``` +Act as sam-atlas. Review the architecture of this project and identify any concerns +with the current structure. +``` + +### Writing Tests (RED Phase) +``` +Act as sam-titan. Write failing tests for the user authentication feature based on +the acceptance criteria in the PRD. +``` + +### Implementation (GREEN Phase) +``` +Act as sam-dyna. Implement the minimum code needed to make the failing authentication +tests pass. +``` + +### Code Review (REFACTOR Phase) +``` +Act as sam-argus. Review the authentication implementation for code quality, +best practices, and potential improvements. +``` + +### CSS Review +``` +Act as sam-cosmo. Review the CSS in the login page for consistency, spacing scale +violations, and styling anti-patterns. +``` + +### UX Review +``` +Act as sam-iris. Review the UX of the login flow and suggest improvements for +usability and accessibility. +``` + +### Documentation +``` +Act as sam-sage. Generate API documentation for the authentication module. +``` + +### Full TDD Pipeline +``` +Act as sam-orchestrator. Run the full TDD pipeline for the feature described in prd.md. +Follow the workflow in copilot-integration/agents/sam-tdd-pipeline.md. +``` + +## Tips for Best Results + +1. **Be specific** — Reference file paths and feature names +2. **One agent at a time** — Switch personas explicitly between phases +3. **Reference the instructions** — Point Copilot to the agent markdown files for deeper context +4. **Follow TDD order** — RED (tests first) → GREEN (implementation) → REFACTOR (review) diff --git a/bin/cli.js b/bin/cli.js index 4c8c390..1f68dcb 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -12,7 +12,7 @@ const RESET = '\x1b[0m'; const BOLD = '\x1b[1m'; const DIM = '\x1b[2m'; -const PLATFORMS = ['claude', 'cursor', 'antigravity', 'gemini', 'all']; +const PLATFORMS = ['claude', 'cursor', 'antigravity', 'gemini', 'copilot', 'all']; function log(message, color = RESET) { console.log(`${color}${message}${RESET}`); @@ -58,7 +58,7 @@ function showHelp() { log(' Autonomous TDD Agent System\n', CYAN); log(' Usage: npx sam-agents [options] [target-directory]\n'); log(' Options:'); - log(' --platform Target platform: claude, cursor, antigravity, gemini, all'); + log(' --platform Target platform: claude, cursor, antigravity, gemini, copilot, all'); log(' --help, -h Show this help message'); log(' --version, -v Show version number\n'); log(' Examples:'); @@ -66,13 +66,15 @@ function showHelp() { log(' npx sam-agents --platform cursor Install for Cursor'); log(' npx sam-agents --platform antigravity Install for Antigravity'); log(' npx sam-agents --platform gemini Install for Gemini CLI'); + log(' npx sam-agents --platform copilot Install for GitHub Copilot'); log(' npx sam-agents --platform all Install for all platforms'); log(' npx sam-agents ./myapp Install in ./myapp directory\n'); log(' Supported Platforms:'); log(' claude - Claude Code CLI (.claude/commands/)'); log(' cursor - Cursor IDE (.cursor/rules/)'); log(' antigravity - Google Antigravity IDE (.agent/skills/)'); - log(' gemini - Gemini CLI (.gemini/skills/)\n'); + log(' gemini - Gemini CLI (.gemini/skills/)'); + log(' copilot - GitHub Copilot (copilot-integration/)\n'); } @@ -516,6 +518,126 @@ Provide a PRD or feature description to start the autonomous TDD pipeline. return skillsCount; } +function generateCopilotSkills(samDir, targetDir) { + const copilotDir = path.join(targetDir, 'copilot-integration'); + const agentsDir = path.join(copilotDir, 'agents'); + + if (!fs.existsSync(agentsDir)) { + fs.mkdirSync(agentsDir, { recursive: true }); + } + + const agents = [ + { + name: 'sam-orchestrator', + file: 'core/agents/sam-master.md', + display: 'SAM Orchestrator', + description: 'Orchestrate autonomous TDD pipeline, coordinate SAM agents, manage RED-GREEN-REFACTOR workflow' + }, + { + name: 'sam-atlas', + file: 'agents/architect.md', + display: 'Atlas - System Architect', + description: 'Architecture review, PRD validation, technical design, system design decisions' + }, + { + name: 'sam-titan', + file: 'agents/test.md', + display: 'Titan - Test Architect', + description: 'Write failing tests, RED phase of TDD, test architecture, acceptance criteria validation' + }, + { + name: 'sam-dyna', + file: 'agents/dev.md', + display: 'Dyna - Developer', + description: 'Implement code to pass tests, GREEN phase of TDD, minimal implementation' + }, + { + name: 'sam-argus', + file: 'agents/reviewer.md', + display: 'Argus - Code Reviewer', + description: 'Code review, REFACTOR phase of TDD, quality improvement, best practices' + }, + { + name: 'sam-sage', + file: 'agents/tech-writer.md', + display: 'Sage - Technical Writer', + description: 'Generate documentation, technical writing, API docs, README creation' + }, + { + name: 'sam-iris', + file: 'agents/ux-designer.md', + display: 'Iris - UX Designer', + description: 'UX validation, user experience review, interface design feedback' + }, + { + name: 'sam-cosmo', + file: 'agents/css-reviewer.md', + display: 'Cosmo - CSS Consistency Reviewer', + description: 'CSS consistency review for web apps, spacing scale violations, hardcoded values, styling anti-patterns' + } + ]; + + let skillsCount = 0; + let instructionsContent = `# SAM (Smart Agent Manager) - GitHub Copilot Instructions + +This repository uses SAM, an autonomous TDD (Test-Driven Development) agent system. +You can invoke specialized agents for different parts of the development lifecycle. + +## How to use SAM Agents +When the user asks you to act as a specific SAM agent, adopt the persona and follow the instructions for that agent. + +### Instructions Folder +All SAM integration files are located in: copilot-integration/ + +`; + + for (const agent of agents) { + const agentPath = path.join(samDir, agent.file); + if (fs.existsSync(agentPath)) { + const content = fs.readFileSync(agentPath, 'utf8'); + const agentFile = `${agent.name}.md`; + const agentDestPath = path.join(agentsDir, agentFile); + + fs.writeFileSync(agentDestPath, content); + + instructionsContent += `### ${agent.display} +- **Invocation**: "Act as ${agent.name}" or "Use the ${agent.display} persona" +- **Role**: ${agent.description} +- **Detailed Instructions**: copilot-integration/agents/${agentFile} + +`; + skillsCount++; + } + } + + // Add TDD Pipeline + const workflowPath = path.join(samDir, 'core/workflows/autonomous-tdd/workflow.md'); + if (fs.existsSync(workflowPath)) { + const workflowContent = fs.readFileSync(workflowPath, 'utf8'); + fs.writeFileSync(path.join(agentsDir, 'sam-tdd-pipeline.md'), workflowContent); + + instructionsContent += `## SAM Autonomous TDD Pipeline +Transform a PRD into working, tested code using specialized agents. + +### The Pipeline +1. **Validate PRD**: sam-atlas (Architect) & sam-iris (UX) +2. **Generate Stories**: Break into epics and user stories +3. **TDD Loop**: + - **RED**: sam-titan (Test Architect) + - **GREEN**: sam-dyna (Developer) + - **REFACTOR**: sam-argus (Reviewer) +4. **Finalize**: sam-sage (Technical Writer) + +- **Detailed Workflow**: copilot-integration/agents/sam-tdd-pipeline.md +`; + } + + fs.writeFileSync(path.join(copilotDir, 'instructions.md'), instructionsContent); + skillsCount++; + + return skillsCount; +} + async function promptPlatform() { const rl = readline.createInterface({ input: process.stdin, @@ -530,10 +652,11 @@ async function promptPlatform() { log(' 2) Cursor ' + DIM + '(.cursor/rules/)' + RESET); log(' 3) Antigravity ' + DIM + '(.agent/skills/)' + RESET); log(' 4) Gemini CLI ' + DIM + '(.gemini/skills/)' + RESET); - log(' 5) All ' + DIM + '(install for all platforms)' + RESET); + log(' 5) GitHub Copilot ' + DIM + '(copilot-integration/)' + RESET); + log(' 6) All ' + DIM + '(install for all platforms)' + RESET); log(''); - rl.question(' Enter choice [1-5]: ', (answer) => { + rl.question(' Enter choice [1-6]: ', (answer) => { rl.close(); const choice = answer.trim(); @@ -545,7 +668,9 @@ async function promptPlatform() { resolve('antigravity'); } else if (choice === '4' || choice.toLowerCase() === 'gemini') { resolve('gemini'); - } else if (choice === '5' || choice.toLowerCase() === 'both' || choice.toLowerCase() === 'all') { + } else if (choice === '5' || choice.toLowerCase() === 'copilot') { + resolve('copilot'); + } else if (choice === '6' || choice.toLowerCase() === 'both' || choice.toLowerCase() === 'all') { resolve('all'); } else if (choice === '') { // Default to claude @@ -615,6 +740,12 @@ function install(platform, targetDir) { log(` ✓ Generated .gemini/skills/ (${geminiSkillsCount} skills)`, GREEN); } + // Install GitHub Copilot integration + if (platform === 'copilot' || platform === 'all') { + const copilotSkillsCount = generateCopilotSkills(samDir, targetDir); + log(` ✓ Generated copilot-integration/ (${copilotSkillsCount} files)`, GREEN); + } + log('\n' + BOLD + ' Installation complete!' + RESET + '\n'); if (platform === 'claude' || platform === 'all') { @@ -669,6 +800,19 @@ function install(platform, targetDir) { log(' sam-tdd-pipeline - Full TDD Pipeline\n'); } + if (platform === 'copilot' || platform === 'all') { + log(' GitHub Copilot Instructions (ask Copilot):', CYAN); + log(' "Act as sam-orchestrator" - SAM Orchestrator'); + log(' "Act as sam-atlas" - Atlas (Architect)'); + log(' "Act as sam-dyna" - Dyna (Developer)'); + log(' "Act as sam-titan" - Titan (Test Architect)'); + log(' "Act as sam-argus" - Argus (Code Reviewer)'); + log(' "Act as sam-cosmo" - Cosmo (CSS Reviewer)'); + log(' "Act as sam-sage" - Sage (Tech Writer)'); + log(' "Act as sam-iris" - Iris (UX Designer)'); + log(' "Run TDD pipeline" - Full TDD Pipeline\n'); + } + if (platform === 'claude' || platform === 'all') { log(' Restart Claude Code to load the new skills.', YELLOW); } @@ -681,6 +825,9 @@ function install(platform, targetDir) { if (platform === 'gemini' || platform === 'all') { log(' Gemini CLI will auto-detect skills in .gemini/skills/', YELLOW); } + if (platform === 'copilot' || platform === 'all') { + log(' Point GitHub Copilot to copilot-integration/instructions.md for context.', YELLOW); + } log(''); } diff --git a/templates/_sam/docs/SAM_COPILOT_GUIDE.md b/templates/_sam/docs/SAM_COPILOT_GUIDE.md new file mode 100644 index 0000000..fd4536d --- /dev/null +++ b/templates/_sam/docs/SAM_COPILOT_GUIDE.md @@ -0,0 +1,60 @@ +# SAM Copilot Integration Guide + +## Overview +SAM (Smart Agent Manager) integrates with GitHub Copilot Chat, enabling developers to leverage autonomous TDD workflows within VS Code and other Copilot-enabled IDEs. + +## Installation + +```bash +npx sam-agents --platform copilot +``` + +This generates a `copilot-integration/` directory containing: +- `instructions.md` — High-level instructions for GitHub Copilot +- `agents/` — Detailed instruction files for every SAM agent +- `references/` — Project design standards and workflows + +## How It Works + +GitHub Copilot doesn't have a native plugin/skill system like Claude Code or Cursor. Instead, SAM generates markdown instruction files that you can reference in Copilot Chat conversations. + +### Invoking Agents + +In GitHub Copilot Chat, ask Copilot to adopt a SAM agent persona: + +``` +"Act as sam-atlas and review this PRD." +"Act as sam-titan and write failing tests for login.ts." +"Act as sam-dyna and implement the login feature to pass the tests." +"Act as sam-argus and review the code changes." +``` + +### Running the TDD Pipeline + +``` +"Run the SAM TDD pipeline for this feature." +``` + +Or point Copilot to the pipeline workflow: +``` +"Follow the instructions in copilot-integration/agents/sam-tdd-pipeline.md" +``` + +## Available Agents + +| Agent | Invocation | Role | +|-------|-----------|------| +| SAM Orchestrator | `Act as sam-orchestrator` | Pipeline coordinator | +| Atlas | `Act as sam-atlas` | System Architect | +| Titan | `Act as sam-titan` | Test Architect (RED) | +| Dyna | `Act as sam-dyna` | Developer (GREEN) | +| Argus | `Act as sam-argus` | Code Reviewer (REFACTOR) | +| Cosmo | `Act as sam-cosmo` | CSS Reviewer | +| Sage | `Act as sam-sage` | Technical Writer | +| Iris | `Act as sam-iris` | UX Designer | + +## Tips + +- Point Copilot to `copilot-integration/instructions.md` at the start of a session for full context +- Reference specific agent files for deep persona adoption +- Works best with GitHub Copilot Chat in VS Code diff --git a/templates/_sam/docs/SAM_COPILOT_USAGE.md b/templates/_sam/docs/SAM_COPILOT_USAGE.md new file mode 100644 index 0000000..448a0ae --- /dev/null +++ b/templates/_sam/docs/SAM_COPILOT_USAGE.md @@ -0,0 +1,71 @@ +# SAM Copilot Usage Examples + +## Quick Start + +### 1. Install SAM for Copilot +```bash +npx sam-agents --platform copilot +``` + +### 2. Open Copilot Chat in VS Code + +### 3. Point Copilot to SAM Instructions +``` +Please read copilot-integration/instructions.md and follow the SAM agent system. +``` + +## Usage Examples + +### Architecture Review +``` +Act as sam-atlas. Review the architecture of this project and identify any concerns +with the current structure. +``` + +### Writing Tests (RED Phase) +``` +Act as sam-titan. Write failing tests for the user authentication feature based on +the acceptance criteria in the PRD. +``` + +### Implementation (GREEN Phase) +``` +Act as sam-dyna. Implement the minimum code needed to make the failing authentication +tests pass. +``` + +### Code Review (REFACTOR Phase) +``` +Act as sam-argus. Review the authentication implementation for code quality, +best practices, and potential improvements. +``` + +### CSS Review +``` +Act as sam-cosmo. Review the CSS in the login page for consistency, spacing scale +violations, and styling anti-patterns. +``` + +### UX Review +``` +Act as sam-iris. Review the UX of the login flow and suggest improvements for +usability and accessibility. +``` + +### Documentation +``` +Act as sam-sage. Generate API documentation for the authentication module. +``` + +### Full TDD Pipeline +``` +Act as sam-orchestrator. Run the full TDD pipeline for the feature described in prd.md. +Follow the workflow in copilot-integration/agents/sam-tdd-pipeline.md. +``` + +## Tips for Best Results + +1. **Be specific** — Reference file paths and feature names +2. **One agent at a time** — Switch personas explicitly between phases +3. **Reference the instructions** — Point Copilot to the agent markdown files for deeper context +4. **Follow TDD order** — RED (tests first) → GREEN (implementation) → REFACTOR (review)