workspai 0.68.0 → 0.70.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 (177) hide show
  1. package/README.md +38 -18
  2. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +459 -0
  3. package/contracts/extension-cli-compatibility.v1.json +11 -0
  4. package/contracts/published-contract-catalog.v1.json +55 -0
  5. package/contracts/runtime-command-surface.v1.json +282 -0
  6. package/contracts/workspace-intelligence/architecture-change-lease.v1.json +50 -0
  7. package/contracts/workspace-intelligence/architecture-surprise-report.v1.json +46 -0
  8. package/contracts/workspace-intelligence/change-operation-result.v1.json +43 -0
  9. package/contracts/workspace-intelligence/decision-checkpoint.v1.json +18 -0
  10. package/contracts/workspace-intelligence/decision-event.v1.json +154 -0
  11. package/contracts/workspace-intelligence/decision-transaction.v1.json +29 -0
  12. package/contracts/workspace-intelligence/goal-index.v1.json +13 -0
  13. package/contracts/workspace-intelligence/goal-pack.v1.json +2 -1
  14. package/contracts/workspace-intelligence/predicted-architecture-change.v1.json +34 -0
  15. package/contracts/workspace-intelligence/proof-carrying-change-capsule-export.v1.json +14 -0
  16. package/contracts/workspace-intelligence/proof-carrying-change-capsule-validation.v1.json +16 -0
  17. package/contracts/workspace-intelligence/proof-carrying-change-capsule.v1.json +63 -0
  18. package/contracts/workspace-intelligence/proof-carrying-change-list.v1.json +80 -0
  19. package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +9 -1
  20. package/dist/analyze-OGWDSPXQ.js +1 -0
  21. package/dist/{artifact-remediation-plan-I7IKC5MR.js → artifact-remediation-plan-URQL5MBN.js} +1 -1
  22. package/dist/autopilot-release-QQDFEPT7.js +1 -0
  23. package/dist/capabilities-command-NFGX42CH.js +1 -0
  24. package/dist/chunk-37SWTS2B.js +1 -0
  25. package/dist/{chunk-KDY4X7SQ.js → chunk-3S2U7WRM.js} +1 -1
  26. package/dist/{chunk-BHM6RHTA.js → chunk-3WHE7V4M.js} +1 -1
  27. package/dist/{chunk-2C5XJBYI.js → chunk-4R7STECB.js} +64 -64
  28. package/dist/chunk-AGZWDYMF.js +12 -0
  29. package/dist/chunk-COICGD62.js +1 -0
  30. package/dist/chunk-DNZHKBQ3.js +49 -0
  31. package/dist/{chunk-4WVOAX2V.js → chunk-DWL3PPLA.js} +1 -1
  32. package/dist/chunk-EBQS5T7Q.js +7 -0
  33. package/dist/chunk-EP6Q2QBU.js +1 -0
  34. package/dist/chunk-EZPLMAW2.js +1 -0
  35. package/dist/chunk-FE5R6EUV.js +2 -0
  36. package/dist/chunk-FIK343LI.js +1 -0
  37. package/dist/chunk-GED7JURY.js +157 -0
  38. package/dist/{chunk-3Z4SVBMR.js → chunk-GL3KLNIG.js} +1 -1
  39. package/dist/{chunk-TMRCPT7S.js → chunk-GYN6RPNU.js} +1 -1
  40. package/dist/{chunk-6E2Y3XGT.js → chunk-HCFOVANQ.js} +1 -1
  41. package/dist/{chunk-7DDEMDG2.js → chunk-IET57ZKN.js} +2 -2
  42. package/dist/{chunk-5OV2WXAR.js → chunk-IFHM2SI6.js} +1 -1
  43. package/dist/{chunk-3BMYMZQB.js → chunk-IGJA6GBQ.js} +1 -1
  44. package/dist/chunk-IHKG5C6G.js +1 -0
  45. package/dist/chunk-IRLKWRLP.js +3 -0
  46. package/dist/{chunk-FX5J6JCK.js → chunk-IVYPC36J.js} +1 -1
  47. package/dist/{chunk-DFVG4DDZ.js → chunk-JK6XEF7K.js} +3 -3
  48. package/dist/chunk-K33JJVQZ.js +2 -0
  49. package/dist/{chunk-3XF7O66C.js → chunk-LE2I2E6R.js} +5 -5
  50. package/dist/chunk-LU6CYDLN.js +1 -0
  51. package/dist/{chunk-QMQBX3RV.js → chunk-MGL6DBOR.js} +1 -1
  52. package/dist/chunk-N4B2M44I.js +1 -0
  53. package/dist/chunk-N6FJZ62B.js +2 -0
  54. package/dist/chunk-NSH7TTSV.js +1 -0
  55. package/dist/chunk-O5XQP5E7.js +1 -0
  56. package/dist/chunk-ODK4LCEL.js +1 -0
  57. package/dist/chunk-PTSEDZIV.js +2 -0
  58. package/dist/chunk-QNHKUSBH.js +1 -0
  59. package/dist/{chunk-SLFOUSRW.js → chunk-QYEQVNBF.js} +1 -1
  60. package/dist/chunk-QZODGRAI.js +2 -0
  61. package/dist/chunk-S2TOSHQW.js +4 -0
  62. package/dist/chunk-S42KDOGG.js +1 -0
  63. package/dist/chunk-TEMFNVO2.js +2 -0
  64. package/dist/chunk-TKXRP2B4.js +1 -0
  65. package/dist/{chunk-IXXQMD34.js → chunk-TLMP2MGH.js} +1 -1
  66. package/dist/chunk-UNXG3ZFV.js +1 -0
  67. package/dist/chunk-UT57IFS4.js +8 -0
  68. package/dist/{chunk-2MTJWPQ4.js → chunk-V52R2W2Q.js} +1 -1
  69. package/dist/chunk-WUXJCSYO.js +9 -0
  70. package/dist/chunk-XSSNM4F5.js +5 -0
  71. package/dist/chunk-XVTN5DDV.js +1 -0
  72. package/dist/{chunk-OFYY4725.js → chunk-Z7JIUA6I.js} +1 -1
  73. package/dist/chunk-ZLCLGIM6.js +1 -0
  74. package/dist/chunk-ZPOZ6MDX.js +4 -0
  75. package/dist/{create-U5PQHOZ4.js → create-BBALBC3U.js} +1 -1
  76. package/dist/doctor-WWVY7NB6.js +1 -0
  77. package/dist/goal-lifecycle-CEUTKUNV.js +1 -0
  78. package/dist/goal-pack-JQL3YOKT.js +1 -0
  79. package/dist/index.d.ts +35 -2
  80. package/dist/index.js +239 -239
  81. package/dist/pipeline-V46WWMP4.js +5 -0
  82. package/dist/{project-agent-entry-MH7364BE.js → project-agent-entry-MRAYG7QD.js} +1 -1
  83. package/dist/{project-intelligence-lens-ZCCHUKVI.js → project-intelligence-lens-4BKPN4PE.js} +1 -1
  84. package/dist/{project-test-coverage-JPWTBSSJ.js → project-test-coverage-4RRCHY5W.js} +1 -1
  85. package/dist/proof-carrying-change-B7ONTBYO.js +1 -0
  86. package/dist/verified-goal-YNSBL7L3.js +1 -0
  87. package/dist/{workspace-B33BFZZ3.js → workspace-FJ6JRYWA.js} +1 -1
  88. package/dist/{workspace-agent-sync-T3MJO2MX.js → workspace-agent-sync-V33UGII3.js} +1 -1
  89. package/dist/{workspace-archive-NOSGRKRZ.js → workspace-archive-OSMU3CK6.js} +1 -1
  90. package/dist/{workspace-context-KOCEP4MJ.js → workspace-context-O6UBCBEA.js} +1 -1
  91. package/dist/{workspace-contract-MQ3QE52V.js → workspace-contract-S2JYDA4K.js} +1 -1
  92. package/dist/workspace-explain-RP6VJ6QM.js +1 -0
  93. package/dist/workspace-explain-contract-KV7RTEJU.js +1 -0
  94. package/dist/{workspace-feedback-3YLIUFQ7.js → workspace-feedback-D6HJLKBQ.js} +1 -1
  95. package/dist/{workspace-foundation-O7O3QIS4.js → workspace-foundation-7QXEJJKZ.js} +1 -1
  96. package/dist/{workspace-graph-stream-XTGGBD7D.js → workspace-graph-stream-YY65R5EC.js} +1 -1
  97. package/dist/workspace-graph-token-efficiency-WNAFAN2F.js +1 -0
  98. package/dist/{workspace-history-7HDZZ4G5.js → workspace-history-WWPS4U7H.js} +1 -1
  99. package/dist/{workspace-intelligence-TFEQBPUP.js → workspace-intelligence-LMR42ICR.js} +1 -1
  100. package/dist/{workspace-intelligence-benchmark-PLVUBGWO.js → workspace-intelligence-benchmark-S5OXVNLC.js} +1 -1
  101. package/dist/{workspace-intelligence-evaluation-OJIQS5SN.js → workspace-intelligence-evaluation-QDSOOUHH.js} +1 -1
  102. package/dist/{workspace-intelligence-runner-6ZAV6RO4.js → workspace-intelligence-runner-FXFSTCHC.js} +1 -1
  103. package/dist/workspace-intelligence-runtime-registry-ZLPF7BAY.js +1 -0
  104. package/dist/{workspace-knowledge-graph-AUXYL3L6.js → workspace-knowledge-graph-3564KQXT.js} +1 -1
  105. package/dist/workspace-knowledge-graph-change-overlay-FIIAFLO6.js +1 -0
  106. package/dist/{workspace-knowledge-graph-contract-X52KXBXJ.js → workspace-knowledge-graph-contract-FVX5T7SU.js} +1 -1
  107. package/dist/{workspace-knowledge-graph-query-A7TKONWY.js → workspace-knowledge-graph-query-WHCGPBGS.js} +1 -1
  108. package/dist/workspace-knowledge-graph-snapshot-P27RPMV5.js +1 -0
  109. package/dist/workspace-mcp-serve-ZK46EZUD.js +3 -0
  110. package/dist/{workspace-model-GVXNLSQM.js → workspace-model-6UMQAGUK.js} +1 -1
  111. package/dist/{workspace-onboarding-ECZ2KJ2A.js → workspace-onboarding-C57OQ7XZ.js} +1 -1
  112. package/dist/{workspace-readme-6N5Y2ZSJ.js → workspace-readme-HA6XLDME.js} +2 -2
  113. package/dist/{workspace-registry-summary-5SFBTRGQ.js → workspace-registry-summary-GLQO4ZUF.js} +1 -1
  114. package/dist/workspace-repair-engine-5ZSSF3T5.js +3 -0
  115. package/dist/workspace-run-UGWGT3K2.js +1 -0
  116. package/dist/{workspace-verify-D3QTMAUI.js → workspace-verify-LQHXBH2D.js} +1 -1
  117. package/dist/{workspace-watch-XYJEW2Z2.js → workspace-watch-Z32443UP.js} +1 -1
  118. package/docs/README.md +35 -31
  119. package/docs/ci-workflows.md +1 -1
  120. package/docs/commands-reference.md +26 -0
  121. package/docs/contracts/ARTIFACT_CATALOG.md +37 -18
  122. package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +17 -0
  123. package/docs/contracts/PROOF_CARRYING_CHANGE_CONTRACT_PLAN.md +68 -0
  124. package/docs/proof-carrying-change.implementation.v1.json +119 -0
  125. package/docs/proof-carrying-change.md +236 -0
  126. package/docs/real-world-qualification.md +8 -3
  127. package/package.json +1 -1
  128. package/dist/analyze-JDEWUBC6.js +0 -1
  129. package/dist/autopilot-release-OELUFNLL.js +0 -1
  130. package/dist/capabilities-command-RAAYENQ6.js +0 -1
  131. package/dist/chunk-2KX6KHEC.js +0 -1
  132. package/dist/chunk-3KU3YUWD.js +0 -2
  133. package/dist/chunk-3NF3M3RE.js +0 -1
  134. package/dist/chunk-3OGPTLI2.js +0 -1
  135. package/dist/chunk-5ME4W4LN.js +0 -1
  136. package/dist/chunk-5XUAAQSV.js +0 -5
  137. package/dist/chunk-5YZ2W57R.js +0 -8
  138. package/dist/chunk-7DZNZ3GM.js +0 -3
  139. package/dist/chunk-BG6IX6HA.js +0 -1
  140. package/dist/chunk-BMAFHX6A.js +0 -1
  141. package/dist/chunk-BUYLM6QV.js +0 -1
  142. package/dist/chunk-C2VTO5WT.js +0 -2
  143. package/dist/chunk-CPR2CMOY.js +0 -1
  144. package/dist/chunk-CSZPE637.js +0 -2
  145. package/dist/chunk-EHLGPLIU.js +0 -1
  146. package/dist/chunk-FPDH3N3A.js +0 -7
  147. package/dist/chunk-GVQKAINC.js +0 -49
  148. package/dist/chunk-IKUFNK46.js +0 -2
  149. package/dist/chunk-JYMO7QXQ.js +0 -1
  150. package/dist/chunk-KY2GOSO5.js +0 -1
  151. package/dist/chunk-LEOFD3W5.js +0 -12
  152. package/dist/chunk-LPCZHKD5.js +0 -1
  153. package/dist/chunk-N5HPMATQ.js +0 -1
  154. package/dist/chunk-P3622IM5.js +0 -4
  155. package/dist/chunk-Q7UGDNSM.js +0 -1
  156. package/dist/chunk-RVAOJOXA.js +0 -2
  157. package/dist/chunk-TCLKGPXF.js +0 -2
  158. package/dist/chunk-VIN7NJW3.js +0 -9
  159. package/dist/chunk-W5VKBDSD.js +0 -157
  160. package/dist/chunk-WRZSQDZV.js +0 -1
  161. package/dist/chunk-Y4Z6CEII.js +0 -1
  162. package/dist/chunk-ZEEV5J4I.js +0 -1
  163. package/dist/chunk-ZGHJIQXL.js +0 -1
  164. package/dist/doctor-D7YI7LSA.js +0 -1
  165. package/dist/goal-lifecycle-BMS6GSIU.js +0 -1
  166. package/dist/goal-pack-RBSVQMMX.js +0 -1
  167. package/dist/pipeline-QOMXH2EK.js +0 -5
  168. package/dist/verified-goal-XUXU2X5H.js +0 -1
  169. package/dist/workspace-explain-DTFCKYXK.js +0 -1
  170. package/dist/workspace-explain-contract-WMREJWHF.js +0 -1
  171. package/dist/workspace-graph-token-efficiency-5LJKQU2J.js +0 -1
  172. package/dist/workspace-intelligence-runtime-registry-UKFB3BI7.js +0 -1
  173. package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +0 -1
  174. package/dist/workspace-knowledge-graph-snapshot-GPBDAKAU.js +0 -1
  175. package/dist/workspace-mcp-serve-TDUXJUAA.js +0 -3
  176. package/dist/workspace-repair-engine-CKJCTWKX.js +0 -3
  177. package/dist/workspace-run-ZZ5WHL7W.js +0 -1
