workspai 0.57.0 → 0.58.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.
Files changed (118) hide show
  1. package/README.md +2 -0
  2. package/contracts/agent-customization-pack.v1.json +10 -0
  3. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +77 -0
  4. package/contracts/extension-cli-compatibility.v1.json +5 -0
  5. package/contracts/published-contract-catalog.v1.json +25 -0
  6. package/contracts/runtime-command-surface.v1.json +45 -0
  7. package/contracts/workspace-intelligence/goal-agent-handoff.v1.json +96 -0
  8. package/contracts/workspace-intelligence/goal-index.v1.json +45 -0
  9. package/contracts/workspace-intelligence/goal-lifecycle-result.v1.json +96 -0
  10. package/contracts/workspace-intelligence/goal-pack.v1.json +250 -0
  11. package/contracts/workspace-intelligence/goal-plan-result.v1.json +46 -0
  12. package/contracts/workspace-intelligence/workspace-repair-proposal.v1.json +1 -0
  13. package/contracts/workspace-intelligence-architecture.v1.json +20 -0
  14. package/dist/analyze-MAU36FTX.js +1 -0
  15. package/dist/{artifact-remediation-plan-BPLON5VX.js → artifact-remediation-plan-JRX4XZ7C.js} +1 -1
  16. package/dist/autopilot-release-TA2L7SCB.js +1 -0
  17. package/dist/capabilities-command-HE2FICLG.js +1 -0
  18. package/dist/chunk-42Q5E2YV.js +1 -0
  19. package/dist/{workspace-knowledge-graph-snapshot-XSQADCNR.js → chunk-4NN5QWOB.js} +1 -1
  20. package/dist/{chunk-GDKFN3CM.js → chunk-4YICCES6.js} +1 -1
  21. package/dist/{chunk-VL3APTVB.js → chunk-6TNSCVR4.js} +1 -1
  22. package/dist/{chunk-PKIRVQLG.js → chunk-7IRGSM25.js} +1 -1
  23. package/dist/{chunk-NHTLE3WN.js → chunk-7KXRA5ST.js} +1 -1
  24. package/dist/{chunk-Z57G62KE.js → chunk-A3JCETSF.js} +1 -1
  25. package/dist/{chunk-GXTCU4WF.js → chunk-AUCHMXUZ.js} +1 -1
  26. package/dist/{chunk-L36ZASME.js → chunk-C4NYG57I.js} +1 -1
  27. package/dist/{chunk-P475BOJW.js → chunk-CFBAGPB4.js} +1 -1
  28. package/dist/{chunk-GTJY55QK.js → chunk-CHMCKYJJ.js} +1 -1
  29. package/dist/{chunk-SNO3WG4V.js → chunk-EEMRRCGR.js} +1 -1
  30. package/dist/{chunk-75HOCFNH.js → chunk-FXIE2WVG.js} +1 -1
  31. package/dist/{chunk-YJTEMJFV.js → chunk-FY6OHOXR.js} +1 -1
  32. package/dist/{chunk-W5ZFXKSL.js → chunk-G4VMNWSU.js} +1 -1
  33. package/dist/{chunk-ADL3CK44.js → chunk-GRGUPSNP.js} +1 -1
  34. package/dist/{chunk-6OFGLNFS.js → chunk-GVS5OFUB.js} +1 -1
  35. package/dist/{chunk-E53BGUOW.js → chunk-H545P6LN.js} +1 -1
  36. package/dist/chunk-HH54C3XJ.js +1 -0
  37. package/dist/{chunk-XMTLKDPP.js → chunk-HI7ONEFI.js} +1 -1
  38. package/dist/chunk-HYY5PQCV.js +1 -0
  39. package/dist/{chunk-QK5QOXOE.js → chunk-I5PDN2P2.js} +1 -1
  40. package/dist/{chunk-V5EYVQ63.js → chunk-II4ROT6X.js} +1 -1
  41. package/dist/{chunk-GBMCHFOV.js → chunk-LGJAAPNR.js} +1 -1
  42. package/dist/{chunk-UQEQ6CXU.js → chunk-M2BK3XTP.js} +1 -1
  43. package/dist/{chunk-N2BIIUDH.js → chunk-MFJ6ZP7S.js} +1 -1
  44. package/dist/{chunk-64JUYYRC.js → chunk-N3DFX4BY.js} +1 -1
  45. package/dist/chunk-NQ5H4R2I.js +83 -0
  46. package/dist/chunk-PCXBPQO6.js +1 -0
  47. package/dist/chunk-QXW3SLEX.js +1 -0
  48. package/dist/{chunk-IXOLHPTN.js → chunk-RJDGC6AQ.js} +1 -1
  49. package/dist/{chunk-ZPA6ECBJ.js → chunk-RMDVRNU7.js} +1 -1
  50. package/dist/{chunk-TTFQWH55.js → chunk-SM55RK3C.js} +1 -1
  51. package/dist/{chunk-LYVDRRDO.js → chunk-T63WRURN.js} +1 -1
  52. package/dist/{chunk-VUR7H2FU.js → chunk-TMOKXYAQ.js} +1 -1
  53. package/dist/{chunk-DF4NWPB7.js → chunk-TTLVG5AR.js} +1 -1
  54. package/dist/{chunk-QHY6F4SS.js → chunk-VAWV3UKV.js} +1 -1
  55. package/dist/chunk-VIFTO53Y.js +1 -0
  56. package/dist/{chunk-IZLEMTES.js → chunk-WSDVFLHT.js} +1 -1
  57. package/dist/{chunk-IUYZ3NHS.js → chunk-XC26FNRL.js} +3 -3
  58. package/dist/chunk-YMY6EFX4.js +1 -0
  59. package/dist/{chunk-YM77FQB3.js → chunk-YYCPRYP7.js} +1 -1
  60. package/dist/{chunk-RPHM7LQW.js → chunk-ZDYGO3T7.js} +17 -17
  61. package/dist/{create-O2KLTN5H.js → create-QIN56Y4M.js} +1 -1
  62. package/dist/{doctor-AL5YWO5X.js → doctor-RP4Q2CKJ.js} +1 -1
  63. package/dist/goal-command-contract-CHE7U6YY.js +1 -0
  64. package/dist/goal-lifecycle-YTBU3ICP.js +1 -0
  65. package/dist/goal-pack-MYYH7K43.js +1 -0
  66. package/dist/index.d.ts +17 -2
  67. package/dist/index.js +125 -125
  68. package/dist/{pipeline-4ST4BQWY.js → pipeline-77NUVYQD.js} +1 -1
  69. package/dist/{project-intelligence-lens-JHYECYOK.js → project-intelligence-lens-AM2B2PXU.js} +1 -1
  70. package/dist/project-test-coverage-MUSS7Z7V.js +1 -0
  71. package/dist/{verified-goal-KFNRGOKT.js → verified-goal-ZSIZYNVO.js} +1 -1
  72. package/dist/{workspace-O4E5CCGK.js → workspace-LFESVKE7.js} +1 -1
  73. package/dist/{workspace-agent-sync-N5DPGU2E.js → workspace-agent-sync-JMRX6J2Y.js} +1 -1
  74. package/dist/{workspace-archive-BA3ONVXX.js → workspace-archive-MFHCFCDO.js} +1 -1
  75. package/dist/{workspace-context-ETZNEHOJ.js → workspace-context-TBKRMVMT.js} +1 -1
  76. package/dist/{workspace-contract-OSI7NBXS.js → workspace-contract-KKVC2DUQ.js} +1 -1
  77. package/dist/workspace-explain-RGGZL5IW.js +1 -0
  78. package/dist/workspace-explain-contract-4ZZ6CJ44.js +1 -0
  79. package/dist/{workspace-feedback-PCZKXG5R.js → workspace-feedback-O6J3RQML.js} +1 -1
  80. package/dist/{workspace-foundation-QQHX66KE.js → workspace-foundation-JQWT7YGC.js} +1 -1
  81. package/dist/{workspace-graph-stream-UZJQ75XZ.js → workspace-graph-stream-V5WOXP4B.js} +1 -1
  82. package/dist/{workspace-history-CHJOABME.js → workspace-history-TOCRMJUJ.js} +1 -1
  83. package/dist/{workspace-intelligence-A7O7MN6T.js → workspace-intelligence-SDBIRKMK.js} +1 -1
  84. package/dist/{workspace-intelligence-evaluation-YMY3C5AW.js → workspace-intelligence-evaluation-E4UMWDAZ.js} +1 -1
  85. package/dist/{workspace-intelligence-runner-4EF66L66.js → workspace-intelligence-runner-DIMNL6CJ.js} +1 -1
  86. package/dist/{workspace-intelligence-runtime-registry-NCVHKCMP.js → workspace-intelligence-runtime-registry-YGWB2RRS.js} +1 -1
  87. package/dist/{workspace-knowledge-graph-BVN4NTJ6.js → workspace-knowledge-graph-MUW6UAGI.js} +1 -1
  88. package/dist/workspace-knowledge-graph-snapshot-7IU2QAXI.js +1 -0
  89. package/dist/{workspace-mcp-serve-TKX4J3SX.js → workspace-mcp-serve-2SWLIH4I.js} +1 -1
  90. package/dist/{workspace-model-7ESEP366.js → workspace-model-VPFCKTYQ.js} +1 -1
  91. package/dist/{workspace-onboarding-SY255V7L.js → workspace-onboarding-GHI6UTQJ.js} +1 -1
  92. package/dist/{workspace-readme-IVJXSIBS.js → workspace-readme-RASXBZRQ.js} +1 -1
  93. package/dist/{workspace-registry-summary-7ISKYEPM.js → workspace-registry-summary-7QT7YMIU.js} +1 -1
  94. package/dist/workspace-repair-engine-AZTJIFCY.js +3 -0
  95. package/dist/workspace-run-VMZY6LIF.js +1 -0
  96. package/dist/{workspace-verify-CNXZPWS5.js → workspace-verify-RYCQZYYB.js} +1 -1
  97. package/dist/{workspace-watch-HGFL2EU3.js → workspace-watch-U3YGN3GG.js} +1 -1
  98. package/docs/README.md +2 -0
  99. package/docs/ci-workflows.md +1 -1
  100. package/docs/commands-reference.md +12 -0
  101. package/docs/contracts/ARTIFACT_CATALOG.md +11 -0
  102. package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +1 -0
  103. package/docs/goal-packs.md +174 -0
  104. package/docs/real-world-qualification.md +22 -3
  105. package/package.json +1 -1
  106. package/dist/analyze-HJ774J3E.js +0 -1
  107. package/dist/autopilot-release-WIFFFQKW.js +0 -1
  108. package/dist/capabilities-command-44JVOE5S.js +0 -1
  109. package/dist/chunk-3U4VLIGW.js +0 -1
  110. package/dist/chunk-5EPPPMAS.js +0 -1
  111. package/dist/chunk-D4RST2HE.js +0 -1
  112. package/dist/chunk-DT4X7I5M.js +0 -81
  113. package/dist/chunk-VZPWIILU.js +0 -1
  114. package/dist/project-test-coverage-FRMVYTFB.js +0 -1
  115. package/dist/workspace-explain-EM7IUV6L.js +0 -1
  116. package/dist/workspace-explain-contract-KVQO57RC.js +0 -1
  117. package/dist/workspace-repair-engine-GMA2YTCF.js +0 -3
  118. package/dist/workspace-run-ZZXVNFUS.js +0 -1
