ai-sdlc 0.1.0-alpha.1

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 (96) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +847 -0
  3. package/dist/agents/implementation.d.ts +11 -0
  4. package/dist/agents/implementation.d.ts.map +1 -0
  5. package/dist/agents/implementation.js +123 -0
  6. package/dist/agents/implementation.js.map +1 -0
  7. package/dist/agents/index.d.ts +7 -0
  8. package/dist/agents/index.d.ts.map +1 -0
  9. package/dist/agents/index.js +8 -0
  10. package/dist/agents/index.js.map +1 -0
  11. package/dist/agents/planning.d.ts +9 -0
  12. package/dist/agents/planning.d.ts.map +1 -0
  13. package/dist/agents/planning.js +84 -0
  14. package/dist/agents/planning.js.map +1 -0
  15. package/dist/agents/refinement.d.ts +10 -0
  16. package/dist/agents/refinement.d.ts.map +1 -0
  17. package/dist/agents/refinement.js +98 -0
  18. package/dist/agents/refinement.js.map +1 -0
  19. package/dist/agents/research.d.ts +16 -0
  20. package/dist/agents/research.d.ts.map +1 -0
  21. package/dist/agents/research.js +141 -0
  22. package/dist/agents/research.js.map +1 -0
  23. package/dist/agents/review.d.ts +24 -0
  24. package/dist/agents/review.d.ts.map +1 -0
  25. package/dist/agents/review.js +740 -0
  26. package/dist/agents/review.js.map +1 -0
  27. package/dist/agents/rework.d.ts +17 -0
  28. package/dist/agents/rework.d.ts.map +1 -0
  29. package/dist/agents/rework.js +139 -0
  30. package/dist/agents/rework.js.map +1 -0
  31. package/dist/agents/state-assessor.d.ts +21 -0
  32. package/dist/agents/state-assessor.d.ts.map +1 -0
  33. package/dist/agents/state-assessor.js +29 -0
  34. package/dist/agents/state-assessor.js.map +1 -0
  35. package/dist/cli/commands.d.ts +87 -0
  36. package/dist/cli/commands.d.ts.map +1 -0
  37. package/dist/cli/commands.js +1183 -0
  38. package/dist/cli/commands.js.map +1 -0
  39. package/dist/cli/formatting.d.ts +68 -0
  40. package/dist/cli/formatting.d.ts.map +1 -0
  41. package/dist/cli/formatting.js +194 -0
  42. package/dist/cli/formatting.js.map +1 -0
  43. package/dist/cli/runner.d.ts +57 -0
  44. package/dist/cli/runner.d.ts.map +1 -0
  45. package/dist/cli/runner.js +272 -0
  46. package/dist/cli/runner.js.map +1 -0
  47. package/dist/cli/story-utils.d.ts +19 -0
  48. package/dist/cli/story-utils.d.ts.map +1 -0
  49. package/dist/cli/story-utils.js +44 -0
  50. package/dist/cli/story-utils.js.map +1 -0
  51. package/dist/cli/table-renderer.d.ts +22 -0
  52. package/dist/cli/table-renderer.d.ts.map +1 -0
  53. package/dist/cli/table-renderer.js +159 -0
  54. package/dist/cli/table-renderer.js.map +1 -0
  55. package/dist/core/auth.d.ts +39 -0
  56. package/dist/core/auth.d.ts.map +1 -0
  57. package/dist/core/auth.js +128 -0
  58. package/dist/core/auth.js.map +1 -0
  59. package/dist/core/client.d.ts +73 -0
  60. package/dist/core/client.d.ts.map +1 -0
  61. package/dist/core/client.js +140 -0
  62. package/dist/core/client.js.map +1 -0
  63. package/dist/core/config.d.ts +48 -0
  64. package/dist/core/config.d.ts.map +1 -0
  65. package/dist/core/config.js +330 -0
  66. package/dist/core/config.js.map +1 -0
  67. package/dist/core/kanban.d.ts +34 -0
  68. package/dist/core/kanban.d.ts.map +1 -0
  69. package/dist/core/kanban.js +253 -0
  70. package/dist/core/kanban.js.map +1 -0
  71. package/dist/core/story.d.ts +91 -0
  72. package/dist/core/story.d.ts.map +1 -0
  73. package/dist/core/story.js +349 -0
  74. package/dist/core/story.js.map +1 -0
  75. package/dist/core/theme.d.ts +17 -0
  76. package/dist/core/theme.d.ts.map +1 -0
  77. package/dist/core/theme.js +136 -0
  78. package/dist/core/theme.js.map +1 -0
  79. package/dist/core/workflow-state.d.ts +56 -0
  80. package/dist/core/workflow-state.d.ts.map +1 -0
  81. package/dist/core/workflow-state.js +162 -0
  82. package/dist/core/workflow-state.js.map +1 -0
  83. package/dist/index.d.ts +3 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +103 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/types/index.d.ts +228 -0
  88. package/dist/types/index.d.ts.map +1 -0
  89. package/dist/types/index.js +38 -0
  90. package/dist/types/index.js.map +1 -0
  91. package/dist/types/workflow-state.d.ts +54 -0
  92. package/dist/types/workflow-state.d.ts.map +1 -0
  93. package/dist/types/workflow-state.js +5 -0
  94. package/dist/types/workflow-state.js.map +1 -0
  95. package/package.json +71 -0
  96. package/templates/story.md +35 -0
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Workflow state persistence for resume functionality
3
+ *
4
+ * This module provides functions to save, load, and validate workflow execution state,
5
+ * enabling the --continue flag to resume workflows after interruption.
6
+ */
7
+ import { WorkflowExecutionState, WorkflowStateValidationResult } from '../types/workflow-state.js';
8
+ /**
9
+ * Get the path to the workflow state file
10
+ */
11
+ export declare function getStateFilePath(sdlcRoot: string): string;
12
+ /**
13
+ * Generate a unique workflow ID based on timestamp
14
+ */
15
+ export declare function generateWorkflowId(): string;
16
+ /**
17
+ * Calculate SHA-256 hash of story content for change detection
18
+ */
19
+ export declare function calculateStoryHash(storyPath: string): string;
20
+ /**
21
+ * Save workflow state to disk atomically
22
+ *
23
+ * Uses write-file-atomic to ensure state file is never corrupted by crashes.
24
+ *
25
+ * @param state - The workflow execution state to save
26
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
27
+ */
28
+ export declare function saveWorkflowState(state: WorkflowExecutionState, sdlcRoot: string): Promise<void>;
29
+ /**
30
+ * Load workflow state from disk
31
+ *
32
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
33
+ * @returns The workflow state, or null if no state file exists
34
+ */
35
+ export declare function loadWorkflowState(sdlcRoot: string): Promise<WorkflowExecutionState | null>;
36
+ /**
37
+ * Validate workflow state structure
38
+ *
39
+ * @param state - The state object to validate
40
+ * @returns Validation result with errors and warnings
41
+ */
42
+ export declare function validateWorkflowState(state: any): WorkflowStateValidationResult;
43
+ /**
44
+ * Clear workflow state (delete the state file)
45
+ *
46
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
47
+ */
48
+ export declare function clearWorkflowState(sdlcRoot: string): Promise<void>;
49
+ /**
50
+ * Check if workflow state exists
51
+ *
52
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
53
+ * @returns True if state file exists
54
+ */
55
+ export declare function hasWorkflowState(sdlcRoot: string): boolean;
56
+ //# sourceMappingURL=workflow-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-state.d.ts","sourceRoot":"","sources":["../../src/core/workflow-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAE9B,MAAM,4BAA4B,CAAC;AAKpC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CA6BxC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,GAAG,6BAA6B,CAyC/E;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWxE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG1D"}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Workflow state persistence for resume functionality
3
+ *
4
+ * This module provides functions to save, load, and validate workflow execution state,
5
+ * enabling the --continue flag to resume workflows after interruption.
6
+ */
7
+ import fs from 'fs';
8
+ import path from 'path';
9
+ import crypto from 'crypto';
10
+ import writeFileAtomic from 'write-file-atomic';
11
+ const STATE_FILE_NAME = '.workflow-state.json';
12
+ const CURRENT_VERSION = '1.0';
13
+ /**
14
+ * Get the path to the workflow state file
15
+ */
16
+ export function getStateFilePath(sdlcRoot) {
17
+ return path.join(sdlcRoot, STATE_FILE_NAME);
18
+ }
19
+ /**
20
+ * Generate a unique workflow ID based on timestamp
21
+ */
22
+ export function generateWorkflowId() {
23
+ const timestamp = Date.now();
24
+ const random = crypto.randomBytes(4).toString('hex');
25
+ return `workflow-${timestamp}-${random}`;
26
+ }
27
+ /**
28
+ * Calculate SHA-256 hash of story content for change detection
29
+ */
30
+ export function calculateStoryHash(storyPath) {
31
+ try {
32
+ const content = fs.readFileSync(storyPath, 'utf-8');
33
+ return crypto.createHash('sha256').update(content).digest('hex');
34
+ }
35
+ catch (error) {
36
+ // If file doesn't exist or can't be read, return empty hash
37
+ return '';
38
+ }
39
+ }
40
+ /**
41
+ * Save workflow state to disk atomically
42
+ *
43
+ * Uses write-file-atomic to ensure state file is never corrupted by crashes.
44
+ *
45
+ * @param state - The workflow execution state to save
46
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
47
+ */
48
+ export async function saveWorkflowState(state, sdlcRoot) {
49
+ const statePath = getStateFilePath(sdlcRoot);
50
+ const stateJson = JSON.stringify(state, null, 2);
51
+ try {
52
+ // Ensure the directory exists
53
+ await fs.promises.mkdir(sdlcRoot, { recursive: true });
54
+ // Write atomically to prevent corruption
55
+ await writeFileAtomic(statePath, stateJson, { encoding: 'utf-8' });
56
+ }
57
+ catch (error) {
58
+ throw new Error(`Failed to save workflow state: ${error instanceof Error ? error.message : String(error)}`);
59
+ }
60
+ }
61
+ /**
62
+ * Load workflow state from disk
63
+ *
64
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
65
+ * @returns The workflow state, or null if no state file exists
66
+ */
67
+ export async function loadWorkflowState(sdlcRoot) {
68
+ const statePath = getStateFilePath(sdlcRoot);
69
+ try {
70
+ // Check if file exists
71
+ if (!fs.existsSync(statePath)) {
72
+ return null;
73
+ }
74
+ // Read and parse the state file
75
+ const content = await fs.promises.readFile(statePath, 'utf-8');
76
+ const state = JSON.parse(content);
77
+ // Validate the state
78
+ const validation = validateWorkflowState(state);
79
+ if (!validation.valid) {
80
+ throw new Error(`Invalid state file: ${validation.errors.join(', ')}`);
81
+ }
82
+ return state;
83
+ }
84
+ catch (error) {
85
+ if (error instanceof SyntaxError) {
86
+ throw new Error(`Corrupted workflow state file at ${statePath}. ` +
87
+ `Delete the file to start fresh: rm "${statePath}"`);
88
+ }
89
+ throw error;
90
+ }
91
+ }
92
+ /**
93
+ * Validate workflow state structure
94
+ *
95
+ * @param state - The state object to validate
96
+ * @returns Validation result with errors and warnings
97
+ */
98
+ export function validateWorkflowState(state) {
99
+ const errors = [];
100
+ const warnings = [];
101
+ // Check required fields
102
+ if (!state || typeof state !== 'object') {
103
+ errors.push('State must be an object');
104
+ return { valid: false, errors, warnings };
105
+ }
106
+ if (!state.version) {
107
+ errors.push('Missing required field: version');
108
+ }
109
+ else if (state.version !== CURRENT_VERSION) {
110
+ warnings.push(`State version ${state.version} differs from current version ${CURRENT_VERSION}`);
111
+ }
112
+ if (!state.workflowId) {
113
+ errors.push('Missing required field: workflowId');
114
+ }
115
+ if (!state.timestamp) {
116
+ errors.push('Missing required field: timestamp');
117
+ }
118
+ if (!Array.isArray(state.completedActions)) {
119
+ errors.push('completedActions must be an array');
120
+ }
121
+ if (!state.context || typeof state.context !== 'object') {
122
+ errors.push('Missing or invalid context object');
123
+ }
124
+ else {
125
+ if (!state.context.sdlcRoot) {
126
+ errors.push('Missing context.sdlcRoot');
127
+ }
128
+ }
129
+ return {
130
+ valid: errors.length === 0,
131
+ errors,
132
+ warnings,
133
+ };
134
+ }
135
+ /**
136
+ * Clear workflow state (delete the state file)
137
+ *
138
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
139
+ */
140
+ export async function clearWorkflowState(sdlcRoot) {
141
+ const statePath = getStateFilePath(sdlcRoot);
142
+ try {
143
+ if (fs.existsSync(statePath)) {
144
+ await fs.promises.unlink(statePath);
145
+ }
146
+ }
147
+ catch (error) {
148
+ // Ignore errors if file doesn't exist or can't be deleted
149
+ // This is a cleanup operation, not critical
150
+ }
151
+ }
152
+ /**
153
+ * Check if workflow state exists
154
+ *
155
+ * @param sdlcRoot - Path to the .agentic-sdlc directory
156
+ * @returns True if state file exists
157
+ */
158
+ export function hasWorkflowState(sdlcRoot) {
159
+ const statePath = getStateFilePath(sdlcRoot);
160
+ return fs.existsSync(statePath);
161
+ }
162
+ //# sourceMappingURL=workflow-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-state.js","sourceRoot":"","sources":["../../src/core/workflow-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAOhD,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAC/C,MAAM,eAAe,GAAyB,KAAK,CAAC;AAEpD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,OAAO,YAAY,SAAS,IAAI,MAAM,EAAE,CAAC;AAC3C,CAAC;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ACf,0DAA0D;QAC1D,4CAA4C;IAC9C,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,MAAM,SAAS,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC7C,OAAO,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import { init, status, add, run, details } from './cli/commands.js';
4
+ import { hasApiKey } from './core/auth.js';
5
+ import { loadConfig, saveConfig } from './core/config.js';
6
+ import { getThemedChalk } from './core/theme.js';
7
+ // Check for API key when running commands that need it
8
+ function checkApiKey() {
9
+ if (!hasApiKey()) {
10
+ const config = loadConfig();
11
+ const c = getThemedChalk(config);
12
+ console.log(c.warning('Warning: No API key found.'));
13
+ console.log(c.dim('Agent commands require authentication.'));
14
+ console.log(c.dim('Options:'));
15
+ console.log(c.dim(' 1. Sign in to Claude Code (credentials stored in Keychain)'));
16
+ console.log(c.dim(' 2. Set ANTHROPIC_API_KEY environment variable'));
17
+ console.log(c.dim('Get a key at: https://console.anthropic.com/'));
18
+ console.log();
19
+ return false;
20
+ }
21
+ return true;
22
+ }
23
+ const program = new Command();
24
+ program
25
+ .name('agentic-sdlc')
26
+ .description('Agent-first SDLC workflow manager')
27
+ .version('0.1.0');
28
+ program
29
+ .command('init')
30
+ .description('Initialize .agentic-sdlc folder structure')
31
+ .action(init);
32
+ program
33
+ .command('status')
34
+ .description('Show current board state')
35
+ .option('--active', 'Hide done stories from output')
36
+ .action((options) => status(options));
37
+ program
38
+ .command('add <title>')
39
+ .description('Add a new story to the backlog')
40
+ .action(add);
41
+ program
42
+ .command('details <id>')
43
+ .alias('d')
44
+ .description('Show detailed information about a story by ID or slug')
45
+ .action(details);
46
+ program
47
+ .command('run')
48
+ .description('Run the workflow (process next action)')
49
+ .option('--auto', 'Process all pending actions (combine with --story for full SDLC: refine → research → plan → implement → review)')
50
+ .option('--dry-run', 'Show what would be done without executing')
51
+ .option('--continue', 'Resume workflow from last checkpoint')
52
+ .option('--story <id-or-slug>', 'Target a specific story by ID or slug')
53
+ .option('--step <phase>', 'Run a specific phase (refine, research, plan, implement, review) - cannot be combined with --auto --story')
54
+ .option('--max-iterations <number>', 'Maximum retry iterations (default: infinite)')
55
+ .action((options) => {
56
+ if (!options.dryRun) {
57
+ checkApiKey();
58
+ }
59
+ return run(options);
60
+ });
61
+ program
62
+ .command('config')
63
+ .description('Manage configuration settings')
64
+ .argument('[key]', 'Configuration key to view or modify (e.g., "theme")')
65
+ .argument('[value]', 'Value to set (leave empty to view current value)')
66
+ .action((key, value) => {
67
+ const config = loadConfig();
68
+ const c = getThemedChalk(config);
69
+ // Show all config if no key provided
70
+ if (!key) {
71
+ console.log(c.bold('Current Configuration:'));
72
+ console.log(JSON.stringify(config, null, 2));
73
+ return;
74
+ }
75
+ // Handle theme configuration
76
+ if (key === 'theme') {
77
+ if (!value) {
78
+ console.log(c.info(`Current theme: ${config.theme}`));
79
+ console.log(c.dim('Available themes: auto, light, dark, none'));
80
+ return;
81
+ }
82
+ // Validate theme preference
83
+ const validThemes = ['auto', 'light', 'dark', 'none'];
84
+ if (!validThemes.includes(value)) {
85
+ console.log(c.error(`Invalid theme: ${value}`));
86
+ console.log(c.dim('Valid options: auto, light, dark, none'));
87
+ process.exit(1);
88
+ }
89
+ // Update theme
90
+ config.theme = value;
91
+ saveConfig(config);
92
+ // Get new themed chalk with updated config
93
+ const newC = getThemedChalk(config);
94
+ console.log(newC.success(`Theme updated to: ${value}`));
95
+ console.log(newC.dim('Theme changes take effect immediately.'));
96
+ }
97
+ else {
98
+ console.log(c.warning(`Unknown configuration key: ${key}`));
99
+ console.log(c.dim('Available keys: theme'));
100
+ }
101
+ });
102
+ program.parse();
103
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,uDAAuD;AACvD,SAAS,WAAW;IAClB,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,MAAM,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC,CAAC;QACnF,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IAED,O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C,CAAC,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,eAAe;QACf,MAAM,CAAC,KAAK,GAAG,KAAwB,CAAC;QACxC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnB,2CAA2C;QAC3C,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,KAAK,EAAE,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,228 @@
1
+ export type StoryStatus = 'backlog' | 'ready' | 'in-progress' | 'done';
2
+ export type StoryType = 'feature' | 'bug' | 'chore' | 'spike';
3
+ export type EffortEstimate = 'small' | 'medium' | 'large';
4
+ /**
5
+ * Source for loading filesystem-based settings from the Agent SDK.
6
+ * - `'user'` - Global user settings (`~/.claude/settings.json`)
7
+ * - `'project'` - Project settings (`.claude/settings.json` and CLAUDE.md)
8
+ * - `'local'` - Local settings (`.claude/settings.local.json`)
9
+ */
10
+ export type SettingSource = 'user' | 'project' | 'local';
11
+ /**
12
+ * Severity levels for review issues
13
+ */
14
+ export type ReviewIssueSeverity = 'blocker' | 'critical' | 'major' | 'minor';
15
+ /**
16
+ * Individual issue identified during review
17
+ */
18
+ export interface ReviewIssue {
19
+ severity: ReviewIssueSeverity;
20
+ category: string;
21
+ description: string;
22
+ file?: string;
23
+ line?: number;
24
+ suggestedFix?: string;
25
+ }
26
+ /**
27
+ * Review decision outcomes
28
+ */
29
+ export declare enum ReviewDecision {
30
+ APPROVED = "APPROVED",
31
+ REJECTED = "REJECTED",
32
+ FAILED = "FAILED"
33
+ }
34
+ /**
35
+ * Severity levels for review rejection
36
+ */
37
+ export declare enum ReviewSeverity {
38
+ LOW = "LOW",
39
+ MEDIUM = "MEDIUM",
40
+ HIGH = "HIGH",
41
+ CRITICAL = "CRITICAL"
42
+ }
43
+ /**
44
+ * Record of a single review attempt
45
+ */
46
+ export interface ReviewAttempt {
47
+ timestamp: string;
48
+ decision: ReviewDecision;
49
+ severity?: ReviewSeverity;
50
+ feedback: string;
51
+ blockers: string[];
52
+ codeReviewPassed: boolean;
53
+ securityReviewPassed: boolean;
54
+ poReviewPassed: boolean;
55
+ }
56
+ /**
57
+ * Record of a single refinement iteration
58
+ */
59
+ export interface RefinementIteration {
60
+ iteration: number;
61
+ agentType: string;
62
+ startedAt: string;
63
+ completedAt?: string;
64
+ reviewFeedback?: string;
65
+ result: 'success' | 'failed' | 'in_progress';
66
+ }
67
+ export interface StoryFrontmatter {
68
+ id: string;
69
+ title: string;
70
+ priority: number;
71
+ status: StoryStatus;
72
+ type: StoryType;
73
+ created: string;
74
+ updated?: string;
75
+ assignee?: string;
76
+ labels: string[];
77
+ estimated_effort?: EffortEstimate;
78
+ research_complete: boolean;
79
+ plan_complete: boolean;
80
+ implementation_complete: boolean;
81
+ reviews_complete: boolean;
82
+ pr_url?: string;
83
+ branch?: string;
84
+ last_error?: string;
85
+ refinement_iterations?: RefinementIteration[];
86
+ refinement_count?: number;
87
+ max_refinement_attempts?: number;
88
+ retry_count?: number;
89
+ max_retries?: number;
90
+ last_restart_reason?: string;
91
+ last_restart_timestamp?: string;
92
+ review_history?: ReviewAttempt[];
93
+ }
94
+ export interface Story {
95
+ path: string;
96
+ slug: string;
97
+ frontmatter: StoryFrontmatter;
98
+ content: string;
99
+ }
100
+ export type ActionType = 'refine' | 'research' | 'plan' | 'implement' | 'review' | 'rework' | 'create_pr' | 'move_to_done';
101
+ export interface Action {
102
+ type: ActionType;
103
+ storyId: string;
104
+ storyPath: string;
105
+ reason: string;
106
+ priority: number;
107
+ context?: any;
108
+ }
109
+ export interface StateAssessment {
110
+ backlogItems: Story[];
111
+ readyItems: Story[];
112
+ inProgressItems: Story[];
113
+ doneItems: Story[];
114
+ recommendedActions: Action[];
115
+ }
116
+ export type ThemePreference = 'auto' | 'light' | 'dark' | 'none';
117
+ export interface ThemeColors {
118
+ success: any;
119
+ error: any;
120
+ warning: any;
121
+ info: any;
122
+ dim: any;
123
+ bold: any;
124
+ backlog: any;
125
+ ready: any;
126
+ inProgress: any;
127
+ done: any;
128
+ phaseRefine: any;
129
+ phaseResearch: any;
130
+ phasePlan: any;
131
+ phaseImplement: any;
132
+ phaseVerify: any;
133
+ reviewAction: any;
134
+ phaseComplete: any;
135
+ }
136
+ export interface StageGateConfig {
137
+ requireApprovalBeforeImplementation: boolean;
138
+ requireApprovalBeforePR: boolean;
139
+ autoMergeOnApproval: boolean;
140
+ }
141
+ /**
142
+ * Refinement loop configuration
143
+ */
144
+ export interface RefinementConfig {
145
+ maxIterations: number;
146
+ escalateOnMaxAttempts: 'error' | 'manual' | 'skip';
147
+ enableCircuitBreaker: boolean;
148
+ }
149
+ /**
150
+ * Review flow configuration
151
+ */
152
+ export interface ReviewConfig {
153
+ maxRetries: number;
154
+ maxRetriesUpperBound: number;
155
+ autoCompleteOnApproval: boolean;
156
+ autoRestartOnRejection: boolean;
157
+ }
158
+ /**
159
+ * Timeout configuration for various operations
160
+ */
161
+ export interface TimeoutConfig {
162
+ /** Timeout for agent queries in milliseconds. @default 600000 (10 minutes) */
163
+ agentTimeout: number;
164
+ /** Timeout for build commands in milliseconds. @default 120000 (2 minutes) */
165
+ buildTimeout: number;
166
+ /** Timeout for test commands in milliseconds. @default 300000 (5 minutes) */
167
+ testTimeout: number;
168
+ }
169
+ export interface Config {
170
+ sdlcFolder: string;
171
+ stageGates: StageGateConfig;
172
+ refinement: RefinementConfig;
173
+ reviewConfig: ReviewConfig;
174
+ defaultLabels: string[];
175
+ theme: ThemePreference;
176
+ /** Command to run tests (e.g., 'npm test'). If set, runs before review. */
177
+ testCommand?: string;
178
+ /** Command to build/compile (e.g., 'npm run build'). If set, runs before review. */
179
+ buildCommand?: string;
180
+ /**
181
+ * Control which filesystem settings to load for the Agent SDK.
182
+ * - `'user'` - Global user settings (`~/.claude/settings.json`)
183
+ * - `'project'` - Project settings (`.claude/settings.json` and CLAUDE.md)
184
+ * - `'local'` - Local settings (`.claude/settings.local.json`)
185
+ *
186
+ * When omitted or empty array, no filesystem settings are loaded (SDK isolation mode).
187
+ * Must include `'project'` to automatically load CLAUDE.md files from `.claude/` directory.
188
+ *
189
+ * @default []
190
+ */
191
+ settingSources?: SettingSource[];
192
+ /**
193
+ * Timeout configuration for operations.
194
+ * All values are in milliseconds.
195
+ */
196
+ timeouts: TimeoutConfig;
197
+ }
198
+ export interface AgentResult {
199
+ success: boolean;
200
+ story: Story;
201
+ changesMade: string[];
202
+ error?: string;
203
+ }
204
+ /**
205
+ * Review-specific result with structured feedback
206
+ */
207
+ export interface ReviewResult extends AgentResult {
208
+ passed: boolean;
209
+ decision: ReviewDecision;
210
+ severity?: ReviewSeverity;
211
+ reviewType: 'code' | 'security' | 'product_owner' | 'combined';
212
+ issues: ReviewIssue[];
213
+ feedback: string;
214
+ }
215
+ /**
216
+ * Context for rework action
217
+ */
218
+ export interface ReworkContext {
219
+ reviewFeedback: ReviewResult;
220
+ targetPhase: 'research' | 'plan' | 'implement';
221
+ iteration: number;
222
+ }
223
+ export declare const KANBAN_FOLDERS: readonly ["backlog", "ready", "in-progress", "done"];
224
+ export type KanbanFolder = typeof KANBAN_FOLDERS[number];
225
+ export declare const STATUS_TO_FOLDER: Record<StoryStatus, KanbanFolder>;
226
+ export declare const FOLDER_TO_STATUS: Record<KanbanFolder, StoryStatus>;
227
+ export * from './workflow-state.js';
228
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC;AACvE,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC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,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,eAAe,GAAG,UAAU,CAAC;IAC/D,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,YAAY,CAAC;IAC7B,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,eAAO,MAAM,cAAc,sDAAuD,CAAC;AACnF,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAGzD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,CAK9D,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,WAAW,CAK9D,CAAC;AAGF,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Review decision outcomes
3
+ */
4
+ export var ReviewDecision;
5
+ (function (ReviewDecision) {
6
+ ReviewDecision["APPROVED"] = "APPROVED";
7
+ ReviewDecision["REJECTED"] = "REJECTED";
8
+ ReviewDecision["FAILED"] = "FAILED";
9
+ })(ReviewDecision || (ReviewDecision = {}));
10
+ /**
11
+ * Severity levels for review rejection
12
+ */
13
+ export var ReviewSeverity;
14
+ (function (ReviewSeverity) {
15
+ ReviewSeverity["LOW"] = "LOW";
16
+ ReviewSeverity["MEDIUM"] = "MEDIUM";
17
+ ReviewSeverity["HIGH"] = "HIGH";
18
+ ReviewSeverity["CRITICAL"] = "CRITICAL";
19
+ })(ReviewSeverity || (ReviewSeverity = {}));
20
+ // Kanban folder structure
21
+ export const KANBAN_FOLDERS = ['backlog', 'ready', 'in-progress', 'done'];
22
+ // Map status to folder
23
+ export const STATUS_TO_FOLDER = {
24
+ 'backlog': 'backlog',
25
+ 'ready': 'ready',
26
+ 'in-progress': 'in-progress',
27
+ 'done': 'done',
28
+ };
29
+ // Map folder to status
30
+ export const FOLDER_TO_STATUS = {
31
+ 'backlog': 'backlog',
32
+ 'ready': 'ready',
33
+ 'in-progress': 'in-progress',
34
+ 'done': 'done',
35
+ };
36
+ // Export workflow state types
37
+ export * from './workflow-state.js';
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AA8BA;;GAEG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,uCAAqB,CAAA;AACvB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAyND,0BAA0B;AAC1B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,CAAU,CAAC;AAGnF,uBAAuB;AACvB,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,MAAM;CACf,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,MAAM;CACf,CAAC;AAEF,8BAA8B;AAC9B,cAAc,qBAAqB,CAAC"}