create-universal-ai-context 2.3.0 → 2.5.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/bin/create-ai-context.js +28 -10
- package/lib/adapters/aider.js +131 -0
- package/lib/adapters/antigravity.js +47 -2
- package/lib/adapters/claude.js +100 -25
- package/lib/adapters/cline.js +16 -2
- package/lib/adapters/continue.js +138 -0
- package/lib/adapters/copilot.js +16 -2
- package/lib/adapters/index.js +11 -2
- package/lib/adapters/windsurf.js +138 -0
- package/lib/ai-orchestrator.js +2 -1
- package/lib/content-preservation.js +243 -0
- package/lib/index.js +11 -4
- package/lib/placeholder.js +82 -1
- package/lib/template-coordination.js +148 -0
- package/lib/template-renderer.js +15 -5
- package/lib/utils/fs-wrapper.js +79 -0
- package/lib/utils/path-utils.js +60 -0
- package/package.json +1 -1
- package/templates/handlebars/aider-config.hbs +80 -0
- package/templates/handlebars/antigravity.hbs +40 -0
- package/templates/handlebars/claude.hbs +1 -2
- package/templates/handlebars/cline.hbs +1 -2
- package/templates/handlebars/continue-config.hbs +116 -0
- package/templates/handlebars/copilot.hbs +1 -2
- package/templates/handlebars/partials/header.hbs +1 -1
- package/templates/handlebars/windsurf-rules.hbs +69 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Coordination Module
|
|
3
|
+
* Helpers for adding tool awareness to generated content
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get tool coordination header
|
|
11
|
+
* @param {string} toolName - Name of the tool (claude, copilot, cline, antigravity)
|
|
12
|
+
* @param {string} version - Version of create-ai-context
|
|
13
|
+
* @returns {string} Header comment for the tool
|
|
14
|
+
*/
|
|
15
|
+
function getToolCoordinationHeader(toolName, version) {
|
|
16
|
+
version = version || '2.3.0';
|
|
17
|
+
|
|
18
|
+
const newline = '\n';
|
|
19
|
+
const htmlHeaderBase = '<!-- ========================================= -->';
|
|
20
|
+
const htmlFooterBase = '<!-- ========================================= -->';
|
|
21
|
+
const hashHeaderBase = '# ==========================================';
|
|
22
|
+
const hashFooterBase = '# ==========================================';
|
|
23
|
+
|
|
24
|
+
const headers = {
|
|
25
|
+
claude: [
|
|
26
|
+
htmlHeaderBase,
|
|
27
|
+
'<!-- WARNING: CLAUDE CODE CONTEXT -->',
|
|
28
|
+
'<!-- Managed by create-ai-context v' + version + ' -->',
|
|
29
|
+
'<!-- Source: .ai-context/ directory -->',
|
|
30
|
+
htmlFooterBase
|
|
31
|
+
].join(newline),
|
|
32
|
+
|
|
33
|
+
copilot: [
|
|
34
|
+
htmlHeaderBase,
|
|
35
|
+
'<!-- WARNING: GITHUB COPILOT INSTRUCTIONS -->',
|
|
36
|
+
'<!-- Managed by create-ai-context v' + version + ' -->',
|
|
37
|
+
'<!-- Source: .ai-context/ directory -->',
|
|
38
|
+
htmlFooterBase
|
|
39
|
+
].join(newline),
|
|
40
|
+
|
|
41
|
+
cline: [
|
|
42
|
+
hashHeaderBase,
|
|
43
|
+
'# WARNING: CLINE RULES',
|
|
44
|
+
'# Managed by create-ai-context v' + version,
|
|
45
|
+
'# Source: .ai-context/ directory',
|
|
46
|
+
hashFooterBase
|
|
47
|
+
].join(newline),
|
|
48
|
+
|
|
49
|
+
antigravity: [
|
|
50
|
+
htmlHeaderBase,
|
|
51
|
+
'<!-- WARNING: ANTIGRAVITY CONTEXT -->',
|
|
52
|
+
'<!-- Managed by create-ai-context v' + version + ' -->',
|
|
53
|
+
'<!-- Source: .ai-context/ directory -->',
|
|
54
|
+
htmlFooterBase
|
|
55
|
+
].join(newline)
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return headers[toolName] || '';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get tool coordination footer
|
|
63
|
+
* @param {string} toolName - Name of the tool
|
|
64
|
+
* @returns {string} Footer content with cross-tool references
|
|
65
|
+
*/
|
|
66
|
+
function getToolCoordinationFooter(toolName) {
|
|
67
|
+
const footer = '---\n' +
|
|
68
|
+
'## Universal Context Directory\n\n' +
|
|
69
|
+
'This project uses **AI Context Engineering** for coordinated documentation across all AI tools.\n\n' +
|
|
70
|
+
'**Universal Source:** .ai-context/\n\n' +
|
|
71
|
+
'**Related Tool Contexts:**\n' +
|
|
72
|
+
'- Claude Code: `AI_CONTEXT.md`\n' +
|
|
73
|
+
'- GitHub Copilot: `.github/copilot-instructions.md`\n' +
|
|
74
|
+
'- Cline: `.clinerules`\n' +
|
|
75
|
+
'- Antigravity: `.agent/`\n\n' +
|
|
76
|
+
'**Regeneration Command:**\n' +
|
|
77
|
+
'```bash\n' +
|
|
78
|
+
'npx create-ai-context generate --ai ' + toolName + '\n```\n\n' +
|
|
79
|
+
'**To Modify Documentation:**\n' +
|
|
80
|
+
'Edit source files in .ai-context/ then regenerate.\n';
|
|
81
|
+
|
|
82
|
+
return footer;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Check if file is managed by create-ai-context
|
|
87
|
+
* @param {string} filePath - Path to file to check
|
|
88
|
+
* @returns {boolean} True if file is managed by create-ai-context
|
|
89
|
+
*/
|
|
90
|
+
function isManagedFile(filePath) {
|
|
91
|
+
try {
|
|
92
|
+
if (!fs.existsSync(filePath)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
96
|
+
return content.includes('Managed by create-ai-context') ||
|
|
97
|
+
content.includes('CREATE-AI-CONTEXT') ||
|
|
98
|
+
content.includes('Auto-generated by AI Context Engineering');
|
|
99
|
+
} catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get universal context reference for templates
|
|
106
|
+
* @returns {object} Object with context directory info
|
|
107
|
+
*/
|
|
108
|
+
function getUniversalContextReference() {
|
|
109
|
+
return {
|
|
110
|
+
directory: '.ai-context',
|
|
111
|
+
description: 'Universal AI Context Engineering directory',
|
|
112
|
+
subdirectories: {
|
|
113
|
+
agents: '.ai-context/agents/',
|
|
114
|
+
commands: '.ai-context/commands/',
|
|
115
|
+
context: '.ai-context/context/',
|
|
116
|
+
indexes: '.ai-context/indexes/',
|
|
117
|
+
custom: '.ai-context/custom/',
|
|
118
|
+
tools: '.ai-context/tools/'
|
|
119
|
+
},
|
|
120
|
+
mainFile: 'AI_CONTEXT.md',
|
|
121
|
+
workflowIndex: '.ai-context/context/WORKFLOW_INDEX.md',
|
|
122
|
+
rpiPlan: '.ai-context/RPI_WORKFLOW_PLAN.md'
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Format tool coordination message for CLI output
|
|
128
|
+
* @param {string} toolName - Name of the tool
|
|
129
|
+
* @returns {string} Formatted message
|
|
130
|
+
*/
|
|
131
|
+
function formatCoordinationMessage(toolName) {
|
|
132
|
+
const messages = {
|
|
133
|
+
claude: 'Claude Code context generated. Symlinks created from .ai-context/',
|
|
134
|
+
copilot: 'Copilot instructions generated from .ai-context/ universal context',
|
|
135
|
+
cline: 'Cline rules generated from .ai-context/ universal context',
|
|
136
|
+
antigravity: 'Antigravity context generated from .ai-context/ universal context'
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
return messages[toolName] || toolName + ' context generated';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
module.exports = {
|
|
143
|
+
getToolCoordinationHeader,
|
|
144
|
+
getToolCoordinationFooter,
|
|
145
|
+
isManagedFile,
|
|
146
|
+
getUniversalContextReference,
|
|
147
|
+
formatCoordinationMessage
|
|
148
|
+
};
|
package/lib/template-renderer.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
const Handlebars = require('handlebars');
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
const path = require('path');
|
|
11
|
+
const { getToolCoordinationHeader, getToolCoordinationFooter, getUniversalContextReference } = require('./template-coordination');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Templates directory
|
|
@@ -217,11 +218,13 @@ function getAvailableTemplates() {
|
|
|
217
218
|
* Build default context from analysis results
|
|
218
219
|
* @param {object} analysis - Analysis results from static analyzer
|
|
219
220
|
* @param {object} config - Configuration from CLI
|
|
221
|
+
* @param {string} toolName - AI tool name (claude, copilot, cline, antigravity)
|
|
220
222
|
* @returns {object} Context object for templates
|
|
221
223
|
*/
|
|
222
|
-
function buildContext(analysis, config) {
|
|
224
|
+
function buildContext(analysis, config, toolName = 'claude') {
|
|
223
225
|
const projectName = config.projectName || 'project';
|
|
224
226
|
const techStack = analysis.techStack || config.techStack || {};
|
|
227
|
+
const version = getPackageVersion();
|
|
225
228
|
|
|
226
229
|
return {
|
|
227
230
|
// Project identity
|
|
@@ -286,12 +289,19 @@ function buildContext(analysis, config) {
|
|
|
286
289
|
// Critical constraints
|
|
287
290
|
critical_constraints: [],
|
|
288
291
|
|
|
289
|
-
// Metadata
|
|
292
|
+
// Metadata with tool-specific coordination header
|
|
290
293
|
metadata: {
|
|
291
|
-
header:
|
|
294
|
+
header: getToolCoordinationHeader(toolName, version),
|
|
292
295
|
timestamp: new Date().toISOString(),
|
|
293
|
-
generator_version:
|
|
294
|
-
source_ref: projectName
|
|
296
|
+
generator_version: version,
|
|
297
|
+
source_ref: projectName,
|
|
298
|
+
tool_name: toolName
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
// Tool coordination footer
|
|
302
|
+
coordination: {
|
|
303
|
+
footer: getToolCoordinationFooter(toolName),
|
|
304
|
+
universal_context: getUniversalContextReference()
|
|
295
305
|
},
|
|
296
306
|
|
|
297
307
|
// Registry (for federation compatibility)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filesystem Operation Wrapper
|
|
3
|
+
*
|
|
4
|
+
* Adds context to filesystem errors (WARNING level, not fatal)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const chalk = require('chalk');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wrap sync file write with better error messages
|
|
13
|
+
* Returns warning object instead of throwing (non-fatal)
|
|
14
|
+
* @param {string} filePath - File path
|
|
15
|
+
* @param {string} content - Content to write
|
|
16
|
+
* @param {object} options - Write options
|
|
17
|
+
* @returns {object} { success: boolean, warning?: string }
|
|
18
|
+
*/
|
|
19
|
+
function writeFileSyncWithContext(filePath, content, options = {}) {
|
|
20
|
+
try {
|
|
21
|
+
fs.writeFileSync(filePath, content, options);
|
|
22
|
+
return { success: true };
|
|
23
|
+
} catch (error) {
|
|
24
|
+
let message;
|
|
25
|
+
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
|
26
|
+
message = `Permission denied writing to ${filePath}. Check file permissions.`;
|
|
27
|
+
} else if (error.code === 'ENOENT') {
|
|
28
|
+
message = `Directory does not exist: ${path.dirname(filePath)}. Ensure parent directory exists.`;
|
|
29
|
+
} else if (error.code === 'ENOSPC') {
|
|
30
|
+
message = `No space left on device while writing ${filePath}. Free up disk space.`;
|
|
31
|
+
} else {
|
|
32
|
+
message = `Failed to write ${filePath}: ${error.message}`;
|
|
33
|
+
}
|
|
34
|
+
return { success: false, warning: message, error };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Wrap sync directory creation with better error messages
|
|
40
|
+
* Returns warning object instead of throwing (non-fatal)
|
|
41
|
+
* @param {string} dirPath - Directory path
|
|
42
|
+
* @param {object} options - mkdir options
|
|
43
|
+
* @returns {object} { success: boolean, warning?: string }
|
|
44
|
+
*/
|
|
45
|
+
function mkdirSyncWithContext(dirPath, options = {}) {
|
|
46
|
+
try {
|
|
47
|
+
fs.mkdirSync(dirPath, options);
|
|
48
|
+
return { success: true };
|
|
49
|
+
} catch (error) {
|
|
50
|
+
// EEXIST is not an error - directory already exists
|
|
51
|
+
if (error.code === 'EEXIST') {
|
|
52
|
+
return { success: true };
|
|
53
|
+
}
|
|
54
|
+
let message;
|
|
55
|
+
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
|
56
|
+
message = `Permission denied creating directory ${dirPath}. Check directory permissions.`;
|
|
57
|
+
} else {
|
|
58
|
+
message = `Failed to create directory ${dirPath}: ${error.message}`;
|
|
59
|
+
}
|
|
60
|
+
return { success: false, warning: message, error };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Log a warning message if verbose mode is enabled
|
|
66
|
+
* @param {object} result - Result from writeFileSyncWithContext or mkdirSyncWithContext
|
|
67
|
+
* @param {boolean} verbose - Whether to log warnings
|
|
68
|
+
*/
|
|
69
|
+
function logWarning(result, verbose = false) {
|
|
70
|
+
if (!result.success && result.warning && verbose) {
|
|
71
|
+
console.warn(chalk.yellow(`⚠ ${result.warning}`));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
module.exports = {
|
|
76
|
+
writeFileSyncWithContext,
|
|
77
|
+
mkdirSyncWithContext,
|
|
78
|
+
logWarning
|
|
79
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path Utilities
|
|
3
|
+
*
|
|
4
|
+
* Cross-platform path handling utilities
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Normalize path separators to forward slashes for consistency
|
|
11
|
+
* @param {string} filePath - Path to normalize
|
|
12
|
+
* @returns {string} Normalized path
|
|
13
|
+
*/
|
|
14
|
+
function normalizePath(filePath) {
|
|
15
|
+
if (!filePath) return '';
|
|
16
|
+
return filePath.replace(/\\/g, '/');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Get relative path with normalized separators
|
|
21
|
+
* @param {string} from - Source path
|
|
22
|
+
* @param {string} to - Destination path
|
|
23
|
+
* @returns {string} Normalized relative path
|
|
24
|
+
*/
|
|
25
|
+
function relativePath(from, to) {
|
|
26
|
+
const rel = path.relative(from, to);
|
|
27
|
+
return normalizePath(rel);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Join path segments and normalize
|
|
32
|
+
* @param {...string} segments - Path segments
|
|
33
|
+
* @returns {string} Normalized joined path
|
|
34
|
+
*/
|
|
35
|
+
function joinPath(...segments) {
|
|
36
|
+
return normalizePath(path.join(...segments));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Check if path is absolute (cross-platform)
|
|
41
|
+
* @param {string} filePath - Path to check
|
|
42
|
+
* @returns {boolean}
|
|
43
|
+
*/
|
|
44
|
+
function isAbsolute(filePath) {
|
|
45
|
+
if (!filePath) return false;
|
|
46
|
+
|
|
47
|
+
// Windows paths can start with drive letter (C:\) or UNC (\\)
|
|
48
|
+
if (/^[a-zA-Z]:\\/.test(filePath) || /^\\\\/.test(filePath)) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return path.isAbsolute(filePath);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = {
|
|
56
|
+
normalizePath,
|
|
57
|
+
relativePath,
|
|
58
|
+
joinPath,
|
|
59
|
+
isAbsolute
|
|
60
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{{!-- Aider Configuration Template --}}
|
|
2
|
+
# {{project.name}} - Aider Configuration
|
|
3
|
+
# Generated: {{metadata.timestamp}}
|
|
4
|
+
|
|
5
|
+
# Model selection (uncomment and configure as needed)
|
|
6
|
+
# model: gpt-4
|
|
7
|
+
# model: claude-3-opus-20240229
|
|
8
|
+
# model: deepseek-coder
|
|
9
|
+
|
|
10
|
+
# Auto-commit settings
|
|
11
|
+
auto-commits: true
|
|
12
|
+
auto-commit: false
|
|
13
|
+
commit_prompt: "docs: update {path} per AI pair-programming session"
|
|
14
|
+
|
|
15
|
+
# File handling
|
|
16
|
+
{{#if key_files.entry_points}}
|
|
17
|
+
# Add only these files to context
|
|
18
|
+
add: {{join key_files.entry_points ","}}
|
|
19
|
+
{{/if}}
|
|
20
|
+
|
|
21
|
+
# Exclude patterns
|
|
22
|
+
exclude:
|
|
23
|
+
- node_modules/
|
|
24
|
+
- build/
|
|
25
|
+
- dist/
|
|
26
|
+
- .git/
|
|
27
|
+
- coverage/
|
|
28
|
+
- "*.min.js"
|
|
29
|
+
- "*.min.css"
|
|
30
|
+
|
|
31
|
+
# Git settings
|
|
32
|
+
gitignore: true
|
|
33
|
+
git-detect: true
|
|
34
|
+
|
|
35
|
+
# Editor settings
|
|
36
|
+
editor: vscode
|
|
37
|
+
# editor-model: gpt-4
|
|
38
|
+
|
|
39
|
+
# Language detection
|
|
40
|
+
{{#if project.primary_language}}
|
|
41
|
+
language: {{project.primary_language}}
|
|
42
|
+
{{/if}}
|
|
43
|
+
|
|
44
|
+
# Testing
|
|
45
|
+
test-cmd: {{commands.test}}
|
|
46
|
+
|
|
47
|
+
# Linting (configure as needed)
|
|
48
|
+
# lint-cmd: npm run lint
|
|
49
|
+
# lint-cmd: python -m flake8 .
|
|
50
|
+
|
|
51
|
+
# Security
|
|
52
|
+
# unsafe-install: false # Set to true to allow pip installs without confirmation
|
|
53
|
+
|
|
54
|
+
# Shell commands
|
|
55
|
+
# shell-commands: true # Allow aider to run shell commands
|
|
56
|
+
|
|
57
|
+
# Voice input (experimental)
|
|
58
|
+
# voice-input: false
|
|
59
|
+
|
|
60
|
+
# Chat history
|
|
61
|
+
# chat-history: .aider.chat.history
|
|
62
|
+
# chat-history-file: .aider.chat.history
|
|
63
|
+
|
|
64
|
+
# Display settings
|
|
65
|
+
# color: true
|
|
66
|
+
# progress-spinner: true
|
|
67
|
+
|
|
68
|
+
# Map tokens (for context optimization)
|
|
69
|
+
# map-tokens: 2048
|
|
70
|
+
|
|
71
|
+
# Message formatting
|
|
72
|
+
# stream: true
|
|
73
|
+
# dark-mode: false
|
|
74
|
+
|
|
75
|
+
# Advanced settings
|
|
76
|
+
# attribute-author: true
|
|
77
|
+
# attribute-committer: true
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
{{{coordination.footer}}}
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
{{/each}}
|
|
61
61
|
{{/if}}
|
|
62
62
|
{{/if}}
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
{{{coordination.footer}}}
|
|
63
67
|
{{{fileEnd}}}
|
|
64
68
|
|
|
65
69
|
{{!-- ============================================================ --}}
|
|
@@ -102,6 +106,10 @@
|
|
|
102
106
|
- `{{this}}`
|
|
103
107
|
{{/each}}
|
|
104
108
|
{{/if}}
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
{{{coordination.footer}}}
|
|
105
113
|
{{{fileEnd}}}
|
|
106
114
|
|
|
107
115
|
{{!-- ============================================================ --}}
|
|
@@ -133,6 +141,10 @@ These are known issues and pitfalls. Review before making changes.
|
|
|
133
141
|
{{else}}
|
|
134
142
|
*No gotchas documented yet. Add as discovered.*
|
|
135
143
|
{{/if}}
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
{{{coordination.footer}}}
|
|
136
148
|
{{{fileEnd}}}
|
|
137
149
|
|
|
138
150
|
{{!-- ============================================================ --}}
|
|
@@ -158,6 +170,10 @@ These rules MUST be followed. Violations may cause production issues.
|
|
|
158
170
|
- Total Constraints: {{length critical_constraints}}
|
|
159
171
|
- Gotchas: {{length gotchas}}
|
|
160
172
|
- Workflows: {{length workflows}}
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
{{{coordination.footer}}}
|
|
161
177
|
{{{fileEnd}}}
|
|
162
178
|
|
|
163
179
|
{{!-- ============================================================ --}}
|
|
@@ -189,6 +205,10 @@ These rules MUST be followed. Violations may cause production issues.
|
|
|
189
205
|
{{else}}
|
|
190
206
|
*No workflows discovered. Run AI analysis to populate.*
|
|
191
207
|
{{/if}}
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
{{{coordination.footer}}}
|
|
192
212
|
{{{fileEnd}}}
|
|
193
213
|
|
|
194
214
|
{{!-- ============================================================ --}}
|
|
@@ -214,6 +234,10 @@ Starts the {{project.name}} development server.
|
|
|
214
234
|
|
|
215
235
|
## Related
|
|
216
236
|
- See `rules/identity.md` for full command list
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
{{{coordination.footer}}}
|
|
217
241
|
{{{fileEnd}}}
|
|
218
242
|
|
|
219
243
|
{{{fileStart "workflows/test.md"}}}
|
|
@@ -232,6 +256,10 @@ Runs the test suite for {{project.name}}.
|
|
|
232
256
|
## Tips
|
|
233
257
|
- Run before committing changes
|
|
234
258
|
- Check test coverage reports
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
{{{coordination.footer}}}
|
|
235
263
|
{{{fileEnd}}}
|
|
236
264
|
|
|
237
265
|
{{{fileStart "workflows/build.md"}}}
|
|
@@ -246,6 +274,10 @@ Runs the test suite for {{project.name}}.
|
|
|
246
274
|
|
|
247
275
|
## Description
|
|
248
276
|
Builds {{project.name}} for production.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
{{{coordination.footer}}}
|
|
249
281
|
{{{fileEnd}}}
|
|
250
282
|
|
|
251
283
|
{{!-- ============================================================ --}}
|
|
@@ -293,6 +325,10 @@ Activate this skill when debugging issues in {{project.name}}.
|
|
|
293
325
|
- Check application logs for errors
|
|
294
326
|
- Review stack traces carefully
|
|
295
327
|
- Verify environment configuration
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
{{{coordination.footer}}}
|
|
296
332
|
{{{fileEnd}}}
|
|
297
333
|
|
|
298
334
|
{{{fileStart "skills/implementation.md"}}}
|
|
@@ -334,4 +370,8 @@ Activate this skill when implementing new features in {{project.name}}.
|
|
|
334
370
|
- {{this}}
|
|
335
371
|
{{/each}}
|
|
336
372
|
{{/if}}
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
{{{coordination.footer}}}
|
|
337
377
|
{{{fileEnd}}}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{{!-- Continue Configuration Template --}}
|
|
2
|
+
{
|
|
3
|
+
"$schema": "https://continue.dev/schema.json",
|
|
4
|
+
"projectTitle": "{{project.name}}",
|
|
5
|
+
"description": "{{project.description}}",
|
|
6
|
+
"techstack": "{{join project.tech_stack ", "}}",
|
|
7
|
+
|
|
8
|
+
"context": {
|
|
9
|
+
"providers": [
|
|
10
|
+
{
|
|
11
|
+
"name": "codebase",
|
|
12
|
+
"description": "Project codebase context"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"rules": [
|
|
16
|
+
{
|
|
17
|
+
"description": "Project Communication Style",
|
|
18
|
+
"type": "markdown",
|
|
19
|
+
"content": "<communication>\n- Speak to me in a professional, technical manner\n- Provide clear explanations for code changes\n- Reference specific files and line numbers when discussing changes\n- Ask clarifying questions when requirements are ambiguous\n</communication>"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"description": "Filesystem Rules",
|
|
23
|
+
"type": "markdown",
|
|
24
|
+
"content": "<filesystem>\n{{#if key_files.entry_points}}- Key project files: {{join key_files.entry_points ", "}}\n{{/if}}- Models directory: {{#each architecture.layers}}{{#if (ifEquals name 'models')}}{{path}}{{/if}}{{/each}}\n- Migrations directory: {{#each architecture.layers}}{{#if (ifEquals name 'migrations')}}{{path}}{{/if}}{{/each}}\n- Treat node_modules, build, dist as read-only\n</filesystem>"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"description": "Coding Guidelines",
|
|
28
|
+
"type": "markdown",
|
|
29
|
+
"content": "<coding>\n- Primary language: {{project.primary_language}}\n- Framework: {{#each architecture.layers}}{{#if (ifEquals name 'framework')}}{{name}}{{/if}}{{/each}}\n- Testing framework: jest\n- Follow existing code style and patterns\n- Add type hints/annotations for all functions\n- Write tests for new functionality (target: 80% coverage)\n- Use early returns when possible\n- Avoid deep nesting (>4 levels)\n- Keep functions focused and small (<50 lines)\n</coding>"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"description": "Commands",
|
|
33
|
+
"type": "table",
|
|
34
|
+
"content": "| Command | Purpose |\n|---------|---------|\n| {{commands.install}} | Install dependencies |\n| {{commands.dev}} | Start development server |\n| {{commands.test}} | Run tests |\n| {{commands.build}} | Build for production |"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "Architecture",
|
|
38
|
+
"type": "markdown",
|
|
39
|
+
"content": "<architecture>\n{{project.description}}\n\nKey patterns:\n- {{architecture.pattern}}\n{{#each architecture.layers}}\n- {{name}}: {{purpose}}\n{{/each}}\n</architecture>"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
"slashCommands": [
|
|
45
|
+
{
|
|
46
|
+
"name": "test",
|
|
47
|
+
"description": "Run tests",
|
|
48
|
+
"run": "{{commands.test}}"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "build",
|
|
52
|
+
"description": "Build project",
|
|
53
|
+
"run": "{{commands.build}}"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "dev",
|
|
57
|
+
"description": "Start development server",
|
|
58
|
+
"run": "{{commands.dev}}"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
|
|
62
|
+
"models": [
|
|
63
|
+
{
|
|
64
|
+
"title": "GPT-4",
|
|
65
|
+
"provider": "openai",
|
|
66
|
+
"model": "gpt-4"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"title": "Claude 3 Opus",
|
|
70
|
+
"provider": "anthropic",
|
|
71
|
+
"model": "claude-3-opus-20240229"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
"tabAutocompleteModel": {
|
|
76
|
+
"title": "DeepSeek V2",
|
|
77
|
+
"provider": "deepseek",
|
|
78
|
+
"model": "deepseek-coder"
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"customCommands": [
|
|
82
|
+
{
|
|
83
|
+
"name": "explain",
|
|
84
|
+
"prompt": "Explain the selected code in detail, including its purpose and how it works."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "refactor",
|
|
88
|
+
"prompt": "Refactor the selected code to improve readability and maintainability."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "docs",
|
|
92
|
+
"prompt": "Generate JSDoc/TypeDoc documentation for the selected code."
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
|
|
96
|
+
"allowYaml": true,
|
|
97
|
+
|
|
98
|
+
"maxContextTokens": 8000,
|
|
99
|
+
|
|
100
|
+
"temperature": 0.2,
|
|
101
|
+
|
|
102
|
+
"regexDenylist": [
|
|
103
|
+
".*\\.min\\.js",
|
|
104
|
+
".*\\.min\\.css",
|
|
105
|
+
"node_modules/.*",
|
|
106
|
+
"build/.*",
|
|
107
|
+
"dist/.*"
|
|
108
|
+
],
|
|
109
|
+
|
|
110
|
+
"_comment": "Generated by create-universal-ai-context v{{metadata.generator_version}}",
|
|
111
|
+
"_generatedAt": "{{metadata.timestamp}}",
|
|
112
|
+
"_toolCoordination": {
|
|
113
|
+
"universalContext": ".ai-context/",
|
|
114
|
+
"regenerateCommand": "npx create-ai-context generate --ai continue"
|
|
115
|
+
}
|
|
116
|
+
}
|