package/README.md CHANGED
@@ -162,6 +162,7 @@ The deterministic model, graph, and checks do not require an AI API key.
162
162
  | --- | --- |
163
163
  | Use guided setup | `npx workspai create` |
164
164
  | Link a project without moving it | `npx workspai adopt .` |
165
+ | Turn an outcome into governed work | `npx workspai goal "Raise test coverage to 85%"` |
165
166
  | Copy or clone a project into a workspace | `npx workspai import <path-or-git-url> --workspace <path>` |
166
167
  | Check the current project | `npx workspai doctor project` |
167
168
  | Check the whole workspace | `npx workspai doctor workspace` |
@@ -212,6 +213,7 @@ modules; Workspai remains the workspace-level CLI.
212
213
  | Understand the exact decision loop | [Workspace Intelligence runner](docs/workspace-intelligence-runner.md) |
213
214
  | Plan, approve, execute, or roll back a repair | [Workspace Repair Engine](docs/workspace-repair-engine.md) |
214
215
  | Set a release, security, or coverage outcome | [Verified engineering goals](docs/workspace-intelligence-runner.md#verified-engineering-goals) |
216
+ | Compile plain language into a governed plan | [Goal Packs](docs/goal-packs.md) |
215
217
  | Integrate CI | [CI workflows](docs/ci-workflows.md) |
216
218
  | Find generated files and schemas | [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) |
217
219
  | Browse all documentation | [Documentation index](docs/README.md) |
@@ -95,6 +95,16 @@
95
95
  "Assumptions"
96
96
  ],
97
97
  "requiredReports": [
98
+ {
99
+ "path": ".workspai/goals/index.json",
100
+ "label": "Active Goal Pack index",
101
+ "required": false
102
+ },
103
+ {
104
+ "path": ".workspai/reports/goal-pack-last-run.json",
105
+ "label": "Latest governed Goal Pack",
106
+ "required": false
107
+ },
98
108
  {
99
109
  "path": ".workspai/reports/workspace-context-agent.json",
100
110
  "label": "Agent context pack",
@@ -430,6 +430,82 @@
430
430
  }
431
431
  ]
432
432
  },
433
+ {
434
+ "path": [
435
+ "goal"
436
+ ],
437
+ "command": "goal",
438
+ "parent": null,
439
+ "registrationKind": "commander",
440
+ "aliases": [],
441
+ "description": "Compile a plain-language engineering intent into a governed, evidence-bound Goal Pack",
442
+ "hidden": false,
443
+ "arguments": [
444
+ {
445
+ "name": "intent",
446
+ "required": false,
447
+ "variadic": false
448
+ }
449
+ ],
450
+ "options": [
451
+ {
452
+ "flags": "--workspace <path>",
453
+ "attributeName": "workspace"
454
+ },
455
+ {
456
+ "flags": "--scope <scope>",
457
+ "attributeName": "scope"
458
+ },
459
+ {
460
+ "flags": "--for-agent <consumer>",
461
+ "attributeName": "forAgent"
462
+ },
463
+ {
464
+ "flags": "--max-attempts <count>",
465
+ "attributeName": "maxAttempts"
466
+ },
467
+ {
468
+ "flags": "--refresh",
469
+ "attributeName": "refresh"
470
+ },
471
+ {
472
+ "flags": "--dry-run",
473
+ "attributeName": "dryRun"
474
+ },
475
+ {
476
+ "flags": "--status [goal-id]",
477
+ "attributeName": "status"
478
+ },
479
+ {
480
+ "flags": "--list",
481
+ "attributeName": "list"
482
+ },
483
+ {
484
+ "flags": "--activate <goal-id>",
485
+ "attributeName": "activate"
486
+ },
487
+ {
488
+ "flags": "--cancel <goal-id>",
489
+ "attributeName": "cancel"
490
+ },
491
+ {
492
+ "flags": "--prepare <goal-id>",
493
+ "attributeName": "prepare"
494
+ },
495
+ {
496
+ "flags": "--verify <goal-id>",
497
+ "attributeName": "verify"
498
+ },
499
+ {
500
+ "flags": "--no-run",
501
+ "attributeName": "run"
502
+ },
503
+ {
504
+ "flags": "--json",
505
+ "attributeName": "json"
506
+ }
507
+ ]
508
+ },
433
509
  {
434
510
  "path": [
435
511
  "import"
@@ -1530,6 +1606,7 @@
1530
1606
  "config",
1531
1607
  "create",
1532
1608
  "doctor",
1609
+ "goal",
1533
1610
  "import",
1534
1611
  "infra",
1535
1612
  "mirror",
@@ -29,6 +29,11 @@
29
29
  "projectTestCoverage": "workspai.project-test-coverage.v1",
30
30
  "verifiedGoal": "workspai.verified-goal.v1",
31
31
  "verifiedGoalStatus": "workspai.verified-goal-status.v1",
32
+ "goalPack": "workspai.goal-pack.v1",
33
+ "goalAgentHandoff": "workspai.goal-agent-handoff.v1",
34
+ "goalPlanResult": "workspai.goal-plan-result.v1",
35
+ "goalIndex": "workspai.goal-index.v1",
36
+ "goalLifecycleResult": "workspai.goal-lifecycle-result.v1",
32
37
  "workspaceIntelligenceArchitecture": "workspai-workspace-intelligence-architecture-v1",
33
38
  "workspaceIntelligenceChain": "workspai-workspace-intelligence-chain-v1",
34
39
  "workspaceIntelligenceArtifacts": {
@@ -131,6 +131,31 @@
131
131
  "contractPath": "contracts/workspace-intelligence/verified-goal-status.v1.json",
132
132
  "publication": "json-schema"
133
133
  },
134
+ "goalPack": {
135
+ "schemaVersion": "workspai.goal-pack.v1",
136
+ "contractPath": "contracts/workspace-intelligence/goal-pack.v1.json",
137
+ "publication": "json-schema"
138
+ },
139
+ "goalAgentHandoff": {
140
+ "schemaVersion": "workspai.goal-agent-handoff.v1",
141
+ "contractPath": "contracts/workspace-intelligence/goal-agent-handoff.v1.json",
142
+ "publication": "json-schema"
143
+ },
144
+ "goalPlanResult": {
145
+ "schemaVersion": "workspai.goal-plan-result.v1",
146
+ "contractPath": "contracts/workspace-intelligence/goal-plan-result.v1.json",
147
+ "publication": "json-schema"
148
+ },
149
+ "goalIndex": {
150
+ "schemaVersion": "workspai.goal-index.v1",
151
+ "contractPath": "contracts/workspace-intelligence/goal-index.v1.json",
152
+ "publication": "json-schema"
153
+ },
154
+ "goalLifecycleResult": {
155
+ "schemaVersion": "workspai.goal-lifecycle-result.v1",
156
+ "contractPath": "contracts/workspace-intelligence/goal-lifecycle-result.v1.json",
157
+ "publication": "json-schema"
158
+ },
134
159
  "workspaceIntelligenceArchitecture": {
135
160
  "schemaVersion": "workspai-workspace-intelligence-architecture-v1",
136
161
  "contractPath": "contracts/workspace-intelligence-architecture.v1.json",
@@ -48,6 +48,7 @@
48
48
  "pipeline",
49
49
  "import",
50
50
  "adopt",
51
+ "goal",
51
52
  "snapshot",
52
53
  "bootstrap",
53
54
  "setup",
@@ -420,6 +421,30 @@
420
421
  "frameworks"
421
422
  ]
422
423
  },
424
+ {
425
+ "invocation": "goal",
426
+ "summary": "Compile a plain-language engineering intent into a scope-bound, evidence-pinned Goal Pack and portable agent handoff without mutating source.",
427
+ "canonicalArgv": [
428
+ "goal",
429
+ "<intent>",
430
+ "--json"
431
+ ],
432
+ "output": {
433
+ "defaultFormat": "human-or-json",
434
+ "modes": [
435
+ {
436
+ "selector": "--json",
437
+ "format": "json",
438
+ "mediaType": "application/json"
439
+ }
440
+ ]
441
+ },
442
+ "exitSemantics": {
443
+ "default": "A contract-valid Goal Pack returns exit code 0, including explicit needs-confirmation, needs-evidence, or blocked planning states.",
444
+ "strict": "Not applicable; Goal planning does not execute or verify source changes.",
445
+ "failure": "Resolution, freshness, contract, integrity, or publication failure returns exit code 1."
446
+ }
447
+ },
423
448
  {
424
449
  "invocation": "help",
425
450
  "summary": "Display contextual CLI usage, arguments, options, and command discovery guidance.",
@@ -1790,6 +1815,16 @@
1790
1815
  ]
1791
1816
  ]
