@nova286/nova-workflow 0.2.0

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 (79) hide show
  1. package/README.md +246 -0
  2. package/dist/cli/commands/archive.d.ts +1 -0
  3. package/dist/cli/commands/archive.js +120 -0
  4. package/dist/cli/commands/archive.js.map +1 -0
  5. package/dist/cli/commands/context.d.ts +1 -0
  6. package/dist/cli/commands/context.js +23 -0
  7. package/dist/cli/commands/context.js.map +1 -0
  8. package/dist/cli/commands/guard.d.ts +1 -0
  9. package/dist/cli/commands/guard.js +21 -0
  10. package/dist/cli/commands/guard.js.map +1 -0
  11. package/dist/cli/commands/init.d.ts +1 -0
  12. package/dist/cli/commands/init.js +22 -0
  13. package/dist/cli/commands/init.js.map +1 -0
  14. package/dist/cli/commands/status.d.ts +1 -0
  15. package/dist/cli/commands/status.js +72 -0
  16. package/dist/cli/commands/status.js.map +1 -0
  17. package/dist/cli/error-handler.d.ts +1 -0
  18. package/dist/cli/error-handler.js +18 -0
  19. package/dist/cli/error-handler.js.map +1 -0
  20. package/dist/cli/index.d.ts +2 -0
  21. package/dist/cli/index.js +35 -0
  22. package/dist/cli/index.js.map +1 -0
  23. package/dist/cli/ui.d.ts +10 -0
  24. package/dist/cli/ui.js +21 -0
  25. package/dist/cli/ui.js.map +1 -0
  26. package/dist/cli-core/__tests__/context-generator.test.d.ts +1 -0
  27. package/dist/cli-core/__tests__/context-generator.test.js +97 -0
  28. package/dist/cli-core/__tests__/context-generator.test.js.map +1 -0
  29. package/dist/cli-core/__tests__/dispatcher.test.d.ts +1 -0
  30. package/dist/cli-core/__tests__/dispatcher.test.js +99 -0
  31. package/dist/cli-core/__tests__/dispatcher.test.js.map +1 -0
  32. package/dist/cli-core/__tests__/guard.test.d.ts +1 -0
  33. package/dist/cli-core/__tests__/guard.test.js +136 -0
  34. package/dist/cli-core/__tests__/guard.test.js.map +1 -0
  35. package/dist/cli-core/__tests__/init-manager.test.d.ts +1 -0
  36. package/dist/cli-core/__tests__/init-manager.test.js +150 -0
  37. package/dist/cli-core/__tests__/init-manager.test.js.map +1 -0
  38. package/dist/cli-core/__tests__/pipeline.test.d.ts +1 -0
  39. package/dist/cli-core/__tests__/pipeline.test.js +119 -0
  40. package/dist/cli-core/__tests__/pipeline.test.js.map +1 -0
  41. package/dist/cli-core/__tests__/project-detect.test.d.ts +1 -0
  42. package/dist/cli-core/__tests__/project-detect.test.js +92 -0
  43. package/dist/cli-core/__tests__/project-detect.test.js.map +1 -0
  44. package/dist/cli-core/__tests__/state-manager.test.d.ts +1 -0
  45. package/dist/cli-core/__tests__/state-manager.test.js +120 -0
  46. package/dist/cli-core/__tests__/state-manager.test.js.map +1 -0
  47. package/dist/cli-core/adapters/claude-code.d.ts +6 -0
  48. package/dist/cli-core/adapters/claude-code.js +311 -0
  49. package/dist/cli-core/adapters/claude-code.js.map +1 -0
  50. package/dist/cli-core/context-generator.d.ts +4 -0
  51. package/dist/cli-core/context-generator.js +81 -0
  52. package/dist/cli-core/context-generator.js.map +1 -0
  53. package/dist/cli-core/dispatcher.d.ts +11 -0
  54. package/dist/cli-core/dispatcher.js +169 -0
  55. package/dist/cli-core/dispatcher.js.map +1 -0
  56. package/dist/cli-core/guard.d.ts +1 -0
  57. package/dist/cli-core/guard.js +57 -0
  58. package/dist/cli-core/guard.js.map +1 -0
  59. package/dist/cli-core/init-manager.d.ts +25 -0
  60. package/dist/cli-core/init-manager.js +182 -0
  61. package/dist/cli-core/init-manager.js.map +1 -0
  62. package/dist/cli-core/pipeline.d.ts +7 -0
  63. package/dist/cli-core/pipeline.js +79 -0
  64. package/dist/cli-core/pipeline.js.map +1 -0
  65. package/dist/cli-core/platform-client.d.ts +19 -0
  66. package/dist/cli-core/platform-client.js +119 -0
  67. package/dist/cli-core/platform-client.js.map +1 -0
  68. package/dist/cli-core/project-detect.d.ts +1 -0
  69. package/dist/cli-core/project-detect.js +64 -0
  70. package/dist/cli-core/project-detect.js.map +1 -0
  71. package/dist/cli-core/state.d.ts +11 -0
  72. package/dist/cli-core/state.js +106 -0
  73. package/dist/cli-core/state.js.map +1 -0
  74. package/dist/cli-core/types.d.ts +141 -0
  75. package/dist/cli-core/types.js +13 -0
  76. package/dist/cli-core/types.js.map +1 -0
  77. package/package.json +33 -0
  78. package/templates/docs/design.md +41 -0
  79. package/templates/docs/proposal.md +25 -0
@@ -0,0 +1,141 @@
1
+ export declare enum AgentType {
2
+ PLANNER = "planner",
3
+ ARCHITECT = "architect",
4
+ CODER = "coder",
5
+ TDD_GUIDE = "tdd_guide",
6
+ CODE_REVIEWER = "code_reviewer",
7
+ SECURITY_REVIEWER = "security_reviewer"
8
+ }
9
+ export interface TaskContext {
10
+ taskId: string;
11
+ parentTaskId?: string;
12
+ title: string;
13
+ description: string;
14
+ taskType: 'design' | 'implementation' | 'review' | 'testing' | 'security' | 'other';
15
+ designContext: {
16
+ designDocRef: string;
17
+ relevantSpecs: string[];
18
+ architectureNotes: string;
19
+ };
20
+ input: {
21
+ files: {
22
+ path: string;
23
+ content?: string;
24
+ action: string;
25
+ }[];
26
+ dependencies: string[];
27
+ environment: {
28
+ language: string;
29
+ framework: string;
30
+ buildTool: string;
31
+ testFramework: string;
32
+ };
33
+ };
34
+ output: {
35
+ expectedArtifacts: {
36
+ type: string;
37
+ description: string;
38
+ pathHint?: string;
39
+ validation?: any;
40
+ }[];
41
+ constraints: {
42
+ maxFilesChanged?: number;
43
+ mustPassTests: boolean;
44
+ codeStyle?: string;
45
+ };
46
+ };
47
+ acceptanceCriteria: string[];
48
+ guardConditions: {
49
+ requireReview: boolean;
50
+ requireTests: boolean;
51
+ blocking: boolean;
52
+ };
53
+ metadata: {
54
+ createdBy: string;
55
+ createdAt: string;
56
+ priority: string;
57
+ estimatedComplexity: number;
58
+ };
59
+ iteration?: {
60
+ round: number;
61
+ reason?: string;
62
+ previousTraceId?: string;
63
+ };
64
+ }
65
+ export interface NovaState {
66
+ version: number;
67
+ project: string;
68
+ environment: string[];
69
+ currentPhase: string;
70
+ phases: Record<string, any>;
71
+ metadata: {
72
+ stateVersion: number;
73
+ lastModified: string;
74
+ history: any[];
75
+ };
76
+ }
77
+ export interface DispatchRequest {
78
+ agent: AgentType;
79
+ context: TaskContext;
80
+ model?: string;
81
+ timeout?: number;
82
+ effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
83
+ retry?: {
84
+ maxAttempts: number;
85
+ backoff: string;
86
+ };
87
+ outputSchema?: string;
88
+ }
89
+ export interface DispatchResult {
90
+ traceId: string;
91
+ agent: AgentType;
92
+ status: 'success' | 'failed' | 'timeout' | 'validation_error';
93
+ output?: any;
94
+ rawOutput?: string;
95
+ metadata: {
96
+ startTime: Date;
97
+ endTime: Date;
98
+ attempts: number;
99
+ tokenUsage?: {
100
+ prompt: number;
101
+ completion: number;
102
+ };
103
+ };
104
+ errors?: ErrorDetail[];
105
+ }
106
+ export interface ErrorDetail {
107
+ message: string;
108
+ code?: string;
109
+ }
110
+ export interface EnvironmentAdapter {
111
+ name: string;
112
+ setup(cwd: string): Promise<void>;
113
+ }
114
+ export interface PipelineTask {
115
+ id: string;
116
+ agent: AgentType;
117
+ context: TaskContext;
118
+ timeout?: number;
119
+ retry?: {
120
+ maxAttempts: number;
121
+ backoff: 'fixed' | 'exponential';
122
+ };
123
+ }
124
+ export interface Stage {
125
+ id: string;
126
+ tasks: PipelineTask[];
127
+ dependsOn?: string[];
128
+ onStageFailure?: 'fail_fast' | 'continue';
129
+ }
130
+ export interface Pipeline {
131
+ stages: Stage[];
132
+ }
133
+ export interface StageResult {
134
+ stageId: string;
135
+ status: 'success' | 'partial' | 'failed';
136
+ taskResults: DispatchResult[];
137
+ }
138
+ export interface PipelineResult {
139
+ status: 'success' | 'partial' | 'failed';
140
+ stages: StageResult[];
141
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentType = void 0;
4
+ var AgentType;
5
+ (function (AgentType) {
6
+ AgentType["PLANNER"] = "planner";
7
+ AgentType["ARCHITECT"] = "architect";
8
+ AgentType["CODER"] = "coder";
9
+ AgentType["TDD_GUIDE"] = "tdd_guide";
10
+ AgentType["CODE_REVIEWER"] = "code_reviewer";
11
+ AgentType["SECURITY_REVIEWER"] = "security_reviewer";
12
+ })(AgentType || (exports.AgentType = AgentType = {}));
13
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/cli-core/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,oCAAuB,CAAA;IACvB,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,oDAAuC,CAAA;AACzC,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@nova286/nova-workflow",
3
+ "version": "0.2.0",
4
+ "description": "Nova: AI workflow orchestration — a thin shell for disciplined AI-assisted development",
5
+ "main": "dist/cli/index.js",
6
+ "bin": { "nova": "dist/cli/index.js" },
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "dev": "ts-node src/cli/index.ts",
10
+ "test": "jest",
11
+ "prepublishOnly": "npm run build && npm test"
12
+ },
13
+ "files": ["dist/", "templates/", "README.md"],
14
+ "keywords": ["nova", "ai-workflow", "orchestration", "claude-code", "skill-based", "process-automation"],
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "commander": "^11.0.0",
18
+ "chalk": "^5.3.0",
19
+ "ora": "^7.0.0",
20
+ "yaml": "^2.3.0",
21
+ "inquirer": "^9.0.0",
22
+ "async-mutex": "^0.4.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^20.0.0",
26
+ "@types/inquirer": "^9.0.0",
27
+ "typescript": "^5.0.0",
28
+ "ts-node": "^10.9.0",
29
+ "jest": "^29.0.0",
30
+ "@types/jest": "^29.0.0",
31
+ "ts-jest": "^29.0.0"
32
+ }
33
+ }
@@ -0,0 +1,41 @@
1
+ # Design
2
+
3
+ ## Architecture Overview
4
+
5
+ <!-- High-level architecture, patterns, and system structure -->
6
+
7
+ ## Tech Stack
8
+
9
+ <!-- Languages, frameworks, key dependencies -->
10
+
11
+ ## Component Breakdown
12
+
13
+ <!-- Each module/component and its responsibility -->
14
+
15
+ ## Data Flow
16
+
17
+ <!-- How data moves through the system, key interfaces -->
18
+
19
+ ## Implementation Plan
20
+
21
+ <!-- Ordered list of tasks defined in YAML below -->
22
+
23
+ ```yaml
24
+ tasks:
25
+ - id: task-1
26
+ title: Example task
27
+ type: implementation
28
+ description: What needs to be done
29
+ files:
30
+ - {path: src/example.ts, action: create}
31
+ expectedArtifacts:
32
+ - {type: file, description: Example module, pathHint: src/example.ts}
33
+ acceptance:
34
+ - Acceptance criterion 1
35
+ priority: medium
36
+ estimatedComplexity: 3
37
+ ```
38
+
39
+ ## Risks & Mitigations
40
+
41
+ <!-- Known risks, what could go wrong, and how to handle it -->
@@ -0,0 +1,25 @@
1
+ # Proposal: {title}
2
+
3
+ ## Problem Statement
4
+
5
+ <!-- What problem exists, and why does it matter? -->
6
+
7
+ ## Proposed Solution
8
+
9
+ <!-- High-level approach — what are we building, and how? -->
10
+
11
+ ## User Stories
12
+
13
+ <!-- Who needs what, in priority order -->
14
+
15
+ ## Scope & Deliverables
16
+
17
+ <!-- What is in scope, what is out, and what concrete outputs will we produce? -->
18
+
19
+ ## Success Criteria
20
+
21
+ <!-- Measurable outcomes that define success -->
22
+
23
+ ## Risks & Constraints
24
+
25
+ <!-- Known risks, limitations, dependencies, or constraints -->