clavix 4.12.0 → 5.0.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.
- package/README.md +69 -61
- package/dist/templates/slash-commands/_canonical/archive.md +83 -121
- package/dist/templates/slash-commands/_canonical/execute.md +32 -42
- package/dist/templates/slash-commands/_canonical/implement.md +32 -44
- package/dist/templates/slash-commands/_canonical/improve.md +13 -52
- package/dist/templates/slash-commands/_components/agent-protocols/cli-reference.md +84 -180
- package/dist/templates/slash-commands/_components/agent-protocols/error-handling.md +2 -2
- package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +41 -59
- package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +20 -27
- package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +4 -5
- package/package.json +2 -2
- package/dist/cli/commands/analyze.d.ts +0 -17
- package/dist/cli/commands/analyze.js +0 -133
- package/dist/cli/commands/archive.d.ts +0 -36
- package/dist/cli/commands/archive.js +0 -266
- package/dist/cli/commands/deep.d.ts +0 -17
- package/dist/cli/commands/deep.js +0 -170
- package/dist/cli/commands/execute.d.ts +0 -15
- package/dist/cli/commands/execute.js +0 -168
- package/dist/cli/commands/fast.d.ts +0 -18
- package/dist/cli/commands/fast.js +0 -219
- package/dist/cli/commands/implement.d.ts +0 -24
- package/dist/cli/commands/implement.js +0 -289
- package/dist/cli/commands/improve.d.ts +0 -32
- package/dist/cli/commands/improve.js +0 -250
- package/dist/cli/commands/list.d.ts +0 -17
- package/dist/cli/commands/list.js +0 -217
- package/dist/cli/commands/plan.d.ts +0 -21
- package/dist/cli/commands/plan.js +0 -297
- package/dist/cli/commands/prd.d.ts +0 -24
- package/dist/cli/commands/prd.js +0 -321
- package/dist/cli/commands/prompts/clear.d.ts +0 -16
- package/dist/cli/commands/prompts/clear.js +0 -222
- package/dist/cli/commands/prompts/list.d.ts +0 -8
- package/dist/cli/commands/prompts/list.js +0 -88
- package/dist/cli/commands/show.d.ts +0 -21
- package/dist/cli/commands/show.js +0 -191
- package/dist/cli/commands/start.d.ts +0 -40
- package/dist/cli/commands/start.js +0 -210
- package/dist/cli/commands/summarize.d.ts +0 -17
- package/dist/cli/commands/summarize.js +0 -196
- package/dist/cli/commands/task-complete.d.ts +0 -27
- package/dist/cli/commands/task-complete.js +0 -269
- package/dist/cli/commands/verify.d.ts +0 -28
- package/dist/cli/commands/verify.js +0 -349
- package/dist/core/archive-manager.d.ts +0 -100
- package/dist/core/archive-manager.js +0 -302
- package/dist/core/basic-checklist-generator.d.ts +0 -35
- package/dist/core/basic-checklist-generator.js +0 -344
- package/dist/core/checklist-parser.d.ts +0 -48
- package/dist/core/checklist-parser.js +0 -238
- package/dist/core/config-manager.d.ts +0 -149
- package/dist/core/config-manager.js +0 -230
- package/dist/core/conversation-analyzer.d.ts +0 -86
- package/dist/core/conversation-analyzer.js +0 -387
- package/dist/core/conversation-quality-tracker.d.ts +0 -81
- package/dist/core/conversation-quality-tracker.js +0 -195
- package/dist/core/git-manager.d.ts +0 -126
- package/dist/core/git-manager.js +0 -282
- package/dist/core/intelligence/confidence-calculator.d.ts +0 -93
- package/dist/core/intelligence/confidence-calculator.js +0 -124
- package/dist/core/intelligence/index.d.ts +0 -11
- package/dist/core/intelligence/index.js +0 -15
- package/dist/core/intelligence/intent-detector.d.ts +0 -54
- package/dist/core/intelligence/intent-detector.js +0 -723
- package/dist/core/intelligence/pattern-library.d.ts +0 -104
- package/dist/core/intelligence/pattern-library.js +0 -330
- package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +0 -27
- package/dist/core/intelligence/patterns/actionability-enhancer.js +0 -192
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +0 -29
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +0 -239
- package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +0 -22
- package/dist/core/intelligence/patterns/ambiguity-detector.js +0 -196
- package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +0 -30
- package/dist/core/intelligence/patterns/assumption-explicitizer.js +0 -296
- package/dist/core/intelligence/patterns/base-pattern.d.ts +0 -192
- package/dist/core/intelligence/patterns/base-pattern.js +0 -103
- package/dist/core/intelligence/patterns/completeness-validator.d.ts +0 -27
- package/dist/core/intelligence/patterns/completeness-validator.js +0 -221
- package/dist/core/intelligence/patterns/conciseness-filter.d.ts +0 -20
- package/dist/core/intelligence/patterns/conciseness-filter.js +0 -92
- package/dist/core/intelligence/patterns/context-precision.d.ts +0 -32
- package/dist/core/intelligence/patterns/context-precision.js +0 -389
- package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +0 -30
- package/dist/core/intelligence/patterns/conversation-summarizer.js +0 -277
- package/dist/core/intelligence/patterns/dependency-identifier.d.ts +0 -23
- package/dist/core/intelligence/patterns/dependency-identifier.js +0 -166
- package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +0 -21
- package/dist/core/intelligence/patterns/domain-context-enricher.js +0 -198
- package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +0 -30
- package/dist/core/intelligence/patterns/edge-case-identifier.js +0 -269
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +0 -22
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +0 -179
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +0 -24
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +0 -259
- package/dist/core/intelligence/patterns/objective-clarifier.d.ts +0 -22
- package/dist/core/intelligence/patterns/objective-clarifier.js +0 -126
- package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +0 -22
- package/dist/core/intelligence/patterns/output-format-enforcer.js +0 -151
- package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +0 -23
- package/dist/core/intelligence/patterns/prd-structure-enforcer.js +0 -183
- package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +0 -23
- package/dist/core/intelligence/patterns/prerequisite-identifier.js +0 -221
- package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +0 -24
- package/dist/core/intelligence/patterns/requirement-prioritizer.js +0 -134
- package/dist/core/intelligence/patterns/scope-definer.d.ts +0 -26
- package/dist/core/intelligence/patterns/scope-definer.js +0 -236
- package/dist/core/intelligence/patterns/step-decomposer.d.ts +0 -31
- package/dist/core/intelligence/patterns/step-decomposer.js +0 -242
- package/dist/core/intelligence/patterns/structure-organizer.d.ts +0 -31
- package/dist/core/intelligence/patterns/structure-organizer.js +0 -218
- package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +0 -22
- package/dist/core/intelligence/patterns/success-criteria-enforcer.js +0 -165
- package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +0 -24
- package/dist/core/intelligence/patterns/success-metrics-enforcer.js +0 -165
- package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +0 -25
- package/dist/core/intelligence/patterns/technical-context-enricher.js +0 -165
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +0 -26
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +0 -300
- package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +0 -24
- package/dist/core/intelligence/patterns/user-persona-enricher.js +0 -141
- package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +0 -31
- package/dist/core/intelligence/patterns/validation-checklist-creator.js +0 -242
- package/dist/core/intelligence/quality-assessor.d.ts +0 -71
- package/dist/core/intelligence/quality-assessor.js +0 -525
- package/dist/core/intelligence/types.d.ts +0 -111
- package/dist/core/intelligence/types.js +0 -3
- package/dist/core/intelligence/universal-optimizer.d.ts +0 -91
- package/dist/core/intelligence/universal-optimizer.js +0 -399
- package/dist/core/prd-generator.d.ts +0 -76
- package/dist/core/prd-generator.js +0 -173
- package/dist/core/prompt-manager.d.ts +0 -110
- package/dist/core/prompt-manager.js +0 -274
- package/dist/core/prompt-optimizer.d.ts +0 -268
- package/dist/core/prompt-optimizer.js +0 -959
- package/dist/core/question-engine.d.ts +0 -167
- package/dist/core/question-engine.js +0 -356
- package/dist/core/session-manager.d.ts +0 -139
- package/dist/core/session-manager.js +0 -365
- package/dist/core/task-manager.d.ts +0 -211
- package/dist/core/task-manager.js +0 -981
- package/dist/core/verification-hooks.d.ts +0 -67
- package/dist/core/verification-hooks.js +0 -309
- package/dist/core/verification-manager.d.ts +0 -107
- package/dist/core/verification-manager.js +0 -415
- package/dist/index 2.js +0 -13
- package/dist/index.d 2.ts +0 -4
- package/dist/types/session.d.ts +0 -78
- package/dist/types/session.js +0 -8
- package/dist/types/verification.d.ts +0 -205
- package/dist/types/verification.js +0 -9
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ArchiveManager - Manages archival of completed PRD projects
|
|
3
|
-
*
|
|
4
|
-
* This class handles:
|
|
5
|
-
* - Listing active and archived PRD projects
|
|
6
|
-
* - Checking task completion status
|
|
7
|
-
* - Moving completed projects to archive
|
|
8
|
-
* - Managing archive directory structure
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Status of a PRD project's tasks
|
|
12
|
-
*/
|
|
13
|
-
export interface TaskStatus {
|
|
14
|
-
hasTasksFile: boolean;
|
|
15
|
-
total: number;
|
|
16
|
-
completed: number;
|
|
17
|
-
remaining: number;
|
|
18
|
-
percentage: number;
|
|
19
|
-
allCompleted: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Information about a PRD project
|
|
23
|
-
*/
|
|
24
|
-
export interface PrdProject {
|
|
25
|
-
name: string;
|
|
26
|
-
path: string;
|
|
27
|
-
taskStatus: TaskStatus;
|
|
28
|
-
modifiedTime: Date;
|
|
29
|
-
isArchived: boolean;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* ArchiveManager class
|
|
33
|
-
*
|
|
34
|
-
* Manages archival of completed PRD projects
|
|
35
|
-
*/
|
|
36
|
-
export declare class ArchiveManager {
|
|
37
|
-
private readonly taskManager;
|
|
38
|
-
private readonly outputsDir;
|
|
39
|
-
private readonly archiveDir;
|
|
40
|
-
constructor();
|
|
41
|
-
/**
|
|
42
|
-
* List all PRD projects in outputs directory
|
|
43
|
-
*
|
|
44
|
-
* @param includeArchived - Include archived projects in results
|
|
45
|
-
* @returns Array of PRD projects
|
|
46
|
-
*/
|
|
47
|
-
listPrdProjects(includeArchived?: boolean): Promise<PrdProject[]>;
|
|
48
|
-
/**
|
|
49
|
-
* List archived PRD projects
|
|
50
|
-
*
|
|
51
|
-
* @returns Array of archived PRD projects
|
|
52
|
-
*/
|
|
53
|
-
listArchivedProjects(): Promise<PrdProject[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Get PRD projects that are ready to archive (all tasks completed)
|
|
56
|
-
*
|
|
57
|
-
* @returns Array of archivable PRD projects
|
|
58
|
-
*/
|
|
59
|
-
getArchivablePrds(): Promise<PrdProject[]>;
|
|
60
|
-
/**
|
|
61
|
-
* Check task completion status for a PRD project
|
|
62
|
-
*
|
|
63
|
-
* @param projectPath - Path to the PRD project directory
|
|
64
|
-
* @returns Task status information
|
|
65
|
-
*/
|
|
66
|
-
checkTasksStatus(projectPath: string): Promise<TaskStatus>;
|
|
67
|
-
/**
|
|
68
|
-
* Archive a PRD project (move to archive directory)
|
|
69
|
-
*
|
|
70
|
-
* @param projectName - Name of the project to archive
|
|
71
|
-
* @param force - Force archive even if tasks are incomplete
|
|
72
|
-
* @returns Success status and message
|
|
73
|
-
*/
|
|
74
|
-
archiveProject(projectName: string, force?: boolean): Promise<{
|
|
75
|
-
success: boolean;
|
|
76
|
-
message: string;
|
|
77
|
-
}>;
|
|
78
|
-
/**
|
|
79
|
-
* Restore an archived project back to active outputs
|
|
80
|
-
*
|
|
81
|
-
* @param projectName - Name of the archived project to restore
|
|
82
|
-
* @returns Success status and message
|
|
83
|
-
*/
|
|
84
|
-
restoreProject(projectName: string): Promise<{
|
|
85
|
-
success: boolean;
|
|
86
|
-
message: string;
|
|
87
|
-
}>;
|
|
88
|
-
/**
|
|
89
|
-
* Check if a directory contains a PRD file
|
|
90
|
-
*/
|
|
91
|
-
private hasPrdFile;
|
|
92
|
-
/**
|
|
93
|
-
* Get incomplete tasks for a project (for display purposes)
|
|
94
|
-
*
|
|
95
|
-
* @param projectPath - Path to the PRD project
|
|
96
|
-
* @returns Array of incomplete task descriptions
|
|
97
|
-
*/
|
|
98
|
-
getIncompleteTasks(projectPath: string): Promise<string[]>;
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=archive-manager.d.ts.map
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ArchiveManager - Manages archival of completed PRD projects
|
|
3
|
-
*
|
|
4
|
-
* This class handles:
|
|
5
|
-
* - Listing active and archived PRD projects
|
|
6
|
-
* - Checking task completion status
|
|
7
|
-
* - Moving completed projects to archive
|
|
8
|
-
* - Managing archive directory structure
|
|
9
|
-
*/
|
|
10
|
-
import fs from 'fs-extra';
|
|
11
|
-
import * as path from 'path';
|
|
12
|
-
import { TaskManager } from './task-manager.js';
|
|
13
|
-
/**
|
|
14
|
-
* ArchiveManager class
|
|
15
|
-
*
|
|
16
|
-
* Manages archival of completed PRD projects
|
|
17
|
-
*/
|
|
18
|
-
export class ArchiveManager {
|
|
19
|
-
taskManager;
|
|
20
|
-
outputsDir = '.clavix/outputs';
|
|
21
|
-
archiveDir = '.clavix/outputs/archive';
|
|
22
|
-
constructor() {
|
|
23
|
-
this.taskManager = new TaskManager();
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* List all PRD projects in outputs directory
|
|
27
|
-
*
|
|
28
|
-
* @param includeArchived - Include archived projects in results
|
|
29
|
-
* @returns Array of PRD projects
|
|
30
|
-
*/
|
|
31
|
-
async listPrdProjects(includeArchived = false) {
|
|
32
|
-
const projects = [];
|
|
33
|
-
// Check if outputs directory exists
|
|
34
|
-
if (!(await fs.pathExists(this.outputsDir))) {
|
|
35
|
-
return projects;
|
|
36
|
-
}
|
|
37
|
-
const dirs = await fs.readdir(this.outputsDir);
|
|
38
|
-
for (const dir of dirs) {
|
|
39
|
-
// Skip archive directory when listing active projects
|
|
40
|
-
if (dir === 'archive' && !includeArchived) {
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
const fullPath = path.join(this.outputsDir, dir);
|
|
44
|
-
const stat = await fs.stat(fullPath);
|
|
45
|
-
if (stat.isDirectory()) {
|
|
46
|
-
// Check if it has a PRD file
|
|
47
|
-
if (await this.hasPrdFile(fullPath)) {
|
|
48
|
-
const taskStatus = await this.checkTasksStatus(fullPath);
|
|
49
|
-
projects.push({
|
|
50
|
-
name: dir,
|
|
51
|
-
path: fullPath,
|
|
52
|
-
taskStatus,
|
|
53
|
-
modifiedTime: stat.mtime,
|
|
54
|
-
isArchived: false,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
// Add archived projects if requested
|
|
60
|
-
if (includeArchived) {
|
|
61
|
-
const archivedProjects = await this.listArchivedProjects();
|
|
62
|
-
projects.push(...archivedProjects);
|
|
63
|
-
}
|
|
64
|
-
// Sort by modification time (most recent first)
|
|
65
|
-
projects.sort((a, b) => b.modifiedTime.getTime() - a.modifiedTime.getTime());
|
|
66
|
-
return projects;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* List archived PRD projects
|
|
70
|
-
*
|
|
71
|
-
* @returns Array of archived PRD projects
|
|
72
|
-
*/
|
|
73
|
-
async listArchivedProjects() {
|
|
74
|
-
const projects = [];
|
|
75
|
-
if (!(await fs.pathExists(this.archiveDir))) {
|
|
76
|
-
return projects;
|
|
77
|
-
}
|
|
78
|
-
const dirs = await fs.readdir(this.archiveDir);
|
|
79
|
-
for (const dir of dirs) {
|
|
80
|
-
const fullPath = path.join(this.archiveDir, dir);
|
|
81
|
-
const stat = await fs.stat(fullPath);
|
|
82
|
-
if (stat.isDirectory()) {
|
|
83
|
-
if (await this.hasPrdFile(fullPath)) {
|
|
84
|
-
const taskStatus = await this.checkTasksStatus(fullPath);
|
|
85
|
-
projects.push({
|
|
86
|
-
name: dir,
|
|
87
|
-
path: fullPath,
|
|
88
|
-
taskStatus,
|
|
89
|
-
modifiedTime: stat.mtime,
|
|
90
|
-
isArchived: true,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return projects;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get PRD projects that are ready to archive (all tasks completed)
|
|
99
|
-
*
|
|
100
|
-
* @returns Array of archivable PRD projects
|
|
101
|
-
*/
|
|
102
|
-
async getArchivablePrds() {
|
|
103
|
-
const allProjects = await this.listPrdProjects(false);
|
|
104
|
-
// Filter to only projects with all tasks completed
|
|
105
|
-
return allProjects.filter((project) => project.taskStatus.hasTasksFile && project.taskStatus.allCompleted);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Check task completion status for a PRD project
|
|
109
|
-
*
|
|
110
|
-
* @param projectPath - Path to the PRD project directory
|
|
111
|
-
* @returns Task status information
|
|
112
|
-
*/
|
|
113
|
-
async checkTasksStatus(projectPath) {
|
|
114
|
-
const tasksPath = path.join(projectPath, 'tasks.md');
|
|
115
|
-
// Check if tasks.md exists
|
|
116
|
-
if (!(await fs.pathExists(tasksPath))) {
|
|
117
|
-
return {
|
|
118
|
-
hasTasksFile: false,
|
|
119
|
-
total: 0,
|
|
120
|
-
completed: 0,
|
|
121
|
-
remaining: 0,
|
|
122
|
-
percentage: 0,
|
|
123
|
-
allCompleted: false,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
try {
|
|
127
|
-
// Read and parse tasks
|
|
128
|
-
const phases = await this.taskManager.readTasksFile(tasksPath);
|
|
129
|
-
const stats = this.taskManager.getTaskStats(phases);
|
|
130
|
-
return {
|
|
131
|
-
hasTasksFile: true,
|
|
132
|
-
total: stats.total,
|
|
133
|
-
completed: stats.completed,
|
|
134
|
-
remaining: stats.remaining,
|
|
135
|
-
percentage: stats.percentage,
|
|
136
|
-
allCompleted: stats.remaining === 0 && stats.total > 0,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
catch {
|
|
140
|
-
// If parsing fails, return error status
|
|
141
|
-
return {
|
|
142
|
-
hasTasksFile: true,
|
|
143
|
-
total: 0,
|
|
144
|
-
completed: 0,
|
|
145
|
-
remaining: 0,
|
|
146
|
-
percentage: 0,
|
|
147
|
-
allCompleted: false,
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Archive a PRD project (move to archive directory)
|
|
153
|
-
*
|
|
154
|
-
* @param projectName - Name of the project to archive
|
|
155
|
-
* @param force - Force archive even if tasks are incomplete
|
|
156
|
-
* @returns Success status and message
|
|
157
|
-
*/
|
|
158
|
-
async archiveProject(projectName, force = false) {
|
|
159
|
-
const sourcePath = path.join(this.outputsDir, projectName);
|
|
160
|
-
// Check if project exists
|
|
161
|
-
if (!(await fs.pathExists(sourcePath))) {
|
|
162
|
-
return {
|
|
163
|
-
success: false,
|
|
164
|
-
message: `Project not found: ${projectName}`,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
// Check if it's already in archive
|
|
168
|
-
if (sourcePath.includes('/archive/')) {
|
|
169
|
-
return {
|
|
170
|
-
success: false,
|
|
171
|
-
message: `Project is already archived: ${projectName}`,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
// Check task status unless forced
|
|
175
|
-
if (!force) {
|
|
176
|
-
const taskStatus = await this.checkTasksStatus(sourcePath);
|
|
177
|
-
if (!taskStatus.hasTasksFile) {
|
|
178
|
-
return {
|
|
179
|
-
success: false,
|
|
180
|
-
message: `Project has no tasks.md file. Use --force to archive anyway.`,
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
if (!taskStatus.allCompleted) {
|
|
184
|
-
return {
|
|
185
|
-
success: false,
|
|
186
|
-
message: `Project has ${taskStatus.remaining} incomplete task(s). Use --force to archive anyway.`,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// Ensure archive directory exists
|
|
191
|
-
await fs.ensureDir(this.archiveDir);
|
|
192
|
-
// Move project to archive
|
|
193
|
-
const destPath = path.join(this.archiveDir, projectName);
|
|
194
|
-
// Check if destination already exists
|
|
195
|
-
if (await fs.pathExists(destPath)) {
|
|
196
|
-
return {
|
|
197
|
-
success: false,
|
|
198
|
-
message: `Archive already contains a project named: ${projectName}`,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
try {
|
|
202
|
-
await fs.move(sourcePath, destPath);
|
|
203
|
-
return {
|
|
204
|
-
success: true,
|
|
205
|
-
message: `Successfully archived ${projectName} to ${destPath}`,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
catch (error) {
|
|
209
|
-
const { getErrorMessage } = await import('../utils/error-utils.js');
|
|
210
|
-
return {
|
|
211
|
-
success: false,
|
|
212
|
-
message: `Failed to archive project: ${getErrorMessage(error)}`,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Restore an archived project back to active outputs
|
|
218
|
-
*
|
|
219
|
-
* @param projectName - Name of the archived project to restore
|
|
220
|
-
* @returns Success status and message
|
|
221
|
-
*/
|
|
222
|
-
async restoreProject(projectName) {
|
|
223
|
-
const sourcePath = path.join(this.archiveDir, projectName);
|
|
224
|
-
// Check if archived project exists
|
|
225
|
-
if (!(await fs.pathExists(sourcePath))) {
|
|
226
|
-
return {
|
|
227
|
-
success: false,
|
|
228
|
-
message: `Archived project not found: ${projectName}`,
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
const destPath = path.join(this.outputsDir, projectName);
|
|
232
|
-
// Check if destination already exists
|
|
233
|
-
if (await fs.pathExists(destPath)) {
|
|
234
|
-
return {
|
|
235
|
-
success: false,
|
|
236
|
-
message: `Active outputs already contains a project named: ${projectName}`,
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
try {
|
|
240
|
-
await fs.move(sourcePath, destPath);
|
|
241
|
-
return {
|
|
242
|
-
success: true,
|
|
243
|
-
message: `Successfully restored ${projectName} to ${destPath}`,
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
catch (error) {
|
|
247
|
-
const { getErrorMessage } = await import('../utils/error-utils.js');
|
|
248
|
-
return {
|
|
249
|
-
success: false,
|
|
250
|
-
message: `Failed to restore project: ${getErrorMessage(error)}`,
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Check if a directory contains a PRD file
|
|
256
|
-
*/
|
|
257
|
-
async hasPrdFile(dirPath) {
|
|
258
|
-
const possibleFiles = [
|
|
259
|
-
'PRD.md',
|
|
260
|
-
'full-prd.md',
|
|
261
|
-
'prd.md',
|
|
262
|
-
'Full-PRD.md',
|
|
263
|
-
'FULL_PRD.md',
|
|
264
|
-
'FULL-PRD.md',
|
|
265
|
-
'QUICK_PRD.md',
|
|
266
|
-
];
|
|
267
|
-
for (const filename of possibleFiles) {
|
|
268
|
-
if (await fs.pathExists(path.join(dirPath, filename))) {
|
|
269
|
-
return true;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return false;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Get incomplete tasks for a project (for display purposes)
|
|
276
|
-
*
|
|
277
|
-
* @param projectPath - Path to the PRD project
|
|
278
|
-
* @returns Array of incomplete task descriptions
|
|
279
|
-
*/
|
|
280
|
-
async getIncompleteTasks(projectPath) {
|
|
281
|
-
const tasksPath = path.join(projectPath, 'tasks.md');
|
|
282
|
-
if (!(await fs.pathExists(tasksPath))) {
|
|
283
|
-
return [];
|
|
284
|
-
}
|
|
285
|
-
try {
|
|
286
|
-
const phases = await this.taskManager.readTasksFile(tasksPath);
|
|
287
|
-
const incompleteTasks = [];
|
|
288
|
-
for (const phase of phases) {
|
|
289
|
-
for (const task of phase.tasks) {
|
|
290
|
-
if (!task.completed) {
|
|
291
|
-
incompleteTasks.push(`[${phase.name}] ${task.description}`);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return incompleteTasks;
|
|
296
|
-
}
|
|
297
|
-
catch {
|
|
298
|
-
return [];
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
//# sourceMappingURL=archive-manager.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clavix v4.8: Basic Checklist Generator
|
|
3
|
-
*
|
|
4
|
-
* Generates basic verification checklists for fast mode prompts
|
|
5
|
-
* that don't have comprehensive checklists from deep mode.
|
|
6
|
-
*/
|
|
7
|
-
import { PromptIntent } from './intelligence/types.js';
|
|
8
|
-
import { ParsedChecklist } from '../types/verification.js';
|
|
9
|
-
/**
|
|
10
|
-
* Basic Checklist Generator
|
|
11
|
-
*/
|
|
12
|
-
export declare class BasicChecklistGenerator {
|
|
13
|
-
/**
|
|
14
|
-
* Generate a basic checklist based on intent
|
|
15
|
-
*/
|
|
16
|
-
generate(intent: PromptIntent): ParsedChecklist;
|
|
17
|
-
/**
|
|
18
|
-
* Generate checklist for a specific prompt content
|
|
19
|
-
* Detects additional items based on prompt keywords
|
|
20
|
-
*/
|
|
21
|
-
generateFromPrompt(content: string, intent: PromptIntent): ParsedChecklist;
|
|
22
|
-
/**
|
|
23
|
-
* Check if content contains any of the keywords
|
|
24
|
-
*/
|
|
25
|
-
private hasKeywords;
|
|
26
|
-
/**
|
|
27
|
-
* Get available intents
|
|
28
|
-
*/
|
|
29
|
-
getAvailableIntents(): PromptIntent[];
|
|
30
|
-
/**
|
|
31
|
-
* Check if intent has a specific checklist
|
|
32
|
-
*/
|
|
33
|
-
hasChecklistForIntent(intent: PromptIntent): boolean;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=basic-checklist-generator.d.ts.map
|