workspai 0.57.0 → 0.59.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 +80 -30
- package/contracts/agent-customization-pack.v1.json +62 -4
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +167 -0
- package/contracts/extension-cli-compatibility.v1.json +8 -1
- package/contracts/project-workspace-resolution.v1.json +15 -2
- package/contracts/published-contract-catalog.v1.json +35 -0
- package/contracts/runtime-command-surface.v1.json +99 -0
- package/contracts/workspace-intelligence/agent-bootstrap-receipt.v1.json +247 -0
- package/contracts/workspace-intelligence/agent-customization-pack-report.v1.json +16 -1
- package/contracts/workspace-intelligence/goal-agent-handoff.v1.json +96 -0
- package/contracts/workspace-intelligence/goal-index.v1.json +51 -0
- package/contracts/workspace-intelligence/goal-lifecycle-result.v1.json +96 -0
- package/contracts/workspace-intelligence/goal-pack.v1.json +251 -0
- package/contracts/workspace-intelligence/goal-plan-result.v1.json +46 -0
- package/contracts/workspace-intelligence/project-agent-entry.v1.json +204 -0
- package/contracts/workspace-intelligence/project-context-agent.v1.json +43 -26
- package/contracts/workspace-intelligence/workspace-context.v1.json +14 -1
- package/contracts/workspace-intelligence/workspace-repair-proposal.v1.json +1 -0
- package/contracts/workspace-intelligence/workspace-repair-transaction.v1.json +15 -2
- package/contracts/workspace-intelligence-architecture.v1.json +20 -0
- package/contracts/workspace-repair-capabilities.v1.json +5 -0
- package/dist/analyze-52TEGLDR.js +1 -0
- package/dist/{artifact-remediation-plan-BPLON5VX.js → artifact-remediation-plan-HPNQTNJ2.js} +1 -1
- package/dist/autopilot-release-KQGDM2AA.js +1 -0
- package/dist/capabilities-command-VBLZXP2T.js +1 -0
- package/dist/chunk-4PUJVYRM.js +1 -0
- package/dist/{workspace-knowledge-graph-snapshot-XSQADCNR.js → chunk-5NIZNXRS.js} +1 -1
- package/dist/chunk-5PSKBJKJ.js +1 -0
- package/dist/{chunk-AA4PNQKR.js → chunk-5SFCBZOH.js} +1 -1
- package/dist/{chunk-N2BIIUDH.js → chunk-6FBNSTUS.js} +1 -1
- package/dist/{chunk-YJTEMJFV.js → chunk-7DSYI7YN.js} +1 -1
- package/dist/chunk-7SFXADXO.js +2 -0
- package/dist/{chunk-ADL3CK44.js → chunk-CCDGHPEJ.js} +1 -1
- package/dist/{chunk-LYVDRRDO.js → chunk-D65FCQIO.js} +1 -1
- package/dist/{chunk-YM77FQB3.js → chunk-DGGTTRYE.js} +1 -1
- package/dist/{chunk-TTFQWH55.js → chunk-ENKGGWRX.js} +1 -1
- package/dist/{chunk-ZPA6ECBJ.js → chunk-GPOZILMY.js} +1 -1
- package/dist/{chunk-L36ZASME.js → chunk-HCFWT42C.js} +1 -1
- package/dist/chunk-HOUQIT7U.js +1 -0
- package/dist/{chunk-IXOLHPTN.js → chunk-HS3DJMU5.js} +1 -1
- package/dist/{chunk-XMTLKDPP.js → chunk-J3X56S7L.js} +1 -1
- package/dist/{chunk-64JUYYRC.js → chunk-KBR4Y4RW.js} +1 -1
- package/dist/{chunk-E53BGUOW.js → chunk-KTN2ARZJ.js} +1 -1
- package/dist/chunk-LPCWROQ3.js +1 -0
- package/dist/{chunk-VL3APTVB.js → chunk-M3IKRWXA.js} +1 -1
- package/dist/{chunk-P475BOJW.js → chunk-M4UOXP5T.js} +1 -1
- package/dist/{chunk-GBMCHFOV.js → chunk-N4QQADXX.js} +1 -1
- package/dist/{chunk-75HOCFNH.js → chunk-NOZ4JCH7.js} +1 -1
- package/dist/chunk-NZ3WZYD5.js +1 -0
- package/dist/{chunk-QHY6F4SS.js → chunk-OFWSZYUX.js} +1 -1
- package/dist/{chunk-IUYZ3NHS.js → chunk-OLC7EYUA.js} +3 -3
- package/dist/chunk-PVXSIYLP.js +1 -0
- package/dist/{chunk-NHTLE3WN.js → chunk-PXWKMPPI.js} +1 -1
- package/dist/{chunk-V5EYVQ63.js → chunk-QCKWQFCD.js} +1 -1
- package/dist/{chunk-GDKFN3CM.js → chunk-QFBVQUKV.js} +1 -1
- package/dist/{chunk-W5ZFXKSL.js → chunk-QJCCZLOF.js} +1 -1
- package/dist/{chunk-Z57G62KE.js → chunk-QMPFNXI7.js} +1 -1
- package/dist/chunk-RBBBXFEU.js +1 -0
- package/dist/{chunk-DF4NWPB7.js → chunk-RHK53ZK7.js} +1 -1
- package/dist/chunk-S45YGN2I.js +142 -0
- package/dist/chunk-S4CWUZ4K.js +1 -0
- package/dist/{chunk-SNO3WG4V.js → chunk-SP5EHSWG.js} +1 -1
- package/dist/chunk-TCURN5VD.js +2 -0
- package/dist/{chunk-GTJY55QK.js → chunk-UVBPEX3E.js} +1 -1
- package/dist/chunk-V3ABABV5.js +39 -0
- package/dist/{chunk-IZLEMTES.js → chunk-W6FHVXNL.js} +1 -1
- package/dist/{chunk-UQEQ6CXU.js → chunk-WQX3JYEP.js} +1 -1
- package/dist/{chunk-GXTCU4WF.js → chunk-WSRUPDZN.js} +1 -1
- package/dist/{chunk-6OFGLNFS.js → chunk-YEEAWZWI.js} +1 -1
- package/dist/{chunk-QK5QOXOE.js → chunk-ZJCM37KX.js} +1 -1
- package/dist/{create-O2KLTN5H.js → create-6QWIJTGU.js} +1 -1
- package/dist/{doctor-AL5YWO5X.js → doctor-NAZEKMGU.js} +1 -1
- package/dist/goal-command-contract-CHE7U6YY.js +1 -0
- package/dist/goal-lifecycle-ECIRCHN5.js +1 -0
- package/dist/goal-pack-HBOPVZFO.js +1 -0
- package/dist/index.d.ts +25 -3
- package/dist/index.js +150 -148
- package/dist/{pipeline-4ST4BQWY.js → pipeline-5LLFP5ZH.js} +1 -1
- package/dist/project-agent-entry-AFKDDRDL.js +1 -0
- package/dist/{project-intelligence-lens-JHYECYOK.js → project-intelligence-lens-U2V3VNZG.js} +1 -1
- package/dist/project-test-coverage-HP37HUV2.js +1 -0
- package/dist/{verified-goal-KFNRGOKT.js → verified-goal-HUYJ6LBI.js} +1 -1
- package/dist/{workspace-O4E5CCGK.js → workspace-CQ43AWUF.js} +1 -1
- package/dist/{workspace-agent-sync-N5DPGU2E.js → workspace-agent-sync-YMXYUGYY.js} +1 -1
- package/dist/{workspace-archive-BA3ONVXX.js → workspace-archive-ZBCKJHXS.js} +1 -1
- package/dist/{workspace-context-ETZNEHOJ.js → workspace-context-RAO62QVU.js} +1 -1
- package/dist/{workspace-contract-OSI7NBXS.js → workspace-contract-ACSIHJIO.js} +1 -1
- package/dist/workspace-explain-RH27OQB4.js +1 -0
- package/dist/workspace-explain-contract-ZL4NMLZI.js +1 -0
- package/dist/{workspace-feedback-PCZKXG5R.js → workspace-feedback-RQ4TGJW6.js} +1 -1
- package/dist/{workspace-foundation-QQHX66KE.js → workspace-foundation-JH2GFSAZ.js} +1 -1
- package/dist/{workspace-graph-stream-UZJQ75XZ.js → workspace-graph-stream-ZZZEQQTE.js} +1 -1
- package/dist/workspace-graph-token-efficiency-D7CUT6NX.js +1 -0
- package/dist/{workspace-history-CHJOABME.js → workspace-history-SYCDK7FO.js} +1 -1
- package/dist/{workspace-intelligence-A7O7MN6T.js → workspace-intelligence-3YERTBA3.js} +1 -1
- package/dist/{workspace-intelligence-evaluation-YMY3C5AW.js → workspace-intelligence-evaluation-CQDKOYZZ.js} +1 -1
- package/dist/{workspace-intelligence-runner-4EF66L66.js → workspace-intelligence-runner-YXMOT6GK.js} +1 -1
- package/dist/{workspace-intelligence-runtime-registry-NCVHKCMP.js → workspace-intelligence-runtime-registry-IW6J53LO.js} +1 -1
- package/dist/{workspace-knowledge-graph-BVN4NTJ6.js → workspace-knowledge-graph-HZZP6ZRB.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-6DAOXGGT.js → workspace-knowledge-graph-query-ON45H6Y7.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-7DWHMEM2.js +1 -0
- package/dist/{workspace-mcp-serve-TKX4J3SX.js → workspace-mcp-serve-5TTAN243.js} +1 -1
- package/dist/{workspace-model-7ESEP366.js → workspace-model-EIQSKDX7.js} +1 -1
- package/dist/{workspace-onboarding-SY255V7L.js → workspace-onboarding-SHHW4R4G.js} +1 -1
- package/dist/{workspace-readme-IVJXSIBS.js → workspace-readme-56YZ4EAZ.js} +1 -1
- package/dist/{workspace-registry-summary-7ISKYEPM.js → workspace-registry-summary-OV5KX3WC.js} +1 -1
- package/dist/workspace-repair-engine-BNXZHW35.js +3 -0
- package/dist/workspace-run-7EJEBHAH.js +1 -0
- package/dist/{workspace-verify-CNXZPWS5.js → workspace-verify-W4P6LBIH.js} +1 -1
- package/dist/{workspace-watch-HGFL2EU3.js → workspace-watch-EZ4D4VCF.js} +1 -1
- package/docs/GLOSSARY.md +13 -10
- package/docs/README.md +24 -17
- package/docs/README_CONTENT_CONTRACT.md +12 -8
- package/docs/agent-entry.md +194 -0
- package/docs/ci-workflows.md +1 -1
- package/docs/commands-reference.md +38 -2
- package/docs/contracts/ARTIFACT_CATALOG.md +17 -0
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +4 -0
- package/docs/contracts/README.md +7 -0
- package/docs/goal-packs.md +235 -0
- package/docs/real-world-qualification.md +22 -3
- package/docs/workspace-operations.md +16 -8
- package/docs/workspace-repair-engine.md +36 -5
- package/package.json +3 -2
- package/scripts/enterprise-package-smoke.mjs +4 -0
- package/dist/analyze-HJ774J3E.js +0 -1
- package/dist/autopilot-release-WIFFFQKW.js +0 -1
- package/dist/capabilities-command-44JVOE5S.js +0 -1
- package/dist/chunk-3U4VLIGW.js +0 -1
- package/dist/chunk-5EPPPMAS.js +0 -1
- package/dist/chunk-CNWUIXF3.js +0 -1
- package/dist/chunk-D4RST2HE.js +0 -1
- package/dist/chunk-DT4X7I5M.js +0 -81
- package/dist/chunk-FPJNWPKU.js +0 -1
- package/dist/chunk-PKIRVQLG.js +0 -1
- package/dist/chunk-RPHM7LQW.js +0 -36
- package/dist/chunk-VUR7H2FU.js +0 -2
- package/dist/chunk-VZPWIILU.js +0 -1
- package/dist/project-test-coverage-FRMVYTFB.js +0 -1
- package/dist/workspace-explain-EM7IUV6L.js +0 -1
- package/dist/workspace-explain-contract-KVQO57RC.js +0 -1
- package/dist/workspace-graph-token-efficiency-TF23UYEF.js +0 -1
- package/dist/workspace-repair-engine-GMA2YTCF.js +0 -3
- package/dist/workspace-run-ZZXVNFUS.js +0 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Canonical-First Agent Entry
|
|
2
|
+
|
|
3
|
+
Workspai gives coding agents one portable way to enter an adopted project
|
|
4
|
+
without treating a broad repository scan as the source of architectural truth.
|
|
5
|
+
|
|
6
|
+
The protocol is:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
Host discovery
|
|
10
|
+
→ portable project entry
|
|
11
|
+
→ canonical identity and evidence
|
|
12
|
+
→ freshness and integrity checks
|
|
13
|
+
→ active Goal handoff
|
|
14
|
+
→ bounded Graph retrieval
|
|
15
|
+
→ targeted live source inspection
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This is deliberately **host-first, not model-first**. A model does not decide
|
|
19
|
+
which repository instruction file is loaded. Codex, Claude Code, Gemini CLI,
|
|
20
|
+
Qwen Code, Kimi Code, GitHub Copilot, Cursor, Windsurf, Amazon Q, Grok, and
|
|
21
|
+
other agent harnesses each own their discovery behavior. Workspai projects one
|
|
22
|
+
canonical protocol through the entry surface each host supports.
|
|
23
|
+
|
|
24
|
+
## Start from an adopted project
|
|
25
|
+
|
|
26
|
+
Adopt or import the project once:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx workspai adopt .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
When the eventual agent host is not known, run the canonical chain with
|
|
33
|
+
`--for-agent generic`:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx workspai workspace intelligence run --for-agent generic --strict --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`generic` creates one consumer-neutral context pack and projects lightweight
|
|
40
|
+
entry surfaces for **all supported agent hosts**. It does not build a separate
|
|
41
|
+
Model or Graph for every provider. A later host can therefore discover the
|
|
42
|
+
same canonical evidence without repeating the expensive intelligence run.
|
|
43
|
+
Choosing a named agent may tune the shared context consumer, but the canonical
|
|
44
|
+
chain still preserves portable entry coverage for every supported host.
|
|
45
|
+
|
|
46
|
+
Workspai writes a portable entry contract at
|
|
47
|
+
`.workspai/agent-entry.v1.json`, a bounded project lens at
|
|
48
|
+
`.workspai/reports/project-context-agent.json`, and host adapters when project
|
|
49
|
+
grounding is managed.
|
|
50
|
+
|
|
51
|
+
At the start of an agent session, issue a receipt from the project directory:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx workspai agent bootstrap --for-agent codex --strict --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `generic` when the host has no dedicated identifier. Use the legacy
|
|
58
|
+
`orca` input only for compatibility; Workspai resolves it to `grok`.
|
|
59
|
+
|
|
60
|
+
Audit every supported host in CI or before publishing project grounding:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx workspai project agent-entry verify --for-agent all --strict --json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What the receipt proves
|
|
67
|
+
|
|
68
|
+
The `workspai.agent-bootstrap-receipt.v1` payload checks:
|
|
69
|
+
|
|
70
|
+
- canonical project-to-workspace membership;
|
|
71
|
+
- entry manifest and project-context integrity hashes;
|
|
72
|
+
- host discovery files without overwriting authored repository state;
|
|
73
|
+
- presence and schema validity of the report index, agent context, Workspace
|
|
74
|
+
Model, and Knowledge Graph;
|
|
75
|
+
- persisted Model/Graph compatibility;
|
|
76
|
+
- live project input compatibility, unless explicitly skipped;
|
|
77
|
+
- active Goal Pack and agent-handoff bindings;
|
|
78
|
+
- portable output with no machine-local absolute paths.
|
|
79
|
+
|
|
80
|
+
The receipt does not claim that a model followed the instructions. It proves
|
|
81
|
+
that the host has a valid route to current Workspai evidence and tells the
|
|
82
|
+
consumer what it may claim next. The portable manifest keeps `generic` as its
|
|
83
|
+
provider-neutral bootstrap command; each runtime receipt replaces that step in
|
|
84
|
+
`requiredReadOrder` with the resolved host (or `all` for a complete host audit),
|
|
85
|
+
so a consumer is never routed back through the wrong adapter.
|
|
86
|
+
|
|
87
|
+
The generated workspace name is a logical identity, never a filesystem path.
|
|
88
|
+
Project-local artifacts use `.workspai/...`; canonical workspace artifacts use
|
|
89
|
+
the `workspace:` URI prefix. When an agent requires direct file access, it
|
|
90
|
+
resolves the exact local workspace root at runtime from the adopted project:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
workspai project workspace status --json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
That resolver intentionally returns absolute paths to the local process. Its
|
|
97
|
+
contract classifies them as machine-local, non-portable, forbidden to persist,
|
|
98
|
+
and forbidden to disclose. Entry manifests, project lenses, bootstrap receipts,
|
|
99
|
+
answers, shared logs, commits, prompts, and telemetry must not copy those paths.
|
|
100
|
+
|
|
101
|
+
| Status | Meaning | Consumer rule |
|
|
102
|
+
| ---------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
103
|
+
| `ready` | Host entry, contracts, integrity, and live evidence passed | Continue with bounded Graph retrieval and targeted source reads |
|
|
104
|
+
| `degraded` | Evidence is usable with an explicit limitation | Disclose the limitation; do not claim complete architecture or verification |
|
|
105
|
+
| `blocked` | Required discovery, binding, contract, integrity, or freshness failed | Refresh or repair evidence before architectural or verification claims |
|
|
106
|
+
|
|
107
|
+
An active Goal is reported independently as `ready`, `stale`, or `invalid`.
|
|
108
|
+
A stale Goal remains `present: true`; the receipt includes a complete refresh
|
|
109
|
+
command in `nextActions`. Absence is represented as `present: false` with
|
|
110
|
+
`status: none`, never as a validation failure.
|
|
111
|
+
|
|
112
|
+
`--strict` returns exit code `2` for both `degraded` and `blocked`. Without
|
|
113
|
+
`--strict`, a blocked receipt still returns exit code `2`; degraded evidence is
|
|
114
|
+
returned for an explicitly limited read-only workflow.
|
|
115
|
+
|
|
116
|
+
`--no-live-inputs` is an intentional degraded mode. It checks persisted
|
|
117
|
+
compatibility but cannot prove that the source tree still matches the last
|
|
118
|
+
intelligence run.
|
|
119
|
+
|
|
120
|
+
## Authority boundaries
|
|
121
|
+
|
|
122
|
+
Workspai does not replace source code with generated summaries:
|
|
123
|
+
|
|
124
|
+
- live source owns exact implementation behavior;
|
|
125
|
+
- the canonical Workspace Model owns workspace identity and structural truth;
|
|
126
|
+
- the Knowledge Graph is a model-bound, proof-backed retrieval projection;
|
|
127
|
+
- CLI evidence owns readiness, verification, repair, and Goal lifecycle claims;
|
|
128
|
+
- the project entry contract owns the order in which an agent reaches those
|
|
129
|
+
sources.
|
|
130
|
+
|
|
131
|
+
This means an agent begins with canonical evidence, then verifies and deepens
|
|
132
|
+
it through narrow source inspection. It must not silently replace missing or
|
|
133
|
+
stale workspace evidence with an unbounded repository scan.
|
|
134
|
+
|
|
135
|
+
## Host projection
|
|
136
|
+
|
|
137
|
+
| Host | Project discovery surface |
|
|
138
|
+
| -------------------------------------------------------- | -------------------------------------------------------- |
|
|
139
|
+
| Generic and unsupported model-only clients | `.workspai/PROJECT-GROUNDING.md` plus explicit bootstrap |
|
|
140
|
+
| Codex, Kimi Code, GitHub Copilot, Cursor, Windsurf, Grok | `AGENTS.md` |
|
|
141
|
+
| Claude Code | `CLAUDE.md` adapter |
|
|
142
|
+
| Gemini CLI | `GEMINI.md` adapter |
|
|
143
|
+
| Qwen Code | `QWEN.md` adapter |
|
|
144
|
+
| Amazon Q | `.amazonq/rules/workspai-agent-entry.md` |
|
|
145
|
+
|
|
146
|
+
The adapters contain routing instructions, not duplicated model or graph
|
|
147
|
+
state. The manifest records whether each surface is native, adapted, or a
|
|
148
|
+
portable fallback and whether Workspai could manage it safely.
|
|
149
|
+
|
|
150
|
+
This matrix was last checked against official host documentation on
|
|
151
|
+
2026-08-16: [Codex `AGENTS.md`](https://learn.chatgpt.com/docs/agent-configuration/agents-md),
|
|
152
|
+
[Claude Code memory](https://code.claude.com/docs/en/memory),
|
|
153
|
+
[Gemini CLI context files](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/gemini-md.md),
|
|
154
|
+
[Qwen Code settings](https://github.com/QwenLM/qwen-code/blob/main/docs/users/configuration/settings.md),
|
|
155
|
+
[Kimi Code `AGENTS.md`](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents),
|
|
156
|
+
[GitHub Copilot repository instructions](https://docs.github.com/en/copilot/concepts/prompting/response-customization),
|
|
157
|
+
[Cursor rules](https://docs.cursor.com/context/rules-for-ai),
|
|
158
|
+
[Windsurf `AGENTS.md`](https://docs.windsurf.com/windsurf/cascade/agents-md),
|
|
159
|
+
[Amazon Q project rules](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/context-project-rules.html),
|
|
160
|
+
and [Grok skills and instructions](https://docs.x.ai/build/features/skills-plugins-marketplaces).
|
|
161
|
+
DeepSeek, Mistral, hosted model APIs, and other model-only consumers do not
|
|
162
|
+
define a provider-wide repository entry surface independently of the agent
|
|
163
|
+
host. They use the generic portable bootstrap unless their host maps to one of
|
|
164
|
+
the verified surfaces above. Workspai does not invent a model-specific file
|
|
165
|
+
name from undocumented behavior.
|
|
166
|
+
|
|
167
|
+
If an authored instruction file or symbolic link prevents safe management,
|
|
168
|
+
Workspai preserves repository ownership and reports degraded or blocked host
|
|
169
|
+
coverage. It does not replace the file to make a check pass.
|
|
170
|
+
|
|
171
|
+
## Consumer integration
|
|
172
|
+
|
|
173
|
+
IDEs and agent runtimes should:
|
|
174
|
+
|
|
175
|
+
1. discover the host-native instruction file;
|
|
176
|
+
2. run `workspai agent bootstrap --for-agent <host> --json`;
|
|
177
|
+
3. validate the receipt schema from the installed CLI contract catalog;
|
|
178
|
+
4. stop broad discovery when the receipt is blocked;
|
|
179
|
+
5. read an applicable active Goal handoff before planning changes;
|
|
180
|
+
6. use the bounded Graph query returned by `nextActions`;
|
|
181
|
+
7. open only returned proofs and target source files;
|
|
182
|
+
8. make mutation and verification claims only through the governed CLI flow.
|
|
183
|
+
|
|
184
|
+
Do not infer support from the package version alone. Discover
|
|
185
|
+
`projectAgentEntry` and `agentBootstrapReceipt` through
|
|
186
|
+
`contracts/published-contract-catalog.v1.json`.
|
|
187
|
+
|
|
188
|
+
## Package boundary
|
|
189
|
+
|
|
190
|
+
The CLI currently owns adoption, synchronization, receipt orchestration, and
|
|
191
|
+
exit semantics. The entry manifest and receipt are versioned, portable
|
|
192
|
+
contracts rather than CLI-internal objects. Future independent Model, Graph,
|
|
193
|
+
Goal, or agent packages can therefore implement their own providers behind the
|
|
194
|
+
same contract without changing the project-facing protocol.
|
package/docs/ci-workflows.md
CHANGED
|
@@ -46,7 +46,7 @@ Validate or preview the current CLI announcement locally:
|
|
|
46
46
|
npm --workspace workspai run check:release-announcement
|
|
47
47
|
npm --workspace workspai run release:announcement -- \
|
|
48
48
|
--product workspai-cli \
|
|
49
|
-
--tag v0.
|
|
49
|
+
--tag v0.59.0 \
|
|
50
50
|
--markdown-output /tmp/workspai-discord-announcement.md
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -8,6 +8,20 @@ For behavior and workflows, see
|
|
|
8
8
|
[workspace-operations.md](./workspace-operations.md) and
|
|
9
9
|
[OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md).
|
|
10
10
|
|
|
11
|
+
Start with the outcome-oriented root help when you do not yet know a command:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx workspai --help
|
|
15
|
+
npx workspai <command> --help
|
|
16
|
+
npx workspai commands --json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Root help presents the canonical `Understand → Impact → Act → Verify` path,
|
|
20
|
+
common human workflows, interactive official-kit discovery through `create
|
|
21
|
+
project`, and a complete ownership-grouped command map. Scoped help carries
|
|
22
|
+
exact flags and examples. `commands --json` remains the machine-complete
|
|
23
|
+
inventory used to prevent the human map from drifting.
|
|
24
|
+
|
|
11
25
|
## Workspace lifecycle
|
|
12
26
|
|
|
13
27
|
```bash
|
|
@@ -19,6 +33,9 @@ npx workspai pipeline [--json] [--strict] [--skip-verify] [--skip-analyze] [--sk
|
|
|
19
33
|
npx workspai analyze [--workspace <path>] [--json] [--strict] [--output <file>]
|
|
20
34
|
npx workspai readiness [--workspace <path>] [--json] [--strict] [--skip-verify]
|
|
21
35
|
npx workspai autopilot release [--mode <audit|safe-fix|enforce>] [--json] [--output <file>] [--since <ref>] [--parallel] [--max-workers <n>]
|
|
36
|
+
npx workspai goal <intent> [--workspace <path>] [--scope <workspace|project:name>] [--for-agent <generic|claude|codex>] [--max-attempts <1-25>] [--refresh] [--dry-run] [--json]
|
|
37
|
+
npx workspai goal <--status [goal-id]|--list|--activate <goal-id>|--cancel <goal-id>|--prepare <goal-id>|--verify <goal-id>> [--workspace <path>] [--no-run] [--json]
|
|
38
|
+
npx workspai agent bootstrap [--project <path>] [--for-agent <host>] [--no-live-inputs] [--strict] [--json]
|
|
22
39
|
```
|
|
23
40
|
|
|
24
41
|
Recommended CI:
|
|
@@ -57,6 +74,7 @@ npx workspai doctor
|
|
|
57
74
|
npx workspai doctor workspace [--json] [--strict] [--ci] [--fix] [--plan] [--apply]
|
|
58
75
|
npx workspai doctor project [--json] [--strict] [--ci] [--fix] [--plan] [--apply]
|
|
59
76
|
npx workspai project coverage [--project <path>] [--target <0-100>] [--run] [--strict] [--json]
|
|
77
|
+
npx workspai project agent-entry [verify] [--project <path>] [--for-agent <host|all>] [--no-live-inputs] [--strict] [--json]
|
|
60
78
|
npx workspai workspace list
|
|
61
79
|
npx workspai workspace foundation ensure [--force] [--json]
|
|
62
80
|
npx workspai workspace share [--output <file>] [--include-paths] [--no-doctor]
|
|
@@ -69,8 +87,8 @@ npx workspai workspace goal plan <release-readiness|dependency-security|test-cov
|
|
|
69
87
|
npx workspai workspace goal status <goal-id> [--json]
|
|
70
88
|
npx workspai workspace goal verify <goal-id> [--no-run] [--reuse-intelligence] [--json]
|
|
71
89
|
npx workspai workspace model [--workspace <path>] [--json] [--write] [--strict] [--cache] [--incremental] [--include-paths] [--include-evidence] [--scan-depth <count>]
|
|
72
|
-
npx workspai workspace context --for-agent [generic|codex|claude|cursor|
|
|
73
|
-
npx workspai workspace agent-sync [--workspace <path>] [--write] [--refresh-context] [--strict] [--json] [--preset minimal|enterprise] [--target all|vscode|agents,copilot,cursor,claude,codex,
|
|
90
|
+
npx workspai workspace context --for-agent [generic|codex|claude|gemini|qwen|kimi|grok|copilot|cursor|windsurf|amazon-q] [--workspace <path>] [--scope project:<name>] [--json] [--write] [--agent-sync|--no-agent-sync] [--target <targets>] [--preset minimal|enterprise] [--project-grounding managed|local|off] [--include-evidence] [--scan-depth <count>] [--strict]
|
|
91
|
+
npx workspai workspace agent-sync [--workspace <path>] [--write] [--refresh-context] [--strict] [--json] [--preset minimal|enterprise] [--target all|vscode|agents,copilot,cursor,claude,codex,gemini,qwen,kimi,grok,windsurf,amazon-q] [--project-grounding managed|local|off] [--experimental-hooks] [--hydrate-prompts]
|
|
74
92
|
npx workspai workspace remediation-plan [--json] [--write] [--ci] [--include-paths]
|
|
75
93
|
npx workspai workspace repair <capabilities|plan|propose|approve|decide|execute|resume|status|list|rollback|cancel> [--workspace <path>] [--card <id>] [--action-id <id>] [--project <name>] [--proposal <file>] [--transaction <id>] [--approved-by <actor>] [--decision <choice>] [--max-risk safe|guarded|invasive] [--allow-breaking] [--allow-force] [--no-auto-rollback] [--json]
|
|
76
94
|
npx workspai workspace snapshot [--workspace <path>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
|
|
@@ -153,6 +171,24 @@ portable verdict is written to
|
|
|
153
171
|
[Verified engineering goals](./workspace-intelligence-runner.md#verified-engineering-goals)
|
|
154
172
|
for the supported scopes, safety constraints, and verification boundary.
|
|
155
173
|
|
|
174
|
+
Top-level `goal <intent>` is the plain-language planning front door. It binds
|
|
175
|
+
the intent to the current canonical Model and Graph, resolves project/workspace
|
|
176
|
+
scope, runs capability/retrieval preflight, and atomically writes a Goal Pack,
|
|
177
|
+
portable agent handoff, and active-goal index. Use `goal --status`, `--list`,
|
|
178
|
+
`--activate`, or `--cancel` for discovery/lifecycle; deterministic goals may use
|
|
179
|
+
`--prepare` and `--verify`. It does not silently mutate source or let an agent
|
|
180
|
+
claim verification. Lifecycle operations are mutually exclusive, cannot be
|
|
181
|
+
combined with an intent or planning-only flags, and `--no-run` is valid only
|
|
182
|
+
with `--verify`. See [Goal Packs](./goal-packs.md).
|
|
183
|
+
|
|
184
|
+
`agent bootstrap` is the project-local canonical-first preflight. It validates
|
|
185
|
+
the host discovery route, project/workspace binding, public artifact schemas,
|
|
186
|
+
integrity hashes, Model/Graph freshness, live source inputs, and active Goal
|
|
187
|
+
handoff before broad repository discovery. `project agent-entry verify` uses
|
|
188
|
+
the same receipt and can audit every supported host with `--for-agent all`.
|
|
189
|
+
Blocked receipts exit `2`; strict mode also maps degraded evidence to exit `2`.
|
|
190
|
+
See [Canonical-first agent entry](./agent-entry.md).
|
|
191
|
+
|
|
156
192
|
`workspace feedback record` is a non-interactive machine interface. It requires
|
|
157
193
|
exactly one JSON object on stdin and `--json`; an empty stdin or interactive TTY
|
|
158
194
|
is rejected. Required fields are `actionId`, `summary`, and `outcome`. The
|
|
@@ -28,6 +28,7 @@ root:
|
|
|
28
28
|
| Artifact | Writer | Schema / format | Portability and reader purpose |
|
|
29
29
|
| ---------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------- |
|
|
30
30
|
| `.workspai/workspace-link.local.json` | `adopt`, `import`, project creation, `workspace sync`, `project workspace relink` | `project-workspace-link.v1` | Machine-local absolute binding; always gitignored and never an agent evidence payload |
|
|
31
|
+
| `.workspai/agent-entry.v1.json` | Project lens reconciliation and `workspace agent-sync --write` | `workspai.agent-entry.v1` | Portable host-discovery, canonical read-order, authority, and integrity contract |
|
|
31
32
|
| `.workspai/reports/project-context-agent.json` | Project lens reconciliation and `workspace agent-sync --write` | `project-context-agent.v1` | Portable bounded model/graph/proof projection for project-local agents |
|
|
32
33
|
| `.workspai/PROJECT-GROUNDING.md` | Project lens reconciliation | Markdown | Portable human/agent entry guide with path-free workspace references |
|
|
33
34
|
| `AGENTS.md` managed section | Project lens reconciliation in `managed` mode | Managed Markdown block | Preserves user content and routes compatible agents to project/workspace evidence |
|
|
@@ -42,6 +43,11 @@ machine-local link publishable. The context is bounded but not count-only: it
|
|
|
42
43
|
includes topology, API/deployment/test surfaces, blockers, portable proofs,
|
|
43
44
|
and model/graph freshness for the selected project.
|
|
44
45
|
|
|
46
|
+
`agent bootstrap --json` and `project agent-entry verify --json` emit a
|
|
47
|
+
non-persisted `workspai.agent-bootstrap-receipt.v1` payload. The receipt proves
|
|
48
|
+
the selected host route, contract validity, integrity, persisted and live
|
|
49
|
+
freshness, and active Goal bindings without exposing the machine-local link.
|
|
50
|
+
|
|
45
51
|
## Naming conventions
|
|
46
52
|
|
|
47
53
|
| Pattern | Meaning | Examples |
|
|
@@ -62,6 +68,9 @@ and model/graph freshness for the selected project.
|
|
|
62
68
|
| `workspace remediation-plan --write` | `.workspai/reports/artifact-remediation-plan-last-run.json` | `artifact-remediation-plan-v1` | `contracts/artifact-remediation-plan.v1.json` |
|
|
63
69
|
| `workspace repair *` | `.workspai/reports/workspace-repair-last-run.json` | `workspai.workspace-repair-transaction.v1` | `contracts/workspace-intelligence/workspace-repair-transaction.v1.json` |
|
|
64
70
|
| `workspace repair capabilities` | CLI capability output | `workspai.workspace-repair-capabilities.v1` | `contracts/workspace-repair-capabilities.v1.json` |
|
|
71
|
+
| `goal <intent>` | `.workspai/reports/goal-pack-last-run.json` | `workspai.goal-pack.v1` | `contracts/workspace-intelligence/goal-pack.v1.json` |
|
|
72
|
+
| `goal <intent>` / lifecycle options | `.workspai/goals/index.json` | `workspai.goal-index.v1` | `contracts/workspace-intelligence/goal-index.v1.json` |
|
|
73
|
+
| `goal --status/--list/... --json` | stdout | `workspai.goal-lifecycle-result.v1` | `contracts/workspace-intelligence/goal-lifecycle-result.v1.json` |
|
|
65
74
|
| `analyze` | `.workspai/reports/analyze-last-run.json` | `rapidkit-analyze-v1` | `contracts/analyze-last-run.v1.json` |
|
|
66
75
|
| `readiness` | `.workspai/reports/release-readiness-last-run.json` | `release-readiness-v1` | `contracts/release-readiness.v1.json` |
|
|
67
76
|
| `pipeline` | `.workspai/reports/pipeline-last-run.json` | `rapidkit-pipeline-v1` | `contracts/pipeline-last-run.v1.json` |
|
|
@@ -70,6 +79,14 @@ and model/graph freshness for the selected project.
|
|
|
70
79
|
|
|
71
80
|
Side/cache (not gates): `.workspai/reports/doctor-workspace-cache.json` (`doctor-workspace-cache-v2`).
|
|
72
81
|
|
|
82
|
+
Every Goal Pack also has an immutable-instance directory under
|
|
83
|
+
`.workspai/goals/<goal-id>/` containing `goal-pack.json` and
|
|
84
|
+
`agent-handoff.json`. These are portable planning/projection artifacts, not
|
|
85
|
+
verification gates. Only CLI-owned verified-goal and Repair Engine evidence may
|
|
86
|
+
authorize mutation or claim completion.
|
|
87
|
+
The sibling `.workspai/goals/index.json` is the canonical active-goal discovery
|
|
88
|
+
and lifecycle registry; consumers must not infer activity from directory order.
|
|
89
|
+
|
|
73
90
|
Doctor Studio handoff:
|
|
74
91
|
`doctor-remediation-plan-v2` (`contracts/doctor-remediation-plan.v2.json`) is emitted in JSON
|
|
75
92
|
responses and persisted to `.workspai/reports/doctor-remediation-plan-last-run.json` by
|
|
@@ -33,6 +33,8 @@ These commands are implemented and orchestrated by Workspai CLI:
|
|
|
33
33
|
- `infra`
|
|
34
34
|
- `commands`
|
|
35
35
|
- `create`
|
|
36
|
+
- `goal`
|
|
37
|
+
- `agent`
|
|
36
38
|
- `project`
|
|
37
39
|
- `shell activate`
|
|
38
40
|
|
|
@@ -57,6 +59,8 @@ These nested Commander commands are implemented and orchestrated by Workspai CLI
|
|
|
57
59
|
- `product manifest`
|
|
58
60
|
- `product manifest create`
|
|
59
61
|
- `product plan`
|
|
62
|
+
- `agent bootstrap`
|
|
63
|
+
- `project agent-entry`
|
|
60
64
|
- `project commands`
|
|
61
65
|
- `project coverage`
|
|
62
66
|
- `project archives`
|
package/docs/contracts/README.md
CHANGED
|
@@ -74,6 +74,8 @@ Published under `../../contracts/` (not duplicated in this folder):
|
|
|
74
74
|
- `analyze-last-run.v1.json` — analyze evidence
|
|
75
75
|
- `pipeline-last-run.v1.json` — governance pipeline orchestration
|
|
76
76
|
- `project-entry-capability.v1.json` — open-ended adopt/import contract for readable projects
|
|
77
|
+
- `workspace-intelligence/project-agent-entry.v1.json` — portable host discovery, canonical read order, authority boundaries, and integrity for an adopted project
|
|
78
|
+
- `workspace-intelligence/agent-bootstrap-receipt.v1.json` — per-session proof of workspace membership, host coverage, schema validity, freshness, live inputs, and active Goal bindings
|
|
77
79
|
- `adopt-effects.v1.json` — dry-run disclosure of project metadata, conditional repository-control reconciliation, and workspace operations before adoption
|
|
78
80
|
- `create-planner-capabilities.v1.json` — native, official, and existing capability lanes
|
|
79
81
|
- `agent-customization-pack.v1.json` — generated instructions, prompts, skills, agents, optional hooks, MCP-ready design metadata, target matrix, and drift state for AI agent surfaces
|
|
@@ -114,6 +116,11 @@ These schemas describe durable artifacts or bounded query results. A command's
|
|
|
114
116
|
stdout may wrap an artifact with operation metadata such as `status`,
|
|
115
117
|
`outputPath`, or a structured error; that envelope follows
|
|
116
118
|
`cli-operation-result.v1.json` and does not change the nested artifact contract.
|
|
119
|
+
`status: "success"` means the command completed and returned its contracted
|
|
120
|
+
artifact; it does not override a policy gate. For gated operations such as
|
|
121
|
+
`workspace verify --strict`, the envelope `exitCode`, process exit code, and
|
|
122
|
+
nested gate exit code are identical even when the artifact was produced
|
|
123
|
+
successfully and the gate blocked progression.
|
|
117
124
|
|
|
118
125
|
CLI commands: see [commands-reference.md](../commands-reference.md) and the
|
|
119
126
|
[CLI README](../../README.md#one-intelligence-chain).
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Goal Packs — Plain Language to Governed Work
|
|
2
|
+
|
|
3
|
+
`workspai goal` is the simple front door for an engineering outcome. It turns
|
|
4
|
+
one plain-language intent into a portable, versioned Goal Pack bound to the
|
|
5
|
+
current Workspace Model and proof-backed Knowledge Graph.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Run inside an adopted project; scope defaults to that project.
|
|
9
|
+
npx workspai goal "Raise test coverage to at least 85%"
|
|
10
|
+
|
|
11
|
+
# Goals are not limited to coverage or another built-in metric.
|
|
12
|
+
npx workspai goal "Add retry with exponential backoff for transient requests"
|
|
13
|
+
npx workspai goal "Refactor the authentication boundary"
|
|
14
|
+
npx workspai goal "Improve startup latency" --scope project:web
|
|
15
|
+
npx workspai goal "Document the release workflow"
|
|
16
|
+
|
|
17
|
+
# Plan for the whole canonical workspace.
|
|
18
|
+
npx workspai goal "Prepare this workspace for release" --scope workspace
|
|
19
|
+
|
|
20
|
+
# Inspect the complete machine contract without writing artifacts.
|
|
21
|
+
npx workspai goal "Map the authentication architecture" --dry-run --json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The command plans work. It does **not** edit source, call a model, install an
|
|
25
|
+
agent plugin, approve a repair, or claim that the outcome is complete.
|
|
26
|
+
|
|
27
|
+
Goal intent is open-ended within the engineering workspace. The category is a
|
|
28
|
+
retrieval and verification hint, not an allowlist. An objective that does not
|
|
29
|
+
match the local deterministic classifier is retained as a low-confidence
|
|
30
|
+
general Goal instead of being discarded; the original text remains the
|
|
31
|
+
authority. Genuine compound ambiguity, missing numeric coverage targets,
|
|
32
|
+
missing evidence, unsafe scope, or stale bindings still stop before mutation.
|
|
33
|
+
|
|
34
|
+
## What it produces
|
|
35
|
+
|
|
36
|
+
A successful plan atomically publishes four portable artifacts:
|
|
37
|
+
|
|
38
|
+
| Artifact | Purpose |
|
|
39
|
+
| ---------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
40
|
+
| `.workspai/goals/<goal-id>/goal-pack.json` | Canonical intent, scope, evidence bindings, policy, criteria, and orchestration state |
|
|
41
|
+
| `.workspai/goals/<goal-id>/agent-handoff.json` | Bounded consumer projection for `generic`, `claude`, or `codex` |
|
|
42
|
+
| `.workspai/goals/index.json` | Active-goal and lifecycle discovery authority for agents and IDEs |
|
|
43
|
+
| `.workspai/reports/goal-pack-last-run.json` | Latest Goal Pack for IDE, CI, and automation discovery |
|
|
44
|
+
|
|
45
|
+
Agents start from the index. They do not infer the active objective by walking
|
|
46
|
+
directories or treating the newest timestamp as authority.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
workspai goal --status --json
|
|
50
|
+
workspai goal --list --json
|
|
51
|
+
workspai goal --activate <goal-id> --json
|
|
52
|
+
workspai goal --cancel <goal-id> --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The files contain logical workspace/project identity and relative artifact
|
|
56
|
+
paths. They do not copy the machine-local workspace root, linked-project path,
|
|
57
|
+
credentials, raw model responses, or unrestricted command output.
|
|
58
|
+
|
|
59
|
+
## Scope resolution
|
|
60
|
+
|
|
61
|
+
- From an adopted or linked project, the default scope is that exact project.
|
|
62
|
+
- From a workspace root, the default scope is all registered projects.
|
|
63
|
+
- `--scope project:<name>` selects one project explicitly.
|
|
64
|
+
- `--scope workspace` selects the complete canonical workspace explicitly.
|
|
65
|
+
- `--workspace <path>` is available for automation that cannot rely on the
|
|
66
|
+
current directory.
|
|
67
|
+
|
|
68
|
+
An unadopted directory is rejected. `goal` never silently creates or selects a
|
|
69
|
+
different workspace.
|
|
70
|
+
|
|
71
|
+
## Evidence and freshness
|
|
72
|
+
|
|
73
|
+
Goal planning requires a persisted canonical Model and a Graph whose
|
|
74
|
+
`source.hash` still matches that Model. Missing or mismatched evidence fails
|
|
75
|
+
closed with a renewal command. Use `--refresh` to run the complete Workspace
|
|
76
|
+
Intelligence chain before planning:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx workspai goal "Fix the authentication regression" --refresh --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The Goal Pack records both bindings and their exact hash semantics. The Model
|
|
83
|
+
uses its stable structural projection; Graph and Goal artifacts use canonical
|
|
84
|
+
JSON. The Graph binding also records its stable live-input fingerprint, so an
|
|
85
|
+
evidence-only rerun does not make an unchanged Goal stale merely because the
|
|
86
|
+
artifact timestamp changed. A Goal fingerprint is an identity key and is never
|
|
87
|
+
presented as a file digest.
|
|
88
|
+
|
|
89
|
+
The original source binding remains immutable. A later source state is accepted
|
|
90
|
+
only when it is sealed by a Goal-bound, approved, closed CLI Repair transaction
|
|
91
|
+
whose plan, proposal, checkpoint output, exact-target verification, canonical
|
|
92
|
+
Model, Graph, and closure receipt all still validate. Any unlinked edit,
|
|
93
|
+
post-closure edit, or unrelated workspace drift makes the Goal stale and
|
|
94
|
+
requires a new Goal Pack.
|
|
95
|
+
|
|
96
|
+
## Honest preflight states
|
|
97
|
+
|
|
98
|
+
`ready-to-plan` means intent, scope, at least one bounded retrieval anchor, and required
|
|
99
|
+
measurement capability are available. It does not mean source changed or the
|
|
100
|
+
goal passed. `needs-evidence` means a measurable target is valid but its
|
|
101
|
+
machine-readable producer or baseline still needs setup. A native C/C++
|
|
102
|
+
project without instrumented LCOV, Cobertura, or LLVM output is therefore
|
|
103
|
+
reported as `needs-evidence`, never as ready.
|
|
104
|
+
|
|
105
|
+
`blocked` means the CLI cannot provide bounded proof-backed retrieval for the
|
|
106
|
+
selected intent and scope. Workspai refuses to hand broad source inspection to
|
|
107
|
+
an agent until Workspace Intelligence is refreshed or the intent is clarified.
|
|
108
|
+
|
|
109
|
+
Only a `ready-to-plan` Goal may become the active objective automatically.
|
|
110
|
+
Planning a Goal that needs confirmation or evidence records it for review but
|
|
111
|
+
does not replace the current active Goal.
|
|
112
|
+
|
|
113
|
+
Preflight also carries the current Workspace Intelligence status, blocked
|
|
114
|
+
stages, objective-first retrieval queries, deterministic category recall, and
|
|
115
|
+
bounded graph anchors. The complete user objective receives the primary anchor
|
|
116
|
+
budget; generic category matches cannot crowd it out. When only structured
|
|
117
|
+
category evidence is available, retrieval is reported as `partial`, not falsely
|
|
118
|
+
as objective-grounded.
|
|
119
|
+
|
|
120
|
+
## Relationship to verified goals
|
|
121
|
+
|
|
122
|
+
The two goal surfaces have different jobs:
|
|
123
|
+
|
|
124
|
+
| Surface | Job |
|
|
125
|
+
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
126
|
+
| `workspai goal "<intent>"` | Compile plain language, resolve scope, pin Model/Graph evidence, and prepare an agent handoff |
|
|
127
|
+
| `workspai workspace goal plan ...` | Create or resume one of the shipped deterministic success contracts: release readiness, dependency security, or test coverage |
|
|
128
|
+
|
|
129
|
+
When a plain-language intent maps exactly to one of those three measurable
|
|
130
|
+
contracts, the Goal Pack includes the correct `workspace goal plan` command.
|
|
131
|
+
For example, a coverage intent without a percentage becomes
|
|
132
|
+
`needs-confirmation`; Workspai does not invent a target.
|
|
133
|
+
|
|
134
|
+
For a supported deterministic contract, the lifecycle bridge is explicit:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
workspai goal --prepare <goal-id> --json
|
|
138
|
+
workspai goal --verify <goal-id> --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Preparation is refused while clarification or measurement evidence is
|
|
142
|
+
missing. Verification is refused until a CLI verified-goal contract is linked,
|
|
143
|
+
and only CLI evidence may transition the lifecycle to `verified`.
|
|
144
|
+
Only the selected `activeGoalId` may enter preparation or verification. A
|
|
145
|
+
completed verified goal clears the active selection. `--list` and `--cancel`
|
|
146
|
+
remain available when an old Goal is stale, so operators can recover safely;
|
|
147
|
+
`--status`, `--activate`, `--prepare`, and `--verify` require current bindings.
|
|
148
|
+
|
|
149
|
+
The immutable Goal Pack also owns the execution-cycle budget. Every repair
|
|
150
|
+
proposal is linked in the Goal index and every verification attempt is recorded
|
|
151
|
+
in the verified-goal status artifact. Proposal planning and verification are
|
|
152
|
+
serialized independently, refuse to exceed `executionPolicy.maxAttempts`, and
|
|
153
|
+
remain bounded even when concurrent IDE or agent requests race. Consumers must
|
|
154
|
+
restore both durable counters and use the greater value as the current cycle;
|
|
155
|
+
they cannot reset a local retry counter. If the baseline already satisfies the
|
|
156
|
+
criteria, the consumer should call the verifier immediately and avoid an
|
|
157
|
+
unnecessary source change.
|
|
158
|
+
|
|
159
|
+
Every other Goal is still executable through a compatible consumer, but its
|
|
160
|
+
semantic outcome is not falsely presented as machine-verifiable. The consumer
|
|
161
|
+
must assess the final diff or answer against the complete immutable objective,
|
|
162
|
+
while the CLI independently owns scope, repair transactions, build/test/audit
|
|
163
|
+
checks, canonical workspace verification, rollback, and the attempt budget.
|
|
164
|
+
Such a result is evidence-reviewed; only the three exact producer contracts may
|
|
165
|
+
use the lifecycle claim `verified`. Its `workspace-verify` success criterion and
|
|
166
|
+
final orchestration step explicitly describe safety and evidence freshness; they
|
|
167
|
+
never describe that signal as proof of an arbitrary semantic outcome.
|
|
168
|
+
|
|
169
|
+
## Ownership and safety boundary
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
User intent
|
|
173
|
+
-> CLI: resolve Model, Graph, scope, policy, and success contract
|
|
174
|
+
-> Agent: inspect bounded evidence and propose one focused source change
|
|
175
|
+
-> Human: approve the immutable repair plan
|
|
176
|
+
-> CLI Repair Engine: checkpoint, execute, reconcile, verify, keep or roll back
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The agent handoff is a projection, not a second source of truth. Agent plugins,
|
|
180
|
+
IDE chat, MCP, and future independent packages may render or transport it, but
|
|
181
|
+
they cannot widen scope, grant network access, authorize mutation, mark a goal
|
|
182
|
+
verified, or replace CLI evidence.
|
|
183
|
+
|
|
184
|
+
Current Goal Packs use `proposal-only` mutation mode: the CLI command itself
|
|
185
|
+
does not invoke a model or mutate source. A compatible IDE or agent consumer
|
|
186
|
+
may execute an inspected proposal only by submitting it to the existing CLI
|
|
187
|
+
Repair Engine, binding the transaction to the active Goal fingerprint, and
|
|
188
|
+
calling the exact Goal verifier after the transaction closes. A closed repair,
|
|
189
|
+
generic test pass, or consumer message cannot mark the Goal verified. This
|
|
190
|
+
boundary is designed to remain compatible with the independent Decisions
|
|
191
|
+
architecture.
|
|
192
|
+
|
|
193
|
+
Goal consumers must also preserve metric integrity. The Workspai extension does
|
|
194
|
+
not expose file deletion to deterministic verified Goals. Its test-coverage
|
|
195
|
+
Goal may write only test-owned source, fixtures, or snapshots; a general Goal
|
|
196
|
+
may create, replace, or delete only inspected source through an approved,
|
|
197
|
+
rollback-protected CLI Repair transaction. This prevents a model from reaching
|
|
198
|
+
a numeric coverage target by shrinking or redefining the measured surface
|
|
199
|
+
without crippling legitimate goals such as removing a deprecated module.
|
|
200
|
+
|
|
201
|
+
## Options
|
|
202
|
+
|
|
203
|
+
```text
|
|
204
|
+
--workspace <path> Explicit canonical workspace
|
|
205
|
+
--scope <scope> workspace or project:<name>
|
|
206
|
+
--for-agent <consumer> generic, claude, or codex (default: generic)
|
|
207
|
+
--max-attempts <count> Bounded execution-cycle budget, 1–25 (default: 5)
|
|
208
|
+
--refresh Refresh Workspace Intelligence before planning
|
|
209
|
+
--dry-run Validate and preview without writes
|
|
210
|
+
--status [goal-id] Validate active or named Goal bindings
|
|
211
|
+
--list List registered Goal Packs
|
|
212
|
+
--activate <goal-id> Select the active agent objective
|
|
213
|
+
--cancel <goal-id> Cancel without deleting evidence
|
|
214
|
+
--prepare <goal-id> Link a deterministic verification contract
|
|
215
|
+
--verify <goal-id> Run CLI-owned verification
|
|
216
|
+
--no-run Read verification evidence without executing producers
|
|
217
|
+
--json Machine-readable result
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Choose exactly one lifecycle option. Lifecycle options cannot be combined with
|
|
221
|
+
an intent, `--scope`, `--refresh`, or `--dry-run`; `--no-run` applies only to
|
|
222
|
+
`--verify`. Invalid combinations fail before workspace resolution or writes.
|
|
223
|
+
|
|
224
|
+
Schemas:
|
|
225
|
+
|
|
226
|
+
- [`goal-pack.v1.json`](../contracts/workspace-intelligence/goal-pack.v1.json)
|
|
227
|
+
- [`goal-agent-handoff.v1.json`](../contracts/workspace-intelligence/goal-agent-handoff.v1.json)
|
|
228
|
+
- [`goal-plan-result.v1.json`](../contracts/workspace-intelligence/goal-plan-result.v1.json)
|
|
229
|
+
- [`goal-index.v1.json`](../contracts/workspace-intelligence/goal-index.v1.json)
|
|
230
|
+
- [`goal-lifecycle-result.v1.json`](../contracts/workspace-intelligence/goal-lifecycle-result.v1.json)
|
|
231
|
+
|
|
232
|
+
Every lifecycle operation uses the same `workspai.goal-lifecycle-result.v1`
|
|
233
|
+
success envelope. Failures use the shared CLI operation result with an
|
|
234
|
+
operation-specific code such as `goal.prepare.failed`; consumers never parse
|
|
235
|
+
terminal prose or infer a lifecycle state from directories.
|