Skip to main content

Implementation Plan: aws-sandbox npm Package Release v0.3.18

Status: APPROVED Created: 2026-02-02 Updated: 2026-02-02 (RQ1+RQ2 Upgrades Applied) Spec Reference: specs/aws-sandbox/spec.md ADLC Phase: 1.2 (Technical Feasibility Assessment)


0. Sprint Planning (RQ1 Upgrade)​

0.1 Sprint Planning Checklist​

PhaseTaskOwnerStatus
PreparationReview previous sprint retrospectiveproduct-ownerβœ…
PreparationGroom backlog (INVEST validation)product-ownerβœ…
PreparationEstimate capacitycloud-architectβœ…
MeetingReview sprint goalHITL Manager⏳ Pending
MeetingCommit to sprint backlogTeam⏳ Pending
MeetingAssign tasksproduct-ownerβœ…
Follow-upUpdate velocity trackingqa-engineer⏳ Pending
Follow-upPublish sprint planHITL Manager⏳ Pending

0.2 Sprint Team Members​

NameRoleCapacity (hours/sprint)Allocation
@nnthanh101HITL Manager40h25% oversight
product-ownerBusiness Validation Agent∞100%
cloud-architectTechnical Design Agent∞100%
infrastructure-engineerExecution Agent∞100%
qa-engineerTest Orchestration Agent∞100%

0.3 Sprint Details​

FieldValue
Sprint Themeaws-sandbox v0.3.18 npm Release with Phase 3.5 Consumer E2E
Start Date2026-02-01
End Date2026-02-02
Sprint Duration2 days
Story Points Committed21

0.4 Velocity Tracking​

SprintCommittedCompletedVelocityNotes
Sprint 0.3.17181583%Phase 3.5 not executed
Sprint 0.3.1821TBDTBDCurrent sprint
3-Sprint Avg19.51577%Baseline velocity

0.5 Capacity Planning​

Team MemberAvailable HoursMeetings/OverheadNet Capacity
HITL Manager40h10h30h (75%)
AI Agents∞0h∞
Total40h10h30h + agents

0.6 Previous Sprint Summary (v0.3.17)​

ItemValue
ThemeTier 1+2 Testing Stabilization
Story Points15/18 (83%)
Key Achievement29/29 Tier 1, 11/11 Tier 2 PASS
CarryoverPhase 3.5 Consumer E2E (not executed)
Retrospective ActionAdd Phase 3.5 as BLOCKING gate

1. Plan Overview​

1.1 Objective​

Execute ADLC 6+1 phase lifecycle for aws-sandbox npm package release v0.3.18 with Phase 3.5 Consumer E2E as the primary quality gate.

1.2 Timeline​

PhaseDurationStatus
Phase 1: PLAN2026-02-0165% β†’ 100%
Phase 2: BUILD2026-02-0275% β†’ 100%
Phase 3: TEST/RELEASE2026-02-0253% β†’ 100%
Phase 4-6: DEPLOY/MONITOR/OPERATEPost-releasePending

1.3 Critical Path​

BLOCK-000 (Phase 1) β†’ BLOCK-001 (Phase 2) β†’ BLOCK-002 (Phase 3.5) β†’ npm publish

2. Technical Design​