@@ -1 +1 @@
1
- import {a}from'./chunk-OFYY4725.js';import {d,s,m as m$1}from'./chunk-2KX6KHEC.js';import {a as a$1}from'./chunk-GR6442P7.js';import {a as a$2}from'./chunk-AFIFZTOY.js';import y from'fs';var b="workspace-watch-event.v1";function R(e){return a$2(e,"contracts/workspace-watch-event.v1.json","Workspace watch event"),e}function g(e){return `${e.from}\0${e.to}\0${e.kind}`}function f(e){return (m$1(e)?.edges??[]).map(o=>({from:o.from,to:o.to,kind:o.kind}))}function m(e){let r=[...a(e).entries()].sort((a,n)=>a[0].localeCompare(n[0])).map(([a,n])=>({id:a,hash:n})),c=f(e).map(g).sort((a,n)=>a.localeCompare(n));return d({projects:r,edges:c})}function C(e,o){let r=a(o),c=e?a(e):new Map,a$1=[],n=[];for(let[t,s]of r.entries())c.has(t)?c.get(t)!==s&&a$1.push(t):n.push(t);let d=[];for(let t of c.keys())r.has(t)||d.push(t);let i=new Map(e?f(e).map(t=>[g(t),t]):[]),l=new Map(f(o).map(t=>[g(t),t])),p=[];for(let[t,s]of l.entries())i.has(t)||p.push(s);let h=[];for(let[t,s]of i.entries())l.has(t)||h.push(s);let u=(t,s)=>g(t).localeCompare(g(s));return a$1.sort((t,s)=>t.localeCompare(s)),n.sort((t,s)=>t.localeCompare(s)),d.sort((t,s)=>t.localeCompare(s)),p.sort(u),h.sort(u),{changedProjects:a$1,addedProjects:n,removedProjects:d,edgesAdded:p,edgesRemoved:h}}var k=class{model=null;sequence=0;rebuild;now;constructor(o,r){this.rebuild=r?.rebuild??(()=>s({...o})),this.now=r?.now??(()=>new Date);}get currentModel(){return this.model}async start(){let o=Date.now(),{model:r}=await this.rebuild();return this.model=r,this.buildEvent("ready","initial",null,r,Date.now()-o)}async pulse(){let o=Date.now(),r=this.model,{model:c,mode:a}=await this.rebuild(),n=this.buildEvent(this.hasStructuralChange(r,c)?"changed":"unchanged",a,r,c,Date.now()-o);return this.model=c,n}hasStructuralChange(o,r){return o?m(o)!==m(r):true}buildEvent(o,r,c,a,n){let d=C(c,a),i=m(a),l=c?m(c)!==i:true;return R({schemaVersion:b,kind:o,sequence:this.sequence++,timestamp:this.now().toISOString(),mode:r,modelHash:i,modelHashChanged:l,changedProjects:d.changedProjects,addedProjects:d.addedProjects,removedProjects:d.removedProjects,graph:{nodeCount:a.graph?.nodes.length??0,edgeCount:a.graph?.edges.length??0,edgesAdded:d.edgesAdded,edgesRemoved:d.edgesRemoved},durationMs:n})}},S=new Set([".git",".hg",".svn","node_modules",".venv","venv","dist","build","out","target","coverage","htmlcov",".next",".turbo",".cache"]),j=new Set(["reports","cache","tmp",".cache"]);function O(e){if(!e)return false;let o=e.split(/[\\/]/).filter(Boolean);if(o.some(r=>S.has(r)||a$1(r)))return false;for(let r=0;r<o.length-1;r+=1)if((o[r]===".workspai"||o[r]===".rapidkit")&&j.has(o[r+1]))return false;return true}async function N(e){let o=new k(e.buildOptions,e.engineOptions),r=await o.start();if(e.emit(r),o.currentModel&&await e.onModel?.(o.currentModel,r),e.once)return;let c=e.debounceMs??250,a=e.selfWriteSuppressionMs??Math.max(400,c+150),n=null,d=false,i=false,l=0,p=async()=>{if(d){i=true;return}d=true;try{let t=await o.pulse();e.emit(t),o.currentModel&&await e.onModel?.(o.currentModel,t);}catch(t){e.emit(R({schemaVersion:b,kind:"error",sequence:-1,timestamp:new Date().toISOString(),mode:"full",modelHash:o.currentModel?m(o.currentModel):"",modelHashChanged:false,changedProjects:[],addedProjects:[],removedProjects:[],graph:{nodeCount:0,edgeCount:0,edgesAdded:[],edgesRemoved:[]},durationMs:0,error:t instanceof Error?t.message:String(t)}));}finally{d=false,l=Date.now()+a,i&&(i=false,p());}},h=t=>{O(t)&&(d||Date.now()<l||(n&&clearTimeout(n),n=setTimeout(()=>{n=null,p();},c)));};e.onProgress?.(`Watching ${e.workspacePath} for changes (Ctrl+C to stop).`);let u=y.watch(e.workspacePath,{recursive:true},(t,s)=>{typeof s=="string"?h(s):s&&h(Buffer.from(s).toString("utf8"));});await new Promise(t=>{let s=()=>{n&&clearTimeout(n),u.close(),t();};if(e.signal){if(e.signal.aborted){s();return}e.signal.addEventListener("abort",s,{once:true});}u.on("error",()=>s());});}export{b as WORKSPACE_WATCH_EVENT_SCHEMA_VERSION,k as WorkspaceWatchEngine,m as computeWatchModelHash,C as diffWatchModels,O as isWatchRelevantPath,N as runWorkspaceWatch};
1
+ import {a}from'./chunk-Z7JIUA6I.js';import {d,s,m as m$1}from'./chunk-IHKG5C6G.js';import {a as a$1}from'./chunk-GR6442P7.js';import {a as a$2}from'./chunk-AFIFZTOY.js';import y from'fs';var b="workspace-watch-event.v1";function R(e){return a$2(e,"contracts/workspace-watch-event.v1.json","Workspace watch event"),e}function g(e){return `${e.from}\0${e.to}\0${e.kind}`}function f(e){return (m$1(e)?.edges??[]).map(o=>({from:o.from,to:o.to,kind:o.kind}))}function m(e){let r=[...a(e).entries()].sort((a,n)=>a[0].localeCompare(n[0])).map(([a,n])=>({id:a,hash:n})),c=f(e).map(g).sort((a,n)=>a.localeCompare(n));return d({projects:r,edges:c})}function C(e,o){let r=a(o),c=e?a(e):new Map,a$1=[],n=[];for(let[t,s]of r.entries())c.has(t)?c.get(t)!==s&&a$1.push(t):n.push(t);let d=[];for(let t of c.keys())r.has(t)||d.push(t);let i=new Map(e?f(e).map(t=>[g(t),t]):[]),l=new Map(f(o).map(t=>[g(t),t])),p=[];for(let[t,s]of l.entries())i.has(t)||p.push(s);let h=[];for(let[t,s]of i.entries())l.has(t)||h.push(s);let u=(t,s)=>g(t).localeCompare(g(s));return a$1.sort((t,s)=>t.localeCompare(s)),n.sort((t,s)=>t.localeCompare(s)),d.sort((t,s)=>t.localeCompare(s)),p.sort(u),h.sort(u),{changedProjects:a$1,addedProjects:n,removedProjects:d,edgesAdded:p,edgesRemoved:h}}var k=class{model=null;sequence=0;rebuild;now;constructor(o,r){this.rebuild=r?.rebuild??(()=>s({...o})),this.now=r?.now??(()=>new Date);}get currentModel(){return this.model}async start(){let o=Date.now(),{model:r}=await this.rebuild();return this.model=r,this.buildEvent("ready","initial",null,r,Date.now()-o)}async pulse(){let o=Date.now(),r=this.model,{model:c,mode:a}=await this.rebuild(),n=this.buildEvent(this.hasStructuralChange(r,c)?"changed":"unchanged",a,r,c,Date.now()-o);return this.model=c,n}hasStructuralChange(o,r){return o?m(o)!==m(r):true}buildEvent(o,r,c,a,n){let d=C(c,a),i=m(a),l=c?m(c)!==i:true;return R({schemaVersion:b,kind:o,sequence:this.sequence++,timestamp:this.now().toISOString(),mode:r,modelHash:i,modelHashChanged:l,changedProjects:d.changedProjects,addedProjects:d.addedProjects,removedProjects:d.removedProjects,graph:{nodeCount:a.graph?.nodes.length??0,edgeCount:a.graph?.edges.length??0,edgesAdded:d.edgesAdded,edgesRemoved:d.edgesRemoved},durationMs:n})}},S=new Set([".git",".hg",".svn","node_modules",".venv","venv","dist","build","out","target","coverage","htmlcov",".next",".turbo",".cache"]),j=new Set(["reports","cache","tmp",".cache"]);function O(e){if(!e)return false;let o=e.split(/[\\/]/).filter(Boolean);if(o.some(r=>S.has(r)||a$1(r)))return false;for(let r=0;r<o.length-1;r+=1)if((o[r]===".workspai"||o[r]===".rapidkit")&&j.has(o[r+1]))return false;return true}async function N(e){let o=new k(e.buildOptions,e.engineOptions),r=await o.start();if(e.emit(r),o.currentModel&&await e.onModel?.(o.currentModel,r),e.once)return;let c=e.debounceMs??250,a=e.selfWriteSuppressionMs??Math.max(400,c+150),n=null,d=false,i=false,l=0,p=async()=>{if(d){i=true;return}d=true;try{let t=await o.pulse();e.emit(t),o.currentModel&&await e.onModel?.(o.currentModel,t);}catch(t){e.emit(R({schemaVersion:b,kind:"error",sequence:-1,timestamp:new Date().toISOString(),mode:"full",modelHash:o.currentModel?m(o.currentModel):"",modelHashChanged:false,changedProjects:[],addedProjects:[],removedProjects:[],graph:{nodeCount:0,edgeCount:0,edgesAdded:[],edgesRemoved:[]},durationMs:0,error:t instanceof Error?t.message:String(t)}));}finally{d=false,l=Date.now()+a,i&&(i=false,p());}},h=t=>{O(t)&&(d||Date.now()<l||(n&&clearTimeout(n),n=setTimeout(()=>{n=null,p();},c)));};e.onProgress?.(`Watching ${e.workspacePath} for changes (Ctrl+C to stop).`);let u=y.watch(e.workspacePath,{recursive:true},(t,s)=>{typeof s=="string"?h(s):s&&h(Buffer.from(s).toString("utf8"));});await new Promise(t=>{let s=()=>{n&&clearTimeout(n),u.close(),t();};if(e.signal){if(e.signal.aborted){s();return}e.signal.addEventListener("abort",s,{once:true});}u.on("error",()=>s());});}export{b as WORKSPACE_WATCH_EVENT_SCHEMA_VERSION,k as WorkspaceWatchEngine,m as computeWatchModelHash,C as diffWatchModels,O as isWatchRelevantPath,N as runWorkspaceWatch};
package/docs/README.md CHANGED
@@ -83,6 +83,7 @@ or use `import` to copy or clone one into the workspace.
83
83
  | Bring an existing repository under governance | [Workspace operations](./workspace-operations.md#import-and-adoption) | Source stays in place with `adopt`, or is copied/cloned with `import` |
84
84
  | Run the complete intelligence loop | [Unified runner](./workspace-intelligence-runner.md) | One ordered run report with durable stage evidence |
85
85
  | Turn plain language into governed work | [Goal Packs](./goal-packs.md) | A scope-bound, evidence-pinned plan and portable agent handoff |
86
+ | Prove what an agent changed and why | [Proof-Carrying Change](./proof-carrying-change.md) | A Goal-bound, effect-receipted, independently verified change capsule |
86
87
  | Ground an agent before broad source discovery | [Canonical-first agent entry](./agent-entry.md) | A portable receipt for host discovery, evidence integrity, and freshness |
87
88
  | Repair a blocker through an approved transaction | [Workspace Repair Engine](./workspace-repair-engine.md) | Checkpointed execution, validation, canonical verify, and safe rollback |
88
89
  | Set a release, security, or coverage outcome | [Verified engineering goals](./workspace-intelligence-runner.md#verified-engineering-goals) | A durable success contract with a current evidence-backed verdict |
@@ -93,6 +94,7 @@ or use `import` to copy or clone one into the workspace.
93
94
  | Find the writer, schema, or path for an output | [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md) | One canonical source instead of path guessing |
94
95
  | Understand Workspai terminology | [Glossary](./GLOSSARY.md) | Shared meanings for model, graph, evidence, gate, and artifacts |
95
96
  | Review or change the main product README | [README content contract](./README_CONTENT_CONTRACT.md) | Stable narrative, claim boundaries, and machine-enforced drift rules |
97
+ | Choose a first contribution path | [Contribution Hub](../../../.github/CONTRIBUTING.md) | One bounded task, support route, and file-aware validation plan |
96
98
  | Contribute to the CLI | [Development](./DEVELOPMENT.md) | Local build, test, contract, and documentation gates |
97
99
 
98
100
  There are two different AI-facing features. Workspace Intelligence is
@@ -102,30 +104,31 @@ with [AI Quickstart](./AI_QUICKSTART.md) only when that is your goal.
102
104
 
103
105
  ## User documentation
104
106
 
105
- | Document | Description |
106
- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
107
- | [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md) | Plain-language guide to every workspace and project creation scenario |
108
- | [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
109
- | [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
110
- | [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
111
- | [workspace-intelligence-runner.md](./workspace-intelligence-runner.md) | Canonical unified runner, execution envelope, report schema, exit codes, failure propagation, and CI consumption |
112
- | [workspace-repair-engine.md](./workspace-repair-engine.md) | CLI-owned plan, approval, checkpoint, execution, verification, decision, and rollback state machine |
113
- | [goal-packs.md](./goal-packs.md) | Plain-language intent compilation, scope/evidence binding, agent handoff, and mutation boundary |
114
- | [agent-entry.md](./agent-entry.md) | Host-native discovery, canonical evidence preflight, receipt status, privacy, and consumer integration |
115
- | [workspace-knowledge-graph.md](./workspace-knowledge-graph.md) | Two-minute graph quickstart, proof model, AI/MCP consumption, performance, and honest token-efficiency measurement |
116
- | [graph-benchmark-methodology.md](./graph-benchmark-methodology.md) | Reproducible payload-reduction benchmark, formulas, claim boundaries, and publication rules |
117
- | [workspace-intelligence-evaluation.md](./workspace-intelligence-evaluation.md) | Provider usage, cost provenance, verified outcomes, comparison, and extension consumption |
118
- | [workspace-intelligence-benchmark.md](./workspace-intelligence-benchmark.md) | Fixed multi-scenario retrieval metrics, measured evaluation attachment, and publication-safe claim boundaries |
119
- | [GLOSSARY.md](./GLOSSARY.md) | Plain-language definitions for workspace, model, graph, evidence, gates, and AI integrations |
120
- | [README_CONTENT_CONTRACT.md](./README_CONTENT_CONTRACT.md) | Required root README journey, architecture statements, claim policy, and drift guard |
121
- | [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
122
- | [../contracts/project-entry-capability.v1.json](../contracts/project-entry-capability.v1.json) | Contract: any readable project can enter through adopt/import when it can be registered |
123
- | [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
124
- | [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) | Role-based workflows (junior → enterprise) |
125
- | [doctor-command.md](./doctor-command.md) | Doctor scopes, CI exit codes, JSON evidence |
126
- | [config-file-guide.md](./config-file-guide.md) | User config file (`~/.workspairc.json`, `workspai.config.*`, with legacy fallbacks) |
127
- | [WORKSPACE_MARKER_SPEC.md](./WORKSPACE_MARKER_SPEC.md) | Workspace marker format |
128
- | [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md) | npm-only policy for this repository |
107
+ | Document | Description |
108
+ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
109
+ | [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md) | Plain-language guide to every workspace and project creation scenario |
110
+ | [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
111
+ | [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
112
+ | [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
113
+ | [workspace-intelligence-runner.md](./workspace-intelligence-runner.md) | Canonical unified runner, execution envelope, report schema, exit codes, failure propagation, and CI consumption |
114
+ | [workspace-repair-engine.md](./workspace-repair-engine.md) | CLI-owned plan, approval, checkpoint, execution, verification, decision, and rollback state machine |
115
+ | [goal-packs.md](./goal-packs.md) | Plain-language intent compilation, scope/evidence binding, agent handoff, and mutation boundary |
116
+ | [proof-carrying-change.md](./proof-carrying-change.md) | Generation-pinned Decisions ledger, predicted-vs-actual Graph delta, receipts, verification, and capsule validation |
117
+ | [agent-entry.md](./agent-entry.md) | Host-native discovery, canonical evidence preflight, receipt status, privacy, and consumer integration |
118
+ | [workspace-knowledge-graph.md](./workspace-knowledge-graph.md) | Two-minute graph quickstart, proof model, AI/MCP consumption, performance, and honest token-efficiency measurement |
119
+ | [graph-benchmark-methodology.md](./graph-benchmark-methodology.md) | Reproducible payload-reduction benchmark, formulas, claim boundaries, and publication rules |
120
+ | [workspace-intelligence-evaluation.md](./workspace-intelligence-evaluation.md) | Provider usage, cost provenance, verified outcomes, comparison, and extension consumption |
121
+ | [workspace-intelligence-benchmark.md](./workspace-intelligence-benchmark.md) | Fixed multi-scenario retrieval metrics, measured evaluation attachment, and publication-safe claim boundaries |
122
+ | [GLOSSARY.md](./GLOSSARY.md) | Plain-language definitions for workspace, model, graph, evidence, gates, and AI integrations |
123
+ | [README_CONTENT_CONTRACT.md](./README_CONTENT_CONTRACT.md) | Required root README journey, architecture statements, claim policy, and drift guard |
124
+ | [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
125
+ | [../contracts/project-entry-capability.v1.json](../contracts/project-entry-capability.v1.json) | Contract: any readable project can enter through adopt/import when it can be registered |
126
+ | [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
127
+ | [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) | Role-based workflows (junior → enterprise) |
128
+ | [doctor-command.md](./doctor-command.md) | Doctor scopes, CI exit codes, JSON evidence |
129
+ | [config-file-guide.md](./config-file-guide.md) | User config file (`~/.workspairc.json`, `workspai.config.*`, with legacy fallbacks) |
130
+ | [WORKSPACE_MARKER_SPEC.md](./WORKSPACE_MARKER_SPEC.md) | Workspace marker format |
131
+ | [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md) | npm-only policy for this repository |
129
132
 
130
133
  **Common tasks**
131
134
 
@@ -179,13 +182,14 @@ npm run contracts:validate
179
182
 
180
183
  ## Contributor documentation
181
184
 
182
- | Document | Description |
183
- | ------------------------------------------------ | ----------------------------------------- |
184
- | [DEVELOPMENT.md](./DEVELOPMENT.md) | Local dev, testing, debugging |
185
- | [SETUP.md](./SETUP.md) | Build gates, smoke flows, release hygiene |
186
- | [ci-workflows.md](./ci-workflows.md) | GitHub Actions workflow map |
187
- | [OPTIMIZATION_GUIDE.md](./OPTIMIZATION_GUIDE.md) | Performance and improvement notes |
188
- | [UTILITIES.md](./UTILITIES.md) | Internal cache and metrics helpers |
185
+ | Document | Description |
186
+ | ---------------------------------------------------- | -------------------------------------------------- |
187
+ | [Contribution Hub](../../../.github/CONTRIBUTING.md) | First-task routes, support, and validation planner |
188
+ | [DEVELOPMENT.md](./DEVELOPMENT.md) | Local dev, testing, debugging |
189
+ | [SETUP.md](./SETUP.md) | Build gates, smoke flows, release hygiene |
190
+ | [ci-workflows.md](./ci-workflows.md) | GitHub Actions workflow map |
191
+ | [OPTIMIZATION_GUIDE.md](./OPTIMIZATION_GUIDE.md) | Performance and improvement notes |
192
+ | [UTILITIES.md](./UTILITIES.md) | Internal cache and metrics helpers |
189
193
 
190
194
  Also see [../CONTRIBUTING.md](../CONTRIBUTING.md) and [../CHANGELOG.md](../CHANGELOG.md).
191
195
 
@@ -63,7 +63,7 @@ Validate or preview the current CLI announcement locally:
63
63
  npm --workspace workspai run check:release-announcement
64
64
  npm --workspace workspai run release:announcement -- \
65
65
  --product workspai-cli \
66
- --tag v0.68.0 \
66
+ --tag v0.70.0 \
67
67
  --markdown-output /tmp/workspai-discord-announcement.md
68
68
  ```
69
69
 
@@ -64,6 +64,17 @@ npx workspai readiness [--workspace <path>] [--json] [--strict] [--skip-verify]
64
64
  npx workspai autopilot release [--mode <audit|safe-fix|enforce>] [--json] [--output <file>] [--since <ref>] [--parallel] [--max-workers <n>]
65
65
  npx workspai goal <intent> [--workspace <path>] [--scope <workspace|project:name|projects:a,b>] [--runtime <runtime>] [--for-agent <generic|claude|codex>] [--max-attempts <1-25>] [--refresh] [--dry-run] [--json]
66
66
  npx workspai goal <--status [goal-id]|--list|--activate <goal-id>|--cancel <goal-id>|--prepare <goal-id>|--verify <goal-id>> [--workspace <path>] [--no-run] [--json]
67
+ npx workspai change begin [--goal <goal-id>] [--workspace <path>] [--json]
68
+ npx workspai change list [--workspace <path>] [--json]
69
+ npx workspai change predict --change <change-id> --file <prediction.json> [--workspace <path>] [--json]
70
+ npx workspai change authorize --change <change-id> --effects <classes> [--granted-by <identity>] [--workspace <path>] [--json]
71
+ npx workspai change effect record --change <change-id> --file <effect-receipt.json> [--workspace <path>] [--json]
72
+ npx workspai change verify --change <change-id> [--strict] [--no-refresh] [--workspace <path>] [--json]
73
+ npx workspai change verification record --change <change-id> --file <verification-receipt.json> [--workspace <path>] [--json]
74
+ npx workspai change <status|explain> --change <change-id> [--workspace <path>] [--json]
75
+ npx workspai change resume --change <change-id> --to <authorized|executing|verifying> --reason <text> [--actor <identity>] [--json]
76
+ npx workspai change abort --change <change-id> --reason <text> [--actor <identity>] [--json]
77
+ npx workspai change capsule <validate|export> --change <change-id> [--output <path>] [--json]
67
78
  npx workspai agent bootstrap [--project <path>] [--for-agent <host>] [--no-live-inputs] [--strict] [--json]
68
79
  ```
69
80
 
@@ -210,6 +221,21 @@ claim verification. Lifecycle operations are mutually exclusive, cannot be
210
221
  combined with an intent or planning-only flags, and `--no-run` is valid only
211
222
  with `--verify`. See [Goal Packs](./goal-packs.md).
212
223
 
224
+ `change` turns an active Goal into a Proof-Carrying Change. `list` is the
225
+ versioned discovery surface for open, blocked, sealed, aborted, and invalid
226
+ capsules. `begin` pins the
227
+ exact Model, Graph, and live-input generation. `predict` is explicitly
228
+ noncanonical and never counts as proof. A human uses `authorize` to grant
229
+ bounded effect classes; agents and tools then append typed, idempotent effect
230
+ receipts. Removed paths use `deletedArtifacts: [{ "artifact": "..." }]`; the
231
+ CLI emits a governed tombstone only after proving the path is absent and
232
+ contained by the workspace or linked-project contract. `verify` re-observes
233
+ the canonical Graph, derives the actual overlay,
234
+ reports prediction surprises, and records Workspace Verify against the exact
235
+ post-effect generation. Additional Goal-domain receipts enter through
236
+ `verification record`. Only complete, passing criteria can seal a capsule. See
237
+ [Proof-Carrying Change](./proof-carrying-change.md).
238
+
213
239
  Coverage Goals are runtime-bound. Interactive terminals select from the
214
240
  canonical Workspace Model when the chosen scope has multiple runtimes;
215
241
  non-interactive consumers receive `needs-confirmation` and rerun with
@@ -67,24 +67,31 @@ is not the exact current canonical projection.
67
67
 
68
68
  ## Governance evidence loop
69
69
 
70
- | Command | Primary artifact | Schema version | JSON Schema |
71
- | ------------------------------------ | ----------------------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------- |
72
- | `doctor workspace` | `.workspai/reports/doctor-last-run.json` | `doctor-workspace-evidence-v1` | `contracts/doctor-workspace-evidence.v1.json` |
73
- | `doctor project` | `.workspai/reports/doctor-project-last-run.json` | `doctor-project-evidence-v1` | `contracts/doctor-project-evidence.v1.json` |
74
- | `project coverage` | `.workspai/reports/project-test-coverage-last-run.json` | `workspai.project-test-coverage.v1` | `contracts/project-test-coverage.v1.json` |
75
- | `doctor * --plan` | `.workspai/reports/doctor-remediation-plan-last-run.json` | `doctor-remediation-plan-v2` | `contracts/doctor-remediation-plan.v2.json` |
76
- | `doctor * --fix/--apply` | `.workspai/reports/doctor-fix-result-last-run.json` | `rapidkit-doctor-fix-result-v1` | `contracts/workspace-intelligence/doctor-fix-result.v1.json` |
77
- | `workspace remediation-plan --write` | `.workspai/reports/artifact-remediation-plan-last-run.json` | `artifact-remediation-plan-v1` | `contracts/artifact-remediation-plan.v1.json` |
78
- | `workspace repair *` | `.workspai/reports/workspace-repair-last-run.json` | `workspai.workspace-repair-transaction.v1` | `contracts/workspace-intelligence/workspace-repair-transaction.v1.json` |
79
- | `workspace repair capabilities` | CLI capability output | `workspai.workspace-repair-capabilities.v1` | `contracts/workspace-repair-capabilities.v1.json` |
80
- | `goal <intent>` | `.workspai/reports/goal-pack-last-run.json` | `workspai.goal-pack.v1` | `contracts/workspace-intelligence/goal-pack.v1.json` |
81
- | `goal <intent>` / lifecycle options | `.workspai/goals/index.json` | `workspai.goal-index.v1` | `contracts/workspace-intelligence/goal-index.v1.json` |
82
- | `goal --status/--list/... --json` | stdout | `workspai.goal-lifecycle-result.v1` | `contracts/workspace-intelligence/goal-lifecycle-result.v1.json` |
83
- | `analyze` | `.workspai/reports/analyze-last-run.json` | `rapidkit-analyze-v1` | `contracts/analyze-last-run.v1.json` |
84
- | `readiness` | `.workspai/reports/release-readiness-last-run.json` | `release-readiness-v1` | `contracts/release-readiness.v1.json` |
85
- | `pipeline` | `.workspai/reports/pipeline-last-run.json` | `rapidkit-pipeline-v1` | `contracts/pipeline-last-run.v1.json` |
86
- | `autopilot release` | `.workspai/reports/autopilot-release-last-run.json` | `autopilot-release-v1` | `contracts/autopilot-release.v1.json` |
87
- | | `.workspai/reports/autopilot-release.json` | (alias, same payload) | `contracts/autopilot-release.v1.json` |
70
+ | Command | Primary artifact | Schema version | JSON Schema |
71
+ | ------------------------------------ | ----------------------------------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------- |
72
+ | `doctor workspace` | `.workspai/reports/doctor-last-run.json` | `doctor-workspace-evidence-v1` | `contracts/doctor-workspace-evidence.v1.json` |
73
+ | `doctor project` | `.workspai/reports/doctor-project-last-run.json` | `doctor-project-evidence-v1` | `contracts/doctor-project-evidence.v1.json` |
74
+ | `project coverage` | `.workspai/reports/project-test-coverage-last-run.json` | `workspai.project-test-coverage.v1` | `contracts/project-test-coverage.v1.json` |
75
+ | `doctor * --plan` | `.workspai/reports/doctor-remediation-plan-last-run.json` | `doctor-remediation-plan-v2` | `contracts/doctor-remediation-plan.v2.json` |
76
+ | `doctor * --fix/--apply` | `.workspai/reports/doctor-fix-result-last-run.json` | `rapidkit-doctor-fix-result-v1` | `contracts/workspace-intelligence/doctor-fix-result.v1.json` |
77
+ | `workspace remediation-plan --write` | `.workspai/reports/artifact-remediation-plan-last-run.json` | `artifact-remediation-plan-v1` | `contracts/artifact-remediation-plan.v1.json` |
78
+ | `workspace repair *` | `.workspai/reports/workspace-repair-last-run.json` | `workspai.workspace-repair-transaction.v1` | `contracts/workspace-intelligence/workspace-repair-transaction.v1.json` |
79
+ | `workspace repair capabilities` | CLI capability output | `workspai.workspace-repair-capabilities.v1` | `contracts/workspace-repair-capabilities.v1.json` |
80
+ | `goal <intent>` | `.workspai/reports/goal-pack-last-run.json` | `workspai.goal-pack.v1` | `contracts/workspace-intelligence/goal-pack.v1.json` |
81
+ | `goal <intent>` / lifecycle options | `.workspai/goals/index.json` | `workspai.goal-index.v1` | `contracts/workspace-intelligence/goal-index.v1.json` |
82
+ | `goal --status/--list/... --json` | stdout | `workspai.goal-lifecycle-result.v1` | `contracts/workspace-intelligence/goal-lifecycle-result.v1.json` |
83
+ | `change begin` | `.workspai/changes/<change-id>/lease.json` | `workspai.architecture-change-lease.v1` | `contracts/workspace-intelligence/architecture-change-lease.v1.json` |
84
+ | `change *` | `.workspai/decisions/<change-id>/transaction.json` | `workspai.decision-transaction.v1` | `contracts/workspace-intelligence/decision-transaction.v1.json` |
85
+ | `change *` | `.workspai/decisions/<change-id>/checkpoint.json` | `workspai.decision-checkpoint.v1` | `contracts/workspace-intelligence/decision-checkpoint.v1.json` |
86
+ | `change predict` | `.workspai/changes/<change-id>/predicted-overlay.json` | `workspai.predicted-architecture-change.v1` | `contracts/workspace-intelligence/predicted-architecture-change.v1.json` |
87
+ | `change verify` | `.workspai/changes/<change-id>/actual-overlay.json` | `workspace-knowledge-graph-change-overlay.v1` | `contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json` |
88
+ | `change verify` | `.workspai/changes/<change-id>/architecture-surprises.json` | `workspai.architecture-surprise-report.v1` | `contracts/workspace-intelligence/architecture-surprise-report.v1.json` |
89
+ | `change *` | `.workspai/changes/<change-id>/capsule.json` | `workspai.proof-carrying-change-capsule.v1` | `contracts/workspace-intelligence/proof-carrying-change-capsule.v1.json` |
90
+ | `analyze` | `.workspai/reports/analyze-last-run.json` | `rapidkit-analyze-v1` | `contracts/analyze-last-run.v1.json` |
91
+ | `readiness` | `.workspai/reports/release-readiness-last-run.json` | `release-readiness-v1` | `contracts/release-readiness.v1.json` |
92
+ | `pipeline` | `.workspai/reports/pipeline-last-run.json` | `rapidkit-pipeline-v1` | `contracts/pipeline-last-run.v1.json` |
93
+ | `autopilot release` | `.workspai/reports/autopilot-release-last-run.json` | `autopilot-release-v1` | `contracts/autopilot-release.v1.json` |
94
+ | | `.workspai/reports/autopilot-release.json` | (alias, same payload) | `contracts/autopilot-release.v1.json` |
88
95
 
89
96
  Side/cache (not gates): `.workspai/reports/doctor-workspace-cache.json` (`doctor-workspace-cache-v2`).
90
97
 
@@ -96,6 +103,18 @@ authorize mutation or claim completion.
96
103
  The sibling `.workspai/goals/index.json` is the canonical active-goal discovery
97
104
  and lifecycle registry; consumers must not infer activity from directory order.
98
105
 
106
+ Proof-Carrying Change uses the append-only JSONL event stream at
107
+ `.workspai/decisions/<change-id>/events.jsonl` as authority. The transaction and
108
+ checkpoint are replay-derived projections, while the capsule composes intent,
109
+ baseline, typed effects, re-observed architecture, independent verification,
110
+ and remaining uncertainty. The private
111
+ `.workspai/changes/<change-id>/private/baseline-graph.json` materialization is a
112
+ hash-bound local cache used to calculate the actual delta after the canonical
113
+ Graph advances; it is non-authoritative and must not be treated as a portable
114
+ consumer artifact. `change list --json` is the stable discovery surface for
115
+ IDEs and automation, so consumers must not infer the active or latest change
116
+ from directory order.
117
+
99
118
  Doctor Studio handoff:
100
119
  `doctor-remediation-plan-v2` (`contracts/doctor-remediation-plan.v2.json`) is emitted in JSON
101
120
  responses and persisted to `.workspai/reports/doctor-remediation-plan-last-run.json` by
@@ -34,6 +34,7 @@ These commands are implemented and orchestrated by Workspai CLI:
34
34
  - `commands`
35
35
  - `create`
36
36
  - `goal`
37
+ - `change`
37
38
  - `agent`
38
39
  - `project`
39
40
  - `live`
@@ -53,6 +54,22 @@ These nested Commander commands are implemented and orchestrated by Workspai CLI
53
54
  - `config remove-api-key`
54
55
  - `config set-api-key`
55
56
  - `config show`
57
+ - `change begin`
58
+ - `change list`
59
+ - `change predict`
60
+ - `change authorize`
61
+ - `change resume`
62
+ - `change effect`
63
+ - `change effect record`
64
+ - `change verification`
65
+ - `change verification record`
66
+ - `change status`
67
+ - `change explain`
68
+ - `change verify`
69
+ - `change abort`
70
+ - `change capsule`
71
+ - `change capsule validate`
72
+ - `change capsule export`
56
73
  - `infra down`
57
74
  - `infra plan`
58
75
  - `infra status`
@@ -0,0 +1,68 @@
1
+ # Proof-Carrying Change contracts
2
+
3
+ Status: released v1 CLI and read-only MCP contracts; extension mutation adapter pending
4
+
5
+ ## Published contracts
6
+
7
+ | Schema | Owner | Purpose |
8
+ | ------------------------------------------------------ | --------------- | --------------------------------------------------- |
9
+ | `workspai.decision-event.v1` | Decisions | Digest-linked causal event. |
10
+ | `workspai.decision-transaction.v1` | Decisions | Replay-derived transaction projection. |
11
+ | `workspai.decision-checkpoint.v1` | Decisions | Event-head and projection integrity checkpoint. |
12
+ | `workspai.architecture-change-lease.v1` | PCC composition | Goal and architecture generation guard. |
13
+ | `workspai.predicted-architecture-change.v1` | PCC composition | Explicit noncanonical expected delta. |
14
+ | `workspace-knowledge-graph-change-overlay.v1` | Graph | Actual base-to-head architecture delta. |
15
+ | `workspai.architecture-surprise-report.v1` | PCC composition | Predicted-versus-observed comparison. |
16
+ | `workspai.proof-carrying-change-capsule.v1` | PCC composition | Portable closure, assurance, and uncertainty index. |
17
+ | `workspai.change-operation-result.v1` | PCC composition | Stable machine result shared by lifecycle commands. |
18
+ | `workspai.proof-carrying-change-list.v1` | PCC composition | Read-only discovery for IDE, CI, and automation. |
19
+ | `workspai.proof-carrying-change-capsule-validation.v1` | PCC composition | Explicit integrity validation verdict. |
20
+ | `workspai.proof-carrying-change-capsule-export.v1` | PCC composition | Validated portable export receipt. |
21
+
22
+ The schemas live in `contracts/workspace-intelligence/` and are advertised by
23
+ the published contract catalog and runtime command surface.
24
+
25
+ ## Reuse map
26
+
27
+ - `workspai.goal-pack.v1`: immutable intent, scope, and success criteria.
28
+ - `workspai.goal-index.v1`: active Goal and bounded PCC transaction links.
29
+ - `workspace-model.v1`: structural baseline and post-effect system identity.
30
+ - `workspace-knowledge-graph.v1`: architecture facts and proofs.
31
+ - `workspace-knowledge-graph-change-overlay.v1`: actual change semantics.
32
+ - `workspace-verify.v1`: canonical workspace verification evidence.
33
+
34
+ ## Semantic validation beyond JSON Schema
35
+
36
+ JSON shape is necessary but insufficient. The runtime additionally verifies:
37
+
38
+ 1. contiguous event sequence and one transaction ID;
39
+ 2. previous-event and event-content digests;
40
+ 3. legal state transitions;
41
+ 4. explicit effect-class authorization;
42
+ 5. unique effect receipt IDs and idempotency keys;
43
+ 6. exact effect-head binding for verification receipts;
44
+ 7. current Model/Graph target identity;
45
+ 8. successful receipt or validated deletion-tombstone coverage for changed
46
+ Graph proof artifacts;
47
+ 9. deletion paths remain absent and contained by the workspace or an explicit
48
+ linked-project contract;
49
+ 10. latest passing receipt for every immutable Goal criterion;
50
+ 11. capsule, lease, decision-head, baseline-cache, and referenced-artifact integrity.
51
+
52
+ ## Compatibility rules
53
+
54
+ - v1 fields do not grant authority beyond their named owner.
55
+ - Prediction remains ineligible as proof in every consumer.
56
+ - A capsule is an index, not a duplicate Goal, Graph, ledger, or verifier.
57
+ - Missing, stale, uncertain, failed, and unsupported are distinct outcomes.
58
+ - Unknown event kinds or fields fail closed under v1 schemas.
59
+ - Consumers must use command discovery and the published catalog rather than
60
+ guessing artifact paths.
61
+ - Consumers must use `change list --json` rather than inferring recency or
62
+ lifecycle state from directory order.
63
+
64
+ ## Deferred contract
65
+
66
+ `workspai.semantic-change-conflict.v1` remains deferred until proof-backed
67
+ two-change overlap can distinguish `overlap`, `disjoint`, and `unknown` without
68
+ inferring absence from incomplete Graph coverage.
@@ -0,0 +1,119 @@
1
+ {
2
+ "schemaVersion": "workspai.proof-carrying-change-implementation-plan.v1",
3
+ "status": "released",
4
+ "release": "0.69.0",
5
+ "hardeningRelease": "0.70.0",
6
+ "runtimeImplemented": true,
7
+ "packageDecision": {
8
+ "newPackage": false,
9
+ "compositionOwner": "workspai-cli",
10
+ "transactionOwner": "extraction-safe Decisions kernel",
11
+ "graphOwner": "workspace-knowledge-graph",
12
+ "modelOwner": "workspace-model",
13
+ "intentOwner": "goal-pack",
14
+ "verificationOwner": "domain-verifier"
15
+ },
16
+ "publicCommands": [
17
+ "change begin",
18
+ "change list",
19
+ "change predict",
20
+ "change authorize",
21
+ "change resume",
22
+ "change effect record",
23
+ "change verification record",
24
+ "change status",
25
+ "change verify",
26
+ "change explain",
27
+ "change abort",
28
+ "change capsule validate",
29
+ "change capsule export"
30
+ ],
31
+ "reusedContracts": [
32
+ "workspai.goal-pack.v1",
33
+ "workspai.goal-index.v1",
34
+ "workspace-knowledge-graph-change-overlay.v1",
35
+ "workspace-impact.v1",
36
+ "workspace-explain.v1",
37
+ "workspace-verify.v1"
38
+ ],
39
+ "implementedContracts": [
40
+ "workspai.decision-event.v1",
41
+ "workspai.decision-transaction.v1",
42
+ "workspai.decision-checkpoint.v1",
43
+ "workspai.architecture-change-lease.v1",
44
+ "workspai.predicted-architecture-change.v1",
45
+ "workspai.architecture-surprise-report.v1",
46
+ "workspai.proof-carrying-change-capsule.v1",
47
+ "workspai.change-operation-result.v1",
48
+ "workspai.proof-carrying-change-list.v1",
49
+ "workspai.proof-carrying-change-capsule-validation.v1",
50
+ "workspai.proof-carrying-change-capsule-export.v1"
51
+ ],
52
+ "deferredContracts": ["workspai.semantic-change-conflict.v1"],
53
+ "consumerStatus": {
54
+ "cli": "complete",
55
+ "ciJsonGate": "complete",
56
+ "mcpReadTools": "complete",
57
+ "extensionReadProjection": "implemented-cli-contract-ready",
58
+ "extensionStudioMutationAdapter": "implemented-cli-contract-ready"
59
+ },
60
+ "stages": [
61
+ {
62
+ "id": "PC0",
63
+ "name": "ownership-and-inventory",
64
+ "status": "complete",
65
+ "exit": "Maintainer approves ownership, reuse map, threat boundary and no-new-package decision."
66
+ },
67
+ {
68
+ "id": "PC1",
69
+ "name": "contract-lock",
70
+ "status": "complete",
71
+ "exit": "Schemas, types, validators, fixtures, artifacts and compatibility rules are locked."
72
+ },
73
+ {
74
+ "id": "PC2",
75
+ "name": "pure-lease-and-comparison-kernel",
76
+ "status": "complete",
77
+ "exit": "Generation guard, prediction comparison and capsule validation pass without CLI globals."
78
+ },
79
+ {
80
+ "id": "PC3",
81
+ "name": "explicit-prediction-mvp",
82
+ "status": "complete",
83
+ "exit": "Begin, predict, status, verify, explain and abort pass JSON and process integration tests."
84
+ },
85
+ {
86
+ "id": "PC4",
87
+ "name": "decisions-and-effect-integration",
88
+ "status": "complete",
89
+ "exit": "All effects and resume behavior use one Decisions transaction and ledger."
90
+ },
91
+ {
92
+ "id": "PC5",
93
+ "name": "semantic-concurrency",
94
+ "status": "deferred",
95
+ "exit": "Proof-backed overlap and honest unknown/disjoint semantics pass multi-change fixtures."
96
+ },
97
+ {
98
+ "id": "PC6",
99
+ "name": "consumer-integration",
100
+ "status": "in-progress",
101
+ "exit": "CLI, CI, MCP and extension consume one capsule contract without semantic forks."
102
+ },
103
+ {
104
+ "id": "PC7",
105
+ "name": "enterprise-hardening",
106
+ "status": "in-progress",
107
+ "exit": "Cross-platform, adversarial, crash, concurrency, scale, privacy and release gates pass."
108
+ }
109
+ ],
110
+ "prohibitedShortcuts": [
111
+ "new transaction or graph truth owner",
112
+ "automatic stale lease renewal",
113
+ "prediction as corroborating evidence",
114
+ "fidelity score as commit or release authority",
115
+ "history as causal ledger",
116
+ "automatic command execution from capability metadata",
117
+ "semantic disjointness inferred from missing graph coverage"
118
+ ]
119
+ }