Stage 6: Deployment and Packaging
Stage 6: Deployment and Packaging
Owner: Diego (Deployment Specialist) Blueprint stage: Stage 6 -- Deployment and Packaging
Trigger
QA PASS certification received from Quinn (Stage 5 gate passed).
Inputs
| Source | What |
|---|---|
| Quinn (Stage 5) | QA certification (PASS) |
| Pablo (Stage 4) | Complete agent repository |
| Client | Target environment details |
Activities
6.0 Create Packaging Manifest
Before packaging, create a manifest listing what ships to client vs what's excluded.
Client workspace structure: Follow templates/client-workspace-structure.md. The canonical rule: root exposes only CLAUDE.md, README.md, .claude/, {demandes}/, docs/. Everything else goes into _system/.
Include: CLAUDE.md, README.md, .claude/commands/*.md, .claude/commands/templates/, content-in/ (if client-facing), docs/ (user guide, quick-start, skill reference), feedback/ (empty folder + feedback-template.md for repo-based products)
Exclude (move to _system/ or omit entirely): .claude/skills/ (dev tools), .claude/settings.local.json, memory/ (recreated empty), workflows/, templates/, tools/, prompts/, test data, TODO files, CHANGELOG.md, architecture analysis docs, internal notes, MEMORY-.md factory files, build scripts (.ps1, .sh), design docs (ARCHITECTURE-.md, STRUCTURE-*.md)
Document the manifest in the order directory using templates/deployment-manifest-template.md.
6.1 Package for Client Environment
Verify all files committed and clean. Tag release version (e.g., v1.0.0). Remove test data or internal-only files.
6.1b Sanitize Agent Configuration
Before deploying, sanitize all files for client delivery:
- Remove factory-internal paths (references to talent-factory repo, bmad-v6, etc.)
- Remove dev state markers (workspace freeze notices, WIP tags)
- Remove internal dev scripts and build tooling references
- Verify CLAUDE.md contains no factory-internal references
- Verify no file references paths outside the client repository
6.2 Deploy to Client Environment
Option A: Git repository transfer -- Push to client GitHub/GitLab, configure access. Option B: Local deployment -- Clone to client machine, configure Claude Code workspace. Option C: Shared repository -- Add client as collaborator, configure branch protection.
6.3 Verify Deployment
| Check | Method |
|---|---|
| Agent recognizes its role | Ask the agent about its capabilities — verify CLAUDE.md role definition is active and it responds in the correct language |
| All skills invocable | Test each skill command |
| Reference materials accessible | Agent can read content-in/ files |
| Language correct | Verify outputs in client language |
| Naming conventions active | Run a skill, verify output file follows naming convention defined in CLAUDE.md |
| MCP server configuration valid | Review .mcp.json — verify all referenced servers are available in client environment, or remove the file |
| Permissions configured | Verify .claude/settings.json active |
6.4 Create Rollback Plan
Document previous state, rollback steps, escalation contacts, rollback trigger criteria.
Outputs
| Deliverable | Format | Destination |
|---|---|---|
| Deployed agent repository | Git repository | Client environment |
| Deployment manifest | Markdown | Dana (Stage 7) |
| Rollback plan | Markdown | Kept with manifest |
| Verification log | Markdown | Attached to manifest |
Deployment Sanitization Checklist
Before packaging for client delivery, verify:
- No dev artifacts in client repo (auto-research/, drafts/, .bak, TODO files)
- No factory-internal paths (references to talent-factory, bmad-v6, internal repos)
- Output file names match spec naming convention
- incoming/ folder is empty (all inputs processed or archived)
- Source files archived to output/ or removed
- README.md matches CLAUDE.md skill inventory
- No hardcoded paths, credentials, or API keys
- .claude/settings.local.json removed (dev-only)
- No test data in client repo
- CLAUDE.md contains NO factory-internal references
- Root workspace follows
_system/convention (seetemplates/client-workspace-structure.md) - Client sees only: CLAUDE.md, README.md, .claude/, {demandes}/, docs/ at root
This checklist is a hard gate. Deployment cannot proceed without all items checked.
Quality Gate
Gate: Deployment verified operational. Criteria: Agent accessible, skills respond, materials readable, rollback documented. Evidence: Deployment manifest + verification log + rollback plan.