From 0c7664b82353b9c4b0855d7bbbd8eb9237c24c53 Mon Sep 17 00:00:00 2001 From: Janos Schwellach Date: Sat, 10 Jan 2026 13:58:31 +0000 Subject: [PATCH] feat: Add multi-user parallel development support to AI-DLC This commit introduces comprehensive multi-user collaboration capabilities integrated into the core AI-DLC workflow: New Features: - Multi-user parallel development with automatic branch management - User-scoped audit files to prevent conflicts - Unit assignment tracking and dependency-aware consolidation - Consolidated project views with automatic indexing New Files: - AGENTS.md.example: Configuration template for multi-user behavior - QUICK-REFERENCE.md: Quick commands and workflows reference - multi-user-commands.md: Command handling rules - multi-user-parallel.md: Parallel workflow orchestration rules Updated Files: - README.md: Added multi-user documentation and configuration sections - units-generation.md: Added Step 20 for multi-user setup workflow - Rule files enhanced with multi-user workflow integration - All documentation uses current 'kiro-cli chat' command syntax Multi-user functionality is built into the core workflow and automatically available. After inception, users can choose solo work or enable team collaboration with automatic unit assignment and consolidation. --- AGENTS.md.example | 30 ++ QUICK-REFERENCE.md | 152 ++++++ README.md | 46 ++ .../common/multi-user-commands.md | 291 ++++++++++++ .../common/multi-user-parallel.md | 439 ++++++++++++++++++ .../inception/units-generation.md | 70 +++ 6 files changed, 1028 insertions(+) create mode 100644 AGENTS.md.example create mode 100644 QUICK-REFERENCE.md create mode 100644 aidlc-rules/aws-aidlc-rule-details/common/multi-user-commands.md create mode 100644 aidlc-rules/aws-aidlc-rule-details/common/multi-user-parallel.md diff --git a/AGENTS.md.example b/AGENTS.md.example new file mode 100644 index 00000000..a31aaab7 --- /dev/null +++ b/AGENTS.md.example @@ -0,0 +1,30 @@ +# AGENTS.md - Project Configuration + +Copy to project root as `AGENTS.md` to customize multi-user behavior. + +## Folder Structure + +### Generated Code +``` +[unit-name]/ +├── src/ # Source code (language-specific structure) +├── tests/ # Tests +└── docs/ # Documentation +``` + +### Audits +``` +aidlc-docs/audits/[unit-name]/[developer]/ +``` + +### Branches +``` +feature/[unit-name]-[developer] +``` + +## Custom Paths (Optional) + +Override defaults by specifying: +- `code_root`: Base path for generated code (default: `[unit-name]/`) +- `audit_root`: Base path for audits (default: `aidlc-docs/audits/`) +- `branch_prefix`: Branch naming prefix (default: `feature/`) diff --git a/QUICK-REFERENCE.md b/QUICK-REFERENCE.md new file mode 100644 index 00000000..b6d931cd --- /dev/null +++ b/QUICK-REFERENCE.md @@ -0,0 +1,152 @@ +# AI-DLC Multi-User Quick Reference + +## 🚀 Quick Start + +### Lead Developer +```bash +kiro-cli chat "Create [your project description]" +# Complete inception → Choose Option B +``` + +### Team Members +```bash +git pull origin main +kiro-cli chat "claim unit " +# Work on unit → Complete +kiro-cli chat "complete unit " +``` + +### Integrator +```bash +kiro-cli chat "consolidate units" +``` + +## 📋 Commands + +| Command | What It Does | +|---------|--------------| +| `list units` | Show all units and status | +| `claim unit ` | Start working on a unit | +| `complete unit ` | Finish your unit | +| `merge unit ` | Merge unit to main | +| `consolidate units` | Merge all units | +| `unit status ` | Check unit details | +| `show audit` | Your activity log | +| `show all audits` | Team activity logs | + +## 🌳 Branch Structure + +``` +main # Shared inception artifacts +├── unit/user-service-alice # Alice's work +├── unit/auth-service-bob # Bob's work +└── unit/api-gateway-charlie # Charlie's work +``` + +## 📁 File Structure + +``` +aidlc-docs/ +├── audit/ +│ ├── user-alice-audit.md # Alice's log +│ ├── user-bob-audit.md # Bob's log +│ └── audit-index.md # All logs +├── construction/ +│ ├── unit-assignments.md # Who's doing what +│ └── consolidated-index.md # Merged units +``` + +## 🔄 Workflow + +``` +Inception (Lead) → Units Generated + ↓ + ┌───────────────┼───────────────┐ + ↓ ↓ ↓ + Alice (Unit 1) Bob (Unit 2) Charlie (Unit 3) + ↓ ↓ ↓ + Complete Complete Complete + └───────────────┼───────────────┘ + ↓ + Consolidate + ↓ + Build & Test +``` + +## ✅ Status Icons + +- ✅ Completed +- 🔄 In Progress +- ⭐ Available +- ⏳ Blocked (waiting on dependency) + +## 🎯 Best Practices + +1. **Check dependencies** before claiming units +2. **Commit often** in your unit branch +3. **Complete units** when all stages done +4. **Consolidate regularly** to avoid drift +5. **Review audits** for team coordination + +## 🆘 Quick Fixes + +**Branch exists?** +```bash +git branch -D unit/name-user +kiro-cli chat "claim unit name" +``` + +**Out of sync?** +```bash +git pull origin main +kiro-cli chat "list units" +``` + +**Check status?** +```bash +kiro-cli chat "unit status " +``` + +## 📞 Need Help? + +```bash +kiro-cli chat "show all audits" # See what everyone did +kiro-cli chat "list units" # See current status +cat aidlc-docs/construction/unit-assignments.md +``` + +## 🎓 Example Session + +```bash +# Alice starts project +kiro-cli chat "Create e-commerce API" +# → Completes inception, enables team + +# Bob joins +git pull origin main +kiro-cli chat "claim unit product-catalog" +# → Works on unit +kiro-cli chat "complete unit product-catalog" + +# Charlie joins +git pull origin main +kiro-cli chat "claim unit shopping-cart" +# → Works on unit +kiro-cli chat "complete unit shopping-cart" + +# Alice consolidates +kiro-cli chat "consolidate units" +# → All units merged, build & test starts +``` + +## 💡 Pro Tips + +- Use `kiro-cli chat "I want to work on X"` instead of `claim unit X` +- Use `kiro-cli chat "I'm done with X"` instead of `complete unit X` +- Use `kiro-cli chat "what's available?"` instead of `list units` +- AI understands natural language! + +--- + +**Full Guide**: See `MULTI-USER-GUIDE.md` +**Implementation Details**: See `MULTI-USER-IMPLEMENTATION.md` diff --git a/README.md b/README.md index 1d058016..61c04645 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,52 @@ AI-DLC follows a structured three-phase approach that adapts to your project's c - **Risk-Based**: Complex changes get comprehensive treatment, simple changes stay efficient - **Question-Driven**: Structured multiple-choice questions in files, not chat - **Always in Control**: Review execution plans and approve each phase +- **Multi-User Parallel Development**: Multiple developers can work on different units simultaneously with automatic branch management and audit isolation + +## Project Configuration + +### AGENTS.md (Optional) + +Customize multi-user behavior and folder structure by creating an `AGENTS.md` file in your project root: + +```bash +cp $AIDLC_WORKFLOWS/AGENTS.md.example ./AGENTS.md +``` + +This file allows you to configure: +- Generated code folder structure per unit +- Audit file locations +- Branch naming conventions +- Custom paths for your project + +See [AGENTS.md.example](AGENTS.md.example) for details. + +## Multi-User Parallel Development + +AI-DLC includes built-in team collaboration with automatic workflow management: + +- 🔀 **Automatic Branch Creation**: Each developer works in isolated branches +- 📝 **User-Scoped Audits**: No audit file conflicts between team members +- 🎯 **Unit Assignment Tracking**: Clear visibility of who's working on what +- 🔄 **Dependency-Aware Consolidation**: Automatic merging in correct order +- 📊 **Consolidated Views**: Project-wide visibility with automatic indexing + +**Quick Start**: +```bash +# Lead completes inception +kiro-cli chat "Create microservices architecture" +# → Choose "Enable team collaboration" + +# Team members claim units +kiro-cli chat "claim unit user-service" + +# Integrator consolidates +kiro-cli chat "consolidate units" +``` + +Multi-user functionality is automatically available when using AI-DLC - no additional setup required. + +**Learn More**: See [Quick Reference](QUICK-REFERENCE.md) for commands and workflows ## Prerequisites diff --git a/aidlc-rules/aws-aidlc-rule-details/common/multi-user-commands.md b/aidlc-rules/aws-aidlc-rule-details/common/multi-user-commands.md new file mode 100644 index 00000000..ee87b54c --- /dev/null +++ b/aidlc-rules/aws-aidlc-rule-details/common/multi-user-commands.md @@ -0,0 +1,291 @@ +# Multi-User Workflow Commands + +## Command Recognition + +The AI MUST recognize and execute these commands automatically: + +### Unit Management Commands + +- `claim unit ` - Claim a unit for development +- `complete unit ` - Mark unit as complete and ready for merge +- `merge unit ` - Merge completed unit into main +- `consolidate units` - Merge all completed units +- `list units` - Show unit assignment status +- `unit status ` - Show detailed unit status + +### Audit Commands + +- `show audit` - Display current user's audit trail +- `show all audits` - Display consolidated audit index +- `audit summary` - Generate summary of all activities + +## Command Implementations + +### claim unit + +**Execution Steps**: +1. Detect current user: `CURRENT_USER=$(whoami)` +2. Validate unit exists and is available +3. Create branch: `git checkout -b unit/-${CURRENT_USER}` +4. Update unit-assignments.md +5. Commit and push assignment +6. Initialize unit workspace +7. Log in user audit file +8. Begin Construction Phase for this unit + +**Output**: +``` +✅ Unit Claimed: +Branch: unit/- +Starting Construction Phase... +``` + +### complete unit + +**Execution Steps**: +1. Validate all construction stages completed +2. Update unit-assignments.md status to "Completed" +3. Commit all unit artifacts +4. Push branch +5. Create PR checklist +6. Log completion in audit +7. Offer next actions (claim another, merge, done) + +**Output**: +``` +✅ Unit Completed: +Ready for merge. Next action? [A/B/C] +``` + +### merge unit + +**Execution Steps**: +1. Check dependencies are satisfied +2. Switch to main: `git checkout main && git pull` +3. Merge unit branch: `git merge --no-ff unit/-` +4. Update consolidated-index.md +5. Commit consolidation +6. Push to main +7. Check if all units complete +8. Trigger Build and Test if ready + +**Output**: +``` +✅ Unit Merged: +Progress: X/Y units completed +``` + +### consolidate units + +**Execution Steps**: +1. Parse unit-assignments.md for completed units +2. Sort by dependencies (topological sort) +3. Merge each unit in dependency order +4. Update consolidated-index.md +5. Generate consolidated-audit.md +6. Trigger Build and Test phase + +**Output**: +``` +✅ All Units Consolidated +X/X units merged successfully +Ready for Build and Test Phase +``` + +### list units + +**Execution Steps**: +1. Read unit-assignments.md +2. Format table with current status +3. Highlight available units +4. Show dependencies + +**Output**: +``` +Unit Assignments: + +✅ user-service (alice) - Completed +🔄 payment-service (bob) - In Progress +⭐ notification-service - Available +⏳ reporting-service - Blocked (depends on payment-service) +``` + +### unit status + +**Execution Steps**: +1. Read unit plan file +2. Show stage completion +3. Show assigned developer +4. Show dependencies +5. Link to audit trail + +**Output**: +``` +Unit: payment-service +Assigned: bob +Branch: unit/payment-service-bob +Status: In Progress + +Construction Stages: +✅ Functional Design +✅ NFR Requirements +🔄 NFR Design (current) +⏳ Infrastructure Design +⏳ Code Generation + +Dependencies: user-service (✅ completed) +Audit: aidlc-docs/audit/user-bob-audit.md +``` + +### show audit + +**Execution Steps**: +1. Detect current user +2. Read user-specific audit file +3. Display formatted content +4. Show recent entries first + +**Output**: +``` +Audit Trail: user-alice + +Recent Activity: +- 2025-11-05 11:07 - Claimed unit: user-service +- 2025-11-05 10:30 - Completed Requirements Analysis +- 2025-11-05 09:15 - Started Inception Phase + +Full audit: aidlc-docs/audit/user-alice-audit.md +``` + +### show all audits + +**Execution Steps**: +1. Read audit-index.md +2. Display all active sessions +3. Show last activity per user +4. Link to individual audits + +**Output**: +``` +All Audit Trails: + +Active Sessions: +- alice: Last activity 2025-11-05 11:07 (user-service) +- bob: Last activity 2025-11-05 10:45 (payment-service) + +Completed Sessions: +- charlie: Completed 2025-11-04 16:00 (notification-service) + +Index: aidlc-docs/audit/audit-index.md +``` + +### audit summary + +**Execution Steps**: +1. Parse all user audit files +2. Extract key milestones +3. Generate timeline +4. Create consolidated-audit.md + +**Output**: +``` +Project Audit Summary: + +Inception Phase: +- Lead: alice +- Duration: 2 hours +- Completed: 2025-11-05 10:00 + +Construction Phase: +- Units: 3 +- Developers: alice, bob, charlie +- In Progress: 2 +- Completed: 1 + +Timeline: aidlc-docs/audit/consolidated-audit.md +``` + +## Automatic Command Detection + +**MANDATORY**: The AI MUST detect these patterns in user input: + +``` +User says: "I want to work on the user service" +→ Execute: claim unit user-service + +User says: "I'm done with payment service" +→ Execute: complete unit payment-service + +User says: "merge the notification service" +→ Execute: merge unit notification-service + +User says: "what units are available?" +→ Execute: list units + +User says: "how is bob doing on payment service?" +→ Execute: unit status payment-service + +User says: "show me what I've done" +→ Execute: show audit + +User says: "integrate everything" +→ Execute: consolidate units +``` + +## Integration Points + +### Units Generation Stage + +After user approves units, automatically: +1. Create unit-assignments.md +2. Commit inception artifacts +3. Present claiming options +4. Wait for "claim unit" command or team assignment + +### Construction Phase + +Only execute for claimed unit in current branch: +1. Check current branch matches unit assignment +2. Execute stages for this unit only +3. Update unit plan checkboxes +4. Log in user-specific audit + +### Build and Test Phase + +Only execute after consolidation: +1. Verify all units merged to main +2. Check consolidated-index.md shows all units +3. Execute build and test across all units +4. Generate integration test results + +## Error Handling + +### Unit Already Claimed +``` +❌ Unit already claimed by +Available units: +``` + +### Dependency Not Met +``` +❌ Cannot merge: dependency not satisfied + depends on: (status: ) +``` + +### Not in Unit Branch +``` +❌ Not in unit branch +Current branch: +Expected: unit/- +Run: git checkout unit/- +``` + +### Unit Not Complete +``` +❌ Unit not complete +Pending stages: +- Infrastructure Design +- Code Generation + +Complete these stages first. +``` diff --git a/aidlc-rules/aws-aidlc-rule-details/common/multi-user-parallel.md b/aidlc-rules/aws-aidlc-rule-details/common/multi-user-parallel.md new file mode 100644 index 00000000..46a69443 --- /dev/null +++ b/aidlc-rules/aws-aidlc-rule-details/common/multi-user-parallel.md @@ -0,0 +1,439 @@ +# Multi-User Parallel Development + +## Overview + +This workflow enables multiple developers to work on different units simultaneously with automatic branch management, audit isolation, and consolidation. + +## User Detection + +**MANDATORY**: At workflow start, detect current user: + +```bash +CURRENT_USER=$(whoami) +``` + +Store in `aidlc-docs/session-info.md`: +```markdown +# Session Information +- **User**: ${CURRENT_USER} +- **Session Start**: ${TIMESTAMP} +- **Audit File**: aidlc-docs/audit/user-${CURRENT_USER}-audit.md +``` + +## Audit File Management + +### User-Scoped Audit Files + +**MANDATORY**: Replace all `audit.md` references with user-scoped files: + +- **Path**: `aidlc-docs/audit/user-${CURRENT_USER}-audit.md` +- **Create directory**: `mkdir -p aidlc-docs/audit/` +- **Always append**: Never use `create` command on audit files + +### Audit Index + +**MANDATORY**: After each audit entry, update `aidlc-docs/audit/audit-index.md`: + +```markdown +# Audit Trail Index + +## Active Sessions +- [user-alice](./user-alice-audit.md) - Last updated: 2025-11-05T11:07:00Z +- [user-bob](./user-bob-audit.md) - Last updated: 2025-11-05T10:30:00Z + +## Completed Sessions +- [user-charlie](./user-charlie-audit.md) - Completed: 2025-11-04T16:00:00Z +``` + +## Parallel Unit Development + +### Phase: Units Generation Completion + +**MANDATORY**: After Units Generation stage approval, execute: + +#### Step 1: Create Unit Assignments Manifest + +Create `aidlc-docs/construction/unit-assignments.md`: + +```markdown +# Unit Assignments + +Generated: ${TIMESTAMP} + +## Units + +| Unit Name | Assigned To | Status | Branch | Started | Completed | +|-----------|-------------|--------|--------|---------|-----------| +${UNIT_ROWS} + +## Dependencies + +${DEPENDENCY_MAP} + +## Instructions + +1. Claim a unit by updating "Assigned To" with your username +2. Run: `kiro-cli chat "claim unit ${UNIT_NAME}"` +3. AI will create your branch and set up workspace +4. Work independently in your branch +5. When complete, run: `kiro-cli chat "complete unit ${UNIT_NAME}"` +``` + +#### Step 2: Commit Inception Artifacts + +```bash +git add aidlc-docs/inception/ +git add aidlc-docs/construction/unit-assignments.md +git commit -m "AI-DLC: Inception phase complete - ${NUM_UNITS} units ready for parallel development" +git push origin main +``` + +#### Step 3: Present Assignment Options + +**Message to user**: +``` +✅ Units Generation Complete + +${NUM_UNITS} units are ready for parallel development: +${UNIT_LIST} + +**Next Steps**: + +A) **Claim a unit now** (you will work on it) + - Choose unit: ${UNIT_OPTIONS} + +B) **Let team claim units** (you're done for now) + - Share: git pull origin main + - Team members run: kiro-cli chat "claim unit " + +C) **Claim multiple units** (sequential work) + - You'll work on multiple units one by one + +Which option? [A/B/C] +``` + +### Unit Claiming Workflow + +**Trigger**: User says "claim unit ${UNIT_NAME}" or chooses option A + +#### Step 1: Validate Unit + +```bash +# Check unit exists and is available +grep "${UNIT_NAME}" aidlc-docs/construction/unit-assignments.md +# Verify status is "Not Started" or "Assigned To" is empty +``` + +#### Step 2: Create Unit Branch + +```bash +git checkout main +git pull origin main +git checkout -b "unit/${UNIT_NAME}-${CURRENT_USER}" +``` + +#### Step 3: Update Assignment Manifest + +Update `aidlc-docs/construction/unit-assignments.md`: +- Set "Assigned To": ${CURRENT_USER} +- Set "Status": In Progress +- Set "Branch": unit/${UNIT_NAME}-${CURRENT_USER} +- Set "Started": ${TIMESTAMP} + +#### Step 4: Commit Assignment + +```bash +git add aidlc-docs/construction/unit-assignments.md +git commit -m "AI-DLC: ${CURRENT_USER} claimed unit ${UNIT_NAME}" +git push origin "unit/${UNIT_NAME}-${CURRENT_USER}" +``` + +#### Step 5: Initialize Unit Workspace + +Create `aidlc-docs/construction/plans/${UNIT_NAME}-unit-plan.md`: + +```markdown +# Unit: ${UNIT_NAME} + +- **Assigned To**: ${CURRENT_USER} +- **Branch**: unit/${UNIT_NAME}-${CURRENT_USER} +- **Status**: In Progress + +## Construction Stages + +- [ ] Functional Design +- [ ] NFR Requirements +- [ ] NFR Design +- [ ] Infrastructure Design +- [ ] Code Generation + +## Audit Trail + +See: [User Audit](../../audit/user-${CURRENT_USER}-audit.md) +``` + +#### Step 6: Log in Audit + +Append to `aidlc-docs/audit/user-${CURRENT_USER}-audit.md`: + +```markdown +## Unit Claimed: ${UNIT_NAME} + +**Timestamp**: ${TIMESTAMP} +**Branch**: unit/${UNIT_NAME}-${CURRENT_USER} +**Action**: Claimed unit for development + +--- +``` + +#### Step 7: Begin Construction Phase + +**Message to user**: +``` +✅ Unit Claimed: ${UNIT_NAME} + +Branch created: unit/${UNIT_NAME}-${CURRENT_USER} +Workspace initialized: aidlc-docs/construction/${UNIT_NAME}/ + +Starting Construction Phase for this unit... +``` + +Proceed to Construction Phase stages for this unit only. + +### Unit Completion Workflow + +**Trigger**: User says "complete unit ${UNIT_NAME}" or Construction Phase finishes + +#### Step 1: Validate Completion + +Check all stages completed in `aidlc-docs/construction/plans/${UNIT_NAME}-unit-plan.md` + +#### Step 2: Update Assignment Manifest + +Update `aidlc-docs/construction/unit-assignments.md`: +- Set "Status": Completed +- Set "Completed": ${TIMESTAMP} + +#### Step 3: Commit Unit Work + +```bash +git add aidlc-docs/construction/${UNIT_NAME}/ +git add aidlc-docs/construction/plans/${UNIT_NAME}-*.md +git add aidlc-docs/audit/user-${CURRENT_USER}-audit.md +git commit -m "AI-DLC: Completed unit ${UNIT_NAME}" +git push origin "unit/${UNIT_NAME}-${CURRENT_USER}" +``` + +#### Step 4: Create Pull Request Preparation + +Create `aidlc-docs/construction/${UNIT_NAME}/PR-CHECKLIST.md`: + +```markdown +# Pull Request Checklist: ${UNIT_NAME} + +## Completed Artifacts +- [x] Functional Design +- [x] NFR Requirements +- [x] NFR Design +- [x] Infrastructure Design +- [x] Code Generation + +## Files Changed +${FILE_LIST} + +## Dependencies +${DEPENDENCY_STATUS} + +## Merge Instructions +1. Ensure dependent units are merged first: ${DEPENDENCIES} +2. Merge to main: git merge unit/${UNIT_NAME}-${CURRENT_USER} +3. Run consolidation: kiro-cli chat "consolidate units" +``` + +#### Step 5: Log Completion + +Append to `aidlc-docs/audit/user-${CURRENT_USER}-audit.md`: + +```markdown +## Unit Completed: ${UNIT_NAME} + +**Timestamp**: ${TIMESTAMP} +**Branch**: unit/${UNIT_NAME}-${CURRENT_USER} +**Action**: Unit development completed, ready for merge + +--- +``` + +#### Step 6: Notify User + +**Message to user**: +``` +✅ Unit Completed: ${UNIT_NAME} + +Branch: unit/${UNIT_NAME}-${CURRENT_USER} +PR Checklist: aidlc-docs/construction/${UNIT_NAME}/PR-CHECKLIST.md + +**Next Steps**: + +A) **Claim another unit** (continue working) + Available units: ${AVAILABLE_UNITS} + +B) **Merge this unit** (if you're the lead/integrator) + Run: kiro-cli chat "merge unit ${UNIT_NAME}" + +C) **Done for now** (let others continue) + Your work is pushed and ready for integration + +Which option? [A/B/C] +``` + +## Unit Consolidation Workflow + +**Trigger**: User says "consolidate units" or "merge unit ${UNIT_NAME}" + +### Auto-Consolidation Process + +#### Step 1: Check Dependencies + +```bash +# Parse unit-assignments.md for dependency graph +# Verify all dependencies are completed before merging +``` + +#### Step 2: Merge Unit Branch + +```bash +git checkout main +git pull origin main +git merge --no-ff "unit/${UNIT_NAME}-${CURRENT_USER}" -m "AI-DLC: Integrate unit ${UNIT_NAME}" +``` + +#### Step 3: Update Consolidated Index + +Create/update `aidlc-docs/construction/consolidated-index.md`: + +```markdown +# Consolidated Construction Artifacts + +Last updated: ${TIMESTAMP} + +## Integrated Units + +### ${UNIT_NAME} (by ${CURRENT_USER}) +- **Merged**: ${TIMESTAMP} +- **Branch**: unit/${UNIT_NAME}-${CURRENT_USER} +- **Artifacts**: [View](${UNIT_NAME}/) +- **Audit**: [View](../audit/user-${CURRENT_USER}-audit.md) + +## Pending Units + +${PENDING_UNITS_LIST} + +## Build and Test Status + +After all units integrated, proceed to Build and Test phase. +``` + +#### Step 4: Commit Consolidation + +```bash +git add aidlc-docs/construction/consolidated-index.md +git add aidlc-docs/construction/unit-assignments.md +git commit -m "AI-DLC: Consolidated unit ${UNIT_NAME} into main" +git push origin main +``` + +#### Step 5: Check All Units Complete + +```bash +# Count completed units vs total units +if [ ${COMPLETED_UNITS} -eq ${TOTAL_UNITS} ]; then + # Trigger Build and Test phase +fi +``` + +#### Step 6: Notify User + +**If more units pending**: +``` +✅ Unit Merged: ${UNIT_NAME} + +Progress: ${COMPLETED_UNITS}/${TOTAL_UNITS} units completed + +Pending units: +${PENDING_LIST} + +Waiting for team to complete remaining units... +``` + +**If all units complete**: +``` +✅ All Units Integrated! + +${TOTAL_UNITS}/${TOTAL_UNITS} units completed and merged. + +**Ready for Build and Test Phase** + +Proceed? [Yes/No] +``` + +## Audit Consolidation + +### Consolidated Audit View + +**MANDATORY**: After each unit merge, update `aidlc-docs/audit/consolidated-audit.md`: + +```markdown +# Consolidated Audit Trail + +Project: ${PROJECT_NAME} +Generated: ${TIMESTAMP} + +## Inception Phase +- **Lead**: ${INCEPTION_USER} +- **Completed**: ${INCEPTION_DATE} +- **Audit**: [View](user-${INCEPTION_USER}-audit.md) + +## Construction Phase + +### Unit: ${UNIT_NAME} +- **Developer**: ${DEVELOPER} +- **Started**: ${START_DATE} +- **Completed**: ${COMPLETE_DATE} +- **Audit**: [View](user-${DEVELOPER}-audit.md) + +### Unit: ${UNIT_NAME_2} +- **Developer**: ${DEVELOPER_2} +- **Started**: ${START_DATE_2} +- **Completed**: ${COMPLETE_DATE_2} +- **Audit**: [View](user-${DEVELOPER_2}-audit.md) + +## Build and Test Phase +- **Lead**: ${BUILD_USER} +- **Status**: ${BUILD_STATUS} +- **Audit**: [View](user-${BUILD_USER}-audit.md) +``` + +## Key Principles + +1. **User Isolation**: Each developer has their own audit trail +2. **Branch Isolation**: Each unit developed in separate branch +3. **Automatic Tracking**: All assignments and completions logged automatically +4. **Dependency Awareness**: System prevents merging units with incomplete dependencies +5. **Consolidated View**: Automatic indexing provides project-wide visibility +6. **Git-Native**: Uses standard git workflows familiar to developers + +## Integration with Existing Workflow + +### Modified Stages + +**Units Generation Stage**: Add consolidation setup after approval +**Construction Phase**: Execute per-unit in claimed branches +**Build and Test**: Execute only after all units consolidated + +### File Path Updates + +Replace all instances of: +- `aidlc-docs/audit.md` → `aidlc-docs/audit/user-${CURRENT_USER}-audit.md` +- Add branch creation after unit assignment +- Add consolidation after unit completion diff --git a/aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md b/aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md index db228c8b..15cae8e1 100644 --- a/aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md +++ b/aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md @@ -181,3 +181,73 @@ If the analysis in step 7 reveals ANY ambiguous answers, you MUST: - `unit-of-work-dependency.md` with dependency matrix - `unit-of-work-story-map.md` with story mappings - Units verified and ready for per-unit design stages + +## Step 20: Setup Multi-User Parallel Development + +**MANDATORY**: After user approval, execute multi-user setup: + +### Load Multi-User Workflow Rules + +Load `common/multi-user-parallel.md` and `common/multi-user-commands.md` for detailed steps. + +### Execute Setup + +1. **Create Unit Assignments Manifest**: + - Generate `aidlc-docs/construction/unit-assignments.md` + - Include all units from unit-of-work.md + - Add dependency information from unit-of-work-dependency.md + - Set all units to "Not Started" status + - Include instructions for claiming units + +2. **Commit Inception Artifacts**: + ```bash + git add aidlc-docs/inception/ + git add aidlc-docs/construction/unit-assignments.md + git commit -m "AI-DLC: Inception phase complete - ${NUM_UNITS} units ready for parallel development" + git push origin main + ``` + +3. **Present Unit Claiming Options**: + ``` + 🎯 Ready for Parallel Development + + ${NUM_UNITS} units are ready. Multiple developers can now work in parallel. + + **Your Options**: + + A) **Claim a unit now** (you will work on it immediately) + Available units: + ${UNIT_LIST_WITH_NUMBERS} + + B) **Enable team collaboration** (setup complete, others can claim units) + Share this command with your team: + kiro-cli chat "claim unit " + + C) **Continue solo** (work on all units yourself in sequence) + I'll guide you through each unit in dependency order. + ``` + +4. **Wait for User Choice**: + - If A: Execute unit claiming workflow (see multi-user-commands.md) + - If B: Present team collaboration instructions and exit + - If C: Continue to CONSTRUCTION PHASE with first unit + +### Team Collaboration Instructions (Option B) + +Present this message and exit: + +``` +✅ Multi-User Setup Complete! + +Your team can now work on units in parallel: + +**Team Members**: Use this command to claim a unit: +kiro-cli chat "claim unit " + +**Available Units**: See aidlc-docs/construction/unit-assignments.md + +**Integrator**: When units are complete, use: +kiro-cli chat "consolidate units" + +**Status Tracking**: Check unit-assignments.md for current status +```