2.1 Architecture Overview​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ aws-sandbox npm Package β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ bin/cli.js β†’ CLI entrypoint (aws-sandbox command) β”‚
β”‚ lib/*.js β†’ Compiled TypeScript (CDK constructs) β”‚
β”‚ source/infrastructure/ β†’ Pre-bundled app.cjs (~58MB) β”‚
β”‚ source/lambdas-bundled/ β†’ Lambda ZIP files β”‚
β”‚ source/frontend/dist/ β†’ React frontend build β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Consumer Environment β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ npm install [email protected] β”‚
β”‚ npx aws-sandbox --version β”‚
β”‚ npx aws-sandbox synth --all β”‚
β”‚ npx aws-sandbox deploy --localstack β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ LocalStack (Tier 2) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ CloudFormation β†’ Stack deployment β”‚
β”‚ DynamoDB β†’ LeaseTable, SandboxAccountTable β”‚
β”‚ S3 β†’ Artifact storage β”‚
β”‚ Lambda β†’ Account provisioning functions β”‚
β”‚ API Gateway β†’ REST API endpoints β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2.2 Component Dependencies​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Phase 1 │────▢│ Phase 2 │────▢│ Phase 3 β”‚
β”‚ PLAN β”‚ β”‚ BUILD β”‚ β”‚ TEST β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚ β”‚
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ spec.md β”‚ β”‚ app.cjs β”‚ β”‚ Phase 3.5 β”‚
β”‚ plan.md β”‚ β”‚ (build) β”‚ β”‚ Consumer β”‚
β”‚ tasks.md β”‚ β”‚ β”‚ β”‚ E2E Deploy β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2.3 AWS Well-Architected Framework Alignment (RQ2 Upgrade)​

PillarCoverageImplementationGap
Operational Excellence75%Runbook via tasks.md, IaC via CDK, PDCA cyclesAutomated rollback
Security80%Apache-2.0 license, no secrets in package, npm auditThreat model (deferred)
Reliability90%RTO 15min, RPO 0min, Phase 3.5 validation, rollback proceduresMulti-region (N/A for npm)
Performance Efficiency70%Tier 1 ≀10s, Tier 2 ≀60s, Consumer deploy ≀5minLambda cold start optimization
Cost Optimization85%$0 Tier 1+2 on LocalStack, ~$50/mo Tier 3 deferredFinOps tagging (deferred)
Sustainability50%Local-first testing reduces cloud computeCarbon footprint tracking

Overall Well-Architected Score: 75% (target: β‰₯70% for npm package)

2.4 Architecture Diagram References (RQ4 Upgrade)​

2.4.1 Draw.io Diagrams (SVG)​

DiagramC4 LevelPurposePath
High-LevelL1 ContextSystem boundaries, external actorscdk/docs/diagrams/architecture/high-level.drawio.svg
In-DepthL2 ContainerCDK stacks, AWS servicescdk/docs/diagrams/architecture/in-depth.drawio.svg
Stack DependenciesL2 ContainerInter-stack relationshipscdk/docs/diagrams/architecture/stack-dependencies.drawio.svg
Stack RelationshipsL2 ContainerData flow between stackscdk/docs/diagrams/architecture/stack-relationships.drawio.svg
Software LayersL3 ComponentApplication architecturecdk/docs/diagrams/architecture/software-architecture-layers.drawio.svg
Account CleanerL3 ComponentCleanup workflowcdk/docs/diagrams/architecture/account-cleaner.drawio.svg
Event InfrastructureL3 ComponentEventBridge patternscdk/docs/diagrams/architecture/event-infrastructure.drawio.svg
Organizational UnitsL2 ContainerAWS Organizationscdk/docs/diagrams/architecture/organizational-units.drawio.svg
Web AppL3 ComponentFrontend architecturecdk/docs/diagrams/architecture/web-app.drawio.svg

2.4.2 Mermaid Diagrams (Docusaurus-Ready)​

DiagramTypePurposePath
AWS 4-Stack Architecturearchitecture-betaHub/IDC account stackscdk/docs/ARCHITECTURE-DIAGRAMS.md#1
Consumer E2E Flowflowchart5-layer Phase 3.5 validationcdk/docs/ARCHITECTURE-DIAGRAMS.md#2
3-Tier Testing PipelineflowchartTier 1 β†’ 2 β†’ 3.5 β†’ 3 flowcdk/docs/ARCHITECTURE-DIAGRAMS.md#3
Deployment SequenceflowchartPhase-based deployment ordercdk/docs/ARCHITECTURE-DIAGRAMS.md#4
npm Package StructureflowchartTarball β†’ consumer CLI flowcdk/docs/ARCHITECTURE-DIAGRAMS.md#5
ADLC 6+1 LifecycleflowchartFull release workflowcdk/docs/ARCHITECTURE-DIAGRAMS.md#6
Stack ResourcesflowchartDataStack + ComputeStack detailcdk/docs/ARCHITECTURE-DIAGRAMS.md#7

3. Implementation Phases​

3.1 Phase 1: PLAN (Complete SPECKIT Deliverables)​

3.1.1 Create spec.md (βœ… DONE)​

# Created: specs/aws-sandbox/spec.md
# Evidence: This file exists

3.1.2 Create plan.md (βœ… IN PROGRESS)​

# Creating: specs/aws-sandbox/plan.md
# Evidence: This file

3.1.3 Create tasks.md​

# Creating: specs/aws-sandbox/tasks.md
# Evidence: Task breakdown with dependencies

3.1.4 HITL Approval​

# Create: tmp/cdk/approvals/hitl-approval-2026-02-02.md
# Action: Manager signs off on Phase 1 deliverables

3.2 Phase 2: BUILD (app.cjs Generation)​

3.2.1 Build Consumer App​

cd /Volumes/Working/projects/sandbox/cdk
npm run build:consumer-app

# Expected output:
# source/infrastructure/dist/infrastructure/bin/app.cjs (~58MB)

# Validation:
ls -la source/infrastructure/dist/infrastructure/bin/app.cjs

3.2.2 Build All Workspaces​

npm run build

# Validates:
# - TypeScript compilation
# - Lambda bundling
# - Frontend build

3.3 Phase 3: TEST/RELEASE​

3.3.1 Tier 1 Snapshot Tests (βœ… PASS)​

npm run test:snapshot
# Result: 29/29 PASS (5.38s)
# Evidence: tmp/cdk/test-results/tier1-2026-02-01-081221.log

3.3.2 Tier 2 LocalStack Tests (βœ… PASS)​

npm run test:localstack
# Result: 11/11 PASS (1.28s)
# Evidence: tmp/cdk/test-results/tier2-2026-02-01-081151.log

3.3.3 Phase 3.5 Consumer E2E Deploy (CRITICAL)​

Layer 1: Package Installation

# Create tarball
npm pack
# Expected: aws-sandbox-0.3.18.tgz

# Create isolated environment
mkdir -p tmp/cdk/consumer-test
cd tmp/cdk/consumer-test
npm init -y
npm install ../../../aws-sandbox-0.3.18.tgz

# Validate critical files
ls node_modules/aws-sandbox/bin/cli.js
ls node_modules/aws-sandbox/lib/index.js
ls node_modules/aws-sandbox/source/infrastructure/dist/infrastructure/bin/app.cjs

Layer 2: CLI Availability

npx aws-sandbox --version
# Expected: 0.3.18

Layer 3: Consumer Mode Detection

# Consumer mode should be auto-detected (no source/infrastructure/bin/app.ts)
npx aws-sandbox synth --all 2>&1 | head -20

Layer 4: LocalStack Deployment

# Ensure LocalStack is running
docker compose -f /Volumes/Working/projects/sandbox/cdk/docker-compose.yml up -d localstack

# Wait for health
until curl -sf http://localhost:4566/_localstack/health; do sleep 2; done

# Deploy to LocalStack
AWS_ENDPOINT_URL=http://localhost:4566 npx aws-sandbox deploy --localstack --require-approval never

# Validate stacks
aws --endpoint-url=http://localhost:4566 cloudformation list-stacks --stack-status-filter CREATE_COMPLETE

Layer 5: Evidence Capture

# Capture deployment logs
mkdir -p /Volumes/Working/projects/sandbox/tmp/cdk/release-logs
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
# Evidence file: tmp/cdk/release-logs/phase3.5-consumer-${TIMESTAMP}.log

3.3.4 npm Publish (HITL Required)​

# Only after Phase 3.5 PASS
# Requires HITL approval

# Pre-publish checklist:
# - [ ] Phase 3.5 PASS evidence
# - [ ] Version 0.3.18 in package.json
# - [ ] CHANGELOG updated
# - [ ] HITL approval signature

# npm publish --access public

4. Testing Strategy​

4.1 3-Tier Testing Matrix​

TierTypeDurationCostCoverageStatus
1Snapshot5.38s$070-80%βœ… PASS
2LocalStack1.28s$0+15-20%βœ… PASS
3AWS E2E5-10min~$50/mo+5-10%Deferred

4.2 Phase 3.5 Validation Criteria​

LayerCheckPass Criteria
1Package installnpm install succeeds
2CLI availability--version returns 0.3.18
3Mode detectionConsumer mode active
4SynthCloudFormation templates generated
5DeployCREATE_COMPLETE status

4.3 SLO Targets (RQ2 Upgrade)​

SLOTargetMeasurement MethodAlert Threshold
Availability99.9%npm registry uptimeN/A (external)
Tier 1 Latency≀10snpm run test:snapshot duration>15s
Tier 2 Latency≀60snpm run test:localstack duration>90s
Phase 3.5 Latency≀5minConsumer E2E total duration>10min
Consumer Install100%npm install success rateAny failure = BLOCK
CLI Availability100%npx aws-sandbox --version successAny failure = BLOCK
Deploy Success100%CloudFormation CREATE_COMPLETEAny failure = BLOCK
Error Rate0%Errors in Phase 3.5 evidence logAny error = BLOCK

SLO Burn Rate: Phase 3.5 failures must be ≀0 for npm publish approval

4.4 Progressive Rollout Strategy (RQ2 Upgrade)​

StageAudienceValidationRollback Trigger
1. npm packInternal onlyPhase 3.5 Consumer E2EAny layer failure
2. npm publish --tag betaEarly adoptersDownload + install monitoring>5% failure rate
3. npm publish --tag latestAll usersnpm download statsCritical bug report

Canary Deployment: Not applicable for npm packages (instant global publish)


5. Risk Mitigation​

5.1 Phase 3.5 Failure Recovery​

IF Phase 3.5 fails:
1. Capture error logs to tmp/cdk/release-logs/
2. Identify failure layer (1-5)
3. Fix issue in source
4. Rebuild (npm run build:consumer-app)
5. Re-execute Phase 3.5
6. DO NOT proceed to npm publish until PASS

5.2 Rollback Procedures​

ScenarioRTORPOAction
Build failure0min0minFix and rebuild
Phase 3.5 failure15min0minFix and re-test
Post-publish bug2-3h0minnpm deprecate + hotfix

6. Evidence Requirements​

6.1 Required Artifacts​

ArtifactPathStatus
spec.mdspecs/aws-sandbox/spec.mdβœ… Created
plan.mdspecs/aws-sandbox/plan.mdβœ… Creating
tasks.mdspecs/aws-sandbox/tasks.mdPending
HITL approvaltmp/cdk/approvals/hitl-approval-2026-02-02.mdPending
Phase 3.5 evidencetmp/cdk/release-logs/phase3.5-consumer-*.logPending

6.2 Validation Summary​

{
"phase1_complete": false,
"phase2_complete": false,
"phase3_5_pass": false,
"hitl_approved": false,
"ready_for_publish": false
}

7. Claude Code Components​

7.1 Agents to Invoke​

AgentPurposePhase
product-ownerBusiness validation1
cloud-architectTechnical design1
infrastructure-engineerBuild/Deploy2, 3
qa-engineerTest execution3

7.2 Commands to Execute​

CommandPurposePhase
/speckit.specifyCreate spec.md1
/speckit.planCreate plan.md1
/speckit.tasksCreate tasks.md1
/cdk:testRun Tier 1+23
/cdk:releaseFull release workflow3

7.3 Skills Loaded​

  • testing-cdk-infrastructure.md - 3-tier testing
  • releasing-npm-package.md - 7-phase release
  • operational-excellence.md - PDCA cycles

8. Approval Gates​

8.1 Phase 1 Gate (HITL Required)​

  • spec.md reviewed and approved
  • plan.md reviewed and approved
  • tasks.md reviewed and approved
  • Manager signature in tmp/cdk/approvals/

8.2 Phase 3.5 Gate (Automated)​

  • Layer 1: Package installation SUCCESS
  • Layer 2: CLI availability SUCCESS
  • Layer 3: Consumer mode detected
  • Layer 4: Synth SUCCESS
  • Layer 5: Deploy CREATE_COMPLETE

8.3 npm Publish Gate (HITL Required)​

  • Phase 3.5 evidence reviewed
  • Version confirmed (0.3.18)
  • CHANGELOG reviewed
  • Manager approval for publish

9. Next Steps​

  1. Immediate: Complete tasks.md creation
  2. Short-term: Build app.cjs (npm run build:consumer-app)
  3. Critical: Execute Phase 3.5 Consumer E2E Deploy
  4. Final: Request HITL approval for npm publish

Plan Version: 1.1.0 ADLC Phase: 1.2 (Technical Feasibility Assessment) Updated: 2026-02-02 (RQ1+RQ2 Upgrades: Sprint Planning, Well-Architected, SLOs, Architecture Refs) Next Action: Execute Phase 3.5 Consumer E2E Deploy