specdacular 0.8.0 → 0.8.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/package.json
CHANGED
|
@@ -6,6 +6,7 @@ Load all context files for a task. Use after validation.
|
|
|
6
6
|
|
|
7
7
|
**Before using this reference, you must have ready:**
|
|
8
8
|
- `$TASK_NAME` — the task name
|
|
9
|
+
- `$TASK_DIR` — resolved task directory (from validate-task, either `.specd/tasks/$TASK_NAME` or `.specd/features/$TASK_NAME`)
|
|
9
10
|
- `$PHASE` (optional) — phase number, if loading phase-specific context
|
|
10
11
|
|
|
11
12
|
### Always Load
|
|
@@ -20,11 +21,11 @@ Load all context files for a task. Use after validation.
|
|
|
20
21
|
|
|
21
22
|
```bash
|
|
22
23
|
# Read all required files
|
|
23
|
-
cat
|
|
24
|
-
cat
|
|
25
|
-
cat
|
|
26
|
-
cat
|
|
27
|
-
cat
|
|
24
|
+
cat $TASK_DIR/FEATURE.md
|
|
25
|
+
cat $TASK_DIR/CONTEXT.md
|
|
26
|
+
cat $TASK_DIR/DECISIONS.md
|
|
27
|
+
cat $TASK_DIR/STATE.md
|
|
28
|
+
cat $TASK_DIR/config.json
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
### Load If Exists
|
|
@@ -37,15 +38,15 @@ cat .specd/tasks/$TASK_NAME/config.json
|
|
|
37
38
|
|
|
38
39
|
```bash
|
|
39
40
|
# Check and read optional files
|
|
40
|
-
[ -f "
|
|
41
|
-
[ -f "
|
|
42
|
-
[ -f "
|
|
41
|
+
[ -f "$TASK_DIR/RESEARCH.md" ] && cat $TASK_DIR/RESEARCH.md
|
|
42
|
+
[ -f "$TASK_DIR/ROADMAP.md" ] && cat $TASK_DIR/ROADMAP.md
|
|
43
|
+
[ -f "$TASK_DIR/CHANGELOG.md" ] && cat $TASK_DIR/CHANGELOG.md
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
### Phase-Specific Context (when $PHASE is set)
|
|
46
47
|
|
|
47
48
|
```bash
|
|
48
|
-
PHASE_DIR="
|
|
49
|
+
PHASE_DIR="$TASK_DIR/phases/phase-$(printf '%02d' $PHASE)"
|
|
49
50
|
|
|
50
51
|
# Read phase plan
|
|
51
52
|
[ -f "$PHASE_DIR/PLAN.md" ] && cat "$PHASE_DIR/PLAN.md"
|
|
@@ -8,7 +8,14 @@ Determine which task to work on.
|
|
|
8
8
|
Use as task name. Normalize to kebab-case (lowercase, hyphens).
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
# Check tasks/ first, fall back to features/ for backwards compat
|
|
12
|
+
if [ -d ".specd/tasks/$ARGUMENTS" ]; then
|
|
13
|
+
TASK_DIR=".specd/tasks/$ARGUMENTS"
|
|
14
|
+
elif [ -d ".specd/features/$ARGUMENTS" ]; then
|
|
15
|
+
TASK_DIR=".specd/features/$ARGUMENTS"
|
|
16
|
+
else
|
|
17
|
+
echo "not found"; exit 1
|
|
18
|
+
fi
|
|
12
19
|
```
|
|
13
20
|
|
|
14
21
|
**If task not found:**
|
|
@@ -19,9 +26,9 @@ Available tasks:
|
|
|
19
26
|
```
|
|
20
27
|
|
|
21
28
|
```bash
|
|
22
|
-
ls -d .specd/tasks/*/ 2>/dev/null | while read dir; do
|
|
29
|
+
{ ls -d .specd/tasks/*/ 2>/dev/null; ls -d .specd/features/*/ 2>/dev/null; } | while read dir; do
|
|
23
30
|
basename "$dir"
|
|
24
|
-
done
|
|
31
|
+
done | sort -u
|
|
25
32
|
```
|
|
26
33
|
|
|
27
34
|
End workflow.
|
|
@@ -30,8 +37,8 @@ End workflow.
|
|
|
30
37
|
Scan for in-progress tasks:
|
|
31
38
|
|
|
32
39
|
```bash
|
|
33
|
-
# List task directories with config.json
|
|
34
|
-
for dir in .specd/tasks/*/config.json; do
|
|
40
|
+
# List task directories with config.json (check both locations)
|
|
41
|
+
for dir in .specd/tasks/*/config.json .specd/features/*/config.json; do
|
|
35
42
|
[ -f "$dir" ] && echo "$dir"
|
|
36
43
|
done
|
|
37
44
|
```
|
|
@@ -10,17 +10,25 @@ Check that a task directory exists with required files.
|
|
|
10
10
|
**Basic validation (all workflows):**
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
# Check task directory exists
|
|
14
|
-
[ -d ".specd/tasks/$TASK_NAME" ]
|
|
13
|
+
# Check task directory exists (tasks/ preferred, features/ for backwards compat)
|
|
14
|
+
if [ -d ".specd/tasks/$TASK_NAME" ]; then
|
|
15
|
+
TASK_DIR=".specd/tasks/$TASK_NAME"
|
|
16
|
+
elif [ -d ".specd/features/$TASK_NAME" ]; then
|
|
17
|
+
TASK_DIR=".specd/features/$TASK_NAME"
|
|
18
|
+
else
|
|
19
|
+
echo "not found"; exit 1
|
|
20
|
+
fi
|
|
15
21
|
|
|
16
22
|
# Check required files
|
|
17
|
-
[ -f "
|
|
18
|
-
[ -f "
|
|
19
|
-
[ -f "
|
|
20
|
-
[ -f "
|
|
21
|
-
[ -f "
|
|
23
|
+
[ -f "$TASK_DIR/FEATURE.md" ] || { echo "missing FEATURE.md"; exit 1; }
|
|
24
|
+
[ -f "$TASK_DIR/CONTEXT.md" ] || { echo "missing CONTEXT.md"; exit 1; }
|
|
25
|
+
[ -f "$TASK_DIR/DECISIONS.md" ] || { echo "missing DECISIONS.md"; exit 1; }
|
|
26
|
+
[ -f "$TASK_DIR/STATE.md" ] || { echo "missing STATE.md"; exit 1; }
|
|
27
|
+
[ -f "$TASK_DIR/config.json" ] || { echo "missing config.json"; exit 1; }
|
|
22
28
|
```
|
|
23
29
|
|
|
30
|
+
**`$TASK_DIR` is now set** — use it in all subsequent file references instead of hardcoding `.specd/tasks/$TASK_NAME`.
|
|
31
|
+
|
|
24
32
|
**If task not found:**
|
|
25
33
|
```
|
|
26
34
|
Task '{name}' not found.
|
|
@@ -40,10 +48,10 @@ Run /specd:discuss {name} to rebuild context.
|
|
|
40
48
|
|
|
41
49
|
```bash
|
|
42
50
|
# Check phases exist (for execute/review)
|
|
43
|
-
[ -d "
|
|
51
|
+
[ -d "$TASK_DIR/phases" ] || { echo "no phases"; exit 1; }
|
|
44
52
|
|
|
45
53
|
# Check ROADMAP exists (for execute/review)
|
|
46
|
-
[ -f "
|
|
54
|
+
[ -f "$TASK_DIR/ROADMAP.md" ] || { echo "no roadmap"; exit 1; }
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
**If no phases:**
|
|
@@ -57,8 +65,8 @@ Run /specd:plan {name} to create phases.
|
|
|
57
65
|
|
|
58
66
|
```bash
|
|
59
67
|
# Check optional files
|
|
60
|
-
[ -f "
|
|
61
|
-
[ -f "
|
|
68
|
+
[ -f "$TASK_DIR/RESEARCH.md" ] && echo "has_research"
|
|
69
|
+
[ -f "$TASK_DIR/ROADMAP.md" ] && echo "has_roadmap"
|
|
62
70
|
```
|
|
63
71
|
|
|
64
72
|
</shared>
|
|
@@ -52,10 +52,10 @@ Ask: "What's the name of this task?"
|
|
|
52
52
|
|
|
53
53
|
**Validate:**
|
|
54
54
|
- Task name should be kebab-case
|
|
55
|
-
- Check if `.specd/tasks
|
|
55
|
+
- Check if task already exists (in either `.specd/tasks/` or `.specd/features/`)
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
[ -d ".specd/tasks/$TASK_NAME" ] && echo "exists"
|
|
58
|
+
{ [ -d ".specd/tasks/$TASK_NAME" ] || [ -d ".specd/features/$TASK_NAME" ]; } && echo "exists"
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
**If task exists:**
|
|
@@ -29,7 +29,7 @@ cat .specd/config.json 2>/dev/null
|
|
|
29
29
|
|
|
30
30
|
### 3. Check for features directory
|
|
31
31
|
|
|
32
|
-
Use Glob to check if `.specd/tasks/*/config.json` matches anything.
|
|
32
|
+
Use Glob to check if `.specd/tasks/*/config.json` or `.specd/features/*/config.json` matches anything (check both for backwards compatibility).
|
|
33
33
|
|
|
34
34
|
**If mode = orchestrator and no root features:**
|
|
35
35
|
Also check sub-project features — scan each project path for `{project-path}/.specd/tasks/*/config.json`. If features found in sub-projects, continue (there's something to show).
|