sdd-toolkit 1.9.2 ā 2.0.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.
- package/definitions/sdd-coder.yaml +161 -71
- package/definitions/sdd-feature.yaml +139 -73
- package/definitions/sdd-log.yaml +70 -61
- package/definitions/sdd-project.yaml +163 -51
- package/definitions/sdd-requirements.yaml +70 -70
- package/definitions/sdd-review.yaml +106 -88
- package/definitions/sdd.yaml +12 -12
- package/package.json +1 -1
- package/src/commands/view.js +18 -18
- package/src/index.js +98 -98
- package/src/lib/dashboard.js +187 -187
- package/src/lib/docs.js +71 -69
- package/src/lib/i18n.js +65 -65
- package/src/lib/messages.js +234 -234
- package/src/lib/profiles.js +186 -186
- package/src/lib/schema.js +13 -13
- package/src/lib/transformers.js +326 -332
- package/src/scripts/archive.js +55 -56
- package/src/scripts/reset.js +19 -19
- package/src/scripts/status.js +50 -58
- package/templates/context.md +22 -0
- package/templates/guidelines.md +9 -9
- package/templates/project.md +28 -28
- package/templates/requirements.md +15 -15
- package/templates/system.md +20 -0
- package/templates/task.md +11 -11
- package/README.pt.md +0 -334
package/src/scripts/archive.js
CHANGED
|
@@ -1,56 +1,55 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const readline = require('readline');
|
|
4
|
-
|
|
5
|
-
const docsDir = path.join(process.cwd(), '.sdd-toolkit');
|
|
6
|
-
const archiveDir = path.join(docsDir, 'archive');
|
|
7
|
-
|
|
8
|
-
// Files to archive (Ephemeral context)
|
|
9
|
-
const filesToArchive = ['project.md', 'task.md', 'audit_report.md', 'requirements.md', 'milestones.md'];
|
|
10
|
-
|
|
11
|
-
// Files to keep (Long-term context)
|
|
12
|
-
// -
|
|
13
|
-
// -
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
console.log('
|
|
22
|
-
console.log('
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
console.log('
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const readline = require('readline');
|
|
4
|
+
|
|
5
|
+
const docsDir = path.join(process.cwd(), '.sdd-toolkit');
|
|
6
|
+
const archiveDir = path.join(docsDir, 'logs', 'archive');
|
|
7
|
+
|
|
8
|
+
// Files to archive (Ephemeral context)
|
|
9
|
+
const filesToArchive = ['project.md', 'task.md', 'audit_report.md', 'requirements.md', 'milestones.md'];
|
|
10
|
+
|
|
11
|
+
// Files to keep (Long-term context)
|
|
12
|
+
// - context.md (Project Reality)
|
|
13
|
+
// - system.md (System State)
|
|
14
|
+
|
|
15
|
+
const rl = readline.createInterface({
|
|
16
|
+
input: process.stdin,
|
|
17
|
+
output: process.stdout
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
console.log('š¦ SDD SESSION ARCHIVER');
|
|
21
|
+
console.log('This will move current Spec, Plan, and Audit reports to .sdd-toolkit/logs/archive/.');
|
|
22
|
+
console.log('Your Context and System files will remain untouched.\n');
|
|
23
|
+
|
|
24
|
+
// Check if there is anything to archive
|
|
25
|
+
const existingFiles = filesToArchive.filter(f => fs.existsSync(path.join(docsDir, f)));
|
|
26
|
+
|
|
27
|
+
if (existingFiles.length === 0) {
|
|
28
|
+
console.log('ā No active session files found (spec.md, plan.md, etc). Nothing to archive.');
|
|
29
|
+
process.exit(0);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
rl.question('Enter a name for this feature/session (e.g., "auth-system"): ', (name) => {
|
|
33
|
+
const safeName = (name || 'untitled').replace(/[^a-z0-9-_]/gi, '-').toLowerCase();
|
|
34
|
+
const timestamp = new Date().toISOString().split('T')[0];
|
|
35
|
+
const folderName = `${timestamp}_${safeName}`;
|
|
36
|
+
const targetDir = path.join(archiveDir, folderName);
|
|
37
|
+
|
|
38
|
+
if (!fs.existsSync(targetDir)) {
|
|
39
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log(`\nMoving files to: .sdd-toolkit/logs/archive/${folderName}/
|
|
43
|
+
`);
|
|
44
|
+
|
|
45
|
+
existingFiles.forEach(file => {
|
|
46
|
+
const srcPath = path.join(docsDir, file);
|
|
47
|
+
const destPath = path.join(targetDir, file);
|
|
48
|
+
fs.renameSync(srcPath, destPath);
|
|
49
|
+
console.log(`ā Archived: ${file}`);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
console.log('\nā
Session archived successfully!');
|
|
53
|
+
console.log('You are ready to start a new feature with /feature');
|
|
54
|
+
rl.close();
|
|
55
|
+
});
|
package/src/scripts/reset.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const docsDir = path.join(process.cwd(), '.sdd-toolkit');
|
|
5
|
-
|
|
6
|
-
console.log('ā ļø WARNING: This will wipe all documentation (Spec, Plan, Context).');
|
|
7
|
-
console.log('Your source code (src/) will NOT be touched.');
|
|
8
|
-
console.log('Are you sure? (Run with --force to execute)');
|
|
9
|
-
|
|
10
|
-
if (process.argv.includes('--force')) {
|
|
11
|
-
['project.md', '
|
|
12
|
-
const p = path.join(docsDir, file);
|
|
13
|
-
if (fs.existsSync(p)) {
|
|
14
|
-
fs.unlinkSync(p);
|
|
15
|
-
console.log(`Deleted: .sdd-toolkit/${file}`);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
console.log('ā
Wipe complete. You can start fresh with /
|
|
19
|
-
}
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const docsDir = path.join(process.cwd(), '.sdd-toolkit');
|
|
5
|
+
|
|
6
|
+
console.log('ā ļø WARNING: This will wipe all documentation (Spec, Plan, Context, System).');
|
|
7
|
+
console.log('Your source code (src/) will NOT be touched.');
|
|
8
|
+
console.log('Are you sure? (Run with --force to execute)');
|
|
9
|
+
|
|
10
|
+
if (process.argv.includes('--force')) {
|
|
11
|
+
['project.md', 'requirements.md', 'guidelines.md', 'context.md', 'system.md'].forEach(file => {
|
|
12
|
+
const p = path.join(docsDir, file);
|
|
13
|
+
if (fs.existsSync(p)) {
|
|
14
|
+
fs.unlinkSync(p);
|
|
15
|
+
console.log(`Deleted: .sdd-toolkit/${file}`);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
console.log('ā
Wipe complete. You can start fresh with /project');
|
|
19
|
+
}
|
package/src/scripts/status.js
CHANGED
|
@@ -1,58 +1,50 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
// Tenta carregar picocolors se estiver disponĆvel no projeto do usuĆ”rio, senĆ£o usa fallback
|
|
5
|
-
let pc = {
|
|
6
|
-
green: s => s,
|
|
7
|
-
blue: s => s,
|
|
8
|
-
yellow: s => s,
|
|
9
|
-
red: s => s,
|
|
10
|
-
bold: s => s,
|
|
11
|
-
bgBlue: s => s
|
|
12
|
-
};
|
|
13
|
-
try { pc = require('picocolors'); } catch (e) {}
|
|
14
|
-
|
|
15
|
-
const docsDir = path.join(process.cwd(), '.sdd-toolkit');
|
|
16
|
-
|
|
17
|
-
function checkFile(name) {
|
|
18
|
-
const p = path.join(docsDir, name);
|
|
19
|
-
if (fs.existsSync(p)) {
|
|
20
|
-
const stats = fs.statSync(p);
|
|
21
|
-
return { exists: true, size: stats.size, mtime: stats.mtime };
|
|
22
|
-
}
|
|
23
|
-
return { exists: false };
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
console.clear();
|
|
27
|
-
console.log(pc.bgBlue(pc.bold(' š SDD PROJECT STATUS ')));
|
|
28
|
-
console.log('');
|
|
29
|
-
|
|
30
|
-
// 1. Spec Status
|
|
31
|
-
const spec = checkFile('project.md');
|
|
32
|
-
if (spec.exists && spec.size > 100) {
|
|
33
|
-
console.log(`${pc.green('ā Spec Defined')} (Last update: ${spec.mtime.toLocaleString()})`);
|
|
34
|
-
} else {
|
|
35
|
-
console.log(`${pc.red('ā Spec Missing')} (Run /project)`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// 2. Plan Status
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
} catch (e) {}
|
|
53
|
-
} else {
|
|
54
|
-
console.log(`${pc.yellow('ā Plan Missing')} (Run /tasks)`);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
console.log('');
|
|
58
|
-
console.log('Use /build to continue work.');
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Tenta carregar picocolors se estiver disponĆvel no projeto do usuĆ”rio, senĆ£o usa fallback
|
|
5
|
+
let pc = {
|
|
6
|
+
green: s => s,
|
|
7
|
+
blue: s => s,
|
|
8
|
+
yellow: s => s,
|
|
9
|
+
red: s => s,
|
|
10
|
+
bold: s => s,
|
|
11
|
+
bgBlue: s => s
|
|
12
|
+
};
|
|
13
|
+
try { pc = require('picocolors'); } catch (e) {}
|
|
14
|
+
|
|
15
|
+
const docsDir = path.join(process.cwd(), '.sdd-toolkit');
|
|
16
|
+
|
|
17
|
+
function checkFile(name) {
|
|
18
|
+
const p = path.join(docsDir, name);
|
|
19
|
+
if (fs.existsSync(p)) {
|
|
20
|
+
const stats = fs.statSync(p);
|
|
21
|
+
return { exists: true, size: stats.size, mtime: stats.mtime };
|
|
22
|
+
}
|
|
23
|
+
return { exists: false };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
console.clear();
|
|
27
|
+
console.log(pc.bgBlue(pc.bold(' š SDD PROJECT STATUS ')));
|
|
28
|
+
console.log('');
|
|
29
|
+
|
|
30
|
+
// 1. Spec Status
|
|
31
|
+
const spec = checkFile('project.md');
|
|
32
|
+
if (spec.exists && spec.size > 100) {
|
|
33
|
+
console.log(`${pc.green('ā Spec Defined')} (Last update: ${spec.mtime.toLocaleString()})`);
|
|
34
|
+
} else {
|
|
35
|
+
console.log(`${pc.red('ā Spec Missing')} (Run /project)`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 2. Plan Status - Check for new structure
|
|
39
|
+
const contextFile = checkFile('context.md');
|
|
40
|
+
const stateFiles = fs.readdirSync(path.join(docsDir, 'features')).filter(f => f.endsWith('state.md'));
|
|
41
|
+
const featuresCount = stateFiles.length;
|
|
42
|
+
|
|
43
|
+
if (featuresCount > 0) {
|
|
44
|
+
console.log(`${pc.green('ā Features Active')} (${featuresCount} features)`);
|
|
45
|
+
} else {
|
|
46
|
+
console.log(`${pc.yellow('ā No Features Found')} (Run /feature)`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
console.log('');
|
|
50
|
+
console.log('Use /coder <Task_ID> to continue work.');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# šŗļø Project Context
|
|
2
|
+
|
|
3
|
+
## Executive Summary
|
|
4
|
+
- **Architecture:** [To be defined]
|
|
5
|
+
- **Database:** [To be defined]
|
|
6
|
+
- **Auth:** [To be defined]
|
|
7
|
+
|
|
8
|
+
## Features Matrix
|
|
9
|
+
| Feature | Status | Active Milestone | Progress |
|
|
10
|
+
|---------|--------|------------------|----------|
|
|
11
|
+
| None created yet | - | - | - |
|
|
12
|
+
|
|
13
|
+
## Key Dependencies
|
|
14
|
+
None defined yet.
|
|
15
|
+
|
|
16
|
+
## System State
|
|
17
|
+
- Database migrations: TBD
|
|
18
|
+
- Test coverage: TBD
|
|
19
|
+
- Last deployment: TBD
|
|
20
|
+
|
|
21
|
+
## Quick Access
|
|
22
|
+
- [All Features](features/)
|
package/templates/guidelines.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# š Project Guidelines
|
|
2
|
-
|
|
3
|
-
## šļø Architecture Patterns
|
|
4
|
-
|
|
5
|
-
## š» Code Conventions
|
|
6
|
-
|
|
7
|
-
## š ļø Tech Stack & Versions
|
|
8
|
-
|
|
9
|
-
## š”ļø Security & Performance
|
|
1
|
+
# š Project Guidelines
|
|
2
|
+
|
|
3
|
+
## šļø Architecture Patterns
|
|
4
|
+
|
|
5
|
+
## š» Code Conventions
|
|
6
|
+
|
|
7
|
+
## š ļø Tech Stack & Versions
|
|
8
|
+
|
|
9
|
+
## š”ļø Security & Performance
|
package/templates/project.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
---
|
|
2
|
-
title:
|
|
3
|
-
version:
|
|
4
|
-
status:
|
|
5
|
-
last_updated:
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
## 1. Overview
|
|
11
|
-
|
|
12
|
-
## 2. Business Objectives
|
|
13
|
-
|
|
14
|
-
## 3. Actors and Personas
|
|
15
|
-
|
|
16
|
-
## 4. Modules and Features Structure
|
|
17
|
-
|
|
18
|
-
## 5. User Journey (Flow)
|
|
19
|
-
|
|
20
|
-
## 6. Business Rules
|
|
21
|
-
|
|
22
|
-
## 7. External Integrations
|
|
23
|
-
|
|
24
|
-
## 8. Non-Functional Requirements & Constraints
|
|
25
|
-
|
|
26
|
-
## 9. Data Definitions
|
|
27
|
-
|
|
28
|
-
## 10. Project Principles (Constitution)
|
|
1
|
+
---
|
|
2
|
+
title:
|
|
3
|
+
version:
|
|
4
|
+
status:
|
|
5
|
+
last_updated:
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
## 1. Overview
|
|
11
|
+
|
|
12
|
+
## 2. Business Objectives
|
|
13
|
+
|
|
14
|
+
## 3. Actors and Personas
|
|
15
|
+
|
|
16
|
+
## 4. Modules and Features Structure
|
|
17
|
+
|
|
18
|
+
## 5. User Journey (Flow)
|
|
19
|
+
|
|
20
|
+
## 6. Business Rules
|
|
21
|
+
|
|
22
|
+
## 7. External Integrations
|
|
23
|
+
|
|
24
|
+
## 8. Non-Functional Requirements & Constraints
|
|
25
|
+
|
|
26
|
+
## 9. Data Definitions
|
|
27
|
+
|
|
28
|
+
## 10. Project Principles (Constitution)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Requirements and Architecture Specification
|
|
3
|
-
scope:
|
|
4
|
-
last_updated:
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Requirements and Stack Catalog
|
|
8
|
-
|
|
9
|
-
## 1. Tech Stack and Standards (Tech Constraints)
|
|
10
|
-
|
|
11
|
-
## 2. Functional Requirements (FR)
|
|
12
|
-
|
|
13
|
-
## 3. Non-Functional Requirements (NFR)
|
|
14
|
-
|
|
15
|
-
## 4. Data Model (Schema Draft)
|
|
1
|
+
---
|
|
2
|
+
title: Requirements and Architecture Specification
|
|
3
|
+
scope:
|
|
4
|
+
last_updated:
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Requirements and Stack Catalog
|
|
8
|
+
|
|
9
|
+
## 1. Tech Stack and Standards (Tech Constraints)
|
|
10
|
+
|
|
11
|
+
## 2. Functional Requirements (FR)
|
|
12
|
+
|
|
13
|
+
## 3. Non-Functional Requirements (NFR)
|
|
14
|
+
|
|
15
|
+
## 4. Data Model (Schema Draft)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# š„ļø System State
|
|
2
|
+
|
|
3
|
+
## Database
|
|
4
|
+
- Current Migration: TBD
|
|
5
|
+
- Pending Migrations: None
|
|
6
|
+
- Database Size: TBD
|
|
7
|
+
|
|
8
|
+
## Configuration
|
|
9
|
+
- Environment: development
|
|
10
|
+
- API Version: v1
|
|
11
|
+
- Auth Provider: TBD
|
|
12
|
+
|
|
13
|
+
## Integrations
|
|
14
|
+
None configured yet.
|
|
15
|
+
|
|
16
|
+
## Known Issues
|
|
17
|
+
None reported yet.
|
|
18
|
+
|
|
19
|
+
## Deployments
|
|
20
|
+
No deployments yet.
|
package/templates/task.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Tasks Sprint -
|
|
3
|
-
milestone_ref:
|
|
4
|
-
tech_stack:
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Execution Backlog:
|
|
8
|
-
|
|
9
|
-
## Technical Summary
|
|
10
|
-
|
|
11
|
-
## Tasks Checklist
|
|
1
|
+
---
|
|
2
|
+
title: Tasks Sprint -
|
|
3
|
+
milestone_ref:
|
|
4
|
+
tech_stack:
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Execution Backlog:
|
|
8
|
+
|
|
9
|
+
## Technical Summary
|
|
10
|
+
|
|
11
|
+
## Tasks Checklist
|