chore: initial monorepo scaffold + WDS Phase 1+2 artifacts

- Nx 22.7 monorepo (pnpm 11.1, TypeScript 5.9, Node 24)
- apps/api: NestJS 11 (CJS conforme CODING-RULES.md PGD-DB-004)
- apps/web: React 19 + Vite 8 (ESM)
- libs/shared/api-interface: Zod contract base
- Docker Compose dev: Postgres 18, Valkey 8, MinIO, Mailpit
- WDS artifacts:
  - design-artifacts/A-Product-Brief/ (5 docs canônicos + 16 dialogs)
  - design-artifacts/B-Trigger-Map/ (hub + 4 personas + feature impact)
- Stack canon: STACK.md v2.2 + CODING-RULES.md v2.0 + brand.md
- AGENTS.md + README.md como entrada para devs/agentes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-27 14:34:20 +00:00
commit 17c08e6392
3631 changed files with 855518 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
---
name: 'step-05l-finalize-contract'
description: 'Finalize the contract document review it with user and present for signing'
# File References
nextStepFile: './step-06a-build-internal-signoff.md'
workflowFile: '../workflow.md'
---
# Step 34: Finalize Contract
## STEP GOAL:
Finalize the contract document, review it with the user, present it for signing, and guide next steps toward Project Brief.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
- 📋 YOU ARE A FACILITATOR, not a content generator
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
### Role Reinforcement:
- ✅ You are the Alignment & Signoff facilitator, guiding users to create stakeholder alignment
- ✅ If you already have been given a name, communication_style and persona, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring alignment and stakeholder management expertise, user brings their project knowledge
- ✅ Maintain a supportive and clarifying tone throughout
### Step-Specific Rules:
- 🎯 Focus only on finalizing and reviewing the contract
- 🚫 FORBIDDEN to skip the review process
- 💬 Approach: Review together, ask for adjustments, confirm readiness
- 📋 This is the final quality gate before signing
## EXECUTION PROTOCOLS:
- 🎯 Review and finalize the contract document
- 💾 Save contract to `docs/wds-1-project-brief/contract.md` (or `service-agreement.md`)
- 📖 Review all sections together with user
- 🚫 Do not skip the review and adjustment opportunity
## CONTEXT BOUNDARIES:
- Available context: Complete contract with all sections
- Focus: Final review and presentation
- Limits: Review only - contract is already built section by section
- Dependencies: step-05k must be completed
## Sequence of Instructions (Do not deviate, skip, or optimize)
### 1. Review the Contract
**After building all sections**:
1. **Review the contract**: "I've built your contract section by section. Let me review it with you..."
2. **Present the contract**: "Your contract is ready at `docs/wds-1-project-brief/contract.md` (or `service-agreement.md`)."
3. **Explain next steps**:
- "Review the contract thoroughly"
- "Both parties should sign before work begins"
- "Once signed, we can proceed to the Project Brief workflow"
4. **Ask**: "Does everything look good? Any adjustments needed before signing?"
### 2. Handle Post-Signing
**Once contract is signed**:
- Alignment achieved
- Commitment secured
- Legal protection in place
- Ready to proceed to Project Brief
**Next**: Full Project Brief workflow
`skill:wds-1-project-brief`
### 3. Update State
Update frontmatter of contract file with completion status.
### 4. Present MENU OPTIONS
Display: "**Select an Option:** [C] Continue to step-06a-build-internal-signoff"
#### Menu Handling Logic:
- IF C: Load, read entire file, then execute {nextStepFile}
- IF M: Return to {workflowFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options]
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- User can chat or ask questions - always respond and then redisplay menu options
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN the contract is reviewed, finalized, and user is satisfied will you then load and read fully `{nextStepFile}` to execute and begin the next step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Contract is reviewed section by section with user
- User confirms the contract is ready
- Contract is saved to correct location
- Next steps toward Project Brief are clear
### ❌ SYSTEM FAILURE:
- Skipping the review process
- Not asking for adjustments
- Not saving the contract to the correct location
- Not explaining next steps
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.