@veewo/claw 0.1.77 → 0.1.79

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
@@ -1,81 +1,84 @@
1
- # @veewo/claw
2
-
3
- `@veewo/claw` is the CLI entrypoint for running the `.claw` workflow in a project.
4
-
5
- It gives agents and developers a concrete way to plan work, recall project knowledge, deposit truth and ADR notes, and close rounds out cleanly instead of leaving project state scattered across transient chats.
6
-
7
- ## What the CLI is for
8
-
9
- - initialize and normalize the `.claw` project surface
10
- - run project-scoped planning and task lifecycle commands
11
- - index and query project documentation recall
12
- - support truth ingestion and closeout flows
13
-
14
- ## Install
15
-
16
- ```bash
17
- npm install -g @veewo/claw
18
- ```
19
-
20
- After installing the CLI, project search still needs one-time setup inside each `.claw` project:
21
-
22
- 1. Run `claw context` so `.claw/project.json` is normalized and the default local embedding config is present.
23
- 2. Run `claw search index --refresh` once so the local embedding model can be downloaded or reused and the first vector index can be built.
24
-
25
- Then run:
26
-
1
+ # @veewo/claw
2
+
3
+ `@veewo/claw` is the CLI entrypoint for running the `.claw` workflow in a project.
4
+
5
+ It gives agents and developers a concrete way to plan work, recall project knowledge, deposit truth and ADR notes, and close rounds out cleanly instead of leaving project state scattered across transient chats.
6
+
7
+ ## What the CLI is for
8
+
9
+ - initialize and normalize the `.claw` project surface
10
+ - run project-scoped planning and task lifecycle commands
11
+ - index and query project documentation recall
12
+ - support truth ingestion and closeout flows
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ npm install -g @veewo/claw
18
+ ```
19
+
20
+ After installing the CLI, project search still needs one-time setup inside each `.claw` project:
21
+
22
+ 1. Run `claw context` so `.claw/project.json` is normalized and the default local embedding config is present.
23
+ 2. Run `claw search index --refresh` once so the local embedding model can be downloaded or reused and the first vector index can be built.
24
+
25
+ Then run:
26
+
27
27
  ```bash
28
28
  claw init
29
29
  claw search index --refresh
30
30
  claw search "existing truth or ADR topic"
31
31
  claw plan create --title "My task" --goal "Define the first task"
32
32
  claw plan create "My templated task" --template default --goal "Route through the default template"
