daedalion 0.0.1 → 0.0.2
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 +15 -5
- package/bin/daedalion.js +1 -0
- package/package.json +2 -2
- package/src/commands/init.js +14 -1
- package/src/generators/skill.js +8 -5
package/README.md
CHANGED
|
@@ -61,10 +61,11 @@ flowchart LR
|
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
npm install -g openspec daedalion
|
|
64
|
-
openspec init
|
|
65
|
-
daedalion init
|
|
66
|
-
daedalion
|
|
67
|
-
daedalion
|
|
64
|
+
openspec init # creates openspec/ + AGENTS.md
|
|
65
|
+
daedalion init # adds daedalion.yaml + project.md (minimal)
|
|
66
|
+
daedalion init --with-example # includes example specs and changes
|
|
67
|
+
daedalion build # generates Copilot artifacts (agents, skills, prompts)
|
|
68
|
+
daedalion validate # checks specs ↔ artifacts are in sync
|
|
68
69
|
```
|
|
69
70
|
|
|
70
71
|
Use the coordinator by asking your AI: “Help me work through the OpenSpec cycle.”
|
|
@@ -84,7 +85,16 @@ Use the coordinator by asking your AI: “Help me work through the OpenSpec cycl
|
|
|
84
85
|
|
|
85
86
|
## Commands
|
|
86
87
|
|
|
87
|
-
- `daedalion init` - Scaffolds a new project
|
|
88
|
+
- `daedalion init` - Scaffolds a new project:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
project/
|
|
92
|
+
├── daedalion.yaml
|
|
93
|
+
└── openspec/
|
|
94
|
+
└── project.md
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Add `--with-example` to include example specs and changes:
|
|
88
98
|
|
|
89
99
|
```
|
|
90
100
|
project/
|
package/bin/daedalion.js
CHANGED
|
@@ -40,6 +40,7 @@ program
|
|
|
40
40
|
.command('init')
|
|
41
41
|
.description('Scaffold config + example spec')
|
|
42
42
|
.option('--target <mode>', 'Agent target mode: ide or sdk')
|
|
43
|
+
.option('--with-example', 'Include example spec and change files')
|
|
43
44
|
.action(async (options) => {
|
|
44
45
|
try {
|
|
45
46
|
await init(process.cwd(), options);
|
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -14,7 +14,7 @@ export async function init(cwd, options = {}) {
|
|
|
14
14
|
|
|
15
15
|
const templatesDir = join(__dirname, '../../templates/init');
|
|
16
16
|
const files = getAllFiles(templatesDir);
|
|
17
|
-
const { agentTarget } = options;
|
|
17
|
+
const { agentTarget, withExample } = options;
|
|
18
18
|
|
|
19
19
|
let created = 0;
|
|
20
20
|
let skipped = 0;
|
|
@@ -23,6 +23,11 @@ export async function init(cwd, options = {}) {
|
|
|
23
23
|
const relativePath = relative(templatesDir, file);
|
|
24
24
|
const targetPath = join(cwd, relativePath);
|
|
25
25
|
|
|
26
|
+
// Skip example files if --with-example not provided
|
|
27
|
+
if (!withExample && isExampleFile(relativePath)) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
if (existsSync(targetPath)) {
|
|
27
32
|
console.log(chalk.yellow(` ⚠ ${relativePath} already exists, skipping`));
|
|
28
33
|
skipped++;
|
|
@@ -86,3 +91,11 @@ function getAllFiles(dir, files = []) {
|
|
|
86
91
|
|
|
87
92
|
return files;
|
|
88
93
|
}
|
|
94
|
+
|
|
95
|
+
function isExampleFile(relativePath) {
|
|
96
|
+
// Example files are in specs/example/ or changes/example-feature/
|
|
97
|
+
return relativePath.includes('specs/example/') ||
|
|
98
|
+
relativePath.includes('specs\\example\\') ||
|
|
99
|
+
relativePath.includes('changes/example-feature/') ||
|
|
100
|
+
relativePath.includes('changes\\example-feature\\');
|
|
101
|
+
}
|
package/src/generators/skill.js
CHANGED
|
@@ -10,14 +10,17 @@ export function generateSkill(spec, tasks, outputDir, options = {}) {
|
|
|
10
10
|
const description = generateDescription(spec);
|
|
11
11
|
const keywords = extractKeywords(spec);
|
|
12
12
|
|
|
13
|
-
const baseFrontmatter = {
|
|
14
|
-
name: spec.domain,
|
|
15
|
-
description: `${description}. Use when working on ${keywords}.`
|
|
16
|
-
};
|
|
17
13
|
const specFrontmatter = spec.frontmatter && typeof spec.frontmatter === 'object'
|
|
18
14
|
? spec.frontmatter
|
|
19
15
|
: {};
|
|
20
|
-
|
|
16
|
+
|
|
17
|
+
// Build frontmatter, preserving spec frontmatter (including tools) while providing defaults
|
|
18
|
+
const frontmatter = {
|
|
19
|
+
name: specFrontmatter.name || spec.domain,
|
|
20
|
+
description: specFrontmatter.description || `${description}. Use when working on ${keywords}.`,
|
|
21
|
+
...specFrontmatter // Preserve all other frontmatter properties (tools, etc.)
|
|
22
|
+
};
|
|
23
|
+
|
|
21
24
|
const agentInstructions = typeof specFrontmatter.agent_instructions === 'string'
|
|
22
25
|
? specFrontmatter.agent_instructions
|
|
23
26
|
: null;
|