1792
1817
  },
1818
+ {
1819
+ "artifactPath": ".workspai/goals/index.json",
1820
+ "schemaVersion": "workspai.goal-index.v1",
1821
+ "contractPath": "contracts/workspace-intelligence/goal-index.v1.json",
1822
+ "producerCommands": [
1823
+ [
1824
+ "goal"
1825
+ ]
1826
+ ]
1827
+ },
1793
1828
  {
1794
1829
  "artifactPath": ".workspai/workspace-link.local.json",
1795
1830
  "schemaVersion": "project-workspace-link.v1",
@@ -1998,6 +2033,16 @@
1998
2033
  ]
1999
2034
  ]
2000
2035
  },
2036
+ {
2037
+ "artifactPath": ".workspai/reports/goal-pack-last-run.json",
2038
+ "schemaVersion": "workspai.goal-pack.v1",
2039
+ "contractPath": "contracts/workspace-intelligence/goal-pack.v1.json",
2040
+ "producerCommands": [
2041
+ [
2042
+ "goal"
2043
+ ]
2044
+ ]
2045
+ },
2001
2046
  {
2002
2047
  "artifactPath": ".workspai/reports/doctor-remediation-plan-last-run.json",
2003
2048
  "schemaVersion": "doctor-remediation-plan-v2",
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workspai.dev/schemas/workspace-intelligence/goal-agent-handoff.v1.json",
4
+ "title": "Workspai Goal Agent Handoff",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "goalId", "goalFingerprint", "generatedAt", "consumer", "state", "objective", "scope", "discovery", "retrieval", "evidence", "guardrails", "workflow", "renewal"],
7
+ "properties": {
8
+ "schemaVersion": { "const": "workspai.goal-agent-handoff.v1" },
9
+ "goalId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$" },
10
+ "goalFingerprint": { "$ref": "#/$defs/hash" },
11
+ "generatedAt": { "type": "string", "format": "date-time" },
12
+ "consumer": { "enum": ["generic", "claude", "codex"] },
13
+ "state": { "enum": ["ready-to-plan", "needs-confirmation", "needs-evidence", "blocked"] },
14
+ "objective": { "type": "string", "minLength": 1, "maxLength": 2000 },
15
+ "scope": {
16
+ "type": "object",
17
+ "required": ["kind", "projects", "selectionSource"],
18
+ "properties": {
19
+ "kind": { "enum": ["workspace", "project"] },
20
+ "projects": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
21
+ "selectionSource": { "enum": ["workspace", "invocation-project", "explicit"] }
22
+ },
23
+ "additionalProperties": false
24
+ },
25
+ "evidence": {
26
+ "type": "array",
27
+ "minItems": 3,
28
+ "items": {
29
+ "type": "object",
30
+ "required": ["role", "artifact", "binding"],
31
+ "properties": {
32
+ "role": { "enum": ["model", "graph", "goal"] },
33
+ "artifact": { "type": "string", "pattern": "^\\.workspai/" },
34
+ "binding": {
35
+ "type": "object",
36
+ "required": ["algorithm", "semantics", "value"],
37
+ "properties": {
38
+ "algorithm": { "const": "sha256" },
39
+ "semantics": { "enum": ["workspace-model-structural-v1", "canonical-json-v1"] },
40
+ "value": { "$ref": "#/$defs/hash" }
41
+ },
42
+ "additionalProperties": false
43
+ }
44
+ },
45
+ "additionalProperties": false
46
+ }
47
+ },
48
+ "discovery": {
49
+ "type": "object",
50
+ "required": ["index", "statusCommand", "requiredReads"],
51
+ "properties": {
52
+ "index": { "const": ".workspai/goals/index.json" },
53
+ "statusCommand": { "type": "string", "pattern": "^workspai goal --status " },
54
+ "requiredReads": { "type": "array", "minItems": 3, "items": { "type": "string", "pattern": "^\\.workspai/" }, "uniqueItems": true }
55
+ },
56
+ "additionalProperties": false
57
+ },
58
+ "retrieval": {
59
+ "type": "object",
60
+ "required": ["status", "strategy", "queries", "anchors"],
61
+ "properties": {
62
+ "status": { "enum": ["grounded", "partial", "empty"] },
63
+ "strategy": { "const": "deterministic-category-v1" },
64
+ "queries": { "type": "array", "minItems": 1, "maxItems": 3, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
65
+ "anchors": { "type": "array", "maxItems": 20, "items": { "type": "object", "required": ["entityId", "kind", "label", "proofIds"], "properties": { "entityId": { "type": "string" }, "kind": { "type": "string" }, "label": { "type": "string" }, "proofIds": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "additionalProperties": false } }
66
+ },
67
+ "additionalProperties": false
68
+ },
69
+ "guardrails": { "type": "array", "minItems": 5, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
70
+ "workflow": {
71
+ "type": "array",
72
+ "minItems": 5,
73
+ "items": {
74
+ "type": "object",
75
+ "required": ["order", "owner", "instruction"],
76
+ "properties": {
77
+ "order": { "type": "integer", "minimum": 1 },
78
+ "owner": { "enum": ["workspai-cli", "agent", "human"] },
79
+ "instruction": { "type": "string", "minLength": 1 }
80
+ },
81
+ "additionalProperties": false
82
+ }
83
+ },
84
+ "renewal": {
85
+ "type": "object",
86
+ "required": ["command", "reason"],
87
+ "properties": {
88
+ "command": { "type": "string", "pattern": "^workspai goal " },
89
+ "reason": { "type": "string", "minLength": 1 }
90
+ },
91
+ "additionalProperties": false
92
+ }
93
+ },
94
+ "$defs": { "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" } },
95
+ "additionalProperties": false
96
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workspai.dev/schemas/workspace-intelligence/goal-index.v1.json",
4
+ "title": "Workspai Goal Index",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "generatedAt", "activeGoalId", "goals"],
7
+ "properties": {
8
+ "schemaVersion": { "const": "workspai.goal-index.v1" },
9
+ "generatedAt": { "type": "string", "format": "date-time" },
10
+ "activeGoalId": { "type": ["string", "null"] },
11
+ "goals": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "required": ["id", "fingerprint", "objective", "category", "state", "lifecycle", "scope", "createdAt", "updatedAt", "goalPack", "agentHandoff"],
16
+ "properties": {
17
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$" },
18
+ "fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
19
+ "objective": { "type": "string", "minLength": 1, "maxLength": 2000 },
20
+ "category": { "enum": ["release-readiness", "dependency-security", "test-coverage", "defect-repair", "feature-change", "refactor", "performance", "documentation", "system-understanding"] },
21
+ "state": { "enum": ["ready-to-plan", "needs-confirmation", "needs-evidence", "blocked"] },
22
+ "lifecycle": { "enum": ["planned", "active", "cancelled", "verification-ready", "verified", "failed"] },
23
+ "scope": {
24
+ "type": "object",
25
+ "required": ["kind", "projects", "selectionSource"],
26
+ "properties": {
27
+ "kind": { "enum": ["workspace", "project"] },
28
+ "projects": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
29
+ "selectionSource": { "enum": ["workspace", "invocation-project", "explicit"] }
30
+ },
31
+ "additionalProperties": false
32
+ },
33
+ "createdAt": { "type": "string", "format": "date-time" },
34
+ "updatedAt": { "type": "string", "format": "date-time" },
35
+ "goalPack": { "type": "string", "pattern": "^\\.workspai/goals/[^/]+/goal-pack\\.json$" },
36
+ "agentHandoff": { "type": "string", "pattern": "^\\.workspai/goals/[^/]+/agent-handoff\\.json$" },
37
+ "verifiedGoalId": { "type": "string", "minLength": 1 },
38
+ "repairTransactionId": { "type": "string", "minLength": 1 }
39
+ },
40
+ "additionalProperties": false
41
+ }
42
+ }
43
+ },
44
+ "additionalProperties": false
45
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workspai.dev/schemas/workspace-intelligence/goal-lifecycle-result.v1.json",
4
+ "title": "Workspai Goal Lifecycle Result",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "operation",
9
+ "activeGoalId",
10
+ "goal",
11
+ "goals",
12
+ "goalPack",
13
+ "verifiedGoalId",
14
+ "verification"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": { "const": "workspai.goal-lifecycle-result.v1" },
18
+ "operation": { "enum": ["status", "list", "activate", "cancel", "prepare", "verify"] },
19
+ "activeGoalId": { "type": ["string", "null"] },
20
+ "goal": { "anyOf": [{ "$ref": "#/$defs/goalEntry" }, { "type": "null" }] },
21
+ "goals": { "type": "array", "items": { "$ref": "#/$defs/goalEntry" } },
22
+ "goalPack": {
23
+ "anyOf": [
24
+ {
25
+ "type": "object",
26
+ "required": ["schemaVersion", "id", "fingerprint", "state"],
27
+ "properties": {
28
+ "schemaVersion": { "const": "workspai.goal-pack.v1" },
29
+ "id": { "type": "string" },
30
+ "fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
31
+ "state": { "enum": ["ready-to-plan", "needs-confirmation", "needs-evidence", "blocked"] }
32
+ }
33
+ },
34
+ { "type": "null" }
35
+ ]
36
+ },
37
+ "verifiedGoalId": { "type": ["string", "null"] },
38
+ "verification": { "type": ["object", "null"] }
39
+ },
40
+ "$defs": {
41
+ "goalEntry": {
42
+ "type": "object",
43
+ "required": [
44
+ "id",
45
+ "fingerprint",
46
+ "objective",
47
+ "category",
48
+ "state",
49
+ "lifecycle",
50
+ "scope",
51
+ "createdAt",
52
+ "updatedAt",
53
+ "goalPack",
54
+ "agentHandoff"
55
+ ],
56
+ "properties": {
57
+ "id": { "type": "string" },
58
+ "fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
59
+ "objective": { "type": "string", "minLength": 1 },
60
+ "category": {
61
+ "enum": [
62
+ "release-readiness",
63
+ "dependency-security",
64
+ "test-coverage",
65
+ "defect-repair",
66
+ "feature-change",
67
+ "refactor",
68
+ "performance",
69
+ "documentation",
70
+ "system-understanding"
71
+ ]
72
+ },
73
+ "state": { "enum": ["ready-to-plan", "needs-confirmation", "needs-evidence", "blocked"] },
74
+ "lifecycle": { "enum": ["planned", "active", "cancelled", "verification-ready", "verified", "failed"] },
75
+ "scope": {
76
+ "type": "object",
77
+ "required": ["kind", "projects", "selectionSource"],
78
+ "properties": {
79
+ "kind": { "enum": ["workspace", "project"] },
80
+ "projects": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
81
+ "selectionSource": { "enum": ["workspace", "invocation-project", "explicit"] }
82
+ },
83
+ "additionalProperties": false
84
+ },
85
+ "createdAt": { "type": "string", "format": "date-time" },
86
+ "updatedAt": { "type": "string", "format": "date-time" },
87
+ "goalPack": { "type": "string" },
88
+ "agentHandoff": { "type": "string" },
89
+ "verifiedGoalId": { "type": "string" },
90
+ "repairTransactionId": { "type": "string" }
91
+ },
92
+ "additionalProperties": false
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ }