@kitsy/coop 0.0.1 → 1.1.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
@@ -2,6 +2,120 @@
2
2
 
3
3
  CLI package for COOP.
4
4
 
5
- Commands:
5
+ Install globally:
6
+
7
+ ```bash
8
+ npm i -g @kitsy/coop
9
+ coop --help
10
+ ```
11
+
12
+ Install locally in a repo:
13
+
14
+ ```bash
15
+ pnpm add -D @kitsy/coop
16
+ pnpm exec coop --help
17
+ ```
18
+
19
+ Both entrypoints operate on the nearest parent `.coop/` workspace. If no workspace log target exists, CLI errors fall back to `~/.coop/logs/cli.log` or `COOP_HOME/logs/cli.log`.
20
+
21
+ Current implemented command families:
6
22
  - `coop`
23
+ - `coop init`
24
+ - `coop create task ...`
25
+ - `coop create task --from <idea> --ai`
26
+ - `coop create idea ...`
27
+ - `coop create track ...`
28
+ - `coop create delivery ... [--commit] [--user <user>] [--force]`
29
+ - `coop assign task <id> --to <assignee> [--actor <actor>]`
30
+ - `coop list tasks|ideas|alias ...`
31
+ - `coop show task|idea ...`
32
+ - `coop transition task ... [--user <user>] [--force]`
33
+ - `coop graph validate|next|show|critical-path ...`
34
+ - `coop index status|rebuild`
35
+ - `coop plan delivery <name>`
36
+ - `coop plan delivery <name> --monte-carlo [--iterations <n>]`
37
+ - `coop plan capacity <track>`
38
+ - `coop status [--today <date>]`
39
+ - `coop view kanban`
40
+ - `coop view timeline --delivery <name>`
41
+ - `coop view velocity [--today <date>]`
42
+ - `coop view burndown --delivery <name> [--today <date>]`
43
+ - `coop view capacity [--today <date>]`
44
+ - `coop ui [--host <host>] [--port <port>] [--no-open]`
45
+ - `coop serve [--host <host>] [--port <port>] [--repo <path>]`
46
+ - `coop webhook github [--host <host>] [--port <port>] [--repo <path>]`
47
+ - `coop migrate --dry-run --to 2`
48
+ - `coop alias ...`
49
+ - `coop list alias [pattern]`
50
+ - `coop config index.data yaml|json`
51
+ - `coop config id.naming "<TYPE>-<USER>-<YYMMDD>-<RAND>"`
52
+ - `coop config project.name <name>`
53
+ - `coop config project.id <id>`
54
+ - `coop config project.aliases <csv>`
55
+ - `coop config ai.provider mock|openai|anthropic|gemini|ollama`
56
+ - `coop config ai.model <model-name>`
57
+ - `coop run task <id> [--step <step>] [--dry-run]`
58
+
59
+ Known limitations:
60
+ - `ext` is still a placeholder for future phases.
61
+ - Provider-backed AI is supported for `openai`, `anthropic`, `gemini`, and `ollama` via `.coop/config.yml` + env vars.
62
+ - Authorization is advisory and config-driven (`.coop/config.yml -> authorization`).
63
+ - Plugin runtime supports manifest triggers under `.coop/plugins/*.yml` (webhook + console + `github_pr` actions).
64
+ - `coop ui` is read-only and depends on local `.coop/.index` data. The command rebuilds stale indexes before launch.
65
+ - `coop init` creates `.coop/.ignore` and `.coop/.gitignore` so logs, tmp files, and index artifacts are not committed by default.
66
+
67
+ GitHub integration quick example:
68
+ ```yaml
69
+ github:
70
+ owner: kitsy
71
+ repo: coop
72
+ base_branch: main
73
+ token_env: GITHUB_TOKEN
74
+ webhook_secret_env: GITHUB_WEBHOOK_SECRET
75
+ merge_method: squash
76
+ ```
77
+
78
+ With `.coop/plugins/github-pr.yml` enabled:
79
+ - `coop transition task PM-101 in_review` creates or updates a PR
80
+ - `coop transition task PM-101 done` merges the linked PR
81
+ - `coop webhook github --port 8787` receives GitHub review/merge webhooks and syncs task status
82
+
83
+ API server and cross-repo dependency quick example:
84
+ ```yaml
85
+ api:
86
+ host: 127.0.0.1
87
+ port: 3847
88
+ remotes:
89
+ platform-repo:
90
+ base_url: http://127.0.0.1:3848
91
+ ```
92
+
93
+ With cross-repo task references such as `external:platform-repo/PM-200`:
94
+ - `coop serve --port 3847` exposes the local read-only API
95
+ - remote dependencies resolve through the configured API base URL when reachable
96
+ - unreachable remotes are reported as external dependency risks
97
+
98
+ Workspace identity:
99
+ ```yaml
100
+ project:
101
+ name: Payments Platform
102
+ id: payments-platform
103
+ aliases:
104
+ - pay
105
+ - ledger.master
106
+ ```
107
+
108
+ This identity is exposed through:
109
+ - `GET /api/meta`
110
+ - MCP `coop_workspace_info`
111
+ - MCP `coop://workspace`
112
+
113
+ Provider config quick example:
114
+ ```yaml
115
+ ai:
116
+ provider: openai
117
+ model: gpt-5-mini
118
+ openai:
119
+ api_key_env: OPENAI_API_KEY
120
+ ```
7
121
 
package/bin/coop.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from "../dist/index.js";
3
+
4
+ await runCli(process.argv);
package/bin/coop.mjs ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from "node:url";
3
+ import { spawnSync } from "node:child_process";
4
+ import path from "node:path";
5
+ import process from "node:process";
6
+
7
+ const script = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "dist", "index.js");
8
+ const result = spawnSync(process.execPath, [script, ...process.argv.slice(2)], {
9
+ stdio: "inherit",
10
+ });
11
+
12
+ process.exit(result.status ?? 1);
package/dist/index.d.ts CHANGED
@@ -1 +1,15 @@
1
1
  #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+
4
+ /**
5
+ * Builds the root Commander program and registers implemented command groups.
6
+ * [SPEC: Architecture v2.0 §23]
7
+ */
8
+ declare function createProgram(): Command;
9
+ /**
10
+ * Executes CLI parsing and centralized error rendering/logging.
11
+ * [SPEC: Architecture v2.0 §23]
12
+ */
13
+ declare function runCli(argv?: string[]): Promise<void>;
14
+
15
+ export { createProgram, runCli };