@winton979/task-cli 1.5.0 → 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 CHANGED
@@ -84,16 +84,27 @@ After initialization, Task CLI creates the `.ai/` workspace and installs workflo
84
84
 
85
85
  ### Exploration Protocol
86
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 exploration, not a runtime dependency.
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
88
 
89
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
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
+
91
93
  Task CLI neither requires nor installs a companion interviewing skill.
92
94
 
93
95
  ---
94
96
 
95
- ## Quick Start
96
-
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
+
97
108
  ### Small Feature / Enhancement
98
109
 
99
110
  ```text
@@ -167,9 +178,13 @@ The workflow encourages the simplest acceptable implementation instead of the mo
167
178
 
168
179
  ---
169
180
 
170
- ## Available Skills
171
-
172
- **Task Workflow**
181
+ ## Available Skills
182
+
183
+ **Project Understanding**
184
+
185
+ * `project-explore`
186
+
187
+ **Task Workflow**
173
188
 
174
189
  * `task-fast`
175
190
  * `task-explore`
@@ -305,7 +320,7 @@ task refresh
305
320
  This will:
306
321
 
307
322
  * keep `.ai/tasks`, `.ai/bugs`, and `.ai/decisions`
308
- * 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`
309
324
  * reinstall the latest versions of those skills
310
325
 
311
326
  Unrelated custom skills in the same project are left untouched. Inspect the current setup first with `task doctor`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winton979/task-cli",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Lightweight task workflow CLI for AI-assisted development",
5
5
  "license": "MIT",
6
6
  "repository": {
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
@@ -48,7 +48,128 @@ Before finalizing the brief, assess whether the requirement justifies added comp
48
48
  as a Risk, not a plan.
49
49
  * When complexity appears justified, do not design the solution here. Simply record that additional implementation effort is likely required.`;
50
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
+
51
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
+
52
173
  'task-fast': {
53
174
  name: 'task-fast',
54
175
  description: 'Fast path for small requirements. Clarify quickly, create the brief, implement, and verify. Archive automatically on completion.',
@@ -804,8 +925,22 @@ const MANAGED_SKILL_NAMES = [
804
925
  ...LEGACY_MANAGED_SKILL_NAMES,
805
926
  ];
806
927
 
807
- function skillFilePath(path, cwd, skillRoot, skillName) {
808
- return path.join(cwd, skillRoot, skillName, 'SKILL.md');
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
+ });
941
+ }
942
+
943
+ return artifacts;
809
944
  }
810
945
 
811
946
  function logCheck(log, ok, label, detail) {
@@ -839,18 +974,24 @@ function installSkills(fs, path, cwd, skillRoot, log) {
839
974
  ensureDir(fs, path, cwd, skillRoot, log);
840
975
  for (const skill of Object.values(SKILLS)) {
841
976
  const skillDir = path.join(cwd, skillRoot, skill.name);
842
- const skillFile = skillFilePath(path, cwd, skillRoot, skill.name);
843
-
844
977
  if (!fs.existsSync(skillDir)) {
845
978
  fs.mkdirSync(skillDir, { recursive: true });
846
979
  }
847
980
 
848
- if (!fs.existsSync(skillFile)) {
849
- fs.writeFileSync(skillFile, skill.content);
850
- log.chalk.green(` ✓ ${skillRoot}/${skill.name}`);
851
- } else {
852
- log.chalk.dim(` - ${skillRoot}/${skill.name} (exists)`);
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;
853
991
  }
992
+
993
+ const label = `${skillRoot}/${skill.name}`;
994
+ created ? log.chalk.green(` ✓ ${label}`) : log.chalk.dim(` - ${label} (exists)`);
854
995
  }
855
996
  }
856
997
 
@@ -916,6 +1057,7 @@ export function init(cwd, { fs, path, log }) {
916
1057
  updateGitignore(fs, path, cwd, log);
917
1058
 
918
1059
  log.info(`\nTask workflow initialized. Recommended flows:
1060
+ explore: project-explore
919
1061
  fast: task-fast
920
1062
  task: task-explore -> task-implement -> task-audit (optional, risk-triggered)
921
1063
  bug: bug-explore -> bug-fix -> bug-audit (optional, risk-triggered)
@@ -952,6 +1094,7 @@ export function refresh(cwd, { fs, path, log }) {
952
1094
  updateGitignore(fs, path, cwd, log);
953
1095
 
954
1096
  log.info(`\nTask workflow refreshed. Managed skills reinstalled:
1097
+ explore: project-explore
955
1098
  fast: task-fast
956
1099
  task: task-explore -> task-implement -> task-audit (optional, risk-triggered)
957
1100
  bug: bug-explore -> bug-fix -> bug-audit (optional, risk-triggered)
@@ -989,22 +1132,27 @@ export function doctor(cwd, { fs, path, log }) {
989
1132
 
990
1133
  for (const skillRoot of [CLAUDE_SKILLS_DIR, CODEX_SKILLS_DIR]) {
991
1134
  for (const skill of Object.values(SKILLS)) {
992
- const skillPath = skillFilePath(path, cwd, skillRoot, skill.name);
993
- if (!fs.existsSync(skillPath)) {
994
- checks.push(false);
995
- logCheck(log, false, `${skillRoot}/${skill.name}`, 'missing');
996
- continue;
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
+ );
997
1155
  }
998
-
999
- const content = fs.readFileSync(skillPath, 'utf-8');
1000
- const matches = content === skill.content;
1001
- checks.push(matches);
1002
- logCheck(
1003
- log,
1004
- matches,
1005
- `${skillRoot}/${skill.name}`,
1006
- matches ? 'current' : 'outdated, run `task refresh`'
1007
- );
1008
1156
  }
1009
1157
 
1010
1158
  for (const skillName of LEGACY_MANAGED_SKILL_NAMES) {