@winton979/task-cli 1.4.3 → 1.6.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/README.md +29 -24
- package/package.json +1 -1
- package/src/cli.js +1 -0
- package/src/init.js +213 -119
package/README.md
CHANGED
|
@@ -82,22 +82,29 @@ task init
|
|
|
82
82
|
|
|
83
83
|
After initialization, Task CLI creates the `.ai/` workspace and installs workflow skills into both `.claude/skills/` and `.codex/skills/`.
|
|
84
84
|
|
|
85
|
-
###
|
|
86
|
-
|
|
87
|
-
Task CLI
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
If no Grill Me compatible skill is installed, `task-fast`, `task-explore`, and `bug-explore` fall back to built-in clarification prompts.
|
|
85
|
+
### Exploration Protocol
|
|
86
|
+
|
|
87
|
+
Task CLI embeds the `grilling` primitive from [Matt Pocock's skills collection](https://github.com/mattpocock/skills.git). Its wording is the methodological foundation for decision-driven exploration, not a runtime dependency.
|
|
88
|
+
|
|
89
|
+
`task-explore` and `bug-explore` preserve the primitive's body verbatim. Their only workflow-specific interpretation of it is that "act on it" means creating the brief. `task-fast` uses a narrower clarification loop so the fast path remains fast.
|
|
90
|
+
|
|
91
|
+
`project-explore` is explicitly invoked, read-only, and evidence-driven. It answers when the available evidence supports a bounded conclusion and asks a question only when ambiguity would materially change the answer.
|
|
92
|
+
|
|
93
|
+
Task CLI neither requires nor installs a companion interviewing skill.
|
|
96
94
|
|
|
97
95
|
---
|
|
98
96
|
|
|
99
|
-
## Quick Start
|
|
100
|
-
|
|
97
|
+
## Quick Start
|
|
98
|
+
|
|
99
|
+
### Project Understanding
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
Claude Code: /project-explore
|
|
103
|
+
Codex CLI: $project-explore
|
|
104
|
+
↓
|
|
105
|
+
evidence-based explanation → no artifacts or changes
|
|
106
|
+
```
|
|
107
|
+
|
|
101
108
|
### Small Feature / Enhancement
|
|
102
109
|
|
|
103
110
|
```text
|
|
@@ -171,9 +178,13 @@ The workflow encourages the simplest acceptable implementation instead of the mo
|
|
|
171
178
|
|
|
172
179
|
---
|
|
173
180
|
|
|
174
|
-
## Available Skills
|
|
175
|
-
|
|
176
|
-
**
|
|
181
|
+
## Available Skills
|
|
182
|
+
|
|
183
|
+
**Project Understanding**
|
|
184
|
+
|
|
185
|
+
* `project-explore`
|
|
186
|
+
|
|
187
|
+
**Task Workflow**
|
|
177
188
|
|
|
178
189
|
* `task-fast`
|
|
179
190
|
* `task-explore`
|
|
@@ -309,18 +320,12 @@ task refresh
|
|
|
309
320
|
This will:
|
|
310
321
|
|
|
311
322
|
* keep `.ai/tasks`, `.ai/bugs`, and `.ai/decisions`
|
|
312
|
-
* remove only managed skills from `.claude/skills/` and `.codex/skills/`, including legacy `task-review` and `bug-review`, then reinstall the current set: `task-fast`, `task-explore`, `task-implement`, `task-audit`, `task-cancel`, `bug-explore`, `bug-fix`, `bug-audit`, `bug-cancel`, `decision-log`, `decision-sweep-weekly`, `decision-curate`
|
|
323
|
+
* remove only managed skills from `.claude/skills/` and `.codex/skills/`, including legacy `task-review` and `bug-review`, then reinstall the current set: `project-explore`, `task-fast`, `task-explore`, `task-implement`, `task-audit`, `task-cancel`, `bug-explore`, `bug-fix`, `bug-audit`, `bug-cancel`, `decision-log`, `decision-sweep-weekly`, `decision-curate`
|
|
313
324
|
* reinstall the latest versions of those skills
|
|
314
325
|
|
|
315
326
|
Unrelated custom skills in the same project are left untouched. Inspect the current setup first with `task doctor`.
|
|
316
327
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
something else:
|
|
320
|
-
> Task CLI does not install Grill Me automatically.
|
|
321
|
-
> Users remain free to choose any Grill Me compatible implementation, and the explore skills fall back to built-in clarification if none is installed.
|
|
322
|
-
|
|
323
|
-
## License
|
|
328
|
+
## License
|
|
324
329
|
|
|
325
330
|
MIT
|
|
326
331
|
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -25,6 +25,7 @@ Usage:
|
|
|
25
25
|
task --help Show this help
|
|
26
26
|
|
|
27
27
|
Recommended flows after init:
|
|
28
|
+
explore: project-explore
|
|
28
29
|
fast: task-fast
|
|
29
30
|
task: task-explore -> task-implement -> task-audit (optional, risk-triggered)
|
|
30
31
|
bug: bug-explore -> bug-fix -> bug-audit (optional, risk-triggered)
|
package/src/init.js
CHANGED
|
@@ -13,11 +13,15 @@ const GITIGNORE_BLOCK = [
|
|
|
13
13
|
'.ai/bugs/active/*.md',
|
|
14
14
|
].join('\n');
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const GRILLING_GUIDANCE = `Grilling
|
|
17
|
+
|
|
18
|
+
Interview me relentlessly about every aspect of this until we reach a shared understanding. Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
19
|
+
|
|
20
|
+
Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.
|
|
21
|
+
|
|
22
|
+
If a *fact* can be found by exploring the environment (filesystem, tools, etc.), look it up rather than asking me. The *decisions*, though, are mine — put each one to me and wait for my answer.
|
|
23
|
+
|
|
24
|
+
Do not act on it until I confirm we have reached a shared understanding.`;
|
|
21
25
|
|
|
22
26
|
const DECISIONS_READ_GUIDANCE = `Decision Intake
|
|
23
27
|
|
|
@@ -44,7 +48,128 @@ Before finalizing the brief, assess whether the requirement justifies added comp
|
|
|
44
48
|
as a Risk, not a plan.
|
|
45
49
|
* When complexity appears justified, do not design the solution here. Simply record that additional implementation effort is likely required.`;
|
|
46
50
|
|
|
51
|
+
const PROJECT_EXPLORE_DESCRIPTION = 'Build an evidence-based understanding of the existing project without changing it. Use only when the user explicitly invokes project-explore; do not use for implementation, bug investigation, or formal review.';
|
|
52
|
+
const PROJECT_EXPLORE_BODY = `Purpose
|
|
53
|
+
|
|
54
|
+
Establish a shared, evidence-based understanding of the existing project within the current conversation.
|
|
55
|
+
|
|
56
|
+
Explain behavior, structure, design intent, constraints, and trade-offs. Do not create change work.
|
|
57
|
+
|
|
58
|
+
Workflow
|
|
59
|
+
|
|
60
|
+
1. Classify the user's primary intent. If it matches a case under Transitions, state the boundary and stop.
|
|
61
|
+
2. Identify the question or project area to understand.
|
|
62
|
+
3. Inspect the relevant code, tests, configuration, documentation, decisions, and repository history. Look up repository facts instead of asking the user for them.
|
|
63
|
+
4. Build the answer from evidence. Separate:
|
|
64
|
+
|
|
65
|
+
* observed facts
|
|
66
|
+
* recorded intent
|
|
67
|
+
* inferred rationale
|
|
68
|
+
* assumptions and unknowns
|
|
69
|
+
* trade-offs
|
|
70
|
+
|
|
71
|
+
5. Answer when the evidence supports a bounded conclusion. Do not prolong exploration to remove immaterial uncertainty.
|
|
72
|
+
6. Ask one focused question at a time only when ambiguity would materially change the answer. Recommend an answer only for a user-owned choice.
|
|
73
|
+
7. Stop when the question is answered or the remaining uncertainty is stated precisely.
|
|
74
|
+
|
|
75
|
+
Evidence Discipline
|
|
76
|
+
|
|
77
|
+
* Treat current code, tests, configuration, and direct observations as evidence of behavior.
|
|
78
|
+
* Treat documentation, decisions, archives, and repository history as evidence of context or intent. Do not let them override contradictory current behavior.
|
|
79
|
+
* Cite file paths and line numbers when practical.
|
|
80
|
+
* Treat missing rationale as unknown. Do not infer that no rationale existed.
|
|
81
|
+
* When sources conflict, report the conflict and identify which claim each source supports.
|
|
82
|
+
* Do not treat unfamiliar design as defective. If evidence indicates incorrect behavior, label it as a possible issue rather than diagnosing it here.
|
|
83
|
+
|
|
84
|
+
Decision Discussion
|
|
85
|
+
|
|
86
|
+
When discussing a design choice:
|
|
87
|
+
|
|
88
|
+
* identify the decision and its constraints
|
|
89
|
+
* compare only relevant alternatives
|
|
90
|
+
* state the benefits, costs, and assumptions of each alternative
|
|
91
|
+
* recommend a direction only when the user explicitly requests a recommendation and the available evidence is sufficient
|
|
92
|
+
|
|
93
|
+
Keep recommendations conceptual. Do not provide code, file-by-file changes, implementation steps, acceptance criteria, or estimates. Do not present exploration as architecture approval.
|
|
94
|
+
|
|
95
|
+
Project Memory
|
|
96
|
+
|
|
97
|
+
Before explaining a project decision, inspect .ai/decisions/decisions.md if it exists and contains entries beyond the title.
|
|
98
|
+
|
|
99
|
+
Use it narrowly:
|
|
100
|
+
|
|
101
|
+
* extract only decisions relevant to the question
|
|
102
|
+
* treat them as durable constraints, not complete documentation
|
|
103
|
+
* verify that current project evidence does not contradict them
|
|
104
|
+
* omit unrelated history
|
|
105
|
+
|
|
106
|
+
Transitions
|
|
107
|
+
|
|
108
|
+
If the user's primary intent becomes:
|
|
109
|
+
|
|
110
|
+
* new or changed behavior: recommend task-fast or task-explore
|
|
111
|
+
* suspected incorrect behavior: recommend bug-explore
|
|
112
|
+
* recording an approved durable decision: recommend decision-log
|
|
113
|
+
* review of a completed task or bug with a brief: recommend task-audit or bug-audit
|
|
114
|
+
* standalone architecture or quality review: state that no managed workflow covers it; do not issue findings, ratings, approval, or a release verdict
|
|
115
|
+
|
|
116
|
+
After routing, stop. Do not inspect the project to fulfill the out-of-scope request. Do not invoke another workflow or create its artifacts unless the user explicitly requests it.
|
|
117
|
+
|
|
118
|
+
Boundaries
|
|
119
|
+
|
|
120
|
+
Do not:
|
|
121
|
+
|
|
122
|
+
* modify code, documentation, or project state
|
|
123
|
+
* create task, bug, or decision artifacts
|
|
124
|
+
* design an implementation
|
|
125
|
+
* perform a formal architecture review or audit
|
|
126
|
+
* treat exploration findings as approved decisions
|
|
127
|
+
|
|
128
|
+
Output
|
|
129
|
+
|
|
130
|
+
Answer directly. Use only the sections that improve clarity:
|
|
131
|
+
|
|
132
|
+
## Understanding
|
|
133
|
+
|
|
134
|
+
## Evidence
|
|
135
|
+
|
|
136
|
+
## Intent and Uncertainty
|
|
137
|
+
|
|
138
|
+
## Trade-offs
|
|
139
|
+
|
|
140
|
+
## Open Questions
|
|
141
|
+
|
|
142
|
+
Omit empty sections. For a simple question, prefer concise prose without headings.
|
|
143
|
+
`;
|
|
144
|
+
|
|
47
145
|
const SKILLS = {
|
|
146
|
+
'project-explore': {
|
|
147
|
+
name: 'project-explore',
|
|
148
|
+
description: PROJECT_EXPLORE_DESCRIPTION,
|
|
149
|
+
content: `---
|
|
150
|
+
name: project-explore
|
|
151
|
+
description: ${PROJECT_EXPLORE_DESCRIPTION}
|
|
152
|
+
user-invocable: true
|
|
153
|
+
disable-model-invocation: true
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
${PROJECT_EXPLORE_BODY}`,
|
|
157
|
+
codexContent: `---
|
|
158
|
+
name: project-explore
|
|
159
|
+
description: ${PROJECT_EXPLORE_DESCRIPTION}
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
${PROJECT_EXPLORE_BODY}`,
|
|
163
|
+
codexAgentContent: `interface:
|
|
164
|
+
display_name: "Project Explore"
|
|
165
|
+
short_description: "Explore existing projects from repository evidence"
|
|
166
|
+
default_prompt: "Use $project-explore to explain the current project from repository evidence."
|
|
167
|
+
|
|
168
|
+
policy:
|
|
169
|
+
allow_implicit_invocation: false
|
|
170
|
+
`,
|
|
171
|
+
},
|
|
172
|
+
|
|
48
173
|
'task-fast': {
|
|
49
174
|
name: 'task-fast',
|
|
50
175
|
description: 'Fast path for small requirements. Clarify quickly, create the brief, implement, and verify. Archive automatically on completion.',
|
|
@@ -60,23 +185,24 @@ Handle a small requirement in one continuous workflow with minimal ceremony.
|
|
|
60
185
|
|
|
61
186
|
Workflow
|
|
62
187
|
|
|
63
|
-
1.
|
|
64
|
-
2. If
|
|
65
|
-
3.
|
|
66
|
-
4.
|
|
67
|
-
5.
|
|
68
|
-
6.
|
|
188
|
+
1. Read the project code and conventions needed to avoid obvious conflicts.
|
|
189
|
+
2. If a fact can be found by exploring the environment, look it up rather than asking the user.
|
|
190
|
+
3. Ask only questions whose answers can change the implementation or acceptance criteria. Ask them one at a time, waiting for feedback on each before continuing. For each question, provide your recommended answer.
|
|
191
|
+
4. Put unresolved decisions to the user; do not make them on the user's behalf.
|
|
192
|
+
5. Read .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain this task.
|
|
193
|
+
6. Before finalizing the brief, perform a Complexity Assessment.
|
|
194
|
+
7. Create a concise task brief and save it to:
|
|
69
195
|
|
|
70
196
|
.ai/tasks/active/YYYY-MM-DD-task-name.md
|
|
71
197
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
198
|
+
8. Show the brief as the fast-path summary of shared understanding, ask the user to confirm it, and stop. Do not code until the user confirms.
|
|
199
|
+
9. Once the user confirms the brief, implement immediately.
|
|
200
|
+
10. Verify the result against the acceptance criteria.
|
|
201
|
+
11. Archive the brief automatically by moving it to:
|
|
76
202
|
|
|
77
203
|
.ai/tasks/archive/YYYY-MM-DD-task-name.md
|
|
78
204
|
|
|
79
|
-
|
|
205
|
+
12. Summarize the outcome and any follow-up risks.
|
|
80
206
|
|
|
81
207
|
${DECISIONS_READ_GUIDANCE}
|
|
82
208
|
|
|
@@ -123,10 +249,10 @@ TASK_DONE
|
|
|
123
249
|
|
|
124
250
|
'task-explore': {
|
|
125
251
|
name: 'task-explore',
|
|
126
|
-
description: '
|
|
252
|
+
description: 'Grill the user relentlessly about a requirement; generate an execution brief only after shared understanding, without implementing.',
|
|
127
253
|
content: `---
|
|
128
254
|
name: task-explore
|
|
129
|
-
description:
|
|
255
|
+
description: Grill the user relentlessly about a requirement; generate an execution brief only after shared understanding, without implementing.
|
|
130
256
|
user-invocable: true
|
|
131
257
|
---
|
|
132
258
|
|
|
@@ -136,17 +262,17 @@ Clarify requirements and leave behind a ready-to-execute brief.
|
|
|
136
262
|
|
|
137
263
|
Workflow
|
|
138
264
|
|
|
139
|
-
1.
|
|
140
|
-
2.
|
|
141
|
-
3.
|
|
142
|
-
4.
|
|
143
|
-
5.
|
|
144
|
-
6. Before writing the brief, inspect .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain this task.
|
|
145
|
-
7. Once the requirement is clear, generate a concise task brief and save it to:
|
|
265
|
+
1. Grill the requirement using the Grilling section below.
|
|
266
|
+
2. Do not write code or create implementation details.
|
|
267
|
+
3. Before writing the brief, inspect .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain this task.
|
|
268
|
+
4. For this workflow, "act on it" means creating the brief.
|
|
269
|
+
5. Generate a concise task brief and save it to:
|
|
146
270
|
|
|
147
271
|
.ai/tasks/active/YYYY-MM-DD-task-name.md
|
|
148
272
|
|
|
149
|
-
|
|
273
|
+
6. Show the saved brief and stop.
|
|
274
|
+
|
|
275
|
+
${GRILLING_GUIDANCE}
|
|
150
276
|
|
|
151
277
|
${DECISIONS_READ_GUIDANCE}
|
|
152
278
|
|
|
@@ -358,10 +484,10 @@ TASK_CANCELLED
|
|
|
358
484
|
|
|
359
485
|
'bug-explore': {
|
|
360
486
|
name: 'bug-explore',
|
|
361
|
-
description: '
|
|
487
|
+
description: 'Grill the user relentlessly about a bug while investigating its evidence; generate a fix brief only after shared understanding, without writing code.',
|
|
362
488
|
content: `---
|
|
363
489
|
name: bug-explore
|
|
364
|
-
description:
|
|
490
|
+
description: Grill the user relentlessly about a bug while investigating its evidence; generate a fix brief only after shared understanding, without writing code.
|
|
365
491
|
user-invocable: true
|
|
366
492
|
---
|
|
367
493
|
|
|
@@ -371,24 +497,24 @@ Investigate a bug and leave behind a ready-to-fix brief.
|
|
|
371
497
|
|
|
372
498
|
Rules
|
|
373
499
|
|
|
374
|
-
1.
|
|
375
|
-
2.
|
|
376
|
-
3.
|
|
377
|
-
4.
|
|
378
|
-
5. Identify root cause candidates.
|
|
379
|
-
6. Request evidence whenever possible.
|
|
380
|
-
7. Separate:
|
|
500
|
+
1. Grill the bug using the Grilling section below.
|
|
501
|
+
2. Investigate the bug and gather reproducible evidence. Do not write code or suggest fixes before enough evidence exists.
|
|
502
|
+
3. Identify root cause candidates.
|
|
503
|
+
4. Separate:
|
|
381
504
|
|
|
382
505
|
* observed behavior
|
|
383
506
|
* expected behavior
|
|
384
507
|
* assumptions
|
|
385
508
|
|
|
386
|
-
|
|
387
|
-
|
|
509
|
+
5. Before writing the brief, inspect .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain the observed behavior, expected behavior, or likely root cause.
|
|
510
|
+
6. For this workflow, "act on it" means creating the brief.
|
|
511
|
+
7. Generate a brief and save it to:
|
|
388
512
|
|
|
389
513
|
.ai/bugs/active/YYYY-MM-DD-bug-name.md
|
|
390
514
|
|
|
391
|
-
|
|
515
|
+
8. Show the saved brief and stop.
|
|
516
|
+
|
|
517
|
+
${GRILLING_GUIDANCE}
|
|
392
518
|
|
|
393
519
|
${DECISIONS_READ_GUIDANCE}
|
|
394
520
|
|
|
@@ -799,51 +925,22 @@ const MANAGED_SKILL_NAMES = [
|
|
|
799
925
|
...LEGACY_MANAGED_SKILL_NAMES,
|
|
800
926
|
];
|
|
801
927
|
|
|
802
|
-
function
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
928
|
+
function skillArtifacts(skillRoot, skill) {
|
|
929
|
+
const artifacts = [{
|
|
930
|
+
relativePath: 'SKILL.md',
|
|
931
|
+
content: skillRoot === CODEX_SKILLS_DIR && skill.codexContent
|
|
932
|
+
? skill.codexContent
|
|
933
|
+
: skill.content,
|
|
934
|
+
}];
|
|
935
|
+
|
|
936
|
+
if (skillRoot === CODEX_SKILLS_DIR && skill.codexAgentContent) {
|
|
937
|
+
artifacts.push({
|
|
938
|
+
relativePath: 'agents/openai.yaml',
|
|
939
|
+
content: skill.codexAgentContent,
|
|
940
|
+
});
|
|
815
941
|
}
|
|
816
942
|
|
|
817
|
-
|
|
818
|
-
if (!entry.isDirectory()) {
|
|
819
|
-
continue;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
if (MANAGED_SKILL_NAMES.includes(entry.name)) {
|
|
823
|
-
continue;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
if (hasGrillMeHint(entry.name)) {
|
|
827
|
-
return entry.name;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
const skillPath = path.join(root, entry.name, 'SKILL.md');
|
|
831
|
-
if (!fs.existsSync(skillPath)) {
|
|
832
|
-
continue;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
const content = fs.readFileSync(skillPath, 'utf-8');
|
|
836
|
-
const metadata = content
|
|
837
|
-
.split('---')
|
|
838
|
-
.slice(1, 2)
|
|
839
|
-
.join('\n');
|
|
840
|
-
|
|
841
|
-
if (hasGrillMeHint(metadata)) {
|
|
842
|
-
return entry.name;
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
return null;
|
|
943
|
+
return artifacts;
|
|
847
944
|
}
|
|
848
945
|
|
|
849
946
|
function logCheck(log, ok, label, detail) {
|
|
@@ -877,18 +974,24 @@ function installSkills(fs, path, cwd, skillRoot, log) {
|
|
|
877
974
|
ensureDir(fs, path, cwd, skillRoot, log);
|
|
878
975
|
for (const skill of Object.values(SKILLS)) {
|
|
879
976
|
const skillDir = path.join(cwd, skillRoot, skill.name);
|
|
880
|
-
const skillFile = skillFilePath(path, cwd, skillRoot, skill.name);
|
|
881
|
-
|
|
882
977
|
if (!fs.existsSync(skillDir)) {
|
|
883
978
|
fs.mkdirSync(skillDir, { recursive: true });
|
|
884
979
|
}
|
|
885
980
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
981
|
+
let created = false;
|
|
982
|
+
for (const artifact of skillArtifacts(skillRoot, skill)) {
|
|
983
|
+
const artifactPath = path.join(skillDir, artifact.relativePath);
|
|
984
|
+
if (fs.existsSync(artifactPath)) {
|
|
985
|
+
continue;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
fs.mkdirSync(path.dirname(artifactPath), { recursive: true });
|
|
989
|
+
fs.writeFileSync(artifactPath, artifact.content);
|
|
990
|
+
created = true;
|
|
891
991
|
}
|
|
992
|
+
|
|
993
|
+
const label = `${skillRoot}/${skill.name}`;
|
|
994
|
+
created ? log.chalk.green(` ✓ ${label}`) : log.chalk.dim(` - ${label} (exists)`);
|
|
892
995
|
}
|
|
893
996
|
}
|
|
894
997
|
|
|
@@ -954,6 +1057,7 @@ export function init(cwd, { fs, path, log }) {
|
|
|
954
1057
|
updateGitignore(fs, path, cwd, log);
|
|
955
1058
|
|
|
956
1059
|
log.info(`\nTask workflow initialized. Recommended flows:
|
|
1060
|
+
explore: project-explore
|
|
957
1061
|
fast: task-fast
|
|
958
1062
|
task: task-explore -> task-implement -> task-audit (optional, risk-triggered)
|
|
959
1063
|
bug: bug-explore -> bug-fix -> bug-audit (optional, risk-triggered)
|
|
@@ -990,6 +1094,7 @@ export function refresh(cwd, { fs, path, log }) {
|
|
|
990
1094
|
updateGitignore(fs, path, cwd, log);
|
|
991
1095
|
|
|
992
1096
|
log.info(`\nTask workflow refreshed. Managed skills reinstalled:
|
|
1097
|
+
explore: project-explore
|
|
993
1098
|
fast: task-fast
|
|
994
1099
|
task: task-explore -> task-implement -> task-audit (optional, risk-triggered)
|
|
995
1100
|
bug: bug-explore -> bug-fix -> bug-audit (optional, risk-triggered)
|
|
@@ -1027,22 +1132,27 @@ export function doctor(cwd, { fs, path, log }) {
|
|
|
1027
1132
|
|
|
1028
1133
|
for (const skillRoot of [CLAUDE_SKILLS_DIR, CODEX_SKILLS_DIR]) {
|
|
1029
1134
|
for (const skill of Object.values(SKILLS)) {
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1135
|
+
for (const artifact of skillArtifacts(skillRoot, skill)) {
|
|
1136
|
+
const artifactPath = path.join(cwd, skillRoot, skill.name, artifact.relativePath);
|
|
1137
|
+
const label = artifact.relativePath === 'SKILL.md'
|
|
1138
|
+
? `${skillRoot}/${skill.name}`
|
|
1139
|
+
: `${skillRoot}/${skill.name}/${artifact.relativePath}`;
|
|
1140
|
+
if (!fs.existsSync(artifactPath)) {
|
|
1141
|
+
checks.push(false);
|
|
1142
|
+
logCheck(log, false, label, 'missing');
|
|
1143
|
+
continue;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
const content = fs.readFileSync(artifactPath, 'utf-8');
|
|
1147
|
+
const matches = content === artifact.content;
|
|
1148
|
+
checks.push(matches);
|
|
1149
|
+
logCheck(
|
|
1150
|
+
log,
|
|
1151
|
+
matches,
|
|
1152
|
+
label,
|
|
1153
|
+
matches ? 'current' : 'outdated, run `task refresh`'
|
|
1154
|
+
);
|
|
1035
1155
|
}
|
|
1036
|
-
|
|
1037
|
-
const content = fs.readFileSync(skillPath, 'utf-8');
|
|
1038
|
-
const matches = content === skill.content;
|
|
1039
|
-
checks.push(matches);
|
|
1040
|
-
logCheck(
|
|
1041
|
-
log,
|
|
1042
|
-
matches,
|
|
1043
|
-
`${skillRoot}/${skill.name}`,
|
|
1044
|
-
matches ? 'current' : 'outdated, run `task refresh`'
|
|
1045
|
-
);
|
|
1046
1156
|
}
|
|
1047
1157
|
|
|
1048
1158
|
for (const skillName of LEGACY_MANAGED_SKILL_NAMES) {
|
|
@@ -1056,22 +1166,6 @@ export function doctor(cwd, { fs, path, log }) {
|
|
|
1056
1166
|
}
|
|
1057
1167
|
}
|
|
1058
1168
|
|
|
1059
|
-
const grillMeFindings = [
|
|
1060
|
-
[CLAUDE_SKILLS_DIR, detectLocalGrillMeSkill(fs, path, cwd, CLAUDE_SKILLS_DIR)],
|
|
1061
|
-
[CODEX_SKILLS_DIR, detectLocalGrillMeSkill(fs, path, cwd, CODEX_SKILLS_DIR)],
|
|
1062
|
-
];
|
|
1063
|
-
|
|
1064
|
-
for (const [skillRoot, skillName] of grillMeFindings) {
|
|
1065
|
-
if (skillName) {
|
|
1066
|
-
logCheck(log, true, `${skillRoot} Grill Me companion`, `detected ${skillName}`);
|
|
1067
|
-
continue;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
console.log(chalk.yellow(
|
|
1071
|
-
` WARN ${skillRoot} Grill Me companion - not detected locally; task-fast, task-explore, and bug-explore will use built-in clarification fallback`
|
|
1072
|
-
));
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
1169
|
const gitignorePath = path.join(cwd, '.gitignore');
|
|
1076
1170
|
const gitignore = fs.existsSync(gitignorePath)
|
|
1077
1171
|
? fs.readFileSync(gitignorePath, 'utf-8')
|