33
+ claw plan create "Ephemeral harness" --scope session --goal "Use plan and Goal workflows without project deposition"
33
34
  ```
34
35
 
35
36
  `claw plan create` uses explicit `--template` first, otherwise the project's configured `defaultPlanTemplate`, and finally falls back to the built-in `default` template. You can select a template explicitly with `claw plan create "<title>" --template <name>` or `claw plan create --template <name> --title "<title>"`.
36
37
 
37
- Projects can add reusable templates directly under `.claw/templates` with `.json`, `.js`, `.mjs`, or `.cjs` files. Put `defaultPlanTemplate` in `.claw/project.json` for a shared team default, or in `.claw/project-override.json` for a local personal override.
38
-
39
- When `.claw/project.json` has `planning: true`, the default `default` template seeds `process.discussing` with:
40
-
41
- 1. a planning task that refines the request and appends executable tasks
42
- 2. an activation task that bridges into `process.active`
43
-
44
- When `planning: false`, `claw plan create` seeds the smallest executable plan directly in `process.active`.
45
-
46
- ## Workflow shape
47
-
48
- In a typical round, the CLI helps land this loop in a project:
49
-
50
- `plan` -> `search and recall` -> `execute` -> `deposit truth / ADR` -> `close out`
51
-
52
- That project-level plan structure helps agents carry longer-running work more cleanly than leaving the task in loose chat state alone.
53
-
54
- Codex startup workflow should rely on the session hook or startup recovery path instead of treating any extra manual recovery step as required after plan creation.
55
-
56
- ## Search and recall
57
-
58
- `claw search` is the project recall command for `.claw` memory, truth, ADR, and declared markdown docs. Use it for retained project context rather than code search.
59
-
60
- When a task needs deeper code investigation or relationship tracing, GitNexus can complement this workflow, but it is optional rather than required for using `claw` itself.
61
-
62
- Typical setup:
63
-
64
- ```bash
65
- claw context
66
- claw search index --refresh
67
- ```
68
-
69
- If you need deeper backup detail on config or recall behavior, use the adapter reference notes in [packages/codex-adapter/references/project-config-reference.md](../codex-adapter/references/project-config-reference.md) or [packages/opencode-adapter/references/project-config-reference.md](../opencode-adapter/references/project-config-reference.md).
70
-
71
- ## Configuration
72
-
73
- If you need backup `.claw/project.json` detail, start with the adapter reference notes above and use [docs/project-json-reference.md](../../docs/project-json-reference.md) only for deeper canonical detail.
74
-
75
- `claw-kit` also stays usable alongside other harnesses or external skills, so the CLI does not assume a single host or investigation surface.
38
+ `--scope session` stores the workflow in a user-level directory keyed by the platform session id, so it works without a project `.claw` directory and recovers across cwd changes. It preserves plan/task/subplan/Goal behavior while disabling project knowledge capture, memory/GitNexus refresh, and project retention. Use `claw session clean` for the current session or `claw session clean --expired` for the seven-day TTL sweep.
76
39
 
40
+ Projects can add reusable templates directly under `.claw/templates` with `.json`, `.js`, `.mjs`, or `.cjs` files. Put `defaultPlanTemplate` in `.claw/project.json` for a shared team default, or in `.claw/project-override.json` for a local personal override.
41
+
42
+ When `.claw/project.json` has `planning: true`, the default `default` template seeds `process.discussing` with:
43
+
44
+ 1. a planning task that refines the request and appends executable tasks
45
+ 2. an activation task that bridges into `process.active`
46
+
47
+ When `planning: false`, `claw plan create` seeds the smallest executable plan directly in `process.active`.
48
+
49
+ ## Workflow shape
50
+
51
+ In a typical round, the CLI helps land this loop in a project:
52
+
53
+ `plan` -> `search and recall` -> `execute` -> `deposit truth / ADR` -> `close out`
54
+
55
+ That project-level plan structure helps agents carry longer-running work more cleanly than leaving the task in loose chat state alone.
56
+
57
+ Codex startup workflow should rely on the session hook or startup recovery path instead of treating any extra manual recovery step as required after plan creation.
58
+
59
+ ## Search and recall
60
+
61
+ `claw search` is the project recall command for `.claw` memory, truth, ADR, and declared markdown docs. Use it for retained project context rather than code search.
62
+
63
+ When a task needs deeper code investigation or relationship tracing, GitNexus can complement this workflow, but it is optional rather than required for using `claw` itself.
64
+
65
+ Typical setup:
66
+
67
+ ```bash
68
+ claw context
69
+ claw search index --refresh
70
+ ```
71
+
72
+ If you need deeper backup detail on config or recall behavior, use the adapter reference notes in [packages/codex-adapter/references/project-config-reference.md](../codex-adapter/references/project-config-reference.md) or [packages/opencode-adapter/references/project-config-reference.md](../opencode-adapter/references/project-config-reference.md).
73
+
74
+ ## Configuration
75
+
76
+ If you need backup `.claw/project.json` detail, start with the adapter reference notes above and use [docs/project-json-reference.md](../../docs/project-json-reference.md) only for deeper canonical detail.
77
+
78
+ `claw-kit` also stays usable alongside other harnesses or external skills, so the CLI does not assume a single host or investigation surface.
79
+
77
80
  The config model is team-friendly as well: `.claw/project.json` carries the shared canonical workflow, while `.claw/project-override.json` leaves room for personal runtime preferences.
78
-
79
- ## Repository
80
-
81
- - [claw-kit](https://github.com/chanyuenpang/claw-kit)
81
+
82
+ ## Repository
83
+
84
+ - [claw-kit](https://github.com/chanyuenpang/claw-kit)
package/dist/bin.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { shouldLoadCliForInvocation } from "./knowledge-hook-preflight.js";
2
3
  const originalEmitWarning = process.emitWarning.bind(process);
3
4
  process.emitWarning = ((warning, ...args) => {
4
5
  if (shouldSuppressSqliteExperimentalWarning(warning, args)) {
@@ -6,7 +7,13 @@ process.emitWarning = ((warning, ...args) => {
6
7
  }
7
8
  return originalEmitWarning(warning, ...args);
8
9
  });
9
- void import("./cli.js");
10
+ void main();
11
+ async function main() {
12
+ if (!await shouldLoadCliForInvocation(process.argv.slice(2), process.cwd(), process.env)) {
13
+ return;
14
+ }
15
+ await import("./cli.js");
16
+ }
10
17
  function shouldSuppressSqliteExperimentalWarning(warning, args) {
11
18
  const message = typeof warning === "string"
12
19
  ? warning
@@ -22,5 +29,4 @@ function shouldSuppressSqliteExperimentalWarning(warning, args) {
22
29
  : "";
23
30
  return type === "ExperimentalWarning" && message.includes("SQLite is an experimental feature");
24
31
  }
25
- export {};
26
32
  //# sourceMappingURL=bin.js.map
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,MAAM,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE9D,OAAO,CAAC,WAAW,GAAG,CAAC,CAAC,OAAgB,EAAE,GAAG,IAAe,EAAE,EAAE;IAC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