@fledge/workflow 0.6.1 → 0.6.3
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/dist/scripts/brief.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { i as runMain, n as writeFrontmatter, r as defineCommand, t as parseFrontmatter } from "./frontmatter-BUnjSmTA.js";
|
|
1
|
+
import { i as runMain, n as writeFrontmatter, r as defineCommand, t as parseFrontmatter } from "./frontmatter-D8qbiIuN.js";
|
|
3
2
|
import { cwd, stdout } from "node:process";
|
|
4
3
|
import fs from "node:fs";
|
|
5
4
|
import path from "node:path";
|
package/dist/scripts/skills.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { i as runMain, n as writeFrontmatter, r as defineCommand, t as parseFrontmatter } from "./frontmatter-BUnjSmTA.js";
|
|
1
|
+
import { i as runMain, n as writeFrontmatter, r as defineCommand, t as parseFrontmatter } from "./frontmatter-D8qbiIuN.js";
|
|
3
2
|
import { cwd, env, stdout } from "node:process";
|
|
4
3
|
import fs from "node:fs";
|
|
5
4
|
import path from "node:path";
|
|
@@ -127,25 +126,9 @@ function installSkill({ source, name, targetBase }) {
|
|
|
127
126
|
data.name = name;
|
|
128
127
|
fs.writeFileSync(skillFile, writeFrontmatter(data, content));
|
|
129
128
|
}
|
|
130
|
-
makeScriptsExecutable(targetDirectory);
|
|
131
129
|
fs.writeFileSync(path.join(targetDirectory, ".gitignore"), "*\n");
|
|
132
130
|
}
|
|
133
131
|
/**
|
|
134
|
-
* Recursively finds `.js` files that start with a shebang and makes them executable.
|
|
135
|
-
*
|
|
136
|
-
* @param directory - The directory to search for scripts.
|
|
137
|
-
*/
|
|
138
|
-
function makeScriptsExecutable(directory) {
|
|
139
|
-
const entries = fs.readdirSync(directory, { withFileTypes: true });
|
|
140
|
-
for (const entry of entries) {
|
|
141
|
-
const fullPath = path.join(directory, entry.name);
|
|
142
|
-
if (entry.isDirectory()) makeScriptsExecutable(fullPath);
|
|
143
|
-
else if (entry.name.endsWith(".js")) {
|
|
144
|
-
if (fs.readFileSync(fullPath, "utf8").startsWith("#!")) fs.chmodSync(fullPath, 493);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
132
|
* Lists all installed skills in a given base directory by reading SKILL.md
|
|
150
133
|
* frontmatter from each subdirectory in the skills directory.
|
|
151
134
|
*
|
|
@@ -220,7 +203,6 @@ runMain(defineCommand({
|
|
|
220
203
|
const targetScripts = path.join(targetBase, SKILLS_DIRECTORY, skill.name, "scripts");
|
|
221
204
|
fs.mkdirSync(targetScripts, { recursive: true });
|
|
222
205
|
fs.cpSync(distScripts, targetScripts, { recursive: true });
|
|
223
|
-
makeScriptsExecutable(targetScripts);
|
|
224
206
|
}
|
|
225
207
|
stdout.write(`[${packageName}] Installed skill "${skill.name}"\n`);
|
|
226
208
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fledge/workflow",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.3",
|
|
5
5
|
"author": "René Schapka",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"node": ">=24"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@fledge/cli": "^0.9.
|
|
18
|
+
"@fledge/cli": "^0.9.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@antfu/eslint-config": "7.7.3",
|
package/skills/brief/SKILL.md
CHANGED
|
@@ -5,20 +5,20 @@ description: >-
|
|
|
5
5
|
Invoked directly via /fledge-brief, not auto-triggered.
|
|
6
6
|
metadata:
|
|
7
7
|
type: workflow
|
|
8
|
-
allowed-tools: Bash(scripts/brief.js *)
|
|
8
|
+
allowed-tools: Bash(node *scripts/brief.js *)
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## Available scripts
|
|
12
12
|
|
|
13
|
-
**Important:**
|
|
13
|
+
**Important:** Run all scripts with `node` (e.g. `node scripts/brief.js list`). Always pass `--project-dir` pointing to the project root.
|
|
14
14
|
|
|
15
|
-
- **`scripts/brief.js create <name> --project-dir <path>`** -- Create a new brief with stub files
|
|
16
|
-
- **`scripts/brief.js start <name> --project-dir <path>`** -- Transition a brief from draft to active
|
|
17
|
-
- **`scripts/brief.js complete <name> --project-dir <path>`** -- Transition a brief from active to completed
|
|
18
|
-
- **`scripts/brief.js status <name> --project-dir <path>`** -- Show status and task progress
|
|
19
|
-
- **`scripts/brief.js list [--status <status>] --project-dir <path>`** -- List all briefs with progress and summary
|
|
20
|
-
- **`scripts/brief.js validate <name> --project-dir <path>`** -- Validate brief files against schemas
|
|
21
|
-
- **`scripts/brief.js schema`** -- Output JSON Schema for brief and tasks frontmatter
|
|
15
|
+
- **`node scripts/brief.js create <name> --project-dir <path>`** -- Create a new brief with stub files
|
|
16
|
+
- **`node scripts/brief.js start <name> --project-dir <path>`** -- Transition a brief from draft to active
|
|
17
|
+
- **`node scripts/brief.js complete <name> --project-dir <path>`** -- Transition a brief from active to completed
|
|
18
|
+
- **`node scripts/brief.js status <name> --project-dir <path>`** -- Show status and task progress
|
|
19
|
+
- **`node scripts/brief.js list [--status <status>] --project-dir <path>`** -- List all briefs with progress and summary
|
|
20
|
+
- **`node scripts/brief.js validate <name> --project-dir <path>`** -- Validate brief files against schemas
|
|
21
|
+
- **`node scripts/brief.js schema`** -- Output JSON Schema for brief and tasks frontmatter
|
|
22
22
|
|
|
23
23
|
## Step 0: Determine intent
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ Ask what the user wants to do, or infer from context. Present these options:
|
|
|
28
28
|
2. **Continue a brief** -- pick up an existing brief. Proceed to Step 4.
|
|
29
29
|
3. **Complete a brief** -- wrap up a finished feature. Proceed to Step 5.
|
|
30
30
|
|
|
31
|
-
If unclear, run `scripts/brief.js list --project-dir <path>` to show current briefs and ask.
|
|
31
|
+
If unclear, run `node scripts/brief.js list --project-dir <path>` to show current briefs and ask.
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ If unclear, run `scripts/brief.js list --project-dir <path>` to show current bri
|
|
|
36
36
|
|
|
37
37
|
Before writing anything, build an understanding of what exists.
|
|
38
38
|
|
|
39
|
-
1. Run `scripts/brief.js list --status completed --project-dir <path>` to read summaries of completed features. Note anything relevant to the new feature.
|
|
39
|
+
1. Run `node scripts/brief.js list --status completed --project-dir <path>` to read summaries of completed features. Note anything relevant to the new feature.
|
|
40
40
|
2. Ask the user what they want to build. Keep it conversational, not a form. Aim to understand:
|
|
41
41
|
- What is the user-facing change?
|
|
42
42
|
- Why does it matter?
|
|
@@ -51,7 +51,7 @@ Proceed to Step 2.
|
|
|
51
51
|
|
|
52
52
|
## Step 2: Draft the brief
|
|
53
53
|
|
|
54
|
-
Run `scripts/brief.js create <name> --project-dir <path>` to create the brief directory.
|
|
54
|
+
Run `node scripts/brief.js create <name> --project-dir <path>` to create the brief directory.
|
|
55
55
|
|
|
56
56
|
Write the brief content into `brief.md`. The frontmatter is managed by the scripts. The markdown body should capture:
|
|
57
57
|
|
|
@@ -87,7 +87,7 @@ tasks:
|
|
|
87
87
|
|
|
88
88
|
Order tasks by dependency: tasks that others depend on come first within their group.
|
|
89
89
|
|
|
90
|
-
After writing tasks, run `scripts/brief.js validate <name> --project-dir <path>` to confirm the brief is valid, then run `scripts/brief.js start <name> --project-dir <path>` to transition to active.
|
|
90
|
+
After writing tasks, run `node scripts/brief.js validate <name> --project-dir <path>` to confirm the brief is valid, then run `node scripts/brief.js start <name> --project-dir <path>` to transition to active.
|
|
91
91
|
|
|
92
92
|
Present the complete brief and task list to the user for review before starting.
|
|
93
93
|
|
|
@@ -95,22 +95,22 @@ Present the complete brief and task list to the user for review before starting.
|
|
|
95
95
|
|
|
96
96
|
## Step 4: Continue a brief
|
|
97
97
|
|
|
98
|
-
Run `scripts/brief.js list --project-dir <path>` to show all briefs. If the user does not specify which brief, ask them to pick one.
|
|
98
|
+
Run `node scripts/brief.js list --project-dir <path>` to show all briefs. If the user does not specify which brief, ask them to pick one.
|
|
99
99
|
|
|
100
|
-
Run `scripts/brief.js status <name> --project-dir <path>` to show progress. Read the brief and tasks files to understand the full context.
|
|
100
|
+
Run `node scripts/brief.js status <name> --project-dir <path>` to show progress. Read the brief and tasks files to understand the full context.
|
|
101
101
|
|
|
102
102
|
From here, the user may want to:
|
|
103
103
|
- **Discuss a task** -- talk through approach before implementing
|
|
104
104
|
- **Update tasks** -- mark tasks as done, add new tasks, reorder
|
|
105
105
|
- **Revise the brief** -- update scope or design decisions based on what was learned during implementation
|
|
106
106
|
|
|
107
|
-
When updating task status, modify the `tasks.md` frontmatter directly, then run `scripts/brief.js status <name> --project-dir <path>` to confirm the update.
|
|
107
|
+
When updating task status, modify the `tasks.md` frontmatter directly, then run `node scripts/brief.js status <name> --project-dir <path>` to confirm the update.
|
|
108
108
|
|
|
109
109
|
---
|
|
110
110
|
|
|
111
111
|
## Step 5: Complete a brief
|
|
112
112
|
|
|
113
|
-
Run `scripts/brief.js status <name> --project-dir <path>` to verify all tasks are done.
|
|
113
|
+
Run `node scripts/brief.js status <name> --project-dir <path>` to verify all tasks are done.
|
|
114
114
|
|
|
115
115
|
If there are incomplete tasks, ask the user whether to:
|
|
116
116
|
1. Mark remaining tasks as done (if they were completed outside this conversation)
|
|
@@ -121,4 +121,4 @@ Write a summary into the `brief.md` frontmatter `summary` field. The summary sho
|
|
|
121
121
|
- What was built
|
|
122
122
|
- Key decisions or patterns established that future features should know about
|
|
123
123
|
|
|
124
|
-
Run `scripts/brief.js complete <name> --project-dir <path>` to transition to completed. The script validates that all tasks are done and the summary is present.
|
|
124
|
+
Run `node scripts/brief.js complete <name> --project-dir <path>` to transition to completed. The script validates that all tasks are done and the summary is present.
|