AWS Coworker Development Guardrails - MANDATORY when extending or modifying AWS Coworker itself.
TRIGGERS (use this skill when ANY of these apply):
This skill applies to ALL files in the aws-coworker-enterprise repository:
| Category | Examples | Gates |
|---|---|---|
| CLI Layer (Core) | skills/, .claude/agents/, .claude/commands/, config/ | Plan approval → Execution authorization → Execute |
| Server Layer | server/ | Plan approval → Execution authorization → Execute |
| Web UI Layer | web-ui/ | Plan approval → Execution authorization → Execute |
| Design Docs | CLAUDE.md, DESIGN.md, CLAUDE-DEVELOPMENT.md | Plan approval → Execution authorization → Execute |
| User-Facing Docs | docs/LESSONS-LEARNED.md, README.md | Collaborative editing OK for minor wording; plan + execute gates for structural changes |
| Archives | docs/conversations/ | Execution authorization before committing |
| Tests | tests/ | Plan approval → Execution authorization → Execute |
Cross-layer changes require extra scrutiny. Any change that touches files in more than one layer (CLI + Server, or Server + Web UI) should explicitly justify why both layers need modification and confirm the dependency direction is not violated (Tenet 10).
Plan approval and execution authorization are separate gates. Approving a plan confirms the content is correct. It does NOT authorize the agent to start making changes. See the workflow below.
Why this matters: The blog, README, and documentation are as much part of AWS Coworker as the code — they represent the project to users and codify lessons learned.
Collaborative editing exception: When the user is actively iterating on wording (e.g., "change X to Y", "how about this phrasing"), small text changes can proceed without formal approval. Structural changes (moving sections, adding lessons, changing architecture descriptions) still require approval.
Before proposing or implementing ANY changes to AWS Coworker:
CLAUDE-DEVELOPMENT.md in the repository rootdocs/DESIGN.md section 5 (Directory Structure)For ANY change to AWS Coworker:
Gate 1 (plan approval) confirms the CONTENT is correct. It does NOT authorize execution. Gate 2 (execution authorization) is a direct user instruction in the conversation to begin making changes.
These are separate decisions. The user may approve a plan but defer execution, request review first, or decide not to execute at all.
This applies to ALL modifications: skills, agents, commands, tests, documentation, and git commits.
The Cowork plan mode popup asks the user to approve a plan. When the user clicks "approve," the platform tells the agent: "You can now start coding."
For AWS Coworker development, this platform signal is NOT sufficient authorization to execute. The platform approval confirms the user has SEEN the plan. The agent must still present an execution summary in the conversation and wait for the user to explicitly authorize execution.
DO NOT treat the platform's "You can now start coding" message as execution authorization. Only a direct user message in the conversation constitutes execution authorization.
When a session is resumed (context compaction, new session continuing prior work):
System continuation prompts ("continue without asking questions") authorize CONTINUING THE CONVERSATION — not executing pending plans. If a plan exists but has not been executed, present the plan status and wait for explicit authorization.
DO NOT interpret any system-generated prompt as user authorization for execution. Only direct user messages in the conversation constitute execution authorization.
Before presenting ANY plan, validate it against ALL Design Tenets (docs/DESIGN.md section 2.6):
If a proposal violates any tenet, revise it before presenting to the user.
aws-coworker- prefix for agents/commands)patterns/ folders (patterns go in Best Practices sections)AWS Coworker has three layers. Dependencies flow downward only.
AWS Coworker (CLI) ← The core product. This is what we're building and learning from.
↑ reads files, invokes via SDK
ACW Server (server/) ← REST + SSE API. Exists to deploy beyond a laptop.
↑ consumes API only
Web UI (web-ui/) ← Reference implementation. Optional.
When working on CLI layer (commands, skills, agents, config):
When working on server layer (server/):
When working on web-ui layer (web-ui/):
| Smell | What it means | What to do |
|---|---|---|
| Adding a CLI skill because the server needs it | Server is driving CLI design | The skill should stand alone; if it doesn't, the server needs to solve its own problem |
| Adding a server endpoint only the UI uses | UI is driving server design | Either the endpoint is generally useful (keep it) or the UI should derive what it needs from existing endpoints |
| Modifying command frontmatter to add fields the server expects | Server is coupling to CLI internals | The server should parse what exists, not dictate the format |
Adding server/ or web-ui/ imports to CLI code |
Upward dependency | Never. The CLI has no knowledge of higher layers. |
| Component | Location | Convention |
|---|---|---|
| Skills | skills/ (root, NOT .claude/skills/) |
Human-visible, tool-agnostic |
| Agents | .claude/agents/ |
aws-coworker-{role}.md |
| Commands | .claude/commands/ |
aws-coworker-{action}.md |
| CLI References | skills/aws/aws-cli-playbook/commands/ |
{service}.md |
| MVA Baselines | skills/aws/aws-well-architected/mva-baselines/ |
{service}.md — per-service, per-environment tier |
| Core Config | config/ |
{purpose}.yaml (committed) |
| Org Config | config/ |
*.local.yaml (gitignored) or config/org-config/ |
When adding new AWS service support, follow this exact template:
# {Service} CLI Reference
## Overview
Brief description of the service.
## Discovery Commands (Read-Only)
[Read-only commands]
## Common Operations
[Create/configure commands]
## Mutation Commands (Require Approval)
[⚠️ Destructive operations]
## Best Practices
[Guidelines including cross-service patterns]
## Related Skills
[Cross-references to related services]
Before finalizing any proposal, verify:
AWS Coworker uses a layered config model. Understanding which layer a config file belongs to is critical when adding or modifying configuration.
| File | Layer | Committed? | Why |
|---|---|---|---|
config/environments/environments.yaml |
Core | Yes | Universal environment tiers with safety rules. Every deployment needs these. |
~/.aws/config (aws_coworker_classification) |
User | N/A | Profile classification for non-obvious names. Lives in user's AWS CLI config — single source of truth. |
config/org-config/example-org-config.yaml |
Reference | Yes | Example only. No sensible core default — this IS the org layer. |
*.local.yaml (gitignored)example-*.yaml files — they serve as documentation for the org layerA core design principle that affects how all components should be built:
"The user never needs to trust the agent's judgment. The agent can trust the user's decision — but only after ensuring the user has full knowledge of what they're deciding."
When building or modifying any component that presents options or recommendations to the user:
Trust directionality does not break Tenet 8 because:
This section guides future implementation of meaningful Well-Architected Reviews (see Tenet 3).
The gap between MNA and MVA is where the user makes informed decisions.
| Environment | WAR Behavior |
|---|---|
| sandbox/test | Optional — present MVA gaps as informational |
| development | Warn — present MVA gaps, let user proceed with acknowledgment |
| staging | Enforce required items — block on critical gaps, warn on others |
| production | Full compliance — enforce ALL MVA requirements, output Terraform |
WAR assessment is NOT a separate sub-agent — it is performed by the primary orchestrator (Opus) inline during the planning phase. The orchestrator already has the user's request, discovery results, and skill context. Evaluating MVA gaps is a reasoning task that belongs at the orchestration layer.
| Phase | Who | Model | Why |
|---|---|---|---|
| Discovery (current state) | Sub-agent | Haiku | Fast, cheap, read-only |
| WAR Assessment (reasoning) | Orchestrator | Opus (primary) | Already has full context; reasoning task, not delegation task |
| Execution (approved plan) | Sub-agent | Sonnet | Thorough, careful state changes |
DO NOT create a dedicated Opus sub-agent for WAR assessment — this would pay for Opus twice (orchestrator + sub-agent) for no benefit. The orchestrator IS the reasoning layer.
Cost consideration: If a future use case requires WAR assessment at scale (e.g., auditing hundreds of existing resources), consider whether Opus 4.5/4.6 is justified vs. Sonnet for batch assessment. For single-resource planning flows, the orchestrator handles WAR directly.
MVA baselines follow the layered extensibility model:
Core MVA (per service) ← Defined in skills/aws/ (e.g., CloudFront MVA = logging + TLS 1.2)
↓
Org MVA overrides ← Defined in skills/org/ (can ADD requirements, cannot lower core)
↓
BU MVA overrides ← Defined in skills/bu/ (can ADD further, cannot lower org or core)
The original WAR implementation was a fill-in template that the planner self-certified. This produced green checkmarks without actual evaluation (e.g., ✅ for Cost Optimization on an EC2 instance hosting a static HTML game). A real WAR must:
Implementation: MVA baselines are now defined per service in skills/aws/aws-well-architected/mva-baselines/{service}.md. The plan command includes Step 4a for orchestrator-inline WAR evaluation. Enforcement levels are configured per environment in config/environments/environments.yaml.
Reference: See docs/LESSONS-LEARNED-PART-2.md for the full analysis of how WAR theater was discovered and the remediation plan.
When adding new features or capabilities to AWS Coworker, tests are mandatory.
tests/TEST-FRAMEWORK.md, tests/RUNBOOK.md)Before marking any new feature complete, verify: