ai-sprint-kit 2.1.24 → 2.1.25

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/bin/ai-sprint.js CHANGED
@@ -14,6 +14,7 @@ const {
14
14
  const {
15
15
  cloneProRepo,
16
16
  copyProContent,
17
+ createAiContextStructure,
17
18
  cleanup,
18
19
  checkExisting
19
20
  } = require('../lib/installer');
@@ -154,6 +155,7 @@ program
154
155
  progress.startStep(3);
155
156
  const installSpinner = ora('Installing framework...').start();
156
157
  await copyProContent(tempDir, targetDir, options.force);
158
+ await createAiContextStructure(targetDir);
157
159
  await cleanup(targetDir);
158
160
  progress.completeStep(3);
159
161
  installSpinner.succeed('Installed');
package/lib/installer.js CHANGED
@@ -63,6 +63,52 @@ async function copyProContent(sourceDir, targetDir, force = false) {
63
63
  }
64
64
  }
65
65
 
66
+ /**
67
+ * Create ai_context directory structure
68
+ * @param {string} targetDir - User's project directory
69
+ */
70
+ async function createAiContextStructure(targetDir) {
71
+ const aiContextDir = path.join(targetDir, 'ai_context');
72
+
73
+ const dirs = [
74
+ 'plans',
75
+ 'reports',
76
+ 'codebase',
77
+ 'memory'
78
+ ];
79
+
80
+ for (const dir of dirs) {
81
+ await fs.mkdir(path.join(aiContextDir, dir), { recursive: true });
82
+ }
83
+
84
+ // Create empty memory files if they don't exist
85
+ const memoryFiles = [
86
+ { file: 'learning.md', content: '# Lessons Learned\n\nDocument lessons and patterns here.\n' },
87
+ { file: 'decisions.md', content: '# Key Decisions\n\nDocument architecture and design decisions here.\n' },
88
+ { file: 'active.md', content: '# Active Context\n\nCurrent session focus and context.\n' }
89
+ ];
90
+
91
+ for (const { file, content } of memoryFiles) {
92
+ const filePath = path.join(aiContextDir, 'memory', file);
93
+ try {
94
+ await fs.access(filePath);
95
+ // File exists, don't overwrite
96
+ } catch {
97
+ await fs.writeFile(filePath, content);
98
+ }
99
+ }
100
+
101
+ // Add .gitkeep to empty dirs
102
+ for (const dir of ['plans', 'reports', 'codebase']) {
103
+ const gitkeep = path.join(aiContextDir, dir, '.gitkeep');
104
+ try {
105
+ await fs.access(gitkeep);
106
+ } catch {
107
+ await fs.writeFile(gitkeep, '');
108
+ }
109
+ }
110
+ }
111
+
66
112
  /**
67
113
  * Cleanup temp directory
68
114
  * @param {string} targetDir
@@ -89,6 +135,7 @@ async function checkExisting(targetDir) {
89
135
  module.exports = {
90
136
  cloneProRepo,
91
137
  copyProContent,
138
+ createAiContextStructure,
92
139
  cleanup,
93
140
  checkExisting
94
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sprint-kit",
3
- "version": "2.1.24",
3
+ "version": "2.1.25",
4
4
  "description": "CLI installer for AI Sprint autonomous development framework - requires license",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {