opencode-vibe-spec-plugin 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +264 -0
  2. package/dist/agents/ask.d.ts +4 -0
  3. package/dist/agents/ask.d.ts.map +1 -0
  4. package/dist/agents/quality-gate.d.ts +55 -0
  5. package/dist/agents/quality-gate.d.ts.map +1 -0
  6. package/dist/agents/spec.d.ts +4 -0
  7. package/dist/agents/spec.d.ts.map +1 -0
  8. package/dist/agents/vibe.d.ts +4 -0
  9. package/dist/agents/vibe.d.ts.map +1 -0
  10. package/dist/config/agent-configs.d.ts +5 -0
  11. package/dist/config/agent-configs.d.ts.map +1 -0
  12. package/dist/config/constants.d.ts +136 -0
  13. package/dist/config/constants.d.ts.map +1 -0
  14. package/dist/config/types.d.ts +1799 -0
  15. package/dist/config/types.d.ts.map +1 -0
  16. package/dist/hooks/message-completed.d.ts +10 -0
  17. package/dist/hooks/message-completed.d.ts.map +1 -0
  18. package/dist/hooks/message-updated.d.ts +2 -0
  19. package/dist/hooks/message-updated.d.ts.map +1 -0
  20. package/dist/hooks/session-end.d.ts +9 -0
  21. package/dist/hooks/session-end.d.ts.map +1 -0
  22. package/dist/hooks/session-start.d.ts +9 -0
  23. package/dist/hooks/session-start.d.ts.map +1 -0
  24. package/dist/hooks/spec-lifecycle.d.ts +17 -0
  25. package/dist/hooks/spec-lifecycle.d.ts.map +1 -0
  26. package/dist/hooks/stop-requested.d.ts +9 -0
  27. package/dist/hooks/stop-requested.d.ts.map +1 -0
  28. package/dist/hooks/tool-execute-before.d.ts +8 -0
  29. package/dist/hooks/tool-execute-before.d.ts.map +1 -0
  30. package/dist/index.d.ts +4 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +2690 -0
  33. package/dist/quality/code-analyzer.d.ts +17 -0
  34. package/dist/quality/code-analyzer.d.ts.map +1 -0
  35. package/dist/quality/engine.d.ts +8 -0
  36. package/dist/quality/engine.d.ts.map +1 -0
  37. package/dist/quality/gate-controller.d.ts +52 -0
  38. package/dist/quality/gate-controller.d.ts.map +1 -0
  39. package/dist/quality/negative-indicators.d.ts +10 -0
  40. package/dist/quality/negative-indicators.d.ts.map +1 -0
  41. package/dist/quality/security-scanner.d.ts +12 -0
  42. package/dist/quality/security-scanner.d.ts.map +1 -0
  43. package/dist/spec/ears-parser.d.ts +96 -0
  44. package/dist/spec/ears-parser.d.ts.map +1 -0
  45. package/dist/spec/index.d.ts +17 -0
  46. package/dist/spec/index.d.ts.map +1 -0
  47. package/dist/spec/phase-gate.d.ts +45 -0
  48. package/dist/spec/phase-gate.d.ts.map +1 -0
  49. package/dist/spec/spec-manager.d.ts +111 -0
  50. package/dist/spec/spec-manager.d.ts.map +1 -0
  51. package/dist/spec/spec-templates.d.ts +35 -0
  52. package/dist/spec/spec-templates.d.ts.map +1 -0
  53. package/dist/spec/steering-integration.d.ts +42 -0
  54. package/dist/spec/steering-integration.d.ts.map +1 -0
  55. package/dist/spec/task-traceability.d.ts +49 -0
  56. package/dist/spec/task-traceability.d.ts.map +1 -0
  57. package/dist/store/session-store.d.ts +12 -0
  58. package/dist/store/session-store.d.ts.map +1 -0
  59. package/dist/subagents/shared/architect.d.ts +4 -0
  60. package/dist/subagents/shared/architect.d.ts.map +1 -0
  61. package/dist/subagents/shared/librarian.d.ts +4 -0
  62. package/dist/subagents/shared/librarian.d.ts.map +1 -0
  63. package/dist/subagents/shared/oracle.d.ts +4 -0
  64. package/dist/subagents/shared/oracle.d.ts.map +1 -0
  65. package/dist/subagents/shared/quality-analyzer.d.ts +4 -0
  66. package/dist/subagents/shared/quality-analyzer.d.ts.map +1 -0
  67. package/dist/subagents/shared/quality-metrics.d.ts +4 -0
  68. package/dist/subagents/shared/quality-metrics.d.ts.map +1 -0
  69. package/dist/subagents/shared/quality-reporter.d.ts +4 -0
  70. package/dist/subagents/shared/quality-reporter.d.ts.map +1 -0
  71. package/dist/subagents/shared/quality-reviewer.d.ts +4 -0
  72. package/dist/subagents/shared/quality-reviewer.d.ts.map +1 -0
  73. package/dist/subagents/spec/planner.d.ts +4 -0
  74. package/dist/subagents/spec/planner.d.ts.map +1 -0
  75. package/dist/subagents/spec/reviewer.d.ts +4 -0
  76. package/dist/subagents/spec/reviewer.d.ts.map +1 -0
  77. package/dist/subagents/vibe/explorer.d.ts +4 -0
  78. package/dist/subagents/vibe/explorer.d.ts.map +1 -0
  79. package/dist/subagents/vibe/inspirer.d.ts +4 -0
  80. package/dist/subagents/vibe/inspirer.d.ts.map +1 -0
  81. package/dist/utils/modeSwitcher.d.ts +8 -0
  82. package/dist/utils/modeSwitcher.d.ts.map +1 -0
  83. package/dist/utils/modelResolver.d.ts +9 -0
  84. package/dist/utils/modelResolver.d.ts.map +1 -0
  85. package/dist/utils/modelRouter.d.ts +6 -0
  86. package/dist/utils/modelRouter.d.ts.map +1 -0
  87. package/dist/utils/steeringLoader.d.ts +7 -0
  88. package/dist/utils/steeringLoader.d.ts.map +1 -0
  89. package/dist/utils/todoParser.d.ts +13 -0
  90. package/dist/utils/todoParser.d.ts.map +1 -0
  91. package/docs/spec.md +147 -0
  92. package/package.json +67 -0
@@ -0,0 +1,17 @@
1
+ import { COMPLEXITY_THRESHOLDS } from '../config/constants';
2
+ export interface CodeAnalysisMetrics {
3
+ cyclomaticComplexity: number;
4
+ cognitiveComplexity: number;
5
+ linesOfCode: number;
6
+ linesOfComments: number;
7
+ commentRatio: number;
8
+ duplicatedLines: number;
9
+ duplicationRatio: number;
10
+ functionCount: number;
11
+ classCount: number;
12
+ maxFunctionLength: number;
13
+ maxNestingDepth: number;
14
+ }
15
+ export declare function analyzeCode(output: string): CodeAnalysisMetrics;
16
+ export declare function getComplexityRating(metric: keyof typeof COMPLEXITY_THRESHOLDS, value: number): 'excellent' | 'good' | 'acceptable' | 'poor' | 'critical';
17
+ //# sourceMappingURL=code-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-analyzer.d.ts","sourceRoot":"","sources":["../../src/quality/code-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB;AAiMD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAqC/D;AAGD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,OAAO,qBAAqB,EAC1C,KAAK,EAAE,MAAM,GACZ,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAiB3D"}
@@ -0,0 +1,8 @@
1
+ import type { QualityScore, QualityMetrics, GateDecision } from '../config/types';
2
+ export declare class QualityEngine {
3
+ private config;
4
+ constructor(config?: Partial<QualityEngine['config']>);
5
+ collectMetrics(agentName: string, sessionId: string, output: string, executionTime: number, tokenUsage: number, toolsUsed: string[]): QualityMetrics;
6
+ makeDecision(score: QualityScore): GateDecision;
7
+ }
8
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/quality/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAoB,MAAM,iBAAiB,CAAC;AAiVpG,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAOZ;gBAEU,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAYrD,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,GAClB,cAAc;IA8EjB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY;CAsBhD"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Quality Gate Controller
3
+ *
4
+ * This module implements quality gates as workflow mechanisms for the spec-driven
5
+ * development process. It validates quality at each phase transition and provides
6
+ * feedback for improvement.
7
+ */
8
+ import type { GateDecision } from '../config/types';
9
+ /**
10
+ * Phase transition validation result
11
+ */
12
+ export interface PhaseValidationResult {
13
+ canAdvance: boolean;
14
+ score: number;
15
+ issues: string[];
16
+ decision: GateDecision;
17
+ }
18
+ /**
19
+ * Quality Gate Controller class
20
+ */
21
+ export declare class QualityGateController {
22
+ /**
23
+ * Validate if a phase transition is allowed
24
+ */
25
+ validatePhaseTransition(from: string, to: string, context: {
26
+ requirements?: string;
27
+ design?: string;
28
+ tasks?: string;
29
+ }): PhaseValidationResult;
30
+ /**
31
+ * Validate implementation quality
32
+ */
33
+ validateImplementation(code: string, standards?: {
34
+ minTestCoverage?: number;
35
+ maxComplexity?: number;
36
+ requireSecurityScan?: boolean;
37
+ }): PhaseValidationResult;
38
+ /**
39
+ * Validate deployment readiness
40
+ */
41
+ validateDeployment(context: {
42
+ testsPass?: boolean;
43
+ securityScanPassed?: boolean;
44
+ documentationComplete?: boolean;
45
+ }): PhaseValidationResult;
46
+ /**
47
+ * Generate quality report
48
+ */
49
+ generateReport(phase: string, validationResult: PhaseValidationResult): string;
50
+ }
51
+ export declare const qualityGateController: QualityGateController;
52
+ //# sourceMappingURL=gate-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-controller.d.ts","sourceRoot":"","sources":["../../src/quality/gate-controller.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQlE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,qBAAqB;IAChC;;OAEG;IACH,uBAAuB,CACrB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,OAAO,EAAE;QACP,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GACA,qBAAqB;IAYxB;;OAEG;IACH,sBAAsB,CACpB,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE;QACT,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC1B,GACL,qBAAqB;IAyCxB;;OAEG;IACH,kBAAkB,CAChB,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;KACjC,GACA,qBAAqB;IA6BxB;;OAEG;IACH,cAAc,CACZ,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,qBAAqB,GACtC,MAAM;CA8BV;AAGD,eAAO,MAAM,qBAAqB,uBAA8B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { NegativeIndicator } from '../config/types';
2
+ export declare const vibeNegativeIndicators: NegativeIndicator[];
3
+ export declare const specNegativeIndicators: NegativeIndicator[];
4
+ export declare const askNegativeIndicators: NegativeIndicator[];
5
+ export declare function getNegativeIndicators(agentName: string): NegativeIndicator[];
6
+ export declare function detectNegativeIndicators(output: string, agentName: string): {
7
+ indicator: NegativeIndicator;
8
+ matches: string[];
9
+ }[];
10
+ //# sourceMappingURL=negative-indicators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negative-indicators.d.ts","sourceRoot":"","sources":["../../src/quality/negative-indicators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAMrD,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAKrD,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAKpD,CAAC;AAGF,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAO5E;AAQD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB;IAAE,SAAS,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,CA2BvD"}
@@ -0,0 +1,12 @@
1
+ export type SecurityFinding = {
2
+ pattern: string;
3
+ severity: 'critical' | 'high' | 'medium' | 'low';
4
+ location?: string;
5
+ cwe?: string;
6
+ owasp?: string;
7
+ recommendation: string;
8
+ };
9
+ export declare function scanSecurity(output: string): SecurityFinding[];
10
+ export declare function getSecurityPenalty(findings: SecurityFinding[]): number;
11
+ export declare function hasSecurityIssues(findings: SecurityFinding[]): boolean;
12
+ //# sourceMappingURL=security-scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-scanner.d.ts","sourceRoot":"","sources":["../../src/quality/security-scanner.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAeF,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE,CAwC9D;AAGD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,MAAM,CAWtE;AAGD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,OAAO,CAEtE"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * EARS/GEARS Parser - Parse and validate EARS/GEARS requirements notation
3
+ *
4
+ * EARS (Easy Approach to Requirements Syntax):
5
+ * WHEN [trigger] THE SYSTEM SHALL [response]
6
+ *
7
+ * GEARS (Generalized EARS) Extension:
8
+ * WHEN [trigger] THE [component] SHALL [response]
9
+ *
10
+ * This module parses EARS/GEARS-formatted requirements from markdown,
11
+ * validates syntax, generates unique IDs, and formats requirements.
12
+ */
13
+ /**
14
+ * EARS requirement types
15
+ */
16
+ export type EarsType = 'WHEN' | 'WHILE' | 'WHERE' | 'IF_THEN';
17
+ /**
18
+ * Parsed EARS requirement
19
+ */
20
+ export interface EarsRequirement {
21
+ /** Unique requirement ID (e.g., REQ-001) */
22
+ id: string;
23
+ /** EARS type */
24
+ type: EarsType;
25
+ /** Trigger condition */
26
+ trigger: string;
27
+ /** System/component that shall respond */
28
+ system: string;
29
+ /** Expected response */
30
+ response: string;
31
+ /** Priority level */
32
+ priority: 'high' | 'medium' | 'low';
33
+ /** Acceptance criteria */
34
+ acceptanceCriteria: string[];
35
+ /** Original raw text */
36
+ raw: string;
37
+ /** Line number in source */
38
+ lineNumber: number;
39
+ }
40
+ /**
41
+ * EARS parse result
42
+ */
43
+ export interface EarsParseResult {
44
+ requirements: EarsRequirement[];
45
+ errors: EarsParseError[];
46
+ summary: {
47
+ total: number;
48
+ valid: number;
49
+ byType: Record<EarsType, number>;
50
+ byPriority: Record<string, number>;
51
+ };
52
+ }
53
+ /**
54
+ * EARS parse error
55
+ */
56
+ export interface EarsParseError {
57
+ line: number;
58
+ message: string;
59
+ raw: string;
60
+ }
61
+ /**
62
+ * Parse EARS/GEARS requirements from markdown content
63
+ */
64
+ export declare function parseEars(content: string): EarsParseResult;
65
+ /**
66
+ * Validate an EARS requirement for completeness
67
+ */
68
+ export declare function validateEarsRequirement(req: EarsRequirement): {
69
+ valid: boolean;
70
+ issues: string[];
71
+ };
72
+ /**
73
+ * Format a requirement to EARS notation
74
+ */
75
+ export declare function formatToEars(req: EarsRequirement): string;
76
+ /**
77
+ * Generate a formatted markdown requirements section from parsed EARS
78
+ */
79
+ export declare function formatRequirementsDoc(requirements: EarsRequirement[]): string;
80
+ /**
81
+ * Generate a unique requirement ID
82
+ */
83
+ export declare function generateRequirementId(index: number): string;
84
+ /**
85
+ * Count EARS requirements in content
86
+ */
87
+ export declare function countEarsRequirements(content: string): number;
88
+ /**
89
+ * Check if content contains valid EARS format
90
+ */
91
+ export declare function hasEarsFormat(content: string): boolean;
92
+ /**
93
+ * Get EARS compliance percentage
94
+ */
95
+ export declare function getEarsCompliance(content: string): number;
96
+ //# sourceMappingURL=ears-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ears-parser.d.ts","sourceRoot":"","sources":["../../src/spec/ears-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB;IAChB,IAAI,EAAE,QAAQ,CAAC;IACf,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpC,0BAA0B;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,wBAAwB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CA0J1D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,eAAe,GAAG;IAC7D,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CA2BA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAGzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,eAAe,EAAE,GAAG,MAAM,CAwC7E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKzD"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Spec Module - Spec-driven development toolkit
3
+ *
4
+ * Exports all spec-related modules for the structured specification
5
+ * workflow with EARS/GEARS notation, phase-gated transitions, and
6
+ * task traceability.
7
+ */
8
+ export { SpecManager, specManager } from './spec-manager';
9
+ export type { SpecPhase, SpecMetadata, SpecDocument, SpecSummary, SpecValidationResult, } from './spec-manager';
10
+ export { parseEars, validateEarsRequirement, formatToEars, formatRequirementsDoc, generateRequirementId, countEarsRequirements, hasEarsFormat, getEarsCompliance, } from './ears-parser';
11
+ export type { EarsType, EarsRequirement, EarsParseResult, EarsParseError, } from './ears-parser';
12
+ export { generateRequirementsDoc, generateDesignDoc, generateTasksDoc, } from './spec-templates';
13
+ export type { SpecTemplateContext } from './spec-templates';
14
+ export { PhaseGateController, phaseGateController } from './phase-gate';
15
+ export { TaskTraceability, taskTraceability } from './task-traceability';
16
+ export { SteeringIntegration, steeringIntegration } from './steering-integration';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spec/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1D,YAAY,EACV,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,QAAQ,EACR,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Phase Gate Controller - Manage phase transitions in spec workflow
3
+ *
4
+ * Implements phase-gated workflow for the spec-driven development process.
5
+ * Validates that each phase meets quality criteria before advancement and
6
+ * requires explicit approval for transitions.
7
+ *
8
+ * Phase flow:
9
+ * requirements → design → tasks → implementation
10
+ *
11
+ * Backward transitions are always allowed:
12
+ * design → requirements (refine)
13
+ * tasks → design (refine)
14
+ */
15
+ import type { SpecDocument, SpecPhase, PhaseGateResult, PhaseTransition } from '../config/types';
16
+ export declare class PhaseGateController {
17
+ /**
18
+ * Check if a phase transition is allowed
19
+ */
20
+ canTransition(from: SpecPhase, to: SpecPhase): {
21
+ allowed: boolean;
22
+ transition: PhaseTransition | null;
23
+ };
24
+ /**
25
+ * Get valid transitions from a phase
26
+ */
27
+ getValidTransitions(from: SpecPhase): PhaseTransition[];
28
+ /**
29
+ * Get forward transitions from a phase (for advancement)
30
+ */
31
+ getForwardTransitions(from: SpecPhase): PhaseTransition[];
32
+ /**
33
+ * Validate if a spec can advance to the next phase
34
+ */
35
+ validatePhaseGate(spec: SpecDocument): PhaseGateResult;
36
+ /**
37
+ * Get approval requirements for a phase transition
38
+ */
39
+ getApprovalRequirements(from: SpecPhase, to: SpecPhase): {
40
+ requiresApproval: boolean;
41
+ rules: string[];
42
+ };
43
+ }
44
+ export declare const phaseGateController: PhaseGateController;
45
+ //# sourceMappingURL=phase-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase-gate.d.ts","sourceRoot":"","sources":["../../src/spec/phase-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;AA6DzB,qBAAa,mBAAmB;IAC9B;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,GAAG;QAC7C,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;KACpC;IAQD;;OAEG;IACH,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,EAAE;IAIvD;;OAEG;IACH,qBAAqB,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,EAAE;IAQzD;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe;IAmHtD;;OAEG;IACH,uBAAuB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,GAAG;QACvD,gBAAgB,EAAE,OAAO,CAAC;QAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB;CAWF;AAGD,eAAO,MAAM,mBAAmB,qBAA4B,CAAC"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Spec Manager - Persistent spec storage and lifecycle management
3
+ *
4
+ * Manages specification documents organized by feature, providing
5
+ * create/read/update/delete operations with file-based persistence
6
+ * under .opencode/specs/.
7
+ */
8
+ /**
9
+ * Spec workflow phases
10
+ */
11
+ export type SpecPhase = 'requirements' | 'design' | 'tasks' | 'implementation';
12
+ /**
13
+ * Spec metadata stored alongside spec content
14
+ */
15
+ export interface SpecMetadata {
16
+ featureName: string;
17
+ currentPhase: SpecPhase;
18
+ createdAt: Date;
19
+ updatedAt: Date;
20
+ workflow: 'requirements-first' | 'design-first';
21
+ steeringFiles: string[];
22
+ version: number;
23
+ }
24
+ /**
25
+ * Complete spec document with all phases
26
+ */
27
+ export interface SpecDocument {
28
+ metadata: SpecMetadata;
29
+ requirements: string;
30
+ design: string;
31
+ tasks: string;
32
+ }
33
+ /**
34
+ * Spec summary for listing
35
+ */
36
+ export interface SpecSummary {
37
+ featureName: string;
38
+ currentPhase: SpecPhase;
39
+ updatedAt: Date;
40
+ hasRequirements: boolean;
41
+ hasDesign: boolean;
42
+ hasTasks: boolean;
43
+ }
44
+ /**
45
+ * Validation result for spec operations
46
+ */
47
+ export interface SpecValidationResult {
48
+ valid: boolean;
49
+ errors: string[];
50
+ }
51
+ export declare class SpecManager {
52
+ private basePath;
53
+ constructor(basePath?: string);
54
+ /**
55
+ * Get the directory path for a specific feature
56
+ */
57
+ private getFeatureDir;
58
+ /**
59
+ * Get the metadata file path for a feature
60
+ */
61
+ private getMetadataPath;
62
+ /**
63
+ * Get a file path within a feature's spec directory
64
+ */
65
+ private getFilePath;
66
+ /**
67
+ * Ensure feature directory exists
68
+ */
69
+ private ensureDir;
70
+ /**
71
+ * Create a new spec for a feature
72
+ */
73
+ createSpec(featureName: string, workflow?: 'requirements-first' | 'design-first'): SpecDocument;
74
+ /**
75
+ * Load an existing spec
76
+ */
77
+ getSpec(featureName: string): SpecDocument | null;
78
+ /**
79
+ * Update spec content for a specific phase
80
+ */
81
+ updateSpec(featureName: string, updates: Partial<Pick<SpecDocument, 'requirements' | 'design' | 'tasks'>>): SpecDocument;
82
+ /**
83
+ * Delete a spec and all its files
84
+ */
85
+ deleteSpec(featureName: string): boolean;
86
+ /**
87
+ * List all specs with summaries
88
+ */
89
+ listSpecs(): SpecSummary[];
90
+ /**
91
+ * Advance spec to the next phase
92
+ */
93
+ advancePhase(featureName: string, phase: SpecPhase): SpecDocument;
94
+ /**
95
+ * Check if a spec exists for a feature
96
+ */
97
+ exists(featureName: string): boolean;
98
+ /**
99
+ * Get the base path used by this manager
100
+ */
101
+ getBasePath(): string;
102
+ /**
103
+ * Validate spec content before saving
104
+ */
105
+ validateSpec(spec: SpecDocument): SpecValidationResult;
106
+ private readFileIfExists;
107
+ private saveSpec;
108
+ }
109
+ export declare const specManager: SpecManager;
110
+ export default specManager;
111
+ //# sourceMappingURL=spec-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-manager.d.ts","sourceRoot":"","sources":["../../src/spec/spec-manager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,SAAS,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,oBAAoB,GAAG,cAAc,CAAC;IAChD,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,SAAS,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAOD,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,CAAC,EAAE,MAAM;IAI7B;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACH,OAAO,CAAC,SAAS;IAMjB;;OAEG;IACH,UAAU,CACR,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,oBAAoB,GAAG,cAAqC,GACrE,YAAY;IA+Bf;;OAEG;IACH,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IA0BjD;;OAEG;IACH,UAAU,CACR,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC,GACxE,YAAY;IAkBf;;OAEG;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAWxC;;OAEG;IACH,SAAS,IAAI,WAAW,EAAE;IAuC1B;;OAEG;IACH,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,YAAY;IAwBjE;;OAEG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAIpC;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,oBAAoB;IAmBtD,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,QAAQ;CAsBjB;AAGD,eAAO,MAAM,WAAW,aAAoB,CAAC;AAE7C,eAAe,WAAW,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Spec Templates - Generate structured spec documents
3
+ *
4
+ * Provides template generation for the three core spec phases:
5
+ * requirements, design, and tasks. Each template follows the
6
+ * EARS/GEARS notation format and includes necessary sections
7
+ * for quality validation.
8
+ */
9
+ import type { EarsRequirement } from '../config/types';
10
+ /**
11
+ * Context for spec template generation
12
+ */
13
+ export interface SpecTemplateContext {
14
+ featureName: string;
15
+ description?: string;
16
+ userStories?: string[];
17
+ businessGoals?: string[];
18
+ technologyStack?: string[];
19
+ constraints?: string[];
20
+ steeringGuidance?: string;
21
+ existingRequirements?: EarsRequirement[];
22
+ }
23
+ /**
24
+ * Generate a requirements document template
25
+ */
26
+ export declare function generateRequirementsDoc(context: SpecTemplateContext): string;
27
+ /**
28
+ * Generate a design document template
29
+ */
30
+ export declare function generateDesignDoc(requirements: string, context: SpecTemplateContext): string;
31
+ /**
32
+ * Generate a tasks document template
33
+ */
34
+ export declare function generateTasksDoc(requirements: string, design: string): string;
35
+ //# sourceMappingURL=spec-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-templates.d.ts","sourceRoot":"","sources":["../../src/spec/spec-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,iBAAiB,CAAC;AAGrE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,eAAe,EAAE,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CA+F5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,mBAAmB,GAC3B,MAAM,CA+GR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,MAAM,CA6DR"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Steering Integration - Integrate steering files with spec workflow
3
+ *
4
+ * Loads steering context (product.md, tech.md, structure.md) and applies
5
+ * it to spec generation, validation, and compliance checking.
6
+ * Integrates with the existing SteeringLoader for backward compatibility.
7
+ */
8
+ import type { SteeringContext, SpecDocument } from '../config/types';
9
+ export declare class SteeringIntegration {
10
+ private projectRoot;
11
+ private cachedContext;
12
+ constructor(projectRoot?: string);
13
+ /**
14
+ * Load steering context from project files
15
+ */
16
+ loadSteeringContext(): SteeringContext;
17
+ /**
18
+ * Invalidate cache to force re-reading steering files
19
+ */
20
+ invalidateCache(): void;
21
+ /**
22
+ * Get steering context formatted as a prompt supplement
23
+ */
24
+ getPromptContext(): string;
25
+ /**
26
+ * Apply steering constraints to a spec
27
+ */
28
+ applySteeringToSpec(spec: SpecDocument): SpecDocument;
29
+ /**
30
+ * Validate spec compliance against steering guidelines
31
+ */
32
+ validateSpecAgainstSteering(spec: SpecDocument): {
33
+ compliant: boolean;
34
+ issues: string[];
35
+ };
36
+ /**
37
+ * Check if steering context is available
38
+ */
39
+ hasSteeringContext(): boolean;
40
+ }
41
+ export declare const steeringIntegration: SteeringIntegration;
42
+ //# sourceMappingURL=steering-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steering-integration.d.ts","sourceRoot":"","sources":["../../src/spec/steering-integration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA2CrE,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,aAAa,CAAgC;gBAEzC,WAAW,CAAC,EAAE,MAAM;IAIhC;;OAEG;IACH,mBAAmB,IAAI,eAAe;IAqDtC;;OAEG;IACH,eAAe,IAAI,IAAI;IAIvB;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAmC1B;;OAEG;IACH,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY;IAiCrD;;OAEG;IACH,2BAA2B,CAAC,IAAI,EAAE,YAAY,GAAG;QAC/C,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB;IA0CD;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAI9B;AAGD,eAAO,MAAM,mBAAmB,qBAA4B,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Task Traceability - Link requirements to implementation tasks
3
+ *
4
+ * Manages bidirectional traceability between EARS requirements and
5
+ * implementation tasks. Supports linking, querying, and generating
6
+ * traceability matrices to ensure complete requirement coverage.
7
+ */
8
+ import type { TaskTraceabilityLink, TraceabilityMatrix, EarsRequirement } from '../config/types';
9
+ export declare class TaskTraceability {
10
+ private links;
11
+ /**
12
+ * Link a requirement to a task
13
+ */
14
+ linkRequirementToTask(requirementId: string, taskId: string, coverage?: 'full' | 'partial', notes?: string): TaskTraceabilityLink;
15
+ /**
16
+ * Get all requirements linked to a task
17
+ */
18
+ getRequirementsForTask(taskId: string): EarsRequirement[];
19
+ /**
20
+ * Get all tasks linked to a requirement
21
+ */
22
+ getTasksForRequirement(requirementId: string): string[];
23
+ /**
24
+ * Parse and link tasks from a tasks document
25
+ */
26
+ parseAndLinkTasks(tasksContent: string, requirementsContent: string): TaskTraceabilityLink[];
27
+ /**
28
+ * Generate a full traceability matrix
29
+ */
30
+ generateTraceabilityMatrix(featureName: string, requirementsContent: string, tasksContent: string): TraceabilityMatrix;
31
+ /**
32
+ * Calculate traceability coverage percentage
33
+ */
34
+ calculateCoverage(matrix: TraceabilityMatrix): {
35
+ requirementCoverage: number;
36
+ taskCoverage: number;
37
+ overallCoverage: number;
38
+ };
39
+ /**
40
+ * Generate a markdown traceability report
41
+ */
42
+ generateReport(matrix: TraceabilityMatrix): string;
43
+ /**
44
+ * Clear all links (for reset)
45
+ */
46
+ clear(): void;
47
+ }
48
+ export declare const taskTraceability: TaskTraceability;
49
+ //# sourceMappingURL=task-traceability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-traceability.d.ts","sourceRoot":"","sources":["../../src/spec/task-traceability.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAGzB,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,KAAK,CAA6D;IAE1E;;OAEG;IACH,qBAAqB,CACnB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,MAAM,GAAG,SAAkB,EACrC,KAAK,CAAC,EAAE,MAAM,GACb,oBAAoB;IAuBvB;;OAEG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE;IAiBzD;;OAEG;IACH,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE;IAOvD;;OAEG;IACH,iBAAiB,CACf,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,MAAM,GAC1B,oBAAoB,EAAE;IA2CzB;;OAEG;IACH,0BAA0B,CACxB,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,MAAM,GACnB,kBAAkB;IAsDrB;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG;QAC7C,mBAAmB,EAAE,MAAM,CAAC;QAC5B,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB;IAkBD;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IAkElD;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAGD,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Todo, TodoStore, AgentMode } from '../config/types';
2
+ export declare class SessionStore {
3
+ private store;
4
+ set(sessionId: string, todos: Todo[], agentMode: AgentMode): void;
5
+ get(sessionId: string): TodoStore | undefined;
6
+ has(sessionId: string): boolean;
7
+ delete(sessionId: string): void;
8
+ countUnfinished(sessionId: string): number;
9
+ getAllPending(sessionId: string): Todo[];
10
+ cleanup(): void;
11
+ }
12
+ //# sourceMappingURL=session-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../src/store/session-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGlE,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAgC;IAE7C,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAcjE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI7C,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI/B,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI/B,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAO1C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE;IAOxC,OAAO,IAAI,IAAI;CAShB"}
@@ -0,0 +1,4 @@
1
+ import type { AgentConfig } from '../../config/types';
2
+ export declare const architectConfig: AgentConfig;
3
+ export declare const architectPrompt = "You are ARCHITECT - a dependency and system design specialist.\n\nYOUR EXPERTISE:\n- Dependency analysis and conflicts\n- Import patterns and module relationships\n- System architecture evaluation\n- Integration complexity assessment\n\nWORKFLOW:\n1. Analyze package.json / requirements / dependencies\n2. Map import patterns across codebase\n3. Check for version conflicts or deprecated packages\n4. Assess system boundaries\n\nOUTPUT FORMAT:\n# \uD83C\uDFD7\uFE0F Architecture Report\n\n## Dependencies Analysis\n- **Core Libraries**: [List with versions]\n- **Dev Dependencies**: [Testing, build tools]\n- **Peer Dependencies**: [Compatibility requirements]\n\n## Import Patterns\n- **Common Imports**: [Most used modules]\n- **Circular Dependencies**: [If any found]\n- **Unused Dependencies**: [Potential cleanup]\n\n## System Boundaries\n- **External APIs**: [Services integrated]\n- **Database/Storage**: [Data layer]\n- **Authentication**: [Auth mechanism]\n\n## Risk Assessment\n- **Version Conflicts**: [Issues]\n- **Deprecated Packages**: [Needs update]\n- **Security Concerns**: [Vulnerabilities]";
4
+ //# sourceMappingURL=architect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architect.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/architect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,WAc7B,CAAC;AAEF,eAAO,MAAM,eAAe,ylCAmCe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AgentConfig } from '../../config/types';
2
+ export declare const librarianConfig: AgentConfig;
3
+ export declare const librarianPrompt = "You are LIBRARIAN - a documentation and codebase research specialist.\n\nYOUR EXPERTISE:\n- Find official documentation (Context7)\n- Search GitHub for implementation examples (codesearch)\n- Map project structure and entry points\n- Identify tech stack and frameworks\n\nWORKFLOW:\n1. ALWAYS check context7 first for detected libraries\n2. Use codesearch for real-world usage patterns\n3. List project structure with glob\n4. Return structured findings\n\nOUTPUT FORMAT:\n# \uD83D\uDCDA Librarian Report\n\n## Tech Stack Detected\n- **Framework**: [Name + Version]\n- **Language**: [TypeScript/Python/etc.]\n- **Key Libraries**: [List with Context7 links]\n\n## Project Structure\n- **Entry Point**: [Main file]\n- **Core Directories**: [src/, lib/, etc.]\n- **Config Files**: [package.json, tsconfig.json, etc.]\n\n## Documentation Resources\n- Context7 Libraries: [List of libraries with docs available]\n- GitHub Examples: [Patterns found via codesearch]\n\n## Recommendations\n- [What should the primary agent know?]\n- [Any missing dependencies?]";
4
+ //# sourceMappingURL=librarian.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"librarian.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/librarian.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,WAiB7B,CAAC;AAEF,eAAO,MAAM,eAAe,iiCAiCE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AgentConfig } from '../../config/types';
2
+ export declare const oracleConfig: AgentConfig;
3
+ export declare const oraclePrompt = "You are ORACLE - a debugging and code architecture specialist.\n\nYOUR EXPERTISE:\n- Deep code analysis and understanding\n- Error pattern recognition\n- Architecture evaluation\n- Root cause analysis (not symptoms!)\n\nWORKFLOW:\n1. Read relevant source files thoroughly\n2. Analyze patterns and relationships\n3. Identify issues or architectural concerns\n4. Provide specific, actionable insights\n\nOUTPUT FORMAT:\n# \uD83D\uDD2E Oracle Analysis\n\n## Code Understanding\n- **File**: [path/to/file.ts]\n- **Purpose**: [What does this code do?]\n- **Key Functions**: [List important functions/classes]\n\n## Issues Found\n- **[SEVERITY: Critical/Warning/Info]** [Issue description]\n - Location: [File:Line]\n - Impact: [What could go wrong]\n - Fix: [Specific recommendation]\n\n## Architecture Assessment\n- **Patterns Used**: [Singleton, Factory, etc.]\n- **Coupling**: [High/Medium/Low]\n- **Recommendations**: [Improvements]";
4
+ //# sourceMappingURL=oracle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/oracle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,WAa1B,CAAC;AAEF,eAAO,MAAM,YAAY,26BA+Ba,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AgentConfig } from '../../config/types';
2
+ export declare const qualityAnalyzerConfig: AgentConfig;
3
+ export declare const qualityAnalyzerPrompt = "You are QUALITY ANALYZER - a specialized subagent for real-time quality analysis of agent outputs.\n\nYOUR MISSION:\nAnalyze agent outputs against quality dimensions, generate scores, and detect potential issues.\n\nWORKFLOW:\n\n### Step 1: Output Analysis\n1. **Read Output**: Analyze the agent's output content\n2. **Identify Patterns**: Detect code patterns, structure, and content\n3. **Extract Metrics**: Calculate quality metrics\n\n### Step 2: Dimension Scoring\n4. **Score Readability**: Evaluate code readability and structure\n5. **Score Feasibility**: Assess technical feasibility\n6. **Score Innovation**: Measure solution creativity\n7. **Score Completeness**: Check feature coverage\n\n### Step 3: Issue Detection\n8. **Detect Issues**: Identify quality problems and risks\n9. **Classify Severity**: Categorize issues by severity level\n10. **Generate Report**: Create detailed analysis report\n\nANALYSIS DIMENSIONS:\n\n### Code Readability\n- Naming conventions (camelCase, PascalCase)\n- Comment quality and coverage\n- Code structure and organization\n- Documentation completeness\n\n### Technical Feasibility\n- Dependency management\n- Architecture\u5408\u7406\u6027\n- Performance considerations\n- Error handling\n\n### Innovation\n- Solution creativity\n- Alternative approaches\n- Unique value proposition\n- Problem-solving approach\n\n### Completeness\n- Feature coverage\n- Error handling\n- Edge cases\n- Testing considerations\n\nOUTPUT FORMAT:\n# Quality Analysis Report\n\n## Output Being Analyzed\n```\n[Agent output to analyze]\n```\n\n## Quality Scores\n- **Readability**: [1-10]\n- **Feasibility**: [1-10]\n- **Innovation**: [1-10]\n- **Completeness**: [1-10]\n- **Overall**: [1-10]\n\n## Issues Found\n### High Severity\n- [Issue 1]\n- [Issue 2]\n\n### Medium Severity\n- [Issue 1]\n- [Issue 2]\n\n### Low Severity\n- [Issue 1]\n- [Issue 2]\n\n## Metrics\n- **Code Blocks**: [count]\n- **Comments**: [count]\n- **Lines of Code**: [count]\n- **Complexity**: [Low/Medium/High]\n\n## Recommendations\n1. [Recommendation 1]\n2. [Recommendation 2]\n3. [Recommendation 3]\n\nANALYSIS RULES:\n1. **Evidence-Based**: All scores must be based on concrete evidence\n2. **Specific**: Provide specific examples for issues\n3. **Actionable**: Give concrete improvement suggestions\n4. **Consistent**: Apply standards uniformly\n5. **Transparent**: Explain scoring rationale\n\nSCORING GUIDE:\n- **9-10**: Excellent, exceeds standards\n- **7-8**: Good, meets standards\n- **5-6**: Acceptable, needs improvement\n- **3-4**: Poor, significant issues\n- **1-2**: Critical, major problems\n\nISSUE CLASSIFICATION:\n- **High**: Blocks promotion, requires immediate fix\n- **Medium**: Should be fixed, affects quality\n- **Low**: Nice to have, minor improvements\n\n=== ANALYSIS PATTERN ===\n\n**Analyze**: Read and understand the output\n**Score**: Calculate quality dimensions\n**Detect**: Identify issues and risks\n**Report**: Generate actionable feedback\n\n=== RULES ===\n- Be objective and evidence-based\n- Provide specific examples\n- Focus on actionable improvements\n- Apply standards consistently\n- Explain scoring rationale";
4
+ //# sourceMappingURL=quality-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-analyzer.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/quality-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,qBAAqB,EAAE,WAenC,CAAC;AAEF,eAAO,MAAM,qBAAqB,slGAuHN,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AgentConfig } from '../../config/types';
2
+ export declare const qualityMetricsConfig: AgentConfig;
3
+ export declare const qualityMetricsPrompt = "You are QUALITY METRICS - a specialized subagent for collecting and aggregating quality metrics.\n\nYOUR MISSION:\nCollect quality metrics, generate statistics, track trends, and provide data-driven insights.\n\nWORKFLOW:\n\n### Step 1: Metrics Collection\n1. **Collect Data**: Gather quality metrics from assessments\n2. **Normalize Data**: Standardize metrics for comparison\n3. **Store Metrics**: Save metrics for trend analysis\n\n### Step 2: Statistical Analysis\n4. **Calculate Statistics**: Generate mean, median, percentiles\n5. **Identify Trends**: Detect patterns and changes\n6. **Compare Performance**: Benchmark against standards\n\n### Step 3: Reporting\n7. **Generate Reports**: Create statistical summaries\n8. **Provide Insights**: Offer data-driven recommendations\n\nMETRICS CATEGORIES:\n\n### Quality Metrics\n- **Overall Score**: Average quality score\n- **Dimension Scores**: Readability, feasibility, innovation, completeness\n- **Issue Counts**: High, medium, low severity issues\n- **Improvement Rate**: Quality improvement over time\n\n### Performance Metrics\n- **Execution Time**: Time to complete quality assessment\n- **Token Usage**: Tokens consumed in assessment\n- **Tools Used**: Number and types of tools used\n- **Efficiency Score**: Quality per token ratio\n\n### Trend Metrics\n- **Quality Trend**: Quality scores over time\n- **Issue Trend**: Issues found over time\n- **Improvement Trend**: Improvements implemented over time\n- **Consistency Trend**: Standard compliance over time\n\nOUTPUT FORMAT:\n# Quality Metrics Report\n\n## Summary Statistics\n- **Total Assessments**: [count]\n- **Average Score**: [score]\n- **Score Range**: [min] - [max]\n- **Standard Deviation**: [value]\n\n## Quality Scores\n### Overall\n- **Mean**: [score]\n- **Median**: [score]\n- **Percentile 25**: [score]\n- **Percentile 75**: [score]\n\n### By Dimension\n| Dimension | Mean | Median | Min | Max |\n|-----------|------|--------|-----|-----|\n| Readability | [score] | [score] | [score] | [score] |\n| Feasibility | [score] | [score] | [score] | [score] |\n| Innovation | [score] | [score] | [score] | [score] |\n| Completeness | [score] | [score] | [score] | [score] |\n\n## Trend Analysis\n### Quality Trend\n- **Last 7 Days**: [trend]\n- **Last 30 Days**: [trend]\n- **Overall Trend**: [improving/stable/declining]\n\n### Issue Trend\n- **High Severity**: [count] ([trend])\n- **Medium Severity**: [count] ([trend])\n- **Low Severity**: [count] ([trend])\n\n## Performance Metrics\n- **Average Execution Time**: [time]\n- **Total Token Usage**: [tokens]\n- **Average Tokens per Assessment**: [tokens]\n- **Efficiency Score**: [score]\n\n## Insights\n1. [Insight 1]\n2. [Insight 2]\n3. [Insight 3]\n\n## Recommendations\n1. [Recommendation 1]\n2. [Recommendation 2]\n3. [Recommendation 3]\n\nMETRICS RULES:\n1. **Accurate**: Ensure metrics are calculated correctly\n2. **Consistent**: Use standardized calculations\n3. **Timely**: Update metrics in real-time\n4. **Actionable**: Provide insights that drive improvement\n5. **Transparent**: Explain methodology clearly\n\nTREND ANALYSIS:\n- **Improving**: Quality scores increasing over time\n- **Stable**: Quality scores consistent over time\n- **Declining**: Quality scores decreasing over time\n\nINSIGHT TYPES:\n- **Performance**: Efficiency and speed insights\n- **Quality**: Output quality insights\n- **Trends**: Pattern and trend insights\n- **Recommendations**: Actionable improvement suggestions\n\n=== METRICS PATTERN ===\n\n**Collect**: Gather quality data\n**Analyze**: Calculate statistics and trends\n**Report**: Generate insights and recommendations\n**Improve**: Drive data-driven improvements\n\n=== RULES ===\n- Ensure accuracy in calculations\n- Use standardized methodologies\n- Provide actionable insights\n- Update metrics in real-time\n- Explain methodology clearly";
4
+ //# sourceMappingURL=quality-metrics.d.ts.map