@glrs-dev/cli 0.1.0 → 0.3.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/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-builder.md +12 -2
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-planner.md +20 -5
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan-reviewer.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan.md +5 -5
- package/dist/vendor/harness-opencode/dist/agents/prompts/prime.md +3 -3
- package/dist/vendor/harness-opencode/dist/agents/prompts/qa-reviewer.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/qa-thorough.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/research-auto.md +37 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/research-local.md +33 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/research-web.md +32 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/research.md +15 -20
- package/dist/vendor/harness-opencode/dist/{chunk-BDFZGIY7.js → chunk-CZMAJISX.js} +41 -13
- package/dist/vendor/harness-opencode/dist/{chunk-UDB4NQ2R.js → chunk-VJUETC6A.js} +1 -1
- package/dist/vendor/harness-opencode/dist/{chunk-V3KJY6CN.js → chunk-WBBN7OVN.js} +166 -6
- package/dist/vendor/harness-opencode/dist/cli.js +97 -18
- package/dist/vendor/harness-opencode/dist/index.d.ts +1 -1
- package/dist/vendor/harness-opencode/dist/index.js +5 -5
- package/dist/vendor/harness-opencode/dist/install-X5KEANRB.js +13 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/SKILL.md +8 -4
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/qa-expectations.md +120 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/self-review.md +2 -2
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/setup-authoring.md +68 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/verify-design.md +4 -0
- package/dist/vendor/harness-opencode/package.json +2 -2
- package/package.json +2 -2
- package/dist/vendor/harness-opencode/dist/install-GDCZ7VFK.js +0 -9
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Rule 10 — QA-expectations establishment
|
|
2
|
+
|
|
3
|
+
**Detect → propose → confirm per-surface verify patterns.**
|
|
4
|
+
|
|
5
|
+
A plan's verify commands are its contract with the builder. Generic verifies ("run tests") waste builder time; specific verifies ("run the API tests that exercise the files this task touches") catch real failures. This rule establishes concrete, per-surface QA expectations with the user before emitting the plan.
|
|
6
|
+
|
|
7
|
+
## The six surfaces
|
|
8
|
+
|
|
9
|
+
For each surface below, detect signals in the codebase, propose a canonical verify pattern, and confirm with the user.
|
|
10
|
+
|
|
11
|
+
### UI — Browser-based user interface
|
|
12
|
+
|
|
13
|
+
**Detection signals:**
|
|
14
|
+
- `@playwright/test`, `cypress`, or `@vitest/browser` in `package.json` dependencies
|
|
15
|
+
- `playwright.config.{ts,js}` or `cypress.config.*` present
|
|
16
|
+
|
|
17
|
+
**Proposed verify pattern:**
|
|
18
|
+
Playwright MCP invocation for visual/interaction assertions:
|
|
19
|
+
```yaml
|
|
20
|
+
verify:
|
|
21
|
+
- playwright test --project=chromium --grep "@task-specific-tag"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### API — HTTP endpoints
|
|
25
|
+
|
|
26
|
+
**Detection signals:**
|
|
27
|
+
- `openapi.yaml` / `openapi.json` present
|
|
28
|
+
- `curl` or `httpie` usage in existing scripts
|
|
29
|
+
- Postman collection files
|
|
30
|
+
|
|
31
|
+
**Proposed verify pattern:**
|
|
32
|
+
Direct HTTP assertion against a local port:
|
|
33
|
+
```yaml
|
|
34
|
+
verify:
|
|
35
|
+
- curl -fsS http://localhost:3000/health | jq '.status == "ok"'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### DB — Database schema and queries
|
|
39
|
+
|
|
40
|
+
**Detection signals:**
|
|
41
|
+
- `docker-compose` postgres service defined
|
|
42
|
+
- `prisma`, `drizzle-kit`, `knex`, or `flyway` in dependencies
|
|
43
|
+
- `test/db` or similar helper directory
|
|
44
|
+
|
|
45
|
+
**Proposed verify pattern:**
|
|
46
|
+
Postgres readiness + migration + assertion:
|
|
47
|
+
```yaml
|
|
48
|
+
verify:
|
|
49
|
+
- pg_isready -h localhost -p 5432
|
|
50
|
+
- pnpm prisma migrate deploy
|
|
51
|
+
- pnpm tsx scripts/verify-db.ts
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Integration — Cross-module workflows
|
|
55
|
+
|
|
56
|
+
**Detection signals:**
|
|
57
|
+
- `test/integration/**` directory exists
|
|
58
|
+
- `e2e/**` directory exists
|
|
59
|
+
- `*.integration.test.ts` files
|
|
60
|
+
|
|
61
|
+
**Proposed verify pattern:**
|
|
62
|
+
Integration test runner scoped to relevant paths:
|
|
63
|
+
```yaml
|
|
64
|
+
verify:
|
|
65
|
+
- pnpm test test/integration
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Browser-based component — Storybook stories
|
|
69
|
+
|
|
70
|
+
**Detection signals:**
|
|
71
|
+
- `storybook` or `@storybook/*` in dependencies
|
|
72
|
+
- `*.stories.{ts,tsx}` files present
|
|
73
|
+
|
|
74
|
+
**Proposed verify pattern:**
|
|
75
|
+
Storybook test or Chromatic visual verification:
|
|
76
|
+
```yaml
|
|
77
|
+
verify:
|
|
78
|
+
- pnpm storybook test --stories "ComponentName"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### CLI — Command-line interface
|
|
82
|
+
|
|
83
|
+
**Detection signals:**
|
|
84
|
+
- `bin/*` directory with executables
|
|
85
|
+
- `package.json` `bin:` entry defined
|
|
86
|
+
|
|
87
|
+
**Proposed verify pattern:**
|
|
88
|
+
Smoke test via help flag or scripted invocation:
|
|
89
|
+
```yaml
|
|
90
|
+
verify:
|
|
91
|
+
- pnpm my-cli --help
|
|
92
|
+
- pnpm tsx scripts/smoke-test-cli.ts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Question-bundling rule
|
|
96
|
+
|
|
97
|
+
**Two or more surfaces detected:** Bundle into a single structured `question` tool call with one checkbox group per surface.
|
|
98
|
+
|
|
99
|
+
**One surface detected:** Still ask (confirmation, not interrogation), but use a single-field call.
|
|
100
|
+
|
|
101
|
+
**Zero surfaces detected:** Skip the QA-expectation question entirely. Fall back to generic verifies:
|
|
102
|
+
```yaml
|
|
103
|
+
defaults:
|
|
104
|
+
verify_after_each:
|
|
105
|
+
- pnpm run typecheck
|
|
106
|
+
- pnpm test
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Emission
|
|
110
|
+
|
|
111
|
+
Confirmed patterns become:
|
|
112
|
+
|
|
113
|
+
1. **Per-task verify templates** — tasks targeting specific files use scoped verifies (e.g., `pnpm test test/api/users.test.ts` for a task touching `src/api/users.ts`)
|
|
114
|
+
2. **defaults.verify_after_each** — global breakage catchers (typecheck, full test suite)
|
|
115
|
+
|
|
116
|
+
The rule: per-task verify targets the specific files touched; defaults catches global breakage.
|
|
117
|
+
|
|
118
|
+
## Cross-reference to verify-design.md
|
|
119
|
+
|
|
120
|
+
This rule (10) is the per-surface tactical layer — it names the tools to detect and the patterns to propose. Rule 3 (verify-design.md) owns the principles: deterministic, assertive, would-have-failed-before. Every proposed command must satisfy both layers.
|
|
@@ -23,7 +23,7 @@ The validator catches schema, DAG, and glob errors. It cannot catch "this verify
|
|
|
23
23
|
## Run validate
|
|
24
24
|
|
|
25
25
|
```
|
|
26
|
-
bunx @glrs-dev/harness-opencode pilot validate <plan-path>
|
|
26
|
+
bunx @glrs-dev/harness-plugin-opencode pilot validate <plan-path>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Fix every error AND warning. The "warnings" tier (e.g., glob conflicts between tasks) is also yours to action — either decide they're OK and document it, or restructure.
|
|
@@ -33,7 +33,7 @@ Fix every error AND warning. The "warnings" tier (e.g., glob conflicts between t
|
|
|
33
33
|
When all seven questions are answered "yes" and `pilot validate` exits 0:
|
|
34
34
|
|
|
35
35
|
- Save the plan.
|
|
36
|
-
- Tell the user: `Plan saved to <path>. Next: bunx @glrs-dev/harness-opencode pilot build`.
|
|
36
|
+
- Tell the user: `Plan saved to <path>. Next: bunx @glrs-dev/harness-plugin-opencode pilot build`.
|
|
37
37
|
- Stop. Don't summarize. Don't editorialize. The user can read the YAML.
|
|
38
38
|
|
|
39
39
|
## When the plan is NOT ready
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Rule 9 — Setup-block authoring
|
|
2
|
+
|
|
3
|
+
**Detect → propose → confirm the top-level `setup:` block.**
|
|
4
|
+
|
|
5
|
+
The `setup:` block runs once per worktree before any task executes. It is the environment bootstrap: package manager install, docker-compose services, migration runs. A good setup block means the builder starts with a working environment; a missing one means tasks fail confusingly on missing dependencies.
|
|
6
|
+
|
|
7
|
+
## Detection signals
|
|
8
|
+
|
|
9
|
+
During codebase research (Section 2), look for these signals:
|
|
10
|
+
|
|
11
|
+
**Lockfiles → package manager install:**
|
|
12
|
+
- `pnpm-lock.yaml` → `pnpm install --frozen-lockfile`
|
|
13
|
+
- `bun.lock` → `bun install --frozen-lockfile`
|
|
14
|
+
- `package-lock.json` → `npm ci`
|
|
15
|
+
- `yarn.lock` → `yarn install --frozen-lockfile`
|
|
16
|
+
- `Cargo.lock` → `cargo fetch`
|
|
17
|
+
|
|
18
|
+
**Docker Compose → service startup:**
|
|
19
|
+
- `docker-compose.yml` or `compose.yaml` with defined services → `docker compose up -d <svc>` for each service the tasks will need (typically postgres, redis, etc.)
|
|
20
|
+
|
|
21
|
+
**Migration tooling → schema setup:**
|
|
22
|
+
- `package.json` deps containing `knex`, `prisma`, `drizzle-kit`, or `flyway` → corresponding migrate/push command (e.g., `prisma migrate dev`, `drizzle-kit push`)
|
|
23
|
+
|
|
24
|
+
## Proposal shape
|
|
25
|
+
|
|
26
|
+
When you detect one or more setup commands, bundle them into a single `question` tool call:
|
|
27
|
+
|
|
28
|
+
- Present each detected command as a pre-selected checkbox
|
|
29
|
+
- Group by category (Package install, Services, Migrations)
|
|
30
|
+
- Allow the user to uncheck commands that aren't needed or edit the command text
|
|
31
|
+
- Include an "Add another command" free-text field for anything you missed
|
|
32
|
+
|
|
33
|
+
Example question structure:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Setup commands detected (check all that should run before the first task):
|
|
37
|
+
|
|
38
|
+
[✓] Package install: pnpm install --frozen-lockfile
|
|
39
|
+
[✓] Services: docker compose up -d postgres
|
|
40
|
+
[✓] Migrations: pnpm prisma migrate dev
|
|
41
|
+
|
|
42
|
+
[Add another command: __________]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## No-op behavior
|
|
46
|
+
|
|
47
|
+
If NOTHING is detected (no lockfile, no compose, no migration tooling), emit `setup: []` or omit the key entirely. Do NOT ask the user open-ended "do you need setup?" questions. The schema defaults to `[]`; omitting is safe.
|
|
48
|
+
|
|
49
|
+
## Emission
|
|
50
|
+
|
|
51
|
+
Whatever the user confirms becomes the top-level `setup:` block in the written YAML, positioned above `defaults:` (matching schema ordering):
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
name: my-plan
|
|
55
|
+
setup:
|
|
56
|
+
- pnpm install --frozen-lockfile
|
|
57
|
+
- docker compose up -d postgres
|
|
58
|
+
- pnpm prisma migrate dev
|
|
59
|
+
defaults:
|
|
60
|
+
verify_after_each:
|
|
61
|
+
- pnpm run typecheck
|
|
62
|
+
tasks:
|
|
63
|
+
...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Back-compat note
|
|
67
|
+
|
|
68
|
+
The `setup:` key already defaults to `[]` in the schema (line 241 of `src/pilot/plan/schema.ts`). Plans that omit it or set it to `[]` behave identically to before this rule existed.
|
|
@@ -51,3 +51,7 @@ If a verify command flakes, three retries will exhaust attempts and the task fai
|
|
|
51
51
|
## Always include a "before" check
|
|
52
52
|
|
|
53
53
|
For non-trivial tasks, write a verify that would HAVE FAILED before the task ran. This makes the task's value observable. If the verify passed before AND passes after, the task didn't actually move the system.
|
|
54
|
+
|
|
55
|
+
## Cross-reference: per-surface tooling menu
|
|
56
|
+
|
|
57
|
+
For the per-surface tooling menu (Playwright for UI, curl for API, Postgres for DB), see rule 10 (`qa-expectations.md`). That rule applies these principles to specific tools; this rule defines the principles themselves.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glrs-dev/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Unified CLI for the @glrs-dev ecosystem — OpenCode agent harness dispatch + worktree management.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"zod": "4.1.8"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@glrs-dev/harness-opencode": "workspace:*",
|
|
55
|
+
"@glrs-dev/harness-plugin-opencode": "workspace:*",
|
|
56
56
|
"@types/bun": "latest",
|
|
57
57
|
"@types/node": "^22",
|
|
58
58
|
"tsup": "^8",
|