cclaw-cli 0.1.0 → 0.1.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/README.md +28 -0
- package/dist/cli.js +14 -3
- package/dist/config.js +2 -1
- package/dist/doctor.js +3 -9
- package/dist/harness-adapters.js +8 -26
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -77,6 +77,34 @@ npx cclaw-cli upgrade
|
|
|
77
77
|
npx cclaw-cli uninstall
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
## PR-First Ship Flow
|
|
81
|
+
|
|
82
|
+
`cclaw` does not run hidden git automation. It enforces release discipline inside the harness and keeps repository actions explicit.
|
|
83
|
+
|
|
84
|
+
Recommended shipping path:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git checkout main
|
|
88
|
+
git pull origin main
|
|
89
|
+
git checkout -b feat/<topic>
|
|
90
|
+
# implement with cclaw stages in the harness
|
|
91
|
+
git add .
|
|
92
|
+
git commit -m "..."
|
|
93
|
+
git push -u origin HEAD
|
|
94
|
+
gh pr create
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
After merge to `main`, CI handles release lifecycle:
|
|
98
|
+
|
|
99
|
+
- `Release Drafter` updates draft notes from merged PRs.
|
|
100
|
+
- `Release Publish` validates the build, publishes to npm (if version is new), publishes an existing release draft or creates a new GitHub Release, and uploads `.tgz` + plugin manifest artifacts.
|
|
101
|
+
- `Release Package` remains available for manual release/event-driven packaging flows.
|
|
102
|
+
- To trigger a new publish, bump `package.json` version in the PR before merge.
|
|
103
|
+
|
|
104
|
+
Required repository secret:
|
|
105
|
+
|
|
106
|
+
- `NPM_TOKEN` with publish access to the npm package.
|
|
107
|
+
|
|
80
108
|
## What Gets Generated
|
|
81
109
|
|
|
82
110
|
```text
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
2
3
|
import process from "node:process";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -93,9 +94,19 @@ async function main() {
|
|
|
93
94
|
process.exitCode = 1;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
function isDirectExecution() {
|
|
98
|
+
if (!process.argv[1])
|
|
99
|
+
return false;
|
|
100
|
+
try {
|
|
101
|
+
const entryPath = realpathSync(path.resolve(process.argv[1]));
|
|
102
|
+
const modulePath = realpathSync(fileURLToPath(import.meta.url));
|
|
103
|
+
return entryPath === modulePath;
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (isDirectExecution()) {
|
|
99
110
|
void main();
|
|
100
111
|
}
|
|
101
112
|
export { parseArgs, parseHarnesses };
|
package/dist/config.js
CHANGED
|
@@ -10,7 +10,8 @@ const SUPPORTED_HARNESSES_TEXT = HARNESS_IDS.join(", ");
|
|
|
10
10
|
function configFixExample() {
|
|
11
11
|
return `harnesses:
|
|
12
12
|
- claude
|
|
13
|
-
- cursor
|
|
13
|
+
- cursor
|
|
14
|
+
`;
|
|
14
15
|
}
|
|
15
16
|
function configValidationError(configFilePath, reason) {
|
|
16
17
|
return new Error(`Invalid cclaw config at ${configFilePath}: ${reason}\n` +
|
package/dist/doctor.js
CHANGED
|
@@ -223,19 +223,13 @@ export async function doctorChecks(projectRoot) {
|
|
|
223
223
|
const hasAllCommands = COMMAND_FILE_ORDER.every((stage) => content.includes(`/cc-${stage}`));
|
|
224
224
|
const hasRouting = content.includes("Intent → Stage Routing") || content.includes("Intent → Stage");
|
|
225
225
|
const hasVerification = content.includes("Verification Discipline");
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
const hasAutoplan = content.includes("Autoplan Orchestrator");
|
|
229
|
-
const hasAgents = content.includes("Agent Specialists");
|
|
230
|
-
const hasSubagents = content.includes("Subagent Orchestration");
|
|
231
|
-
const hasSessionProtocols = content.includes("Session Guidelines");
|
|
232
|
-
const hasHooks = content.includes("Hooks");
|
|
233
|
-
agentsBlockOk = hasMarkers && hasAllCommands && hasRouting && hasVerification && hasFileMap && hasLearnings && hasAutoplan && hasAgents && hasSubagents && hasSessionProtocols && hasHooks;
|
|
226
|
+
const hasDetailLevel = content.includes("Detail Level");
|
|
227
|
+
agentsBlockOk = hasMarkers && hasAllCommands && hasRouting && hasVerification && hasDetailLevel;
|
|
234
228
|
}
|
|
235
229
|
checks.push({
|
|
236
230
|
name: "agents:cclaw_block",
|
|
237
231
|
ok: agentsBlockOk,
|
|
238
|
-
details: `${agentsFile} must contain cclaw marker block with routing
|
|
232
|
+
details: `${agentsFile} must contain cclaw marker block with compact routing and verification guidance`
|
|
239
233
|
});
|
|
240
234
|
// Utility commands
|
|
241
235
|
for (const cmd of ["learn", "autoplan"]) {
|
package/dist/harness-adapters.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { COMMAND_FILE_ORDER, RUNTIME_ROOT } from "./constants.js";
|
|
4
|
-
import { CCLAW_AGENTS, agentMarkdown
|
|
5
|
-
import { autoplanAgentsMdBlock } from "./content/autoplan.js";
|
|
6
|
-
import { learningsAgentsMdBlock } from "./content/learnings.js";
|
|
7
|
-
import { sessionHooksAgentsMdBlock } from "./content/session-hooks.js";
|
|
8
|
-
import { hooksAgentsMdBlock } from "./content/hooks.js";
|
|
9
|
-
import { subagentsAgentsMdBlock } from "./content/subagents.js";
|
|
4
|
+
import { CCLAW_AGENTS, agentMarkdown } from "./content/agents.js";
|
|
10
5
|
import { stageSkillFolder } from "./content/skills.js";
|
|
11
6
|
import { ensureDir, exists, writeFileSafe } from "./fs-utils.js";
|
|
12
7
|
export const CCLAW_MARKER_START = "<!-- cclaw-start -->";
|
|
@@ -48,9 +43,10 @@ Do not skip required handoff gates.
|
|
|
48
43
|
function agentsMdBlock() {
|
|
49
44
|
const stageList = COMMAND_FILE_ORDER.map((s) => `| \`/cc-${s}\` | \`.cclaw/skills/${stageSkillFolder(s)}/SKILL.md\` + \`.cclaw/commands/${s}.md\` |`).join("\n");
|
|
50
45
|
return `${CCLAW_MARKER_START}
|
|
51
|
-
## Cclaw —
|
|
46
|
+
## Cclaw — Workflow Adapter
|
|
52
47
|
|
|
53
|
-
> Auto-generated by \`cclaw sync\`. Do not edit
|
|
48
|
+
> Auto-generated by \`cclaw sync\`. Do not edit this managed block manually.
|
|
49
|
+
> Existing project rules in this repository take precedence over cclaw defaults.
|
|
54
50
|
|
|
55
51
|
### Activation Rule
|
|
56
52
|
|
|
@@ -68,30 +64,16 @@ ${stageList}
|
|
|
68
64
|
| \`/cc-autoplan\` | \`.cclaw/skills/autoplan/SKILL.md\` + \`.cclaw/commands/autoplan.md\` |
|
|
69
65
|
|
|
70
66
|
**Stage order:** brainstorm > scope > design > spec > plan > test > build > review > ship.
|
|
71
|
-
One stage per invocation. Gates must pass before handoff.
|
|
67
|
+
One stage per invocation. Gates must pass before handoff.
|
|
72
68
|
|
|
73
69
|
### Verification Discipline
|
|
74
70
|
|
|
75
71
|
No completion claims without fresh evidence. No "Done" / "All good" / "Tests pass" without running the command in this message.
|
|
76
72
|
|
|
77
|
-
###
|
|
73
|
+
### Detail Level
|
|
78
74
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
| \`.cclaw/commands/*.md\` | Stage commands (thin orchestrators) |
|
|
82
|
-
| \`.cclaw/skills/*/SKILL.md\` | Full stage instructions |
|
|
83
|
-
| \`.cclaw/rules/\` | RULES.md + rules.json |
|
|
84
|
-
| \`.cclaw/state/flow-state.json\` | Flow state & gate tracking |
|
|
85
|
-
| \`.cclaw/artifacts/*.md\` | Stage evidence artifacts |
|
|
86
|
-
| \`.cclaw/agents/*.md\` | Specialist agent personas |
|
|
87
|
-
| \`.cclaw/learnings.jsonl\` | Project knowledge base |
|
|
88
|
-
|
|
89
|
-
${learningsAgentsMdBlock()}
|
|
90
|
-
${autoplanAgentsMdBlock()}
|
|
91
|
-
${agentsAgentsMdBlock()}
|
|
92
|
-
${subagentsAgentsMdBlock()}
|
|
93
|
-
${sessionHooksAgentsMdBlock()}
|
|
94
|
-
${hooksAgentsMdBlock()}
|
|
75
|
+
- This managed AGENTS block is intentionally minimal for cross-project use.
|
|
76
|
+
- Detailed operating procedures live in \`.cclaw/skills/using-cclaw/SKILL.md\`.
|
|
95
77
|
${CCLAW_MARKER_END}`;
|
|
96
78
|
}
|
|
97
79
|
/** Removes the cclaw AGENTS.md block. */
|
package/package.json
CHANGED