@smartmemory/compose 0.1.28-beta → 0.1.29-beta
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/bin/compose.js +27 -0
- package/contracts/task-result.json +60 -0
- package/contracts/taskgraph-gsd.json +94 -0
- package/dist/assets/{App-Dj7XWWxC.js → App-DyRUFvbx.js} +67 -67
- package/dist/assets/{_baseUniq-tNOA7dYy.js → _baseUniq-6fxo8lI4.js} +1 -1
- package/dist/assets/{arc-BAmAJ19S.js → arc-ElMd2B94.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-BPWGVKHW.js → architectureDiagram-Q4EWVU46-CYkxf4MU.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-CVlFbWKF.js → blockDiagram-DXYQGD6D-BEbnyY6z.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-CqzLpnSp.js → c4Diagram-AHTNJAMY-Bo5yMBT9.js} +1 -1
- package/dist/assets/channel-BZuHuJYj.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-D27n9FGy.js → chunk-4BX2VUAB-BETV09jq.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-BNXf8s1x.js → chunk-4TB4RGXK-Dbuohq0Y.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-kGd4Gwx6.js → chunk-55IACEB6-CDVuU3Ew.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-Ci9gWeIv.js → chunk-EDXVE4YY-DjkbltSG.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-B-C0Qn-h.js → chunk-FMBD7UC4-Dz2qczuu.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-CosYsxuv.js → chunk-OYMX7WX6-XJH4cbpv.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DV2v0Qii.js → chunk-QZHKN3VN-DPhBd22Q.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-BlgKQRCn.js → chunk-YZCP3GAM-C-DPngtC.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DTItsUL2.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-DTItsUL2.js +1 -0
- package/dist/assets/clone-BM9Hd7mq.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CSkzhGHO.js → cose-bilkent-S5V4N54A-CN-sdzRq.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-zp76534d.js → dagre-KV5264BT-HcBmaeC1.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-CAsORZBT.js → diagram-5BDNPKRD-DeMZN1_c.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-Da2z6fvR.js → diagram-G4DWMVQ6-DAVSapDS.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-R9NZEWPF.js → diagram-MMDJMWI5-WiLMNWTz.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-DXabRna8.js → diagram-TYMM5635-CjfaWKT0.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-B1zsRPqn.js → erDiagram-SMLLAGMA-DUT_laNT.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-AvlZ6pTE.js → flowDiagram-DWJPFMVM-J9uyMWkp.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-Bnj-jTcM.js → ganttDiagram-T4ZO3ILL-Cee_YjtS.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-82ysfuqG.js → gitGraphDiagram-UUTBAWPF-B1jNNoiW.js} +1 -1
- package/dist/assets/{graph-6nRhlKgL.js → graph-DV5DY72d.js} +1 -1
- package/dist/assets/{index-CF7jc-By.js → index-D5Mh04yh.js} +2 -2
- package/dist/assets/{infoDiagram-42DDH7IO-DSGEEGYr.js → infoDiagram-42DDH7IO-m1jIMAlx.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-COnZHJuM.js → ishikawaDiagram-UXIWVN3A-BC7DwQNb.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-Bsssj2jr.js → journeyDiagram-VCZTEJTY-BOCgv7m4.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-1o5Em0Ia.js → kanban-definition-6JOO6SKY-Fu0eFxr1.js} +1 -1
- package/dist/assets/{layout-C6Mitjz_.js → layout-C-R3-tDf.js} +1 -1
- package/dist/assets/{linear-DoGSpDWQ.js → linear-NOMW_E2I.js} +1 -1
- package/dist/assets/{min-BqH4I4oK.js → min-B7SuZW29.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-79V6zmXV.js → mindmap-definition-QFDTVHPH-BPwx_SxA.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-nXz4HiT6.js → pieDiagram-DEJITSTG-DdBjaXTu.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-BuwKLcii.js → quadrantDiagram-34T5L4WZ-D_K_ZMnx.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-9YEiDjlT.js → requirementDiagram-MS252O5E-XlROD_VH.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-gX8lhWn5.js → sankeyDiagram-XADWPNL6-Sl0FllYQ.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-CkssrD67.js → sequenceDiagram-FGHM5R23-D22asQ-_.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-DPmEy2eV.js → stateDiagram-FHFEXIEX-BnCepkBg.js} +1 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-DD_YjrTQ.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-DGpUOjs3.js → timeline-definition-GMOUNBTQ-gdlx6TEB.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-CIvkd661.js → vennDiagram-DHZGUBPP-wy4YzhrG.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-BqRTpa3K.js → wardley-RL74JXVD-D0T_uQ79.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-B93hOd7R.js → wardleyDiagram-NUSXRM2D-Ds2dLjs8.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-C6hwimqo.js → xychartDiagram-5P7HB3ND-CLgTTXkj.js} +1 -1
- package/dist/index.html +1 -1
- package/lib/gsd-blackboard.js +135 -0
- package/lib/gsd-decompose-enrich.js +171 -0
- package/lib/gsd-prompt.js +82 -0
- package/lib/gsd.js +364 -0
- package/package.json +1 -1
- package/pipelines/gsd.stratum.yaml +141 -0
- package/dist/assets/channel-Ddcaj0fR.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DfGxrNIN.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-DfGxrNIN.js +0 -1
- package/dist/assets/clone-DVujR_lO.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-BGZzYkLq.js +0 -1
package/dist/assets/{xychartDiagram-5P7HB3ND-C6hwimqo.js → xychartDiagram-5P7HB3ND-CLgTTXkj.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,aF as Si,R as Wt}from"./App-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,aF as Si,R as Wt}from"./App-DyRUFvbx.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-NOMW_E2I.js";import"./mobile-BOyZ87uL.js";import"./index-D5Mh04yh.js";import"./graph-CfEl_ohV.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
})();
|
|
21
21
|
</script>
|
|
22
|
-
<script type="module" crossorigin src="/assets/index-
|
|
22
|
+
<script type="module" crossorigin src="/assets/index-D5Mh04yh.js"></script>
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/mobile-BOyZ87uL.js">
|
|
24
24
|
<link rel="stylesheet" crossorigin href="/assets/mobile-5PV1E6OC.css">
|
|
25
25
|
<link rel="stylesheet" crossorigin href="/assets/index-CHkeTiSt.css">
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// lib/gsd-blackboard.js
|
|
2
|
+
//
|
|
3
|
+
// COMP-GSD-2 T2: blackboard I/O for GSD post-execution capture.
|
|
4
|
+
//
|
|
5
|
+
// Exports:
|
|
6
|
+
// read(code, opts?) → Record<taskId, TaskResult> (returns {} if absent)
|
|
7
|
+
// writeAll(code, taskResults, opts?) → Promise<void> (atomic batch write)
|
|
8
|
+
// validate(taskResult) → { ok: boolean, errors: string[] }
|
|
9
|
+
//
|
|
10
|
+
// Lock pattern: mirrors lib/completion-writer.js:48-67 (mkdir-advisory-lock).
|
|
11
|
+
// Atomic write: temp-file + rename (mirrors lib/journal-writer.js).
|
|
12
|
+
// Schema validation: contracts/task-result.json compiled lazily under ajv.
|
|
13
|
+
|
|
14
|
+
import { mkdirSync, readFileSync, writeFileSync, renameSync, rmSync, statSync, existsSync } from 'node:fs';
|
|
15
|
+
import { join, dirname, resolve } from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const PACKAGE_ROOT = resolve(__dirname, '..');
|
|
20
|
+
|
|
21
|
+
const LOCK_TIMEOUT_MS = 5000;
|
|
22
|
+
const LOCK_RETRY_MS = 25;
|
|
23
|
+
|
|
24
|
+
// ---------- Path helpers ----------
|
|
25
|
+
|
|
26
|
+
function blackboardPath(cwd, code) {
|
|
27
|
+
return join(cwd, '.compose', 'gsd', code, 'blackboard.json');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function lockPath(cwd, code) {
|
|
31
|
+
return join(cwd, '.compose', 'data', 'locks', `gsd-${code}.lock`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ---------- Lock helpers (mirrors completion-writer.js:56) ----------
|
|
35
|
+
|
|
36
|
+
async function acquireLock(cwd, code) {
|
|
37
|
+
const lp = lockPath(cwd, code);
|
|
38
|
+
mkdirSync(dirname(lp), { recursive: true });
|
|
39
|
+
|
|
40
|
+
const start = Date.now();
|
|
41
|
+
while (true) {
|
|
42
|
+
try {
|
|
43
|
+
mkdirSync(lp);
|
|
44
|
+
return () => {
|
|
45
|
+
try { rmSync(lp, { recursive: true, force: true }); } catch { /* best-effort */ }
|
|
46
|
+
};
|
|
47
|
+
} catch (err) {
|
|
48
|
+
if (err.code !== 'EEXIST') throw err;
|
|
49
|
+
try {
|
|
50
|
+
const st = statSync(lp);
|
|
51
|
+
if (Date.now() - st.mtimeMs > LOCK_TIMEOUT_MS) {
|
|
52
|
+
rmSync(lp, { recursive: true, force: true });
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
} catch { /* stat raced; retry */ }
|
|
56
|
+
if (Date.now() - start > LOCK_TIMEOUT_MS) {
|
|
57
|
+
throw new Error(`gsd-blackboard: lock timeout after ${LOCK_TIMEOUT_MS}ms: ${lp}`);
|
|
58
|
+
}
|
|
59
|
+
await new Promise((r) => setTimeout(r, LOCK_RETRY_MS));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ---------- Schema validation (lazy ajv) ----------
|
|
65
|
+
|
|
66
|
+
let _validator = null;
|
|
67
|
+
|
|
68
|
+
function getValidator() {
|
|
69
|
+
if (_validator) return _validator;
|
|
70
|
+
const Ajv = require('ajv');
|
|
71
|
+
const schema = JSON.parse(
|
|
72
|
+
readFileSync(join(PACKAGE_ROOT, 'contracts', 'task-result.json'), 'utf-8'),
|
|
73
|
+
);
|
|
74
|
+
const ajv = new Ajv({ strict: false, allErrors: true });
|
|
75
|
+
_validator = ajv.compile(schema);
|
|
76
|
+
return _validator;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// CommonJS require shim for ajv (this module is ESM)
|
|
80
|
+
import { createRequire } from 'node:module';
|
|
81
|
+
const require = createRequire(import.meta.url);
|
|
82
|
+
|
|
83
|
+
export function validate(taskResult) {
|
|
84
|
+
if (taskResult === null || typeof taskResult !== 'object' || Array.isArray(taskResult)) {
|
|
85
|
+
return { ok: false, errors: ['expected TaskResult object'] };
|
|
86
|
+
}
|
|
87
|
+
const v = getValidator();
|
|
88
|
+
const ok = v(taskResult);
|
|
89
|
+
if (ok) return { ok: true, errors: [] };
|
|
90
|
+
return {
|
|
91
|
+
ok: false,
|
|
92
|
+
errors: (v.errors ?? []).map((e) => `${e.instancePath || '/'} ${e.message}`),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ---------- Public I/O ----------
|
|
97
|
+
|
|
98
|
+
export function read(code, opts = {}) {
|
|
99
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
100
|
+
const path = blackboardPath(cwd, code);
|
|
101
|
+
if (!existsSync(path)) return {};
|
|
102
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export async function writeAll(code, taskResults, opts = {}) {
|
|
106
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
107
|
+
|
|
108
|
+
// Validate every entry BEFORE acquiring the lock — fail fast, don't hold the lock for nothing.
|
|
109
|
+
if (taskResults === null || typeof taskResults !== 'object' || Array.isArray(taskResults)) {
|
|
110
|
+
throw new Error('gsd-blackboard.writeAll: invalid taskResults — expected object map');
|
|
111
|
+
}
|
|
112
|
+
for (const [taskId, result] of Object.entries(taskResults)) {
|
|
113
|
+
const v = validate(result);
|
|
114
|
+
if (!v.ok) {
|
|
115
|
+
throw new Error(
|
|
116
|
+
`gsd-blackboard.writeAll: invalid TaskResult for task "${taskId}": ${v.errors.join('; ')}`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const release = await acquireLock(cwd, code);
|
|
122
|
+
try {
|
|
123
|
+
const path = blackboardPath(cwd, code);
|
|
124
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
125
|
+
// One-shot batch finalization: replace whatever was there. The blackboard
|
|
126
|
+
// is a post-execution artifact, not an append log. Concurrent writers
|
|
127
|
+
// serialize on the lock — one wins, one waits — and the last writer's
|
|
128
|
+
// map is the final state.
|
|
129
|
+
const tmpPath = `${path}.tmp.${process.pid}.${Date.now()}`;
|
|
130
|
+
writeFileSync(tmpPath, JSON.stringify(taskResults, null, 2) + '\n');
|
|
131
|
+
renameSync(tmpPath, path);
|
|
132
|
+
} finally {
|
|
133
|
+
release();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// lib/gsd-decompose-enrich.js
|
|
2
|
+
//
|
|
3
|
+
// COMP-GSD-2 T3: enrichTaskGraph(taskGraph, blueprintText) → TaskGraphGsd.
|
|
4
|
+
//
|
|
5
|
+
// Pure function. No filesystem I/O. Takes the bare TaskGraph emitted by
|
|
6
|
+
// Stratum's decompose step (tasks have id/files_owned/files_read/depends_on/
|
|
7
|
+
// description) and the blueprint text. Calls parseBoundaryMap (pure) to get
|
|
8
|
+
// slices and parse violations. Maps each slice to exactly one task by
|
|
9
|
+
// the slice's File Plan files ⊆ task.files_owned. Attaches produces/consumes
|
|
10
|
+
// arrays to each task.
|
|
11
|
+
//
|
|
12
|
+
// Purity note: the blueprint says T6/runGsd should use validateBoundaryMap
|
|
13
|
+
// (which does filesystem checks). T3 only uses parseBoundaryMap so it stays
|
|
14
|
+
// pure and deterministic — runGsd separately calls validateBoundaryMap as
|
|
15
|
+
// its lifecycle precondition.
|
|
16
|
+
//
|
|
17
|
+
// Throws on: parseBoundaryMap parseViolations, empty Boundary Map, orphaned
|
|
18
|
+
// slice (slice's File Plan files not all owned by any single task), orphaned
|
|
19
|
+
// task (no slice maps to it).
|
|
20
|
+
|
|
21
|
+
import { parseBoundaryMap } from './boundary-map.js';
|
|
22
|
+
|
|
23
|
+
// Match per-slice File Plan lines:
|
|
24
|
+
// File Plan: `path/a` (new), `path/b` (modify), ...
|
|
25
|
+
// File Plan: path/a, path/b
|
|
26
|
+
const FILEPLAN_LINE_RE = /^File Plan\s*:\s*(.+)$/;
|
|
27
|
+
const BACKTICK_PATH_RE = /`([^`]+)`/g;
|
|
28
|
+
const BARE_PATH_RE = /([^\s,()`]+)/g;
|
|
29
|
+
|
|
30
|
+
function extractSliceFilePlanFiles(blueprintText, sliceId) {
|
|
31
|
+
// Find the slice block: from `### {sliceId}` to the next `### S` heading or
|
|
32
|
+
// a `## ` heading or EOF.
|
|
33
|
+
const lines = blueprintText.split(/\r?\n/);
|
|
34
|
+
const headingRe = new RegExp(`^### ${sliceId}(?::|\\s|$)`);
|
|
35
|
+
let start = -1;
|
|
36
|
+
for (let i = 0; i < lines.length; i++) {
|
|
37
|
+
if (headingRe.test(lines[i])) { start = i + 1; break; }
|
|
38
|
+
}
|
|
39
|
+
if (start === -1) return [];
|
|
40
|
+
let end = lines.length;
|
|
41
|
+
for (let i = start; i < lines.length; i++) {
|
|
42
|
+
if (/^### S\d/.test(lines[i]) || /^## /.test(lines[i])) { end = i; break; }
|
|
43
|
+
}
|
|
44
|
+
// Find File Plan line within the slice block
|
|
45
|
+
for (let i = start; i < end; i++) {
|
|
46
|
+
const m = lines[i].match(FILEPLAN_LINE_RE);
|
|
47
|
+
if (!m) continue;
|
|
48
|
+
const tail = m[1];
|
|
49
|
+
// Prefer backtick-quoted paths; fall back to bare comma-separated if none.
|
|
50
|
+
const ticked = [...tail.matchAll(BACKTICK_PATH_RE)].map((mm) => mm[1].trim());
|
|
51
|
+
if (ticked.length > 0) return ticked;
|
|
52
|
+
// Strip parenthesized actions like " (new)" before bare-token matching.
|
|
53
|
+
const cleaned = tail.replace(/\([^)]*\)/g, '');
|
|
54
|
+
const bare = [...cleaned.matchAll(BARE_PATH_RE)].map((mm) => mm[1].trim()).filter(Boolean);
|
|
55
|
+
return bare;
|
|
56
|
+
}
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function enrichTaskGraph(taskGraph, blueprintText) {
|
|
61
|
+
if (!taskGraph || !Array.isArray(taskGraph.tasks)) {
|
|
62
|
+
throw new Error('enrichTaskGraph: taskGraph.tasks must be an array');
|
|
63
|
+
}
|
|
64
|
+
if (typeof blueprintText !== 'string') {
|
|
65
|
+
throw new Error('enrichTaskGraph: blueprintText must be a string');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const { slices, parseViolations } = parseBoundaryMap(blueprintText);
|
|
69
|
+
if (parseViolations.length > 0) {
|
|
70
|
+
const summary = parseViolations
|
|
71
|
+
.slice(0, 5)
|
|
72
|
+
.map((v) => `${v.kind}: ${v.message}`)
|
|
73
|
+
.join('; ');
|
|
74
|
+
throw new Error(`enrichTaskGraph: Boundary Map invalid (parse violations): ${summary}`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const liveSlices = slices.filter((s) => !s._duplicate);
|
|
78
|
+
if (liveSlices.length === 0) {
|
|
79
|
+
throw new Error('enrichTaskGraph: Boundary Map empty (zero slices)');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// For each slice, extract its File Plan files and map to a task whose
|
|
83
|
+
// files_owned ⊇ those files. If the slice's File Plan files are split
|
|
84
|
+
// across multiple tasks → ambiguous → throw. If no task owns all of
|
|
85
|
+
// them → orphaned slice.
|
|
86
|
+
const sliceToTask = new Map();
|
|
87
|
+
const sliceFilePlanFiles = new Map(); // sliceId → string[]
|
|
88
|
+
for (const slice of liveSlices) {
|
|
89
|
+
const filePlanFiles = extractSliceFilePlanFiles(blueprintText, slice.id);
|
|
90
|
+
if (filePlanFiles.length === 0) {
|
|
91
|
+
throw new Error(
|
|
92
|
+
`enrichTaskGraph: slice ${slice.id} has no File Plan entries. ` +
|
|
93
|
+
`Each slice must declare its File Plan files for slice→task mapping.`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
sliceFilePlanFiles.set(slice.id, filePlanFiles);
|
|
97
|
+
const fpSet = new Set(filePlanFiles);
|
|
98
|
+
let matchedTaskId = null;
|
|
99
|
+
let partialMatchTaskIds = [];
|
|
100
|
+
for (const task of taskGraph.tasks) {
|
|
101
|
+
const owned = new Set(task.files_owned || []);
|
|
102
|
+
const allOwned = [...fpSet].every((f) => owned.has(f));
|
|
103
|
+
const someOwned = [...fpSet].some((f) => owned.has(f));
|
|
104
|
+
if (allOwned) {
|
|
105
|
+
if (matchedTaskId) {
|
|
106
|
+
throw new Error(
|
|
107
|
+
`enrichTaskGraph: slice ${slice.id} matches multiple tasks ` +
|
|
108
|
+
`(${matchedTaskId}, ${task.id}); decomposition has overlapping files_owned`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
matchedTaskId = task.id;
|
|
112
|
+
} else if (someOwned) {
|
|
113
|
+
partialMatchTaskIds.push(task.id);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (!matchedTaskId) {
|
|
117
|
+
if (partialMatchTaskIds.length > 0) {
|
|
118
|
+
throw new Error(
|
|
119
|
+
`enrichTaskGraph: slice ${slice.id} File Plan files ` +
|
|
120
|
+
`[${[...fpSet].join(', ')}] are split across multiple tasks ` +
|
|
121
|
+
`(partial owners: ${partialMatchTaskIds.join(', ')}). ` +
|
|
122
|
+
`Each slice must map to exactly one task.`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
throw new Error(
|
|
126
|
+
`enrichTaskGraph: slice ${slice.id} is orphaned — no task owns its File Plan files [${[...fpSet].join(', ')}]`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
sliceToTask.set(slice.id, matchedTaskId);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Reverse map: each task must have ≥1 matching slice.
|
|
133
|
+
const taskToSlices = new Map();
|
|
134
|
+
for (const [sliceId, taskId] of sliceToTask.entries()) {
|
|
135
|
+
if (!taskToSlices.has(taskId)) taskToSlices.set(taskId, []);
|
|
136
|
+
taskToSlices.get(taskId).push(sliceId);
|
|
137
|
+
}
|
|
138
|
+
const orphanedTasks = taskGraph.tasks
|
|
139
|
+
.filter((t) => !taskToSlices.has(t.id))
|
|
140
|
+
.map((t) => t.id);
|
|
141
|
+
if (orphanedTasks.length > 0) {
|
|
142
|
+
throw new Error(
|
|
143
|
+
`enrichTaskGraph: tasks have no matching Boundary Map slice (orphaned): ${orphanedTasks.join(', ')}`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Build the enriched TaskGraph. For each task, concatenate produces/consumes
|
|
148
|
+
// from all matching slices.
|
|
149
|
+
const slicesById = new Map(liveSlices.map((s) => [s.id, s]));
|
|
150
|
+
const enrichedTasks = taskGraph.tasks.map((task) => {
|
|
151
|
+
const matchedSliceIds = taskToSlices.get(task.id) || [];
|
|
152
|
+
const produces = [];
|
|
153
|
+
const consumes = [];
|
|
154
|
+
for (const sid of matchedSliceIds) {
|
|
155
|
+
const s = slicesById.get(sid);
|
|
156
|
+
for (const p of s.produces) {
|
|
157
|
+
produces.push({ file: p.file, symbols: p.symbols, kind: p.kind });
|
|
158
|
+
}
|
|
159
|
+
for (const c of s.consumes) {
|
|
160
|
+
consumes.push({ from: c.from, file: c.file, symbols: c.symbols });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
...task,
|
|
165
|
+
produces,
|
|
166
|
+
consumes,
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return { tasks: enrichedTasks };
|
|
171
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// lib/gsd-prompt.js
|
|
2
|
+
//
|
|
3
|
+
// COMP-GSD-2 T4: buildTaskDescription — pure string assembly.
|
|
4
|
+
//
|
|
5
|
+
// Stratum's parallel_dispatch only interpolates {task.id|description|
|
|
6
|
+
// files_owned|files_read|depends_on|index} and {input.<field>}. Every other
|
|
7
|
+
// piece of context — the per-slice produces/consumes contract, the upstream
|
|
8
|
+
// tasks summary, the gate commands — must be packed inside `task.description`.
|
|
9
|
+
//
|
|
10
|
+
// This module produces the rich `description` string. It is also used by
|
|
11
|
+
// runGsd as a deterministic fallback when the decompose_gsd agent failed to
|
|
12
|
+
// bake a description into a task.
|
|
13
|
+
//
|
|
14
|
+
// Pure function. No fs, no globals.
|
|
15
|
+
|
|
16
|
+
const SECTION_DIVIDER = '---';
|
|
17
|
+
|
|
18
|
+
function formatProduces(produces) {
|
|
19
|
+
if (!produces || produces.length === 0) return '(none)';
|
|
20
|
+
const lines = produces.map((p) => {
|
|
21
|
+
const syms = (p.symbols || []).join(', ');
|
|
22
|
+
return ` ${p.file} → ${syms} (${p.kind})`;
|
|
23
|
+
});
|
|
24
|
+
return lines.join('\n');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function formatConsumes(consumes) {
|
|
28
|
+
if (!consumes || consumes.length === 0) return '(none)';
|
|
29
|
+
const lines = consumes.map((c) => {
|
|
30
|
+
const syms = (c.symbols || []).join(', ');
|
|
31
|
+
return ` from ${c.from}: ${c.file} → ${syms}`;
|
|
32
|
+
});
|
|
33
|
+
return lines.join('\n');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function formatUpstream(task, upstreamTasks) {
|
|
37
|
+
const deps = new Set(task.depends_on || []);
|
|
38
|
+
const filtered = (upstreamTasks || []).filter((t) => deps.has(t.id));
|
|
39
|
+
if (filtered.length === 0) return '(none)';
|
|
40
|
+
return filtered
|
|
41
|
+
.map((t) => {
|
|
42
|
+
const producesStr = (t.produces || [])
|
|
43
|
+
.map((p) => `${p.file} → ${(p.symbols || []).join(', ')} (${p.kind})`)
|
|
44
|
+
.join('; ');
|
|
45
|
+
return ` ${t.id}: produces ${producesStr || '(none)'}`;
|
|
46
|
+
})
|
|
47
|
+
.join('\n');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function formatGates(gateCommands) {
|
|
51
|
+
if (!gateCommands || gateCommands.length === 0) return '(none)';
|
|
52
|
+
return gateCommands.map((c) => ` - ${c}`).join('\n');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildTaskDescription({ task, slice, upstreamTasks, gateCommands }) {
|
|
56
|
+
if (!task || typeof task !== 'object') {
|
|
57
|
+
throw new Error('buildTaskDescription: task object required');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// The function PRODUCES task.description — it must not embed any preexisting
|
|
61
|
+
// description (which may itself be malformed; this is the repair path). The
|
|
62
|
+
// output is the fresh, canonical description.
|
|
63
|
+
const lines = [];
|
|
64
|
+
lines.push('Symbols you must produce:');
|
|
65
|
+
lines.push(formatProduces(task.produces));
|
|
66
|
+
lines.push('');
|
|
67
|
+
lines.push('Symbols you may consume from upstream tasks:');
|
|
68
|
+
lines.push(formatConsumes(task.consumes));
|
|
69
|
+
lines.push('');
|
|
70
|
+
lines.push('Boundary Map slice (the contract for this task):');
|
|
71
|
+
lines.push(typeof slice === 'string' ? slice : '(slice text not provided)');
|
|
72
|
+
lines.push('');
|
|
73
|
+
lines.push('Upstream tasks (spec-level summary; their code lands at end-of-step merge):');
|
|
74
|
+
lines.push(formatUpstream(task, upstreamTasks));
|
|
75
|
+
lines.push('');
|
|
76
|
+
lines.push('GATES — you MUST run each command and they MUST pass before declaring done:');
|
|
77
|
+
lines.push(formatGates(gateCommands));
|
|
78
|
+
lines.push('');
|
|
79
|
+
lines.push('Fix and re-run within this invocation. Do NOT declare done while gates are red.');
|
|
80
|
+
|
|
81
|
+
return lines.join('\n');
|
|
82
|
+
}
|