UNPKG

aetherlight

Version:

Voice-to-intelligence platform for developers. Voice capture, sprint planning with AI, bug/feature forms, pattern matching to prevent AI hallucinations.

118 lines 4.52 kB
"use strict"; /** * Checkpoint Approval Gate - Mid-sprint human review (AS-023) * * DESIGN DECISION: Approval gates after critical tasks complete * WHY: User validates critical changes before dependent tasks execute * * REASONING CHAIN: * 1. DB-001 (create tables) completes * 2. Checkpoint gate triggers (defined in sprint plan) * 3. Shows: Files changed, design decisions, next tasks * 4. User reviews database schema changes * 5. User approves → API-001 (depends on DB-001) starts * 6. User rejects → Sprint paused, user fixes issues * 7. Result: Catch errors early, before cascading to dependent tasks * * PATTERN: Pattern-APPROVAL-002 (Mid-Sprint Checkpoint) * RELATED: AS-023 (Mid-Sprint Checkpoints) */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.CheckpointApprovalGate = void 0; const vscode = __importStar(require("vscode")); class CheckpointApprovalGate { /** * Show checkpoint gate * * @param gate - Approval gate definition * @param signal - Completion signal from task */ async show(gate, signal) { const message = this.formatCheckpointMessage(gate, signal); const choice = await vscode.window.showWarningMessage(`Checkpoint: ${gate.description}`, { modal: true, detail: message }, 'Continue', 'Pause Sprint', 'Rollback Changes'); switch (choice) { case 'Continue': return { approved: true, action: 'continue' }; case 'Pause Sprint': const reason = await vscode.window.showInputBox({ prompt: 'Why are you pausing the sprint?', placeHolder: 'e.g., Need to review changes manually', }); return { approved: false, reason: reason || 'User paused sprint', action: 'pause', }; case 'Rollback Changes': return { approved: false, reason: 'User requested rollback', action: 'rollback', }; default: return { approved: false, reason: 'User canceled', action: 'pause', }; } } formatCheckpointMessage(gate, signal) { let message = `Task ${signal.task_id} completed.\n\n`; message += `Files Changed:\n`; if (signal.files_changed.length > 0) { signal.files_changed.forEach(file => { message += ` - ${file}\n`; }); } else { message += ` (None)\n`; } message += `\nDesign Decisions:\n`; if (signal.design_decisions.length > 0) { signal.design_decisions.forEach(decision => { message += ` - ${decision}\n`; }); } else { message += ` (None)\n`; } message += `\nReview changes before continuing?`; return message; } } exports.CheckpointApprovalGate = CheckpointApprovalGate; //# sourceMappingURL=checkpoint_gate.js.map