eser 4.1.53 → 4.1.55
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/chunks/{ajan-CL22MZYV.js → ajan-HYDPJF3Z.js} +1 -1
- package/chunks/{approve-VBXGXWZI.js → approve-7QQFUQ2C.js} +1 -1
- package/chunks/{block-Z4BELXXO.js → block-4ISSYCGQ.js} +1 -1
- package/chunks/{cancel-HHW2G675.js → cancel-ZRTVX5AT.js} +1 -1
- package/chunks/{changelog-gen-JTU6WIYA.js → changelog-gen-HL2OZBDU.js} +1 -1
- package/chunks/{chunk-5QUEAV4O.js → chunk-4JICYXYK.js} +1 -1
- package/chunks/{chunk-6F4PFXYY.js → chunk-4KDDHQVL.js} +1 -1
- package/chunks/chunk-BAVRVBBX.js +2 -0
- package/chunks/{chunk-NYHMH3N5.js → chunk-DI7OHJ53.js} +1 -1
- package/chunks/{chunk-RLA2Z7XV.js → chunk-IXO5V52Y.js} +1 -1
- package/chunks/chunk-KI6473LF.js +6 -0
- package/chunks/chunk-LEG3PWOU.js +4 -0
- package/chunks/{chunk-RUTM4VP7.js → chunk-LOZLXP5G.js} +6 -6
- package/chunks/{chunk-DGI7M6TL.js → chunk-MLC6JFJF.js} +1 -1
- package/chunks/chunk-NCSKHFFW.js +3 -0
- package/chunks/chunk-PPB6ACBB.js +2 -0
- package/chunks/{concern-YFXJJ7DL.js → concern-J22UTED2.js} +1 -1
- package/chunks/{delegate-FVHPWQS7.js → delegate-EBL5HMGD.js} +1 -1
- package/chunks/{diagrams-MRJB73CF.js → diagrams-XRNON3TH.js} +1 -1
- package/chunks/done-QSQ7AMLP.js +2 -0
- package/chunks/{followup-XKVSZT2H.js → followup-EMQ3ZNNS.js} +1 -1
- package/chunks/{gh-3GMLD6TO.js → gh-66RDDALE.js} +1 -1
- package/chunks/{init-ONTNPCSY.js → init-OQ4CKFY7.js} +1 -1
- package/chunks/{invoke-hook-ZM6UQND6.js → invoke-hook-U3LDMMLY.js} +9 -9
- package/chunks/{learn-SRDLP7B5.js → learn-6MIAYVOR.js} +1 -1
- package/chunks/{manager-BMNUSWJO.js → manager-R2Q4FOHO.js} +1 -1
- package/chunks/{mod-6LLSLOX6.js → mod-FSAQBB7E.js} +1 -1
- package/chunks/mod-HZDU4RQ6.js +9 -0
- package/chunks/{mod-TB73AJG3.js → mod-ZCIGCCW4.js} +1 -1
- package/chunks/next-ZR6B35KN.js +8 -0
- package/chunks/{pack-ZQMMSIIP.js → pack-JXH34X7D.js} +1 -1
- package/chunks/{purge-LXL3F3EJ.js → purge-TQXMK5OC.js} +1 -1
- package/chunks/{release-5PXID6GL.js → release-RKXERKDT.js} +2 -2
- package/chunks/{release-tag-2B2CWVMZ.js → release-tag-WQOAE2OF.js} +1 -1
- package/chunks/{reopen-3NA6JI4N.js → reopen-KFHUPFTT.js} +1 -1
- package/chunks/{reset-XITFRWII.js → reset-F25OLGX7.js} +1 -1
- package/chunks/{review-UVYK4M4T.js → review-ITFNV2TI.js} +1 -1
- package/chunks/{rule-BAO7IP5S.js → rule-E3CUOBUX.js} +1 -1
- package/chunks/{run-EBKNNOG7.js → run-7HOUSACQ.js} +1 -1
- package/chunks/{session-SZYH2UOE.js → session-6EGZXYCI.js} +1 -1
- package/chunks/{spec-CPRKQGOX.js → spec-XFXHNULK.js} +1 -1
- package/chunks/{status-SRCNQJ4V.js → status-KEARGELM.js} +1 -1
- package/chunks/{sync-WE6A7KC7.js → sync-7FA2HPX7.js} +1 -1
- package/chunks/{system-6TO2XBOH.js → system-I6RBRBRL.js} +1 -1
- package/chunks/{versions-VGXMC5GM.js → versions-NR3A7CS5.js} +1 -1
- package/chunks/{watch-WBZB2C5P.js → watch-XTRRIRTM.js} +1 -1
- package/chunks/{web-GAF33V4M.js → web-VCJYTSV2.js} +1 -1
- package/chunks/{wontfix-JBPCNL6S.js → wontfix-SLHYAWS7.js} +1 -1
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/chunk-6WFCBJPF.js +0 -4
- package/chunks/chunk-IUORSUN6.js +0 -2
- package/chunks/chunk-NQS27P25.js +0 -6
- package/chunks/chunk-OXP2FOO5.js +0 -2
- package/chunks/chunk-UTENCUNI.js +0 -3
- package/chunks/done-DMKJ27IQ.js +0 -2
- package/chunks/mod-IALKEUJL.js +0 -9
- package/chunks/next-FD3EHJW3.js +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as e,b as s,c as o,d as l,e as r,f as a,g as t}from"./chunk-
|
|
2
|
+
import{a as e,b as s,c as o,d as l,e as r,f as a,g as t}from"./chunk-IXO5V52Y.js";import"./chunk-L5OC7F24.js";import"./chunk-J2Z7NG2X.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import"./chunk-VKB3B2FE.js";import"./chunk-MLC6JFJF.js";import"./chunk-PWLF3WXM.js";import{b as n}from"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var d=new n("system").description("Commands related with this CLI").command(new n("install").description("Install eser CLI globally").run(e)).command(new n("uninstall").description("Uninstall eser CLI globally").run(s)).command(new n("update").description("Update eser CLI to the latest version").run(o)).command(new n("completions").description("Generate shell completion scripts").flag({name:"shell",type:"string",description:"Shell type: bash, zsh, or fish"}).run(l)).command(new n("version").description("Show version and check for updates").flag({name:"bare",type:"boolean",description:"Print version number only"}).run(r)).command(new n("doctor").description("Run diagnostic checks").run(a)).command(new n("info").description("Show runtime and execution context diagnostics").run(t));export{d as systemCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-NCSKHFFW.js";import"./chunk-HTC2FO4I.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import"./chunk-PZUDTTK4.js";import"./chunk-5GGWX7CO.js";import"./chunk-VV47GXU5.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-MG65QJY6.js";import"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{e as handleCli,f as main,a as readVersionFile,b as showVersions,c as versions,d as versionsHandler};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as L,c as I}from"./chunk-2ZYCRMUT.js";import{a as O,c as F}from"./chunk-ODBJ5KMQ.js";import{A as D,B as v,d as S,k as x,l as P}from"./chunk-
|
|
2
|
+
import{a as L,c as I}from"./chunk-2ZYCRMUT.js";import{a as O,c as F}from"./chunk-ODBJ5KMQ.js";import{A as D,B as v,d as S,k as x,l as P}from"./chunk-LOZLXP5G.js";import"./chunk-2XNFZXHY.js";import{a as y,b as C}from"./chunk-FFWPJP7A.js";import{i as g}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var A=async e=>{let t=await S(e),d=await P(e),l=await W(e),s=null,c=null,u=0,a=0;if(t.spec!==null){let n=await O(e,t.spec);if(n!==null){u=n.tasks.length,a=t.execution.completedTasks.length;let f=F(n.tasks,t.execution.completedTasks);f!==null&&(s=f.id,c=f.title)}}let p=null;t.lastCalledAt!==null&&(p=Math.floor((Date.now()-new Date(t.lastCalledAt).getTime())/1e3));let r=(await x(e)).map(n=>({name:n.name,phase:n.state.phase,iteration:n.state.execution.iteration}));return{spec:t.spec,phase:t.phase,iteration:t.execution.iteration,activeTaskId:s,activeTaskTitle:c,totalTasks:u,completedTaskCount:a,lastProgress:t.execution.lastProgress,lastCalledAt:t.lastCalledAt,modifiedFiles:t.execution.modifiedFiles,debt:t.execution.debt,concerns:d?.concerns??[],maxIterations:d?.maxIterationsBeforeRestart??15,awaitingStatusReport:t.execution.awaitingStatusReport,verificationPassed:t.execution.lastVerification?.passed??null,decisionsCount:t.decisions.length,discoveryAnswered:t.discovery.answers.length,discoveryTotal:6,trackedFiles:l,timeSinceUpdate:p,allSpecs:r}},W=async e=>{let t=`${e}/.eser/.state/files-changed.jsonl`;try{let l=(await g.fs.readTextFile(t)).trim().split(`
|
|
3
3
|
`).filter(Boolean),s=[];for(let c of l)try{let u=JSON.parse(c);s.includes(u.file)||s.push(u.file)}catch{}return s}catch{return[]}},N="\x1B[2J\x1B[H",E="\x1B[1m",m="\x1B[2m",o="\x1B[0m",k="\x1B[32m",T="\x1B[33m",w="\x1B[31m",M="\x1B[36m",b=e=>{switch(e){case"COMPLETED":return k;case"BLOCKED":return w;case"EXECUTING":return M;default:return T}},R=(e,t,d)=>{if(t===0)return"\u2591".repeat(d);let l=Math.min(e/t,1),s=Math.round(l*d);return"\u2588".repeat(s)+"\u2591".repeat(d-s)},B=e=>e===null?"never":e<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:`${Math.floor(e/3600)}h ago`,U=e=>e.replace(/\x1b\[[0-9;]*m/g,""),j=(e,t)=>{let d=U(e).length;return e+" ".repeat(Math.max(0,t-d))},K=e=>{let t=[],l="\u2500".repeat(54),s=a=>`${m}\u2502${o} ${j(a,52)}${m}\u2502${o}`,c=()=>`${m}\u2502${"".padEnd(54)}\u2502${o}`;if(t.push(`${m}\u256D${l}\u256E${o}`),t.push(s(`${E}noskills watch${o}`)),t.push(c()),t.push(s(`${E}Specs:${o}`)),e.allSpecs.length>0)for(let a of e.allSpecs){let p=b(a.phase),i=a.name.slice(0,18).padEnd(18),r=`${p}${a.phase}${o}`.padEnd(a.phase.length+10);if(a.phase==="EXECUTING"||a.phase==="BLOCKED"){let n=R(e.completedTaskCount,e.totalTasks,10),f=e.totalTasks>0?Math.round(e.completedTaskCount/e.totalTasks*100):0;t.push(s(` ${i} ${r} ${n} ${e.completedTaskCount}/${e.totalTasks} (${f}%)`))}else a.phase==="COMPLETED"?t.push(s(` ${i} ${r} done`)):t.push(s(` ${i} ${r}`))}else if(e.spec!==null){let a=b(e.phase);t.push(s(` ${e.spec} ${a}${e.phase}${o}`))}else t.push(s(` ${m}No specs yet${o}`));if(t.push(c()),e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REVIEW")t.push(s(`Phase: ${b(e.phase)}${e.phase}${o} Discovery: ${e.discoveryAnswered}/${e.discoveryTotal} questions answered`));else if(e.phase==="SPEC_DRAFT")t.push(s(`Phase: ${T}${e.phase}${o} ${T}Awaiting approval${o}`));else if(e.phase==="SPEC_APPROVED")t.push(s(`Phase: ${T}${e.phase}${o} ${k}Ready to start${o}`));else if(e.phase==="EXECUTING"||e.phase==="BLOCKED"){if(e.spec!==null&&t.push(s(`${E}${e.spec}${o} (iteration ${e.iteration}):`)),e.activeTaskId!==null){let i=`${e.activeTaskId}${e.activeTaskTitle!==null?` (${e.activeTaskTitle})`:""}`;t.push(s(` Active task: ${M}${i.slice(0,36)}${o}`))}let a=R(e.completedTaskCount,e.totalTasks,12),p=e.totalTasks>0?Math.round(e.completedTaskCount/e.totalTasks*100):0;if(t.push(s(` Progress: ${k}${a} ${e.completedTaskCount}/${e.totalTasks} tasks (${p}%)${o}`)),t.push(s(` Iteration: ${e.iteration}`)),t.push(s(` Last update: ${B(e.timeSinceUpdate)}`)),e.lastProgress!==null&&t.push(s(` ${m}${e.lastProgress.slice(0,50)}${o}`)),e.phase==="BLOCKED"){let i=(e.lastProgress??"unknown").replace(/^BLOCKED:\s*/,"");t.push(s(` ${w}BLOCKED: ${i.slice(0,40)}${o}`)),t.push(s(` ${T}Human input needed${o}`))}if(e.awaitingStatusReport&&t.push(s(` ${T}Status report pending${o}`)),e.verificationPassed===!1&&t.push(s(` ${w}Verification failed${o}`)),t.push(c()),e.debt!==null&&e.debt.items.length>0){t.push(s(` Debt: ${e.debt.items.length} item(s)`));for(let i of e.debt.items.slice(0,3))t.push(s(` \u2514\u2500 ${i.text.slice(0,44)}`));e.debt.items.length>3&&t.push(s(` \u2514\u2500 ... and ${e.debt.items.length-3} more`))}if(e.trackedFiles.length>0||e.modifiedFiles.length>0){let i=e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles;t.push(s(` Files changed: ${i.length}`));for(let r of i.slice(0,5)){let n=r.length>44?"..."+r.slice(-41):r;t.push(s(` \u2514\u2500 ${n}`))}i.length>5&&t.push(s(` \u2514\u2500 ... and ${i.length-5} more`))}}else e.phase==="COMPLETED"?t.push(s(`${k}Complete!${o} ${e.iteration} iterations, ${e.decisionsCount} decisions`)):e.phase==="IDLE"&&t.push(s(`${m}No active spec \u2014 work freely${o}`));t.push(c()),e.concerns.length>0&&t.push(s(`Concerns: ${e.concerns.join(", ").slice(0,40)}`));let u=e.iteration>=e.maxIterations?`${w}RESTART RECOMMENDED${o}`:`${k}ok${o} (${e.iteration}/${e.maxIterations})`;return t.push(s(`Context: ${u}`)),t.push(`${m}\u2570${l}\u256F${o}`),t.push(` ${m}watching .eser/.state/ ... ctrl+c to stop${o}`),t.join(`
|
|
4
4
|
`)},V=e=>JSON.stringify({ts:new Date().toISOString(),phase:e.phase,spec:e.spec,iteration:e.iteration,activeTask:e.activeTaskId,tasks:{completed:e.completedTaskCount,total:e.totalTasks},progress:e.lastProgress,debt:e.debt?.items.length??0,filesChanged:e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles,timeSinceUpdate:e.timeSinceUpdate,verificationPassed:e.verificationPassed}),z=async e=>{let{root:t}=await v(),l=e!==void 0&&e.some(r=>r==="-o"||r.startsWith("--output"))?L(e):"ansi";if(!await D(t)){let r=new TextEncoder,n=g.process.stdout.getWriter();return await n.write(r.encode(`noskills not initialized.
|
|
5
5
|
`)),n.releaseLock(),C({exitCode:1})}let s=`${t}/.eser/.state`,c="",u=async()=>{let r=await A(t),n=l==="json"?V(r):l==="markdown"?I(r,"markdown"):K(r);if(l==="json"){let h=new TextEncoder,$=g.process.stdout.getWriter();await $.write(h.encode(n+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{A as l,B as a}from"./chunk-
|
|
2
|
+
import{A as l,B as a}from"./chunk-LOZLXP5G.js";import"./chunk-2XNFZXHY.js";import{a as n,b as s}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var m=async p=>{let{root:t}=await a();if(!await l(t))return console.error("noskills is not initialized. Run: noskills init"),s({exitCode:1});let r=3e3,o=!1;for(let e of p??[])e.startsWith("--port=")&&(r=parseInt(e.slice(7),10)),e==="--open"&&(o=!0);let c="@eser/noskills-web",i;try{i=(await import(c)).startServer}catch{return console.error("@eser/noskills-web is not installed. Run: deno install"),s({exitCode:1})}return await i({root:t,port:r,open:o}),n(void 0)};export{m as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P}from"./chunk-YWSOQJ7G.js";import{a as T,d as L}from"./chunk-
|
|
2
|
+
import{a as P}from"./chunk-YWSOQJ7G.js";import{a as T,d as L}from"./chunk-DI7OHJ53.js";import{h as I}from"./chunk-L32KHQVT.js";import{D as A,p as v,s as D}from"./chunk-BAVRVBBX.js";import{B as C,c as g,e as x,g as E,h as k,j as y}from"./chunk-LOZLXP5G.js";import"./chunk-2XNFZXHY.js";import{f as w,h,k as S}from"./chunk-SHN5MT56.js";import{d as f,f as n,g as u}from"./chunk-YVN2NZL4.js";import{a as m,b as i}from"./chunk-FFWPJP7A.js";import{i as d}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var z=async c=>{let e=w({renderer:S.ansi(),sink:h.stdout()}),{root:r}=await C(),p=E(c);if(!p.ok)return e.writeln(n(p.error)),await e.close(),i({exitCode:1});let o=(c??[]).filter(a=>!a.startsWith("--spec=")).join(" ");if(o.length===0)return e.writeln(n('A reason is required: noskills wontfix "reason text"')),await e.close(),i({exitCode:1});let t;try{t=await x(r,p.spec)}catch(a){let $=a instanceof Error?a.message:String(a);return e.writeln(n($)),await e.close(),i({exitCode:1})}if(t.phase==="IDLE"||t.phase==="UNINITIALIZED"||t.phase==="COMPLETED")return e.writeln(n(`Cannot mark as won't fix in phase: ${t.phase}`)),await e.close(),i({exitCode:1});if(t.spec!==null){let a=`${r}/${g.specDir(t.spec)}`;try{await d.fs.stat(a)}catch{return e.writeln(n(`Active spec '${t.spec}' directory not found.`)),e.writeln(f("Run `noskills reset` to return to idle.")),await e.close(),i({exitCode:1})}}let l=await I(r),s=v(t,"wontfix",o);s=D(s,t.phase,"COMPLETED",l,o),s.spec!==null&&await y(r,s.spec,s);let U=A(s);return await k(r,U),s.spec!==null&&(await T(r,s.spec,"wontfix"),await L(r,s.spec,"wontfix")),await P(r,{ts:new Date().toISOString(),type:"phase-change",spec:t.spec??"unknown",user:l.name,from:t.phase,to:"COMPLETED",reason:"wontfix"}),e.writeln(u("\u2714"),` Spec marked as won't fix: ${o}`),await e.close(),m(void 0)};export{z as main};
|
package/eser.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
3
|
-
import{a as u}from"./chunks/chunk-DGI7M6TL.js";import{a as m}from"./chunks/chunk-PBZV2KA3.js";import"./chunks/chunk-PWLF3WXM.js";import{a as o}from"./chunks/chunk-NMEPQK3T.js";import{b as a}from"./chunks/chunk-RNFCAHVL.js";import"./chunks/chunk-MG65QJY6.js";import{b as d,e as c}from"./chunks/chunk-FFWPJP7A.js";import{i as p}from"./chunks/chunk-6DBKPC2O.js";import"./chunks/chunk-ALFFE37K.js";import"./chunks/chunk-6G6UVWJN.js";import"./chunks/chunk-5WJ6AUNY.js";var g=new o({description:"Kit \u2014 recipes, templates, project creation",modules:{add:{description:"Add a recipe to your project",category:"Distribution",load:()=>import("./chunks/add-HBUORTI5.js")},list:{description:"Browse available recipes and templates",category:"Distribution",load:()=>import("./chunks/list-M5DGQG46.js")},new:{description:"Create a new project from a template",category:"Distribution",load:()=>import("./chunks/new-SS67ZKMK.js")},clone:{description:"Clone a recipe from any GitHub repo",category:"Distribution",load:()=>import("./chunks/clone-455UAECS.js")},update:{description:"Re-fetch and update an applied recipe",category:"Distribution",load:()=>import("./chunks/update-VLYRDEH4.js")}},aliases:{create:"new"}});var f=new o({description:"Codebase management tools",modules:{scaffolding:{description:"Initialize project from template",category:"Setup",load:()=>import("./chunks/mod-DESWHMN6.js")},install:{description:"Install git hooks from .eser/manifest.yml",category:"Setup",load:()=>import("./chunks/install-USGLFPAU.js")},uninstall:{description:"Remove managed git hooks",category:"Setup",load:async()=>({main:(await import("./chunks/install-USGLFPAU.js")).uninstallMain})},status:{description:"Show git hook installation status",category:"Setup",load:async()=>({main:(await import("./chunks/install-USGLFPAU.js")).statusMain})},commitmsg:{description:"Generate commit message from git diff",category:"AI",load:()=>import("./chunks/commitmsg-BRWGZ26L.js")},gh:{description:"GitHub operations (contributors, releases, tags)",category:"GitHub",load:()=>import("./chunks/gh-3GMLD6TO.js")},versions:{description:"Manage workspace package versions",category:"Release",load:()=>import("./chunks/versions-VGXMC5GM.js")},"changelog-gen":{description:"Generate CHANGELOG from commits",category:"Release",load:()=>import("./chunks/changelog-gen-JTU6WIYA.js")},release:{description:"Create a release (bump, changelog, commit, push)",category:"Release",load:()=>import("./chunks/release-5PXID6GL.js")},rerelease:{description:"Delete and recreate the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-5PXID6GL.js")).rereleaseMain})},unrelease:{description:"Delete the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-5PXID6GL.js")).unreleaseMain})},"validate-eof":{description:"Ensure files end with newline",category:"Validation",load:()=>import("./chunks/validate-eof-UYQI6DYK.js")},"validate-trailing-whitespace":{description:"Remove trailing whitespace",category:"Validation",load:()=>import("./chunks/validate-trailing-whitespace-PDAFNVPQ.js")},"validate-bom":{description:"Remove UTF-8 byte order markers",category:"Validation",load:()=>import("./chunks/validate-bom-YFYXM4ND.js")},"validate-line-endings":{description:"Normalize line endings to LF",category:"Validation",load:()=>import("./chunks/validate-line-endings-KMXN5IUT.js")},"validate-large-files":{description:"Detect files exceeding size limit",category:"Validation",load:()=>import("./chunks/validate-large-files-JKQBKNS4.js")},"validate-case-conflict":{description:"Detect case-conflicting filenames",category:"Validation",load:()=>import("./chunks/validate-case-conflict-E7LKQYVM.js")},"validate-merge-conflict":{description:"Detect merge conflict markers",category:"Validation",load:()=>import("./chunks/validate-merge-conflict-N7M4OVXI.js")},"validate-json":{description:"Validate JSON syntax",category:"Validation",load:()=>import("./chunks/validate-json-2JS2Y4YU.js")},"validate-toml":{description:"Validate TOML syntax",category:"Validation",load:()=>import("./chunks/validate-toml-NGF5Q27B.js")},"validate-yaml":{description:"Validate YAML syntax",category:"Validation",load:()=>import("./chunks/validate-yaml-ILJZJGDG.js")},"validate-symlinks":{description:"Detect broken symlinks",category:"Validation",load:()=>import("./chunks/validate-symlinks-PDLYFPNE.js")},"validate-shebangs":{description:"Validate shebang consistency",category:"Validation",load:()=>import("./chunks/validate-shebangs-JACZB7C3.js")},"validate-secrets":{description:"Detect credentials and private keys",category:"Validation",load:()=>import("./chunks/validate-secrets-3PW5GJZD.js")},"validate-filenames":{description:"Enforce filename conventions",category:"Validation",load:()=>import("./chunks/validate-filenames-Z6VSIR2C.js")},"validate-submodules":{description:"Detect git submodules",category:"Validation",load:()=>import("./chunks/validate-submodules-SCY4LARV.js")},"validate-commit-msg":{description:"Validate conventional commit format",category:"Validation",load:()=>import("./chunks/validate-commit-msg-2JQ2W6Y6.js")},"validate-docs":{description:"Validate JSDoc documentation",category:"Validation",load:()=>import("./chunks/validate-docs-EXDICKDK.js")},"validate-circular-deps":{description:"Detect circular dependencies",category:"Validation",load:()=>import("./chunks/validate-circular-deps-L4MDRIG3.js")},"validate-export-names":{description:"Validate export naming conventions",category:"Validation",load:()=>import("./chunks/validate-export-names-QBYWTK5Q.js")},"validate-licenses":{description:"Validate license headers",category:"Validation",load:()=>import("./chunks/validate-licenses-7MVLVDZA.js")},"validate-mod-exports":{description:"Validate mod.ts export coverage",category:"Validation",load:()=>import("./chunks/validate-mod-exports-C7WDH4FK.js")},"validate-package-configs":{description:"Validate package configurations",category:"Validation",load:()=>import("./chunks/validate-package-configs-AYVT55GJ.js")}},aliases:{init:"scaffolding"}});var l=e=>new o({description:"Workflow engine \u2014 run tool pipelines",modules:{run:{description:"Run workflows by event or id",load:async()=>{let t=await import("./chunks/run-IMXYUDHS.js");return{main:r=>t.main(r,{tools:e??[]})}}},list:{description:"List available workflows and tools",load:async()=>{let t=await import("./chunks/list-RI4IF5TD.js");return{main:r=>t.main(r,{tools:e??[]})}}}}}),R=l();var y=new o({description:"noskills \u2014 state-machine orchestrator for AI agents",modules:{init:{description:"Initialize noskills in project",load:()=>import("./chunks/init-ONTNPCSY.js")},status:{description:"Show current state",load:()=>import("./chunks/status-SRCNQJ4V.js")},spec:{description:"Manage specs (new, list)",load:()=>import("./chunks/spec-CPRKQGOX.js")},next:{description:"Get next instruction for agent",load:()=>import("./chunks/next-FD3EHJW3.js")},approve:{description:"Approve phase transition",load:()=>import("./chunks/approve-VBXGXWZI.js")},block:{description:"Mark spec as blocked",load:()=>import("./chunks/block-Z4BELXXO.js")},reset:{description:"Reset current spec state",load:()=>import("./chunks/reset-XITFRWII.js")},done:{description:"Mark spec execution as complete",load:()=>import("./chunks/done-DMKJ27IQ.js")},free:{description:"Show idle mode info (noskills starts permissive by default)",load:()=>import("./chunks/free-IPJPYOJS.js")},cancel:{description:"Cancel current spec",load:()=>import("./chunks/cancel-HHW2G675.js")},wontfix:{description:"Mark spec as won't fix (requires reason)",load:()=>import("./chunks/wontfix-JBPCNL6S.js")},reopen:{description:"Reopen a completed spec for revision",load:()=>import("./chunks/reopen-3NA6JI4N.js")},concern:{description:"Manage concerns (add, remove, list)",load:()=>import("./chunks/concern-YFXJJ7DL.js")},run:{description:"Autonomous execution loop (Ralph loop)",load:()=>import("./chunks/run-EBKNNOG7.js")},watch:{description:"Live dashboard for monitoring agent progress",load:()=>import("./chunks/watch-WBZB2C5P.js")},web:{description:"Start web interface (browser dashboard)",load:()=>import("./chunks/web-GAF33V4M.js")},sync:{description:"Regenerate tool-specific files (redirects to init)",load:()=>import("./chunks/sync-WE6A7KC7.js")},learn:{description:"Manage cross-session learnings (list, remove)",load:()=>import("./chunks/learn-SRDLP7B5.js")},diagrams:{description:"Diagram registry and staleness checks (scan, list, check, verify)",load:()=>import("./chunks/diagrams-MRJB73CF.js")},purge:{description:"Remove all noskills content (specs, rules, concerns, hooks)",load:()=>import("./chunks/purge-LXL3F3EJ.js")},"invoke-hook":{description:"Internal hook handlers (called by agents)",load:()=>import("./chunks/invoke-hook-ZM6UQND6.js")},rule:{description:"Manage rules (add, list, promote)",load:()=>import("./chunks/rule-BAO7IP5S.js")},config:{description:"Manage configuration (set-user, get-user, clear-user)",load:()=>import("./chunks/config-O3OOS5BQ.js")},pack:{description:"Manage packs (list, install, uninstall, inspect, search)",load:()=>import("./chunks/pack-ZQMMSIIP.js")},session:{description:"Manage sessions for multi-instance support",load:()=>import("./chunks/session-SZYH2UOE.js")},manager:{description:"Multi-spec TUI with tab management",load:()=>import("./chunks/manager-BMNUSWJO.js")},mgr:{description:"Alias for manager",load:()=>import("./chunks/manager-BMNUSWJO.js")}}});var w=new o({description:"laroux.js framework commands",modules:{init:{description:"Create a new laroux.js project",load:()=>import("./chunks/init-BZ6B74SY.js"),flags:[{name:"template",short:"t",type:"string",description:"Project template (minimal, blog, dashboard, docs)",default:"minimal"},{name:"force",short:"f",type:"boolean",description:"Overwrite existing files"},{name:"no-git",type:"boolean",description:"Skip git initialization"},{name:"no-install",type:"boolean",description:"Skip dependency installation"}]},dev:{description:"Start development server with hot reload",load:()=>import("./chunks/dev-UV7J3QTQ.js"),flags:[{name:"port",short:"p",type:"number",description:"Server port",default:8e3},{name:"no-hmr",type:"boolean",description:"Disable hot module replacement"},{name:"log-level",type:"string",description:"Log level (debug, info, warn, error)",default:"info"},{name:"open",short:"o",type:"boolean",description:"Open browser automatically"}]},build:{description:"Build for production",load:()=>import("./chunks/build-4WTOXDXD.js"),flags:[{name:"out-dir",type:"string",description:"Output directory",default:"dist"},{name:"clean",type:"boolean",description:"Clean output directory first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",description:"Log level (debug, info, warn, error)",default:"info"}]},serve:{description:"Serve production build locally",load:()=>import("./chunks/serve-T5HR56BZ.js"),flags:[{name:"port",short:"p",type:"number",description:"Server port",default:8e3},{name:"log-level",type:"string",description:"Log level (debug, info, warn, error)",default:"info"}]}}});var i=new o({description:"Terminal client for Eser's work"});i.addSubmodule({name:"ai"},m);i.addSubmodule({name:"kit"},g);i.addSubmodule({name:"codebase",aliases:["cb","."]},f);await i.addSubmoduleAsync({name:"workflows",aliases:["wf"]},(async()=>{let{getWorkflowTools:e}=await import("./chunks/mod-MKKBIIC4.js");return l(e())})());i.addSubmodule({name:"noskills",aliases:["nos"]},y);i.addSubmodule({name:"laroux"},w);var k=i.toCommand("eser",u.version).lazyCommand("system",{description:"Commands related with this CLI",load:async()=>(await import("./chunks/system-6TO2XBOH.js")).systemCommand}).lazyCommand("install",{description:"Install eser CLI globally (alias for system install)",load:async()=>{let e=await import("./chunks/mod-6LLSLOX6.js");return new a("install").run(e.installHandler)}}).lazyCommand("update",{description:"Update eser CLI to latest version (alias for system update)",load:async()=>{let e=await import("./chunks/mod-6LLSLOX6.js");return new a("update").run(e.updateHandler)}}).lazyCommand("version",{description:"Show version number",load:async()=>{let e=await import("./chunks/mod-6LLSLOX6.js");return new a("version").flag({name:"bare",type:"boolean",description:"Print raw version only"}).run(e.versionHandler)}}).lazyCommand("doctor",{description:"Run diagnostic checks",load:async()=>{let e=await import("./chunks/mod-6LLSLOX6.js");return new a("doctor").run(e.doctorHandler)}}).lazyCommand("ajan",{description:"Ajan native bridge commands",load:async()=>(await import("./chunks/ajan-CL22MZYV.js")).ajanCommand}).fallback(async(e,t)=>{let n=(await(await import("./chunks/manifest-3GT2RMQL.js")).loadManifest("."))?.scripts;if(n!=null&&typeof n=="object"){let s=n;if(e in s){let b=s[e],{runScript:v}=await import("./chunks/scripts-XTXYY5MJ.js");return await v(e,b,s,t)}}return console.error(`Unknown subcommand "${e}"`),d({exitCode:1})}),h=async()=>await k.parse();if(import.meta.main){let e=await h();c(e,{ok:()=>{},fail:t=>{t.message!==void 0&&console.error(t.message),p.process.setExitCode(t.exitCode)}})}export{h as main};
|
|
3
|
+
import{a as u}from"./chunks/chunk-MLC6JFJF.js";import{a as m}from"./chunks/chunk-PBZV2KA3.js";import"./chunks/chunk-PWLF3WXM.js";import{a as o}from"./chunks/chunk-NMEPQK3T.js";import{b as a}from"./chunks/chunk-RNFCAHVL.js";import"./chunks/chunk-MG65QJY6.js";import{b as d,e as c}from"./chunks/chunk-FFWPJP7A.js";import{i as p}from"./chunks/chunk-6DBKPC2O.js";import"./chunks/chunk-ALFFE37K.js";import"./chunks/chunk-6G6UVWJN.js";import"./chunks/chunk-5WJ6AUNY.js";var g=new o({description:"Kit \u2014 recipes, templates, project creation",modules:{add:{description:"Add a recipe to your project",category:"Distribution",load:()=>import("./chunks/add-HBUORTI5.js")},list:{description:"Browse available recipes and templates",category:"Distribution",load:()=>import("./chunks/list-M5DGQG46.js")},new:{description:"Create a new project from a template",category:"Distribution",load:()=>import("./chunks/new-SS67ZKMK.js")},clone:{description:"Clone a recipe from any GitHub repo",category:"Distribution",load:()=>import("./chunks/clone-455UAECS.js")},update:{description:"Re-fetch and update an applied recipe",category:"Distribution",load:()=>import("./chunks/update-VLYRDEH4.js")}},aliases:{create:"new"}});var f=new o({description:"Codebase management tools",modules:{scaffolding:{description:"Initialize project from template",category:"Setup",load:()=>import("./chunks/mod-DESWHMN6.js")},install:{description:"Install git hooks from .eser/manifest.yml",category:"Setup",load:()=>import("./chunks/install-USGLFPAU.js")},uninstall:{description:"Remove managed git hooks",category:"Setup",load:async()=>({main:(await import("./chunks/install-USGLFPAU.js")).uninstallMain})},status:{description:"Show git hook installation status",category:"Setup",load:async()=>({main:(await import("./chunks/install-USGLFPAU.js")).statusMain})},commitmsg:{description:"Generate commit message from git diff",category:"AI",load:()=>import("./chunks/commitmsg-BRWGZ26L.js")},gh:{description:"GitHub operations (contributors, releases, tags)",category:"GitHub",load:()=>import("./chunks/gh-66RDDALE.js")},versions:{description:"Manage workspace package versions",category:"Release",load:()=>import("./chunks/versions-NR3A7CS5.js")},"changelog-gen":{description:"Generate CHANGELOG from commits",category:"Release",load:()=>import("./chunks/changelog-gen-HL2OZBDU.js")},release:{description:"Create a release (bump, changelog, commit, push)",category:"Release",load:()=>import("./chunks/release-RKXERKDT.js")},rerelease:{description:"Delete and recreate the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-RKXERKDT.js")).rereleaseMain})},unrelease:{description:"Delete the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-RKXERKDT.js")).unreleaseMain})},"validate-eof":{description:"Ensure files end with newline",category:"Validation",load:()=>import("./chunks/validate-eof-UYQI6DYK.js")},"validate-trailing-whitespace":{description:"Remove trailing whitespace",category:"Validation",load:()=>import("./chunks/validate-trailing-whitespace-PDAFNVPQ.js")},"validate-bom":{description:"Remove UTF-8 byte order markers",category:"Validation",load:()=>import("./chunks/validate-bom-YFYXM4ND.js")},"validate-line-endings":{description:"Normalize line endings to LF",category:"Validation",load:()=>import("./chunks/validate-line-endings-KMXN5IUT.js")},"validate-large-files":{description:"Detect files exceeding size limit",category:"Validation",load:()=>import("./chunks/validate-large-files-JKQBKNS4.js")},"validate-case-conflict":{description:"Detect case-conflicting filenames",category:"Validation",load:()=>import("./chunks/validate-case-conflict-E7LKQYVM.js")},"validate-merge-conflict":{description:"Detect merge conflict markers",category:"Validation",load:()=>import("./chunks/validate-merge-conflict-N7M4OVXI.js")},"validate-json":{description:"Validate JSON syntax",category:"Validation",load:()=>import("./chunks/validate-json-2JS2Y4YU.js")},"validate-toml":{description:"Validate TOML syntax",category:"Validation",load:()=>import("./chunks/validate-toml-NGF5Q27B.js")},"validate-yaml":{description:"Validate YAML syntax",category:"Validation",load:()=>import("./chunks/validate-yaml-ILJZJGDG.js")},"validate-symlinks":{description:"Detect broken symlinks",category:"Validation",load:()=>import("./chunks/validate-symlinks-PDLYFPNE.js")},"validate-shebangs":{description:"Validate shebang consistency",category:"Validation",load:()=>import("./chunks/validate-shebangs-JACZB7C3.js")},"validate-secrets":{description:"Detect credentials and private keys",category:"Validation",load:()=>import("./chunks/validate-secrets-3PW5GJZD.js")},"validate-filenames":{description:"Enforce filename conventions",category:"Validation",load:()=>import("./chunks/validate-filenames-Z6VSIR2C.js")},"validate-submodules":{description:"Detect git submodules",category:"Validation",load:()=>import("./chunks/validate-submodules-SCY4LARV.js")},"validate-commit-msg":{description:"Validate conventional commit format",category:"Validation",load:()=>import("./chunks/validate-commit-msg-2JQ2W6Y6.js")},"validate-docs":{description:"Validate JSDoc documentation",category:"Validation",load:()=>import("./chunks/validate-docs-EXDICKDK.js")},"validate-circular-deps":{description:"Detect circular dependencies",category:"Validation",load:()=>import("./chunks/validate-circular-deps-L4MDRIG3.js")},"validate-export-names":{description:"Validate export naming conventions",category:"Validation",load:()=>import("./chunks/validate-export-names-QBYWTK5Q.js")},"validate-licenses":{description:"Validate license headers",category:"Validation",load:()=>import("./chunks/validate-licenses-7MVLVDZA.js")},"validate-mod-exports":{description:"Validate mod.ts export coverage",category:"Validation",load:()=>import("./chunks/validate-mod-exports-C7WDH4FK.js")},"validate-package-configs":{description:"Validate package configurations",category:"Validation",load:()=>import("./chunks/validate-package-configs-AYVT55GJ.js")}},aliases:{init:"scaffolding"}});var l=e=>new o({description:"Workflow engine \u2014 run tool pipelines",modules:{run:{description:"Run workflows by event or id",load:async()=>{let t=await import("./chunks/run-IMXYUDHS.js");return{main:r=>t.main(r,{tools:e??[]})}}},list:{description:"List available workflows and tools",load:async()=>{let t=await import("./chunks/list-RI4IF5TD.js");return{main:r=>t.main(r,{tools:e??[]})}}}}}),R=l();var y=new o({description:"noskills \u2014 state-machine orchestrator for AI agents",modules:{init:{description:"Initialize noskills in project",load:()=>import("./chunks/init-OQ4CKFY7.js")},status:{description:"Show current state",load:()=>import("./chunks/status-KEARGELM.js")},spec:{description:"Manage specs (new, list)",load:()=>import("./chunks/spec-XFXHNULK.js")},next:{description:"Get next instruction for agent",load:()=>import("./chunks/next-ZR6B35KN.js")},approve:{description:"Approve phase transition",load:()=>import("./chunks/approve-7QQFUQ2C.js")},block:{description:"Mark spec as blocked",load:()=>import("./chunks/block-4ISSYCGQ.js")},reset:{description:"Reset current spec state",load:()=>import("./chunks/reset-F25OLGX7.js")},done:{description:"Mark spec execution as complete",load:()=>import("./chunks/done-QSQ7AMLP.js")},free:{description:"Show idle mode info (noskills starts permissive by default)",load:()=>import("./chunks/free-IPJPYOJS.js")},cancel:{description:"Cancel current spec",load:()=>import("./chunks/cancel-ZRTVX5AT.js")},wontfix:{description:"Mark spec as won't fix (requires reason)",load:()=>import("./chunks/wontfix-SLHYAWS7.js")},reopen:{description:"Reopen a completed spec for revision",load:()=>import("./chunks/reopen-KFHUPFTT.js")},concern:{description:"Manage concerns (add, remove, list)",load:()=>import("./chunks/concern-J22UTED2.js")},run:{description:"Autonomous execution loop (Ralph loop)",load:()=>import("./chunks/run-7HOUSACQ.js")},watch:{description:"Live dashboard for monitoring agent progress",load:()=>import("./chunks/watch-XTRRIRTM.js")},web:{description:"Start web interface (browser dashboard)",load:()=>import("./chunks/web-VCJYTSV2.js")},sync:{description:"Regenerate tool-specific files (redirects to init)",load:()=>import("./chunks/sync-7FA2HPX7.js")},learn:{description:"Manage cross-session learnings (list, remove)",load:()=>import("./chunks/learn-6MIAYVOR.js")},diagrams:{description:"Diagram registry and staleness checks (scan, list, check, verify)",load:()=>import("./chunks/diagrams-XRNON3TH.js")},purge:{description:"Remove all noskills content (specs, rules, concerns, hooks)",load:()=>import("./chunks/purge-TQXMK5OC.js")},"invoke-hook":{description:"Internal hook handlers (called by agents)",load:()=>import("./chunks/invoke-hook-U3LDMMLY.js")},rule:{description:"Manage rules (add, list, promote)",load:()=>import("./chunks/rule-E3CUOBUX.js")},config:{description:"Manage configuration (set-user, get-user, clear-user)",load:()=>import("./chunks/config-O3OOS5BQ.js")},pack:{description:"Manage packs (list, install, uninstall, inspect, search)",load:()=>import("./chunks/pack-JXH34X7D.js")},session:{description:"Manage sessions for multi-instance support",load:()=>import("./chunks/session-6EGZXYCI.js")},manager:{description:"Multi-spec TUI with tab management",load:()=>import("./chunks/manager-R2Q4FOHO.js")},mgr:{description:"Alias for manager",load:()=>import("./chunks/manager-R2Q4FOHO.js")}}});var w=new o({description:"laroux.js framework commands",modules:{init:{description:"Create a new laroux.js project",load:()=>import("./chunks/init-BZ6B74SY.js"),flags:[{name:"template",short:"t",type:"string",description:"Project template (minimal, blog, dashboard, docs)",default:"minimal"},{name:"force",short:"f",type:"boolean",description:"Overwrite existing files"},{name:"no-git",type:"boolean",description:"Skip git initialization"},{name:"no-install",type:"boolean",description:"Skip dependency installation"}]},dev:{description:"Start development server with hot reload",load:()=>import("./chunks/dev-UV7J3QTQ.js"),flags:[{name:"port",short:"p",type:"number",description:"Server port",default:8e3},{name:"no-hmr",type:"boolean",description:"Disable hot module replacement"},{name:"log-level",type:"string",description:"Log level (debug, info, warn, error)",default:"info"},{name:"open",short:"o",type:"boolean",description:"Open browser automatically"}]},build:{description:"Build for production",load:()=>import("./chunks/build-4WTOXDXD.js"),flags:[{name:"out-dir",type:"string",description:"Output directory",default:"dist"},{name:"clean",type:"boolean",description:"Clean output directory first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",description:"Log level (debug, info, warn, error)",default:"info"}]},serve:{description:"Serve production build locally",load:()=>import("./chunks/serve-T5HR56BZ.js"),flags:[{name:"port",short:"p",type:"number",description:"Server port",default:8e3},{name:"log-level",type:"string",description:"Log level (debug, info, warn, error)",default:"info"}]}}});var i=new o({description:"Terminal client for Eser's work"});i.addSubmodule({name:"ai"},m);i.addSubmodule({name:"kit"},g);i.addSubmodule({name:"codebase",aliases:["cb","."]},f);await i.addSubmoduleAsync({name:"workflows",aliases:["wf"]},(async()=>{let{getWorkflowTools:e}=await import("./chunks/mod-MKKBIIC4.js");return l(e())})());i.addSubmodule({name:"noskills",aliases:["nos"]},y);i.addSubmodule({name:"laroux"},w);var k=i.toCommand("eser",u.version).lazyCommand("system",{description:"Commands related with this CLI",load:async()=>(await import("./chunks/system-I6RBRBRL.js")).systemCommand}).lazyCommand("install",{description:"Install eser CLI globally (alias for system install)",load:async()=>{let e=await import("./chunks/mod-FSAQBB7E.js");return new a("install").run(e.installHandler)}}).lazyCommand("update",{description:"Update eser CLI to latest version (alias for system update)",load:async()=>{let e=await import("./chunks/mod-FSAQBB7E.js");return new a("update").run(e.updateHandler)}}).lazyCommand("version",{description:"Show version number",load:async()=>{let e=await import("./chunks/mod-FSAQBB7E.js");return new a("version").flag({name:"bare",type:"boolean",description:"Print raw version only"}).run(e.versionHandler)}}).lazyCommand("doctor",{description:"Run diagnostic checks",load:async()=>{let e=await import("./chunks/mod-FSAQBB7E.js");return new a("doctor").run(e.doctorHandler)}}).lazyCommand("ajan",{description:"Ajan native bridge commands",load:async()=>(await import("./chunks/ajan-HYDPJF3Z.js")).ajanCommand}).fallback(async(e,t)=>{let n=(await(await import("./chunks/manifest-3GT2RMQL.js")).loadManifest("."))?.scripts;if(n!=null&&typeof n=="object"){let s=n;if(e in s){let b=s[e],{runScript:v}=await import("./chunks/scripts-XTXYY5MJ.js");return await v(e,b,s,t)}}return console.error(`Unknown subcommand "${e}"`),d({exitCode:1})}),h=async()=>await k.parse();if(import.meta.main){let e=await h();c(e,{ok:()=>{},fail:t=>{t.message!==void 0&&console.error(t.message),p.process.setExitCode(t.exitCode)}})}export{h as main};
|
package/package.json
CHANGED
package/chunks/chunk-6WFCBJPF.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as y}from"./chunk-ODBJ5KMQ.js";import{c as d}from"./chunk-RUTM4VP7.js";import{i as h}from"./chunk-6DBKPC2O.js";var S=p=>{let n=p.split(/\n/).flatMap(t=>t.trim().length>0?[t.trim()]:[]);return n.length>1?n:p.split(/\.(?=\s+[A-Z])|;\s+/).map(t=>t.trim()).filter(t=>t.length>5)},A=(p,n=[])=>{let t=[],c=p.find(r=>r.questionId==="ambition");if(c!==void 0){let r=c.answer,a=r.match(/10[- ]?star[:\s]+(.+?)(?:\n|$)/is),l=r.match(/5[- ]?star[:\s]+(.+?)(?:\n|$)/is),o=(a!==null?a[1].trim():l!==null?l[1].trim():r.replace(/1[- ]?star[:\s]+[^.]*\.\s*/i,"").trim()).replace(/^(the|a|an|with|plus|also)\s+/i,"").replace(/^(the\s+)?(target|goal|objective)[:\s]+/i,"").trim();o.length>0&&(o=o.charAt(0).toUpperCase()+o.slice(1)),o=o.replace(/[.\u2026]+$/,"").trim(),o.length>140&&(o=o.slice(0,137)+"..."),o.length>3&&t.push(o)}let i=p.find(r=>r.questionId==="verification");if(i!==void 0){let r=i.answer.split(/\n/).map(a=>a.replace(/^\s*[-\u2022*]\s*/,"").trim()).filter(a=>a.length>0);for(let a of r)t.push(a)}for(let r of n){let a=r.choice.toLowerCase();if(a.includes("accepted")||a.includes("add to scope")){let l=r.question.replace(/^should\s+(we|i)\s+/i,"").replace(/\?+$/,"").trim(),e=l.charAt(0).toUpperCase()+l.slice(1);t.push(e)}}return t.length===0&&t.push("_Tasks need to be defined before execution. Add tasks manually or run discovery with more detail._"),t.push("Write or update tests for all new and changed behavior"),t.push("Update documentation for all public-facing changes (README, API docs, CHANGELOG)"),t},C=(p,n)=>{let t={};if(n===null){for(let c of p.specSections)t[c]=!1;return t}for(let c of p.specSections){let i=c.toLowerCase();i.includes("design")||i.includes("mobile")||i.includes("layout")||i.includes("interaction")?t[c]=n.involvesWebUI:i.includes("contributor")||i.includes("public api")||i.includes("api surface")?t[c]=n.involvesPublicAPI:i.includes("migration")||i.includes("deprecation")||i.includes("backward")||i.includes("compatibility")?t[c]=n.involvesMigration:i.includes("audit")||i.includes("access control")||i.includes("data handling")?t[c]=n.involvesDataHandling:t[c]=!0}return t},b=(p,n,t,c,i,r,a,l)=>{let e=[];e.push(`# Spec: ${p}`),e.push(""),e.push("## Status: draft"),e.push(""),t.length>0&&(e.push(`## Concerns: ${t.map(s=>s.id).join(", ")}`),e.push("")),e.push("## Discovery Answers"),e.push("");for(let s of n){if(e.push(`### ${s.questionId}`),e.push(""),e.push(s.answer),"user"in s&&s.user!=="Unknown User"){let u=s;e.push(""),e.push(`_-- ${u.user}_`)}e.push("")}for(let s of t)if(s.specSections.length>0){let u=C(s,i??null);for(let w of s.specSections)u[w]!==!1&&(e.push(`## ${w} (${s.id})`),e.push(""),e.push("_To be addressed during execution._"),e.push(""))}if(c.length>0){e.push("## Decisions"),e.push(""),e.push("| # | Decision | Choice | Promoted |"),e.push("|---|----------|--------|----------|");for(let s=0;s<c.length;s++){let u=c[s];e.push(`| ${s+1} | ${u.question} | ${u.choice} | ${u.promoted?"yes":"no"} |`)}e.push("")}let o=n.find(s=>s.questionId==="scope_boundary");if(o!==void 0){e.push("## Out of Scope"),e.push("");let s=S(o.answer);for(let u of s)e.push(`- ${u}`);e.push("")}let f=A(n,c);e.push("## Tasks"),e.push("");for(let s=0;s<f.length;s++)e.push(`- [ ] task-${s+1}: ${f[s]}`);e.push("");let m=n.find(s=>s.questionId==="verification");if(e.push("## Verification"),e.push(""),m!==void 0){let s=S(m.answer);for(let u of s)e.push(`- ${u}`)}else e.push("_To be defined._");e.push("");let g=r??[];if(g.length>0){e.push("## Custom Acceptance Criteria"),e.push("");for(let s of g)e.push(`- ${s.text} _-- ${s.user}, ${s.addedInPhase}_`);e.push("")}let $=(a??[]).filter(s=>!s.text.startsWith("[TASK] "));if($.length>0){e.push("## Notes"),e.push("");for(let s of $)e.push(`- ${s.text} _-- ${s.user}, ${s.phase}_`);e.push("")}let v=l??[];if(v.length>0){e.push("## Transition History"),e.push(""),e.push("| From | To | User | Timestamp | Reason |"),e.push("|------|----|------|-----------|--------|");for(let s of v)e.push(`| ${s.from} | ${s.to} | ${s.user} | ${s.timestamp} | ${s.reason??"-"} |`);e.push("")}return e.join(`
|
|
3
|
-
`)};var _=async(p,n,t)=>{if(n.spec===null)throw new Error("No active spec");let c=`${p}/${d.specDir(n.spec)}`,i=`${p}/${d.specFile(n.spec)}`;await h.fs.mkdir(c,{recursive:!0});let r=b(n.spec,n.discovery.answers,t,n.decisions,n.classification,n.customACs,n.specNotes,n.transitionHistory);await h.fs.writeTextFile(i,r);let a=y(n.spec,r),l=`${c}/progress.json`,e={spec:n.spec,status:"draft",tasks:a.tasks.map(o=>({id:o.id,title:o.title,status:"pending"})),decisions:n.decisions.map(o=>({question:o.question,choice:o.choice,promoted:o.promoted})),debt:[],updatedAt:new Date().toISOString()};return await h.fs.writeTextFile(l,JSON.stringify(e,null,2)+`
|
|
4
|
-
`),i};export{_ as a};
|
package/chunks/chunk-IUORSUN6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
var l={id:"open-source",name:"Open Source",description:"Community-driven, inclusive, well-documented. Prioritize contributor experience, avoid exclusionary patterns, default to permissive choices.",extras:[{questionId:"status_quo",text:"Is this workaround common in the community?"},{questionId:"user_impact",text:"Does this make contribution harder?"}],specSections:["Contributor Guide","Public API Surface"],reminders:["Endpoint should be documented in API docs","Consider contributor experience for new patterns","Default to permissive, well-documented choices","New features and API changes must be documented so contributors can discover and use them"],acceptanceCriteria:["Public API documented","Changes reflected in README or relevant docs","No exclusionary patterns introduced"]};var u={id:"beautiful-product",name:"Beautiful Product",description:"Design and UX are first-class. Agent critiques UI/UX like a passionate designer. Empty states, error states, loading states, mobile layout \u2014 nothing ships unspecified.",extras:[{questionId:"status_quo",text:"How painful is the current experience?"},{questionId:"status_quo",text:"What does the current UI look like? Rate it 0-10 on design intentionality."},{questionId:"ambition",text:"In the 10-star version, what does the user feel?"},{questionId:"ambition",text:"What would a 10/10 design look like for this feature? Describe the emotional response you want from users."},{questionId:"ambition",text:"What makes this UI NOT look AI-generated? Name specific design decisions that differentiate it from generic templates."},{questionId:"verification",text:"How will you verify design quality? Will you review empty states, loading states, error states, and edge cases (long text, zero results, slow connection)?"}],specSections:["Design States (empty, loading, error, success)","Mobile Layout","Interaction Design"],reminders:["Loading state and error state must be designed, not placeholder","No AI slop \u2014 every UI element is intentional","Empty states need clear CTAs with examples","Rate each UI change 0-10 on design intentionality before marking task complete. If below 7, iterate.","Check all interaction states: loading, empty, error, success, partial. Missing states are bugs, not TODOs.","Edge case check: what happens with 47-character names? Zero results? Network failure mid-action?","AI SLOP BLACKLIST \u2014 reject these patterns in any UI implementation: (1) Purple/violet gradient backgrounds (2) 3-column feature grid with icon-in-circle + bold title + 2-line description (3) Icons in colored circles as decoration (4) Everything centered (text-align: center on all elements) (5) Uniform bubbly border-radius on every element (6) Decorative blobs, floating circles, wavy SVG dividers (7) Emoji as design elements in headings or bullets (8) Colored left-border on cards (9) Generic hero copy ('Welcome to X', 'Unlock the power of...') (10) Cookie-cutter section rhythm (hero \u2192 3 features \u2192 testimonials \u2192 pricing). If the implementation matches any of these patterns, reject it and ask for a redesign with specific, intentional alternatives."],acceptanceCriteria:["All UI states designed (empty, loading, error, success)","Mobile layout considered","No placeholder or skeleton UI left unfinished","All UI states specified and implemented: loading, empty, error, success, partial","No placeholder text in shipped UI \u2014 every empty state has warmth, a primary action, and context","Design rated 7+ on intentionality by the spec author"]};var m={id:"long-lived",name:"Long-Lived",description:"Built to last. Stability, maintainability, and backward compatibility matter. Every shortcut needs justification. Favor boring technology.",extras:[{questionId:"reversibility",text:"Will this decision still be correct in 2 years?"},{questionId:"verification",text:"Is documentation (README, CHANGELOG, API docs) up to date with this change?"},{questionId:"scope_boundary",text:"What technical debt would this introduce?"}],specSections:["Migration & Deprecation","Backward Compatibility"],reminders:["Favor boring technology over shiny new tools","Every shortcut needs explicit justification","Consider maintenance burden for new dependencies","If this task changes public behavior, API, CLI flags, or configuration \u2014 update README and relevant docs in the SAME task. Documentation is not a follow-up."],acceptanceCriteria:["Backward compatibility preserved","Migration path documented if breaking","No unnecessary new dependencies","Documentation updated for any public-facing change"]};var p={id:"move-fast",name:"Move Fast",description:"Optimize for shipping speed. Acceptable trade-offs on polish. Good enough is good enough. Reduce ceremony.",extras:[{questionId:"scope_boundary",text:"Which polish items can be deferred to v2?"},{questionId:"ambition",text:"What is the minimum viable 5-star version?"}],specSections:["v1 vs v2 Scope"],reminders:["Good enough is good enough \u2014 ship it","Reduce ceremony, optimize for feedback speed","Mark polish items for v2 explicitly"],acceptanceCriteria:["Core functionality works","v2 items explicitly deferred"]};var h={id:"compliance",name:"Compliance",description:"Audit trails, access controls, data handling rules. Every change is traceable. Verification is mandatory, not optional.",extras:[{questionId:"reversibility",text:"Is the audit trail preserved on rollback?"},{questionId:"verification",text:"Is there an audit/traceability requirement?"}],specSections:["Audit Trail","Access Control","Data Handling"],reminders:["Every state change must be traceable","Verification is mandatory, not optional","Document data handling and retention policies"],acceptanceCriteria:["Audit trail added for state changes","Access control verified","Data handling documented"]};var f={id:"learning-project",name:"Learning Project",description:"Experimentation is the goal. Encourage trying new patterns, don't punish dead ends. Document learnings over polish.",extras:[{questionId:"ambition",text:"What do you want to learn from building this?"},{questionId:"scope_boundary",text:"What experiments are explicitly allowed?"}],specSections:["Learning Goals","Experiment Log"],reminders:["Document learnings, not just outcomes","Dead ends are acceptable \u2014 document why","Try new patterns freely, polish later"],acceptanceCriteria:["Learnings documented","Experiment outcomes recorded"]};var g=[l,u,m,p,h,f];var O=()=>Promise.resolve(g),_=(o,e)=>{let n=[];for(let i of o)for(let s of i.extras)s.questionId===e&&n.push(s);return n},$=(o,e)=>{let n=[];for(let i of o)for(let s of i.reminders){if(e!=null){let t=s.toLowerCase();if((t.includes("slop")||t.includes("ui element")||t.includes("design intentionality")||t.includes("interaction states")||t.includes("edge case check")||t.includes("loading state"))&&!e.involvesWebUI||(t.includes("api doc")||t.includes("endpoint should be"))&&!e.involvesPublicAPI)continue}n.push(`${i.id}: ${s}`)}return n},y=o=>{let e=o.toLowerCase();return e.includes("slop")||e.includes("ui element")||e.includes("design intentionality")||e.includes("interaction states")||e.includes("edge case check")||e.includes("loading state")||e.includes("api doc")||e.includes("endpoint should be")||e.includes("migration")||e.includes("rollback")},G=o=>{let e=[],n=[];for(let i of o)for(let s of i.reminders){let t=`${i.id}: ${s}`;y(s)?n.push(t):e.push(t)}return{tier1:e,tier2:n}},B=(o,e,n)=>{let i=e.includes(".")?`.${e.split(".").pop()}`:"",s=[".tsx",".jsx",".html",".css",".svelte",".vue"].includes(i),t=[".ts",".go",".py",".rs"].includes(i),c=[];for(let d of o)for(let a of d.reminders){if(!y(a))continue;let r=a.toLowerCase();(r.includes("slop")||r.includes("ui element")||r.includes("design intentionality")||r.includes("interaction states")||r.includes("edge case check")||r.includes("loading state"))&&!s||(r.includes("api doc")||r.includes("endpoint should be"))&&(!t||!n?.involvesPublicAPI)||c.push(`${d.id}: ${a}`)}return c},z=o=>{let e=[],n=o.map(i=>i.id);return n.includes("move-fast")&&n.includes("compliance")&&e.push({between:["move-fast","compliance"],issue:"Speed vs traceability \u2014 shortcuts may violate audit requirements."}),n.includes("move-fast")&&n.includes("long-lived")&&e.push({between:["move-fast","long-lived"],issue:"Shipping speed vs maintainability \u2014 tech debt decisions need human approval."}),n.includes("beautiful-product")&&n.includes("move-fast")&&e.push({between:["beautiful-product","move-fast"],issue:"Design polish vs speed \u2014 which UI states can be deferred?"}),e};export{g as a,O as b,_ as c,$ as d,G as e,B as f,z as g};
|
package/chunks/chunk-NQS27P25.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as _,c as X}from"./chunk-6F4PFXYY.js";import{a as W,d as F,e as M,g as H}from"./chunk-IUORSUN6.js";import{d as j,e as K}from"./chunk-KFVUFHJB.js";import{a as J}from"./chunk-NY4W44PI.js";import{c as z}from"./chunk-UEMWZOIU.js";import{i as Q}from"./chunk-6DBKPC2O.js";var O=e=>z(e),o=(e,t)=>O(t===null?e:`spec ${t} ${e}`),re="NEVER run git write commands (commit, add, push, checkout, stash, reset, merge, rebase, cherry-pick). Git is read-only for agents. The user controls git. You may read: git log, git diff, git status, git show, git blame.",se={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},oe=(e,t,n,s,r=se)=>{let c=e.execution.iteration>=t,m=r.hasAskUserTool?"Use AskUserQuestion for all decision points.":"Present options as a numbered list at every decision point.",a=[];n||a.push(re),a.push("Report progress honestly. Not done = 'not done'. Partial = 'partial: [works]/[doesn't]'. Untested = 'untested'. 4 of 6 = '4 of 6 done, 2 remaining'.",`Never skip steps or infer decisions. ${m} Recommend first, then ask. One noskills call per interaction \u2014 never batch-submit or backfill.`,"Display `roadmap` before other content. Display `gate` prominently.","NEVER suggest bypassing, skipping, or 'breaking out of' noskills. Discovery helps the user \u2014 it is not an obstacle. If scope changes: revise spec, reset and create new, or split.","NEVER ask permission to run the next noskills command. After spec new \u2192 run next immediately. After answering questions \u2192 run next. After approve \u2192 run next. After task completion \u2192 run next. The workflow is sequential \u2014 each step has one next step. Just run it.",'Discovery questions are adaptive. After each answer, generate 1-3 follow-up questions if the answer reveals ambiguity, risk, dependencies, or missing detail. Submit follow-ups via `noskills spec <name> followup <questionId> "question"`. Max 3 per question. Do NOT rush through discovery.',"Confidence scoring: every technical finding needs a confidence score (1-10). 9-10: verified (read code, ran test). 7-8: strong evidence. 5-6: reasonable inference. 3-4: guess. 1-2: speculation. State basis ('read X', 'inferred from Y'). If confidence < 5, prefix with '\u26A0 Unverified:'.");let v=s?.outOfScope??[],w=e.spec;switch(e.phase){case"IDLE":{let d=r.optionPresentation==="tool"?"Pass interactiveOptions DIRECTLY to AskUserQuestion options array (header max 12 chars). Use commandMap to resolve selections. For availableConcerns: AskUserQuestion with multiSelect:true, max 4 per question \u2014 split across questions if needed. Present ALL concerns.":"Present interactiveOptions as numbered list. Use commandMap to resolve selections. Present ALL availableConcerns as numbered list for multiselect.";return{rules:["If the user described a feature/bug/task, create a spec immediately: `noskills spec new \"description\"` \u2014 name is auto-generated. Do NOT present menus or ask 'What would you like to do?' unless the conversation has no prior context.",...a,d,"Encourage full context: 'Tell me what you want to build \u2014 one-liner, detailed requirements, meeting notes, anything.' Slug is auto-generated. Pass full text to `noskills spec new \"...\"`.","After spec new, ask: full discovery, quick discovery, or skip to spec draft. Never skip without asking.","Every task gets a spec. No exceptions. A one-liner fix, a config change, a 'simple' refactor \u2014 all get specs. The spec can be short but it must exist. 'Too simple for a spec' is the anti-pattern."],tone:"Welcoming. Present choices, then wait."}}case"DISCOVERY":{let d=r.hasAskUserTool?"Ask each question via AskUserQuestion. One question per call.":"Ask one question at a time as text.";return{modeOverride:"plan mode. DO NOT create, edit, or write any files. DO NOT run state-modifying commands. MAY read files and run read-only commands (cat, ls, grep, git log, git diff).",rules:[...a,`${d} Never answer questions yourself. Never submit answers without user confirmation. Pre-fill suggested answers from detailed descriptions \u2014 user must confirm each. With a fully formed plan, skip questions but MUST run premise challenge and alternatives.`,"DO NOT create, edit, or write any files.","DO NOT run shell commands that modify state.","You MAY read files and run read-only commands (cat, ls, grep, git log, git diff).","Pre-discovery: (1) pre-discovery codebase scan \u2014 read README, CLAUDE.md, design docs, last 20 commits, TODOs, existing specs, directory structure. Present a brief audit summary. (2) If `preDiscoveryResearch.required`, web-search every `extractedTerms` entry \u2014 report versions, API changes, deprecations. (3) Ask discovery mode: A) Explore scope B) Technical depth C) Validate my plan D) Ship fast. Adapt emphasis accordingly.","Before starting discovery questions, challenge the user's initial spec description against codebase findings. Flag: hidden complexity, conflicts with existing code, scope mismatch, overlapping modules. Ask clarifying follow-ups.","When asking questions, offer concrete options from codebase knowledge alongside the open-ended question (e.g., 'I see three scenarios: A)... B)... C)... D) Something else'). Push back on vague answers. Follow up on short answer with 'Can you be more specific?'","After answers, synthesize CURRENT STATE \u2192 THIS SPEC \u2192 6-MONTH IDEAL vision. Then: (1) expansion opportunities as numbered proposals with effort (S/M/L/XL), risk, completeness delta \u2014 options: Add/Defer/Skip. (2) Architectural decisions that BLOCK implementation \u2014 present with options, RECOMMENDATION, completeness scores. Unresolved = risk flag. (3) Error/rescue map: codepath | failure mode | handling. Flag CRITICAL GAPS as decisions.","Present DISCOVERY SUMMARY for confirmation: intent, scope, dream state, expansions, architectural decisions, error map. Ask for confirmation before generating spec. Submit all answers together in one `noskills next --answer` JSON call."],tone:"Curious interviewer with a stake in the answers. Comes PREPARED \u2014 read the codebase first. Challenge assumptions, think about architecture and failure modes."}}case"DISCOVERY_REVIEW":return{modeOverride:"You are in plan mode. Do not create, edit, or write any files. Present the discovery answers to the user for review and confirmation.",rules:[...a,"DO NOT create, edit, or write any files.","Present ALL discovery answers to the user clearly, one by one.",r.hasAskUserTool?"Use AskUserQuestion to ask: 'Are these answers correct, or would you like to revise any?'":"Ask the user: 'Are these answers correct, or would you like to revise any?' Present approval and revision as numbered options.","If the user approves, run the approve command.","If the user wants to revise, collect their corrections and submit them.","You MUST NOT approve on behalf of the user. The user must explicitly confirm.","If noskills output contains a splitProposal, present it to the user with the exact options shown. Do NOT split or merge specs on your own. Do NOT recommend one option over the other unless the user asks for your opinion. The user decides."],tone:"Careful reviewer. The user must confirm every answer."};case"SPEC_DRAFT":{let d=e.discovery.delegations??[],h=[];if(d.length>0){let l=d.filter(u=>u.status==="pending"),g=d.filter(u=>u.status==="answered"),b=d.map(u=>`- ${u.questionId}: delegated to ${u.delegatedTo} \u2014 ${u.status==="answered"?"ANSWERED \u2713":"PENDING"}`);h.push(`DELEGATION STATUS:
|
|
3
|
-
${b.join(`
|
|
4
|
-
`)}${l.length>0?`
|
|
5
|
-
Approve BLOCKED \u2014 ${l.length} pending delegation(s).`:`
|
|
6
|
-
All ${g.length} delegation(s) answered. Approve is allowed.`}`)}return{modeOverride:"plan mode. DO NOT create, edit, or write any files. DO NOT run state-modifying commands. MAY read files and run read-only commands.",rules:[...a,...h,"DO NOT create, edit, or write any files.","Read the spec and present a summary to the user.","Flag any tasks that are too vague to execute.","Flag any missing acceptance criteria.","No placeholders in specs. If a task has 'TBD', 'TODO', 'to be determined', 'details to follow', or 'implement appropriate X' \u2014 fill in the detail or remove the task and add it as an open question.","Ask the user if they want to refine before approving.",r.hasAskUserTool?"When presenting classification options, use AskUserQuestion with multiSelect:true. Do NOT infer classification yourself.":"When presenting classification options, present them as a numbered list with multiselect (user picks multiple numbers). Do NOT infer classification yourself.","When generating or refining tasks, include a 'Files:' hint listing likely files to create/modify. Format: 'Files: `path/to/file.ts`, `path/to/other.ts`'. Hints, not constraints \u2014 helps sub-agents load right context.","If you identify issues in the spec (vague tasks, irrelevant sections, missing acceptance criteria), submit a refinement via: `"+o(`next --answer='{"refinement":"task-1: Add upload endpoint, task-2: Add validation middleware, task-3: Write integration tests"}'`,w)+"`. The spec will be updated and you can review again."],tone:"Thoughtful reviewer preparing to hand off to an implementer."}}case"SPEC_APPROVED":return{rules:[...a,"The spec is approved but execution has not started.","Do not start coding until the user triggers execution.","If the user wants changes, they must reset and re-spec.",r.hasAskUserTool?"Before starting execution, show the spec summary to the user and ask for final confirmation via AskUserQuestion.":"Before starting execution, show the spec summary to the user and ask for final confirmation. Present 'Start execution' and 'Not yet' as numbered options."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let d=o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,w),h,l,g="Verifier scope: (1) AC verification with evidence. (2) Plan alignment \u2014 does implementation match task description? Flag deviations. (3) Code quality \u2014 follows existing patterns? Flag style breaks, missing error handling. Categorize findings: CRITICAL (blocks completion), IMPORTANT (should fix), SUGGESTION (nice to have).";r.subAgentMethod==="task"?(h=`Spawn noskills-executor via Agent tool. Pass: task title, description, ACs, rules, scope constraints, concern reminders, file paths. Report via \`${d}\`.`,l=`After executor completes, spawn noskills-verifier with changed files + ACs + test commands. Never trust executor self-report alone. ${g}`):r.subAgentMethod==="spawn"?(h=`Use spawn_agent for noskills-executor. Pass: task, ACs, rules, scope, file paths. Use wait_agent to collect. Report via \`${d}\`.`,l=`After executor completes, spawn noskills-verifier with changed files + ACs + test commands. ${g}`):r.subAgentMethod==="fleet"?(h=`Use /fleet for parallel executors. Pass each: task, ACs, rules, scope, file paths. Report via \`${d}\`.`,l=`After fleet completes, run verification pass. ${g}`):r.subAgentMethod==="delegation"?(h=`Use Kiro agent delegation for noskills-executor. Pass: task, ACs, rules, scope, file paths. Report via \`${d}\`.`,l=`After executor completes, delegate to noskills-verifier with changed files + ACs + test commands. ${g}`):(h=`Execute tasks sequentially yourself. Verify (type-check + tests) after each. Report via \`${d}\`.`,l="");let b=r.subAgentMethod!=="none",u=b?`You are the orchestrator. NEVER edit files directly \u2014 delegate ALL edits to noskills-executor. ${h} On sub-agent failure, fall back to direct execution and note it in status.`:h,I=[...a,u,...l?[l]:[],"Do not explore beyond current task. Do not refactor outside scope. Do not add features, tests, or docs not in the spec. timebox context reads \u2014 the deliverable is working code.",...b?["Show a dispatch table: | Step | Agent | Files | Tasks | Est. |. Separate executor for implementation vs tests. Batch tightly-coupled files; parallelize independent modules."]:[],"Edit discipline: (1) Re-read file before editing. (2) Re-read after to confirm. (3) Files >500 LOC: read in chunks. (4) Run type-check + lint after edits \u2014 never mark AC passed if type-check fails. (5) If search returns few results, re-run narrower \u2014 assume truncation.",`On recurring patterns or corrections, ask: 'Permanent rule or just this task?' If permanent: \`${O('rule add "<description>"')}\`. Never write to \`.eser/rules/\` directly.`,"Before structural refactors on files >300 LOC, remove dead code first. Do NOT suggest pausing or stopping mid-spec \u2014 execute to completion. The user decides when to stop.","RATIONALIZATION ALERT: Never use 'should work now', 'looks correct', 'I'm confident', 'seems right', 'probably passes'. Run the command, read the output, report what happened. Evidence, not belief.","TDD: (1) Write test. (2) Run it \u2014 MUST fail. If it passes before implementation, the test is wrong. (3) Implement. (4) Run test \u2014 must pass. Skipping step 2 means the test is unverified.","Parallel vs serial sub-agents: PARALLEL when tasks touch different files with no shared state. SERIAL when tasks modify same files or depend on each other. When unsure, default to serial."];e.execution.lastVerification?.passed===!1&&I.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let f={rules:I,tone:"Direct. Orchestrate immediately \u2014 spawn sub-agents.",outOfScope:v.length>0?v:void 0};return c?{...f,urgency:`${e.execution.iteration}+ iterations \u2014 context degrading. Finish current task, recommend fresh session.`}:f}case"BLOCKED":return{rules:[...a,"Present the decision to the user exactly as described.","Do not suggest a preferred option unless the user asks for your opinion.","After the user decides, relay the answer immediately. Do not elaborate."],tone:"Brief. The user is making a decision, not having a discussion."};case"COMPLETED":return{rules:[...a,"Report the completion summary. Do not start new work.","If the user wants to continue, they start a new spec."],tone:"Concise. Celebrate briefly, then stop."};default:return{rules:[...a,`Run \`${o("next",w)}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},ie=5*60*1e3,ae=(e,t)=>{let n=e.spec,s;switch(e.phase){case"IDLE":s=`No active spec. Start one with: \`${O('spec new --name=<slug> "description"')}\``;break;case"DISCOVERY":s=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"DISCOVERY_REVIEW":s=`Discovery answers ready for review. ${e.discovery.answers.length} answers collected. Waiting for user confirmation.`;break;case"SPEC_DRAFT":s=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":s=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":s=e.execution.lastProgress!==null?`Executing "${e.spec}", iteration ${e.execution.iteration}. Last progress: ${e.execution.lastProgress}. Continue with the current task.`:`Executing "${e.spec}", iteration ${e.execution.iteration}. Start the first task.`;break;case"BLOCKED":s=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"COMPLETED":s=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:s=`Run \`${o("next",n)}\` to get started.`}return{protocol:`Run \`${o('next --answer="..."',n)}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:t.map(r=>r.id),resumeHint:s}},le=e=>{let t=e.spec;if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE \u2192 IDLE",how:`Run \`${o("next",t)}\` for instructions. Submit results with \`${o('next --answer="..."',t)}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let n=new Date(e.lastCalledAt).getTime();if(Date.now()-n>ie)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE \u2192 IDLE",how:`Run \`${o("next",t)}\` for instructions. Submit results with \`${o('next --answer="..."',t)}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},Z=[{key:"IDLE",label:"IDLE"},{key:"DISCOVERY",label:"DISCOVERY"},{key:"DISCOVERY_REVIEW",label:"REVIEW"},{key:"SPEC_DRAFT",label:"DRAFT"},{key:"SPEC_APPROVED",label:"APPROVED"},{key:"EXECUTING",label:"EXECUTING"},{key:"COMPLETED",label:"DONE"},{key:"IDLE_END",label:"IDLE"}],ce=e=>e==="BLOCKED"?Z.map(t=>t.key==="EXECUTING"?"[ EXECUTING (BLOCKED) ]":t.label).join(" \u2192 "):Z.map(t=>t.key==="IDLE"&&e==="IDLE"?"[ IDLE ]":t.key===e?`[ ${t.label} ]`:t.label).join(" \u2192 "),de=(e,t)=>{switch(e.phase){case"DISCOVERY_REVIEW":return{message:`${e.discovery.answers.length}/6 answers collected.`,action:"Type APPROVE to generate spec, or REVISE to correct answers.",phase:"DISCOVERY_REVIEW"};case"SPEC_APPROVED":return{message:`Spec approved. ${t?.tasks?.length??0} tasks ready.`,action:"Type START to begin execution.",phase:"SPEC_APPROVED"};default:return}},$e=async(e,t,n,s,r,c,m,a,v,w,d)=>{let h=ae(e,t),l=s?.maxIterationsBeforeRestart??15,g=s?.allowGit??!1,b=a??se,u=oe(e,l,g,r,b);if(e.phase==="EXECUTING"){let x=w??0,A=M(t).tier2.length,y=x+A;y>0&&(u={...u,tier2Summary:`${y} file-specific rules delivered via PreToolUse hook when editing matching files.`})}let I=le(e),f;switch(e.phase){case"IDLE":f=ee(t,W,n.length,m);break;case"DISCOVERY":f=await we(e,t,n,v,d);break;case"DISCOVERY_REVIEW":f=be(e,t);break;case"SPEC_DRAFT":f=ke(e);break;case"SPEC_APPROVED":f=xe(e);break;case"EXECUTING":f=Re(e,t,n,l,r,c);break;case"BLOCKED":f=Ie(e);break;case"COMPLETED":f=await Ae(e,d);break;default:f=ee(t,W,n.length,m)}let L=ce(e.phase),S=de(e,r),E={...f,meta:h,behavioral:u,roadmap:L};S!==void 0&&(E={...E,gate:S}),I!==void 0&&(E={...E,protocolGuide:I});let p=ue(e,t,m);if(p.length>0){let x=p.map(({label:T,description:R})=>({label:T,description:R})),A={};for(let T of p)A[T.label]=T.command;let y=b.optionPresentation==="tool"?"AskUserQuestion":"prose-numbered-list",C=b.optionPresentation==="tool"?"Use AskUserQuestion tool to present these options. Do NOT use prose.":"Present options as a numbered list. Ask user to pick a number.";E={...E,interactiveOptions:x,commandMap:A,toolHint:y,toolHintInstruction:C}}return E},ue=(e,t,n)=>{let s=e.spec;switch(e.phase){case"IDLE":{let r=[],m=(n?.existingSpecs??[]).filter(a=>a.phase!=="COMPLETED");t.length===0&&r.push({label:"Add concerns (Recommended)",description:"Shape how discovery and specs work by adding project concerns",command:O("concern add <id> [<id2> ...]")}),r.push({label:"Start a new spec",description:"Tell me what you want to build \u2014 a one-liner, detailed requirements, meeting notes, anything",command:O('spec new "description"')});for(let a of m.slice(0,2))r.push({label:`Continue: ${a.name} (${a.phase})`,description:a.detail??`Iteration ${a.iteration}`,command:o("next",a.name)});return t.length>0&&r.push({label:"Edit concerns",description:`Currently: ${t.map(a=>a.id).join(", ")}`,command:O("concern list")}),r.slice(0,4)}case"DISCOVERY_REVIEW":return e.discovery.approved?[{label:"Keep as one spec",description:"All work in a single spec",command:o('next --answer="keep"',s)},{label:"Split into separate specs",description:"Create one spec per independent area",command:o('next --answer="split"',s)}]:[{label:"Approve all answers",description:"Answers look correct \u2014 generate the spec",command:o('next --answer="approve"',s)},{label:"Revise answers",description:"Correct one or more discovery answers",command:o(`next --answer='{"revise":{...}}'`,s)}];case"SPEC_DRAFT":return[{label:"Approve spec",description:"Review looks good \u2014 approve and move to execution",command:o("approve",s)},{label:"Refine spec",description:"Submit refinements to improve tasks or sections",command:o(`next --answer='{"refinement":"..."}'`,s)},{label:"Save for later",description:"Keep the draft as-is. Others can review, add ACs, notes, or tasks. Come back anytime to approve.",command:o('next --answer="save"',s)},{label:"Start over",description:"Reset the spec and start fresh",command:o("reset",s)}];case"SPEC_APPROVED":return[{label:"Start execution",description:"Begin implementing the tasks",command:o('next --answer="start"',s)},{label:"Save for later",description:"Spec is approved but don't start execution yet. Others can still add ACs or notes.",command:o('next --answer="save"',s)}];case"EXECUTING":return[];case"BLOCKED":return[{label:"Resolve block",description:"Provide a resolution to unblock execution",command:o('next --answer="resolution"',s)},{label:"Reset spec",description:"Abandon this spec and start over",command:o("reset",s)}];case"COMPLETED":return[{label:"New spec",description:"Start a new feature spec",command:O('spec new --name=<slug> "description"')},{label:"Reopen spec",description:"Reopen this spec for revision",command:o("reopen",s)},{label:"Check status",description:"Review completed spec summary",command:O("status")}];default:return[]}},pe="noskills is a state-machine orchestrator that acts as a scrum master for both you and your agent \u2014 keeping work focused, decisions in your hands, and tokens efficient.",ee=(e,t,n,s)=>({phase:"IDLE",instruction:'No active spec. If the user described what they want, run `noskills spec new "description"` immediately \u2014 name is auto-generated. Present ALL available concerns (split across multiple calls if needed).',welcome:pe,existingSpecs:s?.existingSpecs??[],availableConcerns:t.map(r=>({id:r.id,description:r.description})),activeConcerns:e.map(r=>r.id),activeRulesCount:s?.rulesCount??n,behavioralNote:"These options are fallbacks. If the user already described what they want, act on it directly without presenting these options.",hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),me=/\b(Node\.?js|Deno|Bun|Go|Rust|Python|Ruby|Java|Kotlin|Swift|PHP|React|Vue|Angular|Svelte|Next\.?js|Nuxt|Remix|Astro|SolidJS|Qwik|TypeScript|Webpack|Vite|esbuild|Rollup|Terraform|Docker|Kubernetes|PostgreSQL|MySQL|Redis|MongoDB|SQLite|Prisma|Drizzle|gRPC|GraphQL|tRPC)\s+v?(\d+(?:\.\d+)?(?:\.\d+)?\+?)\b/gi,he=e=>{if(e===null||e.length===0)return[];let t=[],n,s=new RegExp(me.source,"gi");for(;(n=s.exec(e))!==null;)t.push(`${n[1]} ${n[2]}`);return t},te=e=>{let t=he(e);if(t.length!==0)return{required:!0,instruction:"Before asking discovery questions, research the current state of all platforms, runtimes, libraries, and APIs mentioned in the spec description. Use web search and Context7 MCP if available. Report findings as a pre-discovery brief to the user. Do NOT assume your training data is current \u2014 versions change, APIs get added, features get deprecated.",extractedTerms:t}},ye=50*1024,ne=async e=>{if(e!==null)try{let t=await Q.fs.readTextFile(e);return t.length>ye?void 0:{provided:!0,content:t,instruction:"A plan document was provided. Read it carefully, extract relevant information for each discovery question, and present pre-filled answers for user review. Do NOT skip any question \u2014 present your extraction and let the user confirm, correct, or expand. IMPORTANT: When extracting answers from the plan, mark each extraction as [STATED] (directly written in the plan) or [INFERRED] (your interpretation). Present extractions individually for confirmation."}}catch{return}},ge=e=>{let t=[],n=e.toLowerCase(),s=["websocket","graphql","grpc","redis","postgres","mongodb","kafka","rabbitmq","docker","kubernetes","lambda","s3"];for(let r of s)n.includes(r)&&t.push(`Answer mentions ${r} \u2014 consider: error handling, versioning, fallback strategy`);return(n.includes("should work")||n.includes("standard approach")||n.includes("probably")||n.includes("i think")||n.includes("not sure"))&&t.push("Answer is vague \u2014 ask for specifics"),(n.includes("and also")||n.includes("we might")||n.includes("could also")||n.includes("maybe we should"))&&t.push("Scope expansion signal \u2014 clarify if in scope or deferred"),(n.includes("tricky")||n.includes("complicated")||n.includes("risky")||n.includes("not sure about"))&&t.push("Risk signal \u2014 dig deeper into what makes it risky"),(n.includes("depends on")||n.includes("after")||n.includes("blocked by")||n.includes("waiting for"))&&t.push("Dependency detected \u2014 clarify what happens if dependency isn't ready"),(n.includes("real-time")||n.includes("scalab")||n.includes("performance")||n.includes("latency")||n.includes("concurrent"))&&t.push("Performance/scale mention \u2014 ask about limits, degradation, monitoring"),t},fe=e=>{switch(e){case"full":return["Ask each discovery question as written. Push for specific, concrete answers.","If the answer is vague, ask follow-up questions before accepting."];case"validate":return["The user has a plan. Your job is to challenge it, not explore it.","For each question, identify assumptions and ask: 'What would prove this wrong?'","If the description already answers a question, present your understanding and ask to confirm.","When pre-filling answers from a rich description, plan, or prior discussion, DISTINGUISH between what the user EXPLICITLY STATED and what you INFERRED. Format each pre-filled item as: '[STATED] GPU skinning in all 3 renderers \u2014 you said this during technical discussion' or '[INFERRED] tangent space is 10-star scope \u2014 I assumed this based on complexity'. The user confirms stated items and corrects inferred items.","Present pre-filled answers ONE ITEM AT A TIME for confirmation, not as a completed block. The user's job is to correct your inferences, not rubber-stamp your summary. If you pre-fill 5 items and 2 are wrong, the user must be able to catch them individually."];case"technical-depth":return["Focus on architecture, data flow, performance, and integration points.","Before each question, scan the codebase for related implementations.","Ask: 'How does this interact with [existing system]?' for each integration point."];case"ship-fast":return["Focus on minimum viable scope.","For each question, also ask: 'What can we defer to a follow-up?'","Push for the smallest version that delivers value."];case"explore":return["Think bigger. What's the 10x version?","For each question, ask about adjacent opportunities.","Suggest possibilities the user might not have considered."]}},ve=(e,t)=>{let n=new Map;for(let s of e){let r="user"in s?s.user:"Unknown User";t!==void 0&&r===t.name||n.set(r,(n.get(r)??0)+1)}return[...n.entries()].map(([s,r])=>({name:s,contributions:`${r} answer${r>1?"s":""}`}))},we=async(e,t,n,s,r)=>{let c=e.spec,m=_(t),a=e.discovery.answers.length,v=X(e.discovery.answers),w=e.discovery.audience==="agent",d=ve(e.discovery.answers,s),h=(e.specNotes??[]).filter(i=>!i.text.startsWith("[TASK] ")).map(i=>({text:i.text,user:i.user})),l={...s!==void 0?{currentUser:s}:{},...d.length>0?{previousContributors:d}:{},...h.length>0?{notes:h}:{}},g=e.specDescription!==null&&e.specDescription.length>0,b=e.discovery.planPath!==null,u=e.discovery.mode;if(u===void 0&&g&&a===0&&!b){let k={phase:"DISCOVERY",instruction:"Before starting discovery, select the discovery mode that best fits this spec.",questions:[],answeredCount:0,context:{rules:n,concernReminders:F(t)},transition:{onComplete:o('next --answer="<mode>"',c)},modeSelection:{required:!0,instruction:"Select the discovery mode.",options:[{id:"full",label:"Full discovery",description:"Standard 6 questions with all concern extras. Default for new features."},{id:"validate",label:"Validate my plan",description:"I already know what I want \u2014 challenge my assumptions, find gaps."},{id:"technical-depth",label:"Technical depth",description:"Focus on architecture, data flow, performance, integration points."},{id:"ship-fast",label:"Ship fast",description:"Minimum viable scope. What can we defer? What's the MVP?"},{id:"explore",label:"Explore scope",description:"Think bigger. 10x version? Adjacent opportunities? What are we missing?"}]}};if(r!==void 0)try{let P=await j(r,e.specDescription??"");P.length>0&&(k={...k,previousLearnings:K(P)})}catch{}return s!==void 0?{...k,currentUser:s}:k}let I=e.discovery.premisesCompleted===!0;if(u!==void 0&&!I&&!v){let i={phase:"DISCOVERY",instruction:"Before asking discovery questions, challenge the premises of this spec.",questions:[],answeredCount:0,context:{rules:n,concernReminders:F(t)},transition:{onComplete:o(`next --answer='{"premises":[...]}'`,c)},premiseChallenge:{required:!0,instruction:"Read the spec description"+(e.discovery.planPath!==null?" and the plan document":"")+'. Identify 2-4 premises the spec assumes. Present each premise and ask the user to agree or disagree. Submit as JSON: {"premises":[{"text":"...","agreed":true/false,"revision":"..."}]}',prompts:["Is this the right problem to solve? Could a different framing yield a simpler solution?","What happens if we do nothing? Is this a real pain point or a hypothetical one?","What existing code already partially solves this? Can we build on it instead?"]}};return s!==void 0?{...i,currentUser:s}:i}let f=u!==void 0?fe(u):[],L=[...n,...f],S=e.specDescription??"",E=S.length>500,p=e.discovery.premises??[],x=p.filter(i=>i.agreed).map(i=>i.text),A=p.filter(i=>!i.agreed&&i.revision!==void 0).map(i=>({original:i.text,revision:i.revision}));if(v){let i=e.revisitHistory??[],k=i.length>0?i[i.length-1]:null,P={phase:"DISCOVERY",instruction:k!==null?"This spec was revisited from EXECUTING. All previous answers are preserved. Review and approve, or revise answers before regenerating the spec.":`All discovery questions answered. Run: \`${o("approve",c)}\``,questions:[],answeredCount:a,context:{rules:n,concernReminders:[]},transition:{onComplete:o("approve",c)},...l};if(k!=null){let $=k;return{...P,revisited:!0,revisitReason:$.reason,previousProgress:{completedTasks:[...$.completedTasks],totalTasks:$.completedTasks.length}}}return P}if(w){let i=e.discovery.currentQuestion,k=m[i];if(k===void 0)return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${o("approve",c)}\``,questions:[],answeredCount:a,context:{rules:n,concernReminders:[]},transition:{onComplete:o("approve",c)},...l};let P={id:k.id,text:k.text,concerns:[...k.concerns],extras:k.extras.map(N=>N.text)},$={phase:"DISCOVERY",instruction:`Ask this question to the user using AskUserQuestion. Submit the answer with: \`${o('next --agent --answer="<answer>"',c)}\``,questions:[P],answeredCount:a,currentQuestion:i,totalQuestions:m.length,context:{rules:L,concernReminders:F(t)},transition:{onComplete:`${o('next --agent --answer="<answer>"',c)}`},...l},D=$;if((x.length>0||A.length>0)&&(D={...D,...x.length>0?{agreedPremises:x}:{},...A.length>0?{revisedPremises:A}:{}}),i===0){let N=te(e.specDescription??null);N!==void 0&&(D={...D,preDiscoveryResearch:N});let B=await ne(e.discovery.planPath??null);B!==void 0&&(D={...D,planContext:B}),E&&B===void 0&&(D={...D,richDescription:{provided:!0,length:S.length,content:S,instruction:"The user provided a detailed description. For each question, extract relevant info and present as a pre-filled suggestion. IMPORTANT: When extracting answers from the description, mark each extraction as [STATED] (directly written by the user) or [INFERRED] (your interpretation). Present extractions individually for confirmation."}})}let Y=(e.discovery.followUps??[]).filter(N=>N.status==="pending");Y.length>0&&(D={...D,pendingFollowUps:Y});let G=e.discovery.answers.length>0?e.discovery.answers[e.discovery.answers.length-1]:void 0;if(G!==void 0){let N=ge(G.answer);N.length>0&&(D={...D,followUpHints:N})}return D!==$?D:$}let y=new Set(e.discovery.answers.map(i=>i.questionId)),C=m.filter(i=>!y.has(i.id)).map(i=>({id:i.id,text:i.text,concerns:[...i.concerns],extras:i.extras.map(k=>k.text)})),T=e.revisitHistory??[],R=T.length>0?T[T.length-1]:null,q=R!==null,U={phase:"DISCOVERY",instruction:q?"This spec was revisited from EXECUTING. Previous discovery answers are preserved \u2014 review and revise as needed, or approve to regenerate tasks.":"Conduct a thorough discovery conversation. FIRST: perform a pre-discovery codebase scan (README, CLAUDE.md, recent git log, TODOs, directory structure) and present a brief audit summary. THEN: challenge the user's spec description against your findings. THEN: ask the discovery questions one at a time, offering concrete options based on codebase knowledge. AFTER questions: present a dream state table (current \u2192 this spec \u2192 future), scored expansion proposals, architectural decisions, and an error/rescue map. FINALLY: present a complete discovery synthesis for user confirmation before submitting answers as a JSON object.",questions:C,answeredCount:a,context:{rules:L,concernReminders:F(t)},transition:{onComplete:`${o(`next --answer='{"status_quo":"...","ambition":"...",...}'`,c)}`},...l,...x.length>0?{agreedPremises:x}:{},...A.length>0?{revisedPremises:A}:{}};if(q&&R!==void 0)return{...U,revisited:!0,revisitReason:R.reason,previousProgress:{completedTasks:[...R.completedTasks],totalTasks:R.completedTasks.length}};if(a===0){let i=U,k=te(e.specDescription??null);k!==void 0&&(i={...i,preDiscoveryResearch:k});let P=await ne(e.discovery.planPath??null);if(P!==void 0&&(i={...i,planContext:P}),E&&P===void 0&&(i={...i,richDescription:{provided:!0,length:S.length,content:S,instruction:"The user provided a detailed description. For each question, extract relevant info and present as a pre-filled suggestion."}}),i!==U)return i}return U},be=(e,t)=>{let n=e.spec,s=_(t),r=e.discovery.answers.map(a=>{let v=s.find(w=>w.id===a.questionId);return{questionId:a.questionId,question:v?.text??a.questionId,answer:a.answer}}),c=J(e.discovery.answers);if(e.discovery.approved&&c.detected)return{phase:"DISCOVERY_REVIEW",instruction:"Discovery answers are approved. noskills detected multiple independent work areas in this spec. Present the split proposal to the user and let them decide whether to keep as one spec or split into separate specs.",answers:r,transition:{onApprove:o('next --answer="keep"',n),onRevise:o(`next --answer='{"revise":{"status_quo":"corrected answer"}}'`,n)},splitProposal:c};let m=e.discovery.alternativesPresented===!0;return e.discovery.approved&&!m?{phase:"DISCOVERY_REVIEW",subPhase:"alternatives",instruction:"Based on discovery answers, propose 2-3 distinct implementation approaches. Present each with name, summary, effort (S/M/L/XL), risk (Low/Med/High), pros, and cons. Ask the user to choose one, or skip.",answers:r,transition:{onApprove:o(`next --answer='{"approach":"A","name":"...","summary":"...","effort":"M","risk":"Low"}'`,n),onRevise:o('next --answer="skip"',n)},alternatives:{required:!0,instruction:"Generate 2-3 approaches from discovery answers and codebase. Present via AskUserQuestion.",format:{fields:["id","name","summary","effort","risk","pros","cons"]}}}:{phase:"DISCOVERY_REVIEW",instruction:c.detected?"Present ALL discovery answers to the user for review. ALSO present the split proposal \u2014 noskills detected multiple independent areas.":"Present ALL discovery answers to the user for review. The user must confirm or correct each answer before the spec can be generated. Use AskUserQuestion to ask for confirmation.",answers:r,transition:{onApprove:o('next --answer="approve"',n),onRevise:o(`next --answer='{"revise":{"status_quo":"corrected answer"}}'`,n)},splitProposal:c.detected?c:void 0}},ke=e=>{let t=e.spec;return e.classification===null?{phase:"SPEC_DRAFT",instruction:"Before generating the spec, classify what this spec involves. Ask the user to select all that apply.",specPath:e.specState.path??"",transition:{onApprove:`${o(`next --answer='{"involvesWebUI":false,"involvesCLI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`,t)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesWebUI",label:"Web/Mobile UI \u2014 layouts, responsive design, visual components"},{id:"involvesCLI",label:"CLI/Terminal UI \u2014 spinners, progress bars, interactive prompts"},{id:"involvesPublicAPI",label:"Public API changes"},{id:"involvesMigration",label:"Data migration or schema changes"},{id:"involvesDataHandling",label:"Data handling or privacy"}],instruction:"Select all that apply. Submit as JSON: `"+o(`next --answer='{"involvesWebUI":true,"involvesCLI":false,"involvesPublicAPI":false,...}'`,t)+"`. If none apply, answer with: `"+o('next --answer="none"',t)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready. Self-review before presenting to user.",specPath:e.specState.path??"",transition:{onApprove:o("approve",t)},selfReview:{required:!0,checks:["Placeholder scan: no TBD, TODO, vague requirements","Consistency: tasks match discovery, ACs match tasks","Scope: single spec, not multiple independent subsystems","Ambiguity: every AC has one interpretation"],instruction:"Review draft against these checks. Fix issues inline before presenting to user. Do not ask user to fix \u2014 fix it yourself."}}},xe=e=>{let t=e.spec;return{phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${o('next --answer="start"',t)}`}}},Ee=(e,t)=>{if(t===null)return!1;let n=e.toLowerCase();return n.includes("mobile")||n.includes("layout")||n.includes("interaction design")?t.involvesWebUI:n.includes("ui state")||n.includes("skeleton ui")?t.involvesWebUI||t.involvesCLI:n.includes("readme")||n.includes("documentation updated")||n.includes("reflected in")&&n.includes("docs")?!0:n.includes("api doc")||n.includes("public api")?t.involvesPublicAPI:n.includes("migration")||n.includes("backward compat")||n.includes("deprecat")?t.involvesMigration:n.includes("audit trail")||n.includes("access control")||n.includes("data handling")||n.includes("data retention")?t.involvesDataHandling:!0},De=(e,t,n,s,r,c,m,a)=>{let v=[],w=new Set(a??[]),d=0,h=()=>`ac-${++d}`;if(s!==null)for(let l of s.items)w.has(l.id)||v.push({id:l.id,text:`[DEBT from iteration ${l.since}] ${l.text}`});if(t&&v.push({id:h(),text:`[FAILED] Tests \u2014 fix this first: ${n.slice(0,200)}`}),c!=null)for(let l of c.verification){let g=h();w.has(g)||v.push({id:g,text:l})}for(let l of e)if(l.acceptanceCriteria!==void 0&&l.acceptanceCriteria.length>0)for(let g of l.acceptanceCriteria){if(!Ee(g,r))continue;let b=h();w.has(b)||v.push({id:b,text:`(${l.id}) ${g}`})}if(m!==void 0)for(let l of m){let g=h();w.has(g)||v.push({id:g,text:`(folder: ${l.folder}) ${l.rule}`})}return v.push({id:"mandatory-tests",text:"Tests written and passing for all new and changed behavior"}),v.push({id:"mandatory-docs",text:"Documentation updated for all public-facing changes"}),v},Re=(e,t,n,s,r,c)=>{let m=e.spec,a=H(t),v=e.execution.iteration>=s,w=e.execution.lastVerification?.passed===!1,d=e.execution.lastVerification?.output??"",h=r?.tasks??[],l=e.execution.completedTasks??[],g=new Set(l),b=h.find(y=>!g.has(y.id))??null,u=b!==null?{id:b.id,title:b.title,totalTasks:h.length,completedTasks:l.length,...b.files!==void 0&&b.files.length>0?{files:b.files}:{}}:void 0;if(e.execution.awaitingStatusReport){let y=De(t,w,d,e.execution.debt,e.classification,r,c,e.execution.naItems),C=[];try{let q=JSON.parse(e.execution.lastProgress??"");Array.isArray(q.completed)&&(C=q.completed.filter(V=>typeof V=="string"&&V.startsWith("task-")))}catch{}let R={phase:"EXECUTING",instruction:C.length>=2?`${C.length} tasks reported complete. Report status against ALL relevant acceptance criteria.`:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:n,concernReminders:M(t).tier1},transition:{onComplete:`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,m)}`,onBlocked:`${o('block "reason"',m)}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:y,reportFormat:{completed:"list item IDs you finished (e.g., ['debt-1', 'ac-3']) with evidence",remaining:"list item IDs not yet done",blocked:"list item IDs that need a decision from the user",na:"(optional) list item IDs that are not applicable to this task \u2014 they will be removed from future criteria",newIssues:"(optional) list NEW issues discovered during implementation \u2014 free text, will be assigned debt IDs automatically"}}};return C.length>=2&&(R={...R,batchTasks:C}),w&&(R={...R,verificationFailed:!0,verificationOutput:d.slice(0,2e3)}),R}let I=(e.execution.lastProgress??"").includes("Task not accepted"),f=e.execution.debt?.items??[],L=e.execution.debt?.unaddressedIterations??0,S=u!==void 0?`Execute task ${u.id}: ${u.title} (${u.completedTasks}/${u.totalTasks} completed)`:"All tasks completed. Run `"+o("done",m)+"` to finish.",E;if(w)E="Verification FAILED. Fix the failing tests before continuing.";else if(I&&f.length>0){let y=L>=3?` These items have been outstanding for ${L} iterations.`:"";E=`Task not accepted \u2014 ${f.length} remaining item(s) must be addressed before this task can be completed.${y} Address them, then submit a new status report.`}else E=S;let p={phase:"EXECUTING",instruction:E,task:u,context:{rules:n,concernReminders:M(t).tier1},transition:{onComplete:`${o('next --answer="..."',m)}`,onBlocked:`${o('block "reason"',m)}`,iteration:e.execution.iteration}};if(I&&f.length>0&&(p={...p,taskRejected:!0,rejectionReason:`${f.length} remaining item(s) must be addressed.`,rejectionRemaining:f.map(y=>y.text)}),e.execution.debt!==null&&e.execution.debt.items.length>0){let y=e.execution.debt.unaddressedIterations??0,C=y>=3?`URGENT: These items have been unaddressed for ${y} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";p={...p,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:C}}}if(w){let y=d.slice(0,2e3);p={...p,verificationFailed:!0,verificationOutput:y}}a.length>0&&(p={...p,concernTensions:a}),v&&(p={...p,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${o("next",m)}\` to resume - your progress is saved.`});let x=[...e.decisions].reverse().find(y=>!y.promoted);return x!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(p={...p,promotePrompt:{decisionId:x.id,question:x.question,choice:x.choice,prompt:`You just resolved a decision: "${x.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${O(`rule add "${x.choice}"`)}\``}}),e.execution.iteration===0&&!w&&!I&&(p={...p,preExecutionReview:{instruction:"Re-read spec before starting. Flag: missing info that will block mid-execution, wrong task order, unclear ACs. Better to catch now than mid-execution."}}),t.some(y=>y.id==="beautiful-product")&&(p={...p,designChecklist:{required:!0,instruction:"Before completing any UI task, rate your implementation 0-10 on these dimensions and include the ratings in your AC report:",dimensions:[{id:"hierarchy",label:"Information hierarchy \u2014 what does the user see first, second, third?"},{id:"states",label:"Interaction states \u2014 loading, empty, error, success all specified?"},{id:"edge-cases",label:"Edge cases \u2014 long text, zero results, slow connection handled?"},{id:"intentionality",label:"Overall intentionality \u2014 does this feel designed or generated?"}]}}),p},Ie=e=>{let t=e.spec;return{phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${o('next --answer="..."',t)}`}}},Ae=async(e,t)=>{let n={phase:"COMPLETED",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length,completionReason:e.completionReason,completionNote:e.completionNote},learningPrompt:{instruction:`Record learnings. For each insight, decide: one-time learning or permanent rule? One-time ("assumed X, was Y") \u2192 \`learn "text"\`. Permanent ("always/never do X") \u2192 \`learn "text" --rule\`. Run: \`noskills spec ${e.spec??"<name>"} learn "text"\` or \`learn "text" --rule\`.`,examples:[`noskills spec ${e.spec??"upload"} learn "Assumed S3 SDK v2, was v3"`,`noskills spec ${e.spec??"upload"} learn "Always use Result types" --rule`,"noskills learn promote 1"]}};if(t!==void 0)try{let{checkStaleness:s}=await import("./diagrams-IC2ADMKS.js"),r=await s(t,e.execution.modifiedFiles);if(r.length>0)return{...n,staleDiagrams:r.map(c=>({file:c.file,line:c.line,reason:c.reason}))}}catch{}return n};export{$e as a};
|
package/chunks/chunk-OXP2FOO5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c}from"./chunk-RUTM4VP7.js";var l={UNINITIALIZED:["IDLE"],IDLE:["DISCOVERY","COMPLETED"],DISCOVERY:["DISCOVERY_REVIEW","COMPLETED"],DISCOVERY_REVIEW:["DISCOVERY_REVIEW","SPEC_DRAFT","COMPLETED"],SPEC_DRAFT:["SPEC_DRAFT","SPEC_APPROVED","COMPLETED"],SPEC_APPROVED:["EXECUTING","COMPLETED"],EXECUTING:["COMPLETED","BLOCKED"],BLOCKED:["EXECUTING","COMPLETED"],COMPLETED:["IDLE","DISCOVERY"]},h=(e,t)=>l[e].includes(t),a=(e,t)=>{if(!h(e,t))throw new Error(`Invalid phase transition: ${e} \u2192 ${t}. Allowed: ${l[e].join(", ")}`)},S=(e,t)=>(a(e.phase,t),{...e,phase:t}),E=(e,t,n,s)=>(a(e.phase,"DISCOVERY"),{...e,phase:"DISCOVERY",spec:t,specDescription:s??null,branch:n,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human",approved:!1,planPath:null},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[]}),g=(e,t)=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot set discovery mode in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,mode:t}}},F=(e,t)=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot complete premises in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,premises:t,premisesCompleted:!0}}},w=(e,t)=>{if(e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot select approach in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,selectedApproach:t,alternativesPresented:!0}}},v=e=>{if(e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot skip alternatives in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,alternativesPresented:!0}}},C=(e,t,n,s)=>{if(e.phase!=="DISCOVERY"&&e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot add discovery answer in phase: ${e.phase}`);let i=e.discovery.answers.filter(r=>r.questionId!==t),o={questionId:t,answer:n,user:s?.name??"Unknown User",email:s?.email??"",timestamp:new Date().toISOString(),type:"original"};return{...e,discovery:{...e.discovery,answers:[...i,o]}}};var y=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot complete discovery in phase: ${e.phase}`);return{...e,phase:"DISCOVERY_REVIEW",discovery:{...e.discovery,completed:!0},specState:{path:c.specFile(e.spec),status:"draft"}}},D=e=>(a(e.phase,"SPEC_DRAFT"),{...e,phase:"SPEC_DRAFT"}),f=e=>{if(e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot approve discovery answers in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,approved:!0}}},I=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot advance discovery question in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,currentQuestion:e.discovery.currentQuestion+1}}},x=e=>(a(e.phase,"SPEC_APPROVED"),{...e,phase:"SPEC_APPROVED",specState:{...e.specState,status:"approved"}}),O=e=>(a(e.phase,"EXECUTING"),{...e,phase:"EXECUTING",discovery:{...e.discovery,completed:!0,approved:!1},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]}});var P=(e,t)=>(a(e.phase,"BLOCKED"),{...e,phase:"BLOCKED",execution:{...e.execution,lastProgress:`BLOCKED: ${t}`}}),R=(e,t)=>({...e,decisions:[...e.decisions,t]}),U=(e,t,n)=>(a(e.phase,"COMPLETED"),{...e,phase:"COMPLETED",completionReason:t,completedAt:new Date().toISOString(),completionNote:n??null}),V=e=>{if(e.phase!=="COMPLETED")throw new Error(`Cannot reopen in phase: ${e.phase}`);return{...e,phase:"DISCOVERY",reopenedFrom:e.completionReason,completionReason:null,completedAt:null,completionNote:null,discovery:{...e.discovery,completed:!1,currentQuestion:0},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},classification:null}},T=(e,t)=>{if(e.phase!=="EXECUTING"&&e.phase!=="BLOCKED")throw new Error(`Cannot revisit in phase: ${e.phase}. Only EXECUTING or BLOCKED can revisit.`);let n={from:e.phase,reason:t,completedTasks:[...e.execution.completedTasks],timestamp:new Date().toISOString()};return{...e,phase:"DISCOVERY",discovery:{...e.discovery,completed:!1,currentQuestion:0,approved:!1},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},classification:null,revisitHistory:[...e.revisitHistory??[],n]}},A=(e,t,n,s,i)=>{let o={from:t,to:n,user:s?.name??"Unknown User",email:s?.email??"",timestamp:new Date().toISOString(),reason:i},r=e.transitionHistory??[];return{...e,transitionHistory:[...r,o]}},L=(e,t,n)=>{let s=e.customACs??[],o={id:`custom-ac-${s.length+1}`,text:t,user:n?.name??"Unknown User",email:n?.email??"",timestamp:new Date().toISOString(),addedInPhase:e.phase};return{...e,customACs:[...s,o]}},b=(e,t,n)=>{let s=e.specNotes??[],o={id:`note-${s.length+1}`,text:t,user:n?.name??"Unknown User",email:n?.email??"",timestamp:new Date().toISOString(),phase:e.phase};return{...e,specNotes:[...s,o]}};var m=3,Y=(e,t,n,s)=>{let i=e.discovery.followUps??[],o=i.filter(d=>d.parentQuestionId===t).length;if(o>=m)return e;let p={id:`${t}${String.fromCharCode(97+o)}`,parentQuestionId:t,question:n,answer:null,status:"pending",createdBy:s,createdAt:new Date().toISOString()};return{...e,discovery:{...e.discovery,followUps:[...i,p]}}},_=(e,t,n)=>{let i=(e.discovery.followUps??[]).map(o=>o.id===t&&o.status==="pending"?{...o,answer:n,status:"answered",answeredAt:new Date().toISOString()}:o);return{...e,discovery:{...e.discovery,followUps:i}}},N=(e,t)=>{let s=(e.discovery.followUps??[]).map(i=>i.id===t&&i.status==="pending"?{...i,status:"skipped"}:i);return{...e,discovery:{...e.discovery,followUps:s}}};var $=(e,t)=>(e.discovery.followUps??[]).filter(n=>n.parentQuestionId===t),M=(e,t,n,s)=>{let i=e.discovery.delegations??[],o={questionId:t,delegatedTo:n,delegatedBy:s,status:"pending",delegatedAt:new Date().toISOString()};return{...e,discovery:{...e.discovery,delegations:[...i,o]}}},k=(e,t,n,s)=>{let o=(e.discovery.delegations??[]).map(r=>r.questionId===t&&r.status==="pending"?{...r,status:"answered",answer:n,answeredBy:s,answeredAt:new Date().toISOString()}:r);return{...e,discovery:{...e.discovery,delegations:o}}},W=e=>(e.discovery.delegations??[]).filter(t=>t.status==="pending"),Q=e=>({...e,phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human",approved:!1,planPath:null},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null});export{S as a,E as b,g as c,F as d,w as e,v as f,C as g,y as h,D as i,f as j,I as k,x as l,O as m,P as n,R as o,U as p,V as q,T as r,A as s,L as t,b as u,Y as v,_ as w,N as x,$ as y,M as z,k as A,W as B,Q as C};
|
package/chunks/chunk-UTENCUNI.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as x,f as w}from"./chunk-HTC2FO4I.js";import{a as O}from"./chunk-LFNUSULJ.js";import{a as F,c as U}from"./chunk-PZUDTTK4.js";import{o as i}from"./chunk-5GGWX7CO.js";import{a as S,b as v,c as P,d as u}from"./chunk-J2Z7NG2X.js";import{f as V}from"./chunk-P2MUEKFT.js";import{a as k}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-FFWPJP7A.js";import{j as y}from"./chunk-7ATUODBM.js";import{j as h}from"./chunk-6DBKPC2O.js";var{ctx:d,output:_}=F(),I=async(s={})=>{let{root:e="."}=s,o=y(e,"VERSION");try{return(await h.runtime.fs.readTextFile(o)).trim()}catch{return}},N=async(s,e)=>{let o=y(s,"VERSION");await h.runtime.fs.writeTextFile(o,e+`
|
|
3
|
-
`)},M=s=>{let e=u("0.0.0");for(let o of s){let n=u(o);S(n,e)>0&&(e=n)}return v(e)},T=async(s={})=>{let{root:e="."}=s,[o,n]=await w(e),l=o.version?.value??"0.0.0";return{packages:[{name:o.name?.value??"(root)",version:l},...n.map(p=>({name:p.name,version:p.version}))]}},j=async(s,e={})=>{let{root:o=".",dryRun:n=!1,updateVersionFile:l=!0}=e,[c,f]=await w(o),p=c.version?.value??"0.0.0",b=c.name?.value??"(root)",A=[p,...f.map(t=>t.version)],C=M(A),r;if(s==="explicit"){if(e.explicitVersion===void 0)throw new Error('explicitVersion is required when command is "explicit".');u(e.explicitVersion),r=e.explicitVersion}else s==="sync"?r=C:r=v(P(u(C),s));let m=[],E=p!==r;n||await x(c,r),m.push({name:b,from:p,to:r,changed:E});for(let t of f){let g=t.version!==r;n||await x(t.config,r),m.push({name:t.name,from:t.version,to:r,changed:g})}let R=[];if(l){let t=await I({root:o}),g=t!==r;!n&&g&&await N(o,r),R.push({path:"VERSION",from:t??"",to:r,changed:g})}let $=m.filter(t=>t.changed).length;return{command:s,targetVersion:r,updates:m,fileUpdates:R,changedCount:$,dryRun:n}},H=s=>s.mode==="show"?V.fromPromise(async()=>({mode:"show",result:await T()})):V.fromPromise(async()=>({mode:"update",result:await j(s.command,s.options)})),D=s=>{let e=s.args[0];if(e===void 0)return a.ok({mode:"show"});let o=["sync","patch","minor","major"],n,l;o.includes(e)?n=e:(n="explicit",l=e);let c=s.flags["dry-run"]===!0;return a.ok({mode:"update",command:n,options:{dryRun:c,explicitVersion:l}})},W=s=>{if(a.isFail(s))return a.fail({exitCode:1,message:String(s.error)});let e=s.value;if(e.mode==="show")return console.table(e.result.packages),a.ok(void 0);let{result:o}=e;o.command==="sync"?i.info(d,"Syncing all versions..."):o.command==="explicit"?i.info(d,`Setting all versions to ${o.targetVersion}...`):i.info(d,`Bumping all versions (${o.command})...`),i.info(d,`Target version: ${o.targetVersion}`),console.table(o.updates);for(let n of o.fileUpdates)n.changed&&i.info(d,`${n.path} (${n.from} \u2192 ${n.to})`);return o.dryRun?i.info(d,`Dry run - ${o.changedCount} packages would be modified.`):i.success(d,`Done. Updated ${o.changedCount} packages.`),a.ok(void 0)},q=O.createTrigger({handler:H,adaptInput:D,adaptOutput:W}),ee=async s=>{let e=k(s??[],{boolean:["dry-run"]}),o=U("versions",e);return await q(o)};export{I as a,T as b,j as c,H as d,q as e,ee as f};
|
package/chunks/done-DMKJ27IQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P}from"./chunk-YWSOQJ7G.js";import{a as x,d as O}from"./chunk-NYHMH3N5.js";import{h as I}from"./chunk-L32KHQVT.js";import{C as D,p as U,s as $}from"./chunk-OXP2FOO5.js";import{B as k,c as S,e as g,g as C,h as y,j as T}from"./chunk-RUTM4VP7.js";import{c as v}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{f,h,k as E}from"./chunk-SHN5MT56.js";import{c as l,d as o,f as a,g as w}from"./chunk-YVN2NZL4.js";import{a as d,b as n}from"./chunk-FFWPJP7A.js";import{i as u}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var B=async b=>{let e=f({renderer:E.ansi(),sink:h.stdout()}),{root:r}=await k(),p=C(b);if(!p.ok)return e.writeln(a(p.error)),await e.close(),n({exitCode:1});let t;try{t=await g(r,p.spec)}catch(i){let c=i instanceof Error?i.message:String(i);return e.writeln(a(c)),await e.close(),n({exitCode:1})}if(t.phase!=="EXECUTING")return e.writeln(a(`Cannot complete in phase: ${t.phase}`)),e.writeln(o("Only EXECUTING phase can transition to COMPLETED.")),await e.close(),n({exitCode:1});if(t.spec!==null){let i=`${r}/${S.specDir(t.spec)}`;try{await u.fs.stat(i)}catch{return e.writeln(a(`Active spec '${t.spec}' directory not found.`)),e.writeln(o("Run `noskills reset` to return to idle.")),await e.close(),n({exitCode:1})}}let m=await I(r),s=U(t,"done");s=$(s,"EXECUTING","COMPLETED",m),s.spec!==null&&await T(r,s.spec,s);let G=D(s);if(await y(r,G),s.spec!==null&&(await x(r,s.spec,"completed"),await O(r,s.spec,"completed")),await P(r,{ts:new Date().toISOString(),type:"phase-change",spec:t.spec??"unknown",user:m.name,from:"EXECUTING",to:"COMPLETED"}),e.writeln(w("\u2714")," Spec completed!"),e.writeln(""),e.writeln(" Spec: ",l(t.spec??"unknown")),e.writeln(` Iterations: ${t.execution.iteration}`),e.writeln(` Decisions: ${t.decisions.length}`),t.decisions.length>0){let i=t.decisions.filter(c=>c.promoted);i.length>0&&e.writeln(o(` Promoted to rules: ${i.length}`))}return e.writeln(""),e.writeln("Start a new spec with: ",l(`${v('spec new "..."')}`)),await e.close(),d(void 0)};export{B as main};
|
package/chunks/mod-IALKEUJL.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-5WJ6AUNY.js";var A=await import("node:fs"),r=t=>{try{return A.statSync(t),!0}catch{return!1}},_=t=>{let s=globalThis;if(typeof s.process<"u"&&typeof s.process.env=="object")return s.process.env[t]??void 0},W=t=>{if(t!==void 0)return t;let s=globalThis;return typeof s.__dirname=="string"?s.__dirname:typeof s.process<"u"&&typeof s.process.cwd=="function"?s.process.cwd():"."},y={command:"eser-ajan.wasm",reactor:"eser-ajan-reactor.wasm"},h=(t="command",s)=>{let e=y[t]??y.command,a=t==="reactor"?"wasi-reactor":"wasi",o=[],c=_("ESER_AJAN_WASM_PATH");if(c!==void 0){if(r(c))return c;o.push(`$ESER_AJAN_WASM_PATH = ${c}`)}let i=W(s),d=`${i}/${e}`;if(o.push(d),r(d))return d;let g=`${i}/..`,m=`${g}/dist/${a}/${e}`;if(o.push(m),r(m))return m;let f=`${i}/dist/${a}/${e}`;if(o.push(f),r(f))return f;let u=globalThis,p=typeof u.process<"u"&&typeof u.process.cwd=="function"?u.process.cwd():".";if(p!==i){let n=`${p}/pkg/@eser/ajan/dist/${a}/${e}`;if(o.push(n),r(n))return n}let $=[i,g,p];for(let n of $){let l=`${n}/node_modules/@eserstack/ajan-wasm/${e}`;if(o.push(l),r(l))return l}let P=[`/usr/local/lib/${e}`,`/usr/lib/${e}`];for(let n of P)if(o.push(n),r(n))return n;throw new Error(`Could not find eser-ajan WASM module (${e}).
|
|
3
|
-
Checked the following locations:
|
|
4
|
-
`+o.map(n=>` - ${n}`).join(`
|
|
5
|
-
`)+`
|
|
6
|
-
|
|
7
|
-
To fix this:
|
|
8
|
-
1. Install: npm install @eser/ajan
|
|
9
|
-
2. Or set ESER_AJAN_WASM_PATH to the full path of ${e}`)};var w=import.meta.dirname,b=(t="command")=>{try{return h(t,w),!0}catch{return!1}},S=async t=>{let s=t?.mode??"command",e=t?.wasmPath??h(s,w);if(s==="reactor"){let{loadReactorWasm:o}=await import("./loader-reactor-P6I3MX5L.js");return o(e)}let{loadCommandWasm:a}=await import("./loader-command-I5DTYP25.js");return a(e)};export{b as isWasmAvailable,S as loadEserAjanWasm};
|
package/chunks/next-FD3EHJW3.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as re}from"./chunk-5YBG2HOI.js";import{a as Ie}from"./chunk-NTY267SI.js";import"./chunk-L5OC7F24.js";import{a as z}from"./chunk-NQS27P25.js";import{a as ge,b as Se,c as ve}from"./chunk-6F4PFXYY.js";import"./chunk-IUORSUN6.js";import{a as K,c as Y,e as X}from"./chunk-5QUEAV4O.js";import"./chunk-KFVUFHJB.js";import{a as G}from"./chunk-NY4W44PI.js";import{a as we,b as ye,d as C}from"./chunk-2ZYCRMUT.js";import{a as be}from"./chunk-6WFCBJPF.js";import{a as W}from"./chunk-ODBJ5KMQ.js";import{a as Ee,b as Re,c as Fe,d as Oe}from"./chunk-NYHMH3N5.js";import{h as J}from"./chunk-L32KHQVT.js";import{a as xe,b as De,c as Z,d as ee,e as Ce,f as te,g as F,h as se,i as _,j as ne,k as ke,m as Ae,o as ie,p as Pe}from"./chunk-OXP2FOO5.js";import{A as fe,B as he,a as oe,c as R,e as ce,f as le,j as de,k as pe,l as ue,p as me,r as q,w as B}from"./chunk-RUTM4VP7.js";import{c as V}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{a as j,b}from"./chunk-FFWPJP7A.js";import{i as D}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var at=async d=>{let{root:e}=await he(),a=we(d),u=ye(d);if(!await fe(e))return await C({error:`noskills not initialized. Run: ${V("init")}`},a),b({exitCode:1});let n=null;for(let m of u)m.startsWith("--answer=")&&(n=m.slice(9));let s=le(u),t;try{t=await ce(e,s)}catch(m){let f=m instanceof Error?m.message:String(m);return await C({error:f},a),b({exitCode:1})}if(s===null&&t.phase!=="IDLE"&&t.phase!=="COMPLETED")return await C({error:"Error: --spec=<name> is required. Use `noskills spec list` to see available specs."},a),b({exitCode:1});let o=await ue(e);if(o?.command!==void 0){let{setCommandPrefix:m}=await import("./cmd-QE4P4DS4.js");m(o.command)}if(o===null)return await C({error:"No config found"},a),b({exitCode:1});if(t.spec!==null&&t.phase!=="IDLE"&&t.phase!=="COMPLETED"){let m=`${e}/${R.specDir(t.spec)}`;try{await D.fs.stat(m)}catch{return await C({error:!0,message:`Active spec '${t.spec}' directory not found. Files may have been deleted manually.`,suggestion:`Run \`${V("reset")}\` to return to idle, or \`${V("cancel")}\` to mark as cancelled.`},a),b({exitCode:1})}}let i=Ie(u,o);t.phase==="DISCOVERY"&&t.discovery.audience!==i&&(t={...t,discovery:{...t.discovery,audience:i}});let l=(await me(e)).filter(m=>o.concerns.includes(m.id));if(n!==null){let m=await J(e),f=await Ne(e,t,o,l,n,m);await q(e,f);let g={...f,lastCalledAt:new Date().toISOString()};await q(e,g);let U=D.env.get("NOSKILLS_SESSION")??null;U!==null&&await B(e,U,g.phase);let N=await K(e),{tier1:M,tier2Count:v}=Y(N,g.phase),k=g.spec!==null?await W(e,g.spec):null,P=await Te(e,g),x=await re(e,P),I=X(o?.tools??[]),S=await J(e),A=await z(g,l,M,o,k,x,void 0,I,S,v,e),Q=n.trim().toLowerCase()==="save",$e=g.phase===t.phase;if(Q&&$e&&(g.phase==="SPEC_DRAFT"||g.phase==="SPEC_APPROVED")){let Le=g.phase==="SPEC_DRAFT"?"Spec draft saved. The spec stays in DRAFT and can be reviewed by anyone. Other users can add ACs (`ac add`), notes (`note add`), or tasks (`task add`) while in draft. When ready, any user can approve with `noskills spec <name> approve`.":'Spec is approved and parked. Others can still add ACs or notes. When ready, run `noskills next --answer="start"` to begin execution.',Ue={...A,instruction:Le,saved:!0};return await C(Ue,a),j(void 0)}return await C(A,a),j(void 0)}let r={...t,lastCalledAt:new Date().toISOString()};await q(e,r);let p=D.env.get("NOSKILLS_SESSION")??null;p!==null&&await B(e,p,r.phase);let h=await K(e),{tier1:w,tier2Count:y}=Y(h,r.phase),H=r.spec!==null?await W(e,r.spec):null,O=await Te(e,r),T=await re(e,O),$;r.phase==="IDLE"&&($={existingSpecs:(await pe(e)).map(f=>({name:f.name,phase:f.state.phase,iteration:f.state.execution.iteration,detail:f.state.phase==="EXECUTING"?`${f.state.execution.completedTasks.length} tasks done, iteration ${f.state.execution.iteration}`:f.state.phase==="SPEC_DRAFT"?"awaiting approval":f.state.phase==="COMPLETED"?"completed":void 0})),rulesCount:w.length});let L=X(o?.tools??[]),ae=await J(e),E=await z(r,l,w,o,H,T,$,L,ae,y,e);return await C(E,a),j(void 0)},Ne=async(d,e,a,u,n,s)=>{switch(e.phase){case"DISCOVERY":{let t=e.specDescription!==null&&e.specDescription.length>0,o=e.discovery.mode;if(o===void 0&&t)return["full","validate","technical-depth","ship-fast","explore"].includes(n)?Z(e,n):Z(e,"full");let i=e.discovery.premisesCompleted===!0;if(o!==void 0&&!i){try{let p=JSON.parse(n);if(p!==null&&typeof p=="object"&&"premises"in p){let w=p.premises.map(y=>({text:y.text??"",agreed:y.agreed??!0,revision:y.revision,user:s?.name??"Unknown User",timestamp:new Date().toISOString()}));return ee(e,w)}}catch{}return ee(e,[])}let c=e.discovery.audience==="agent",l=null;try{let p=JSON.parse(n);typeof p=="object"&&p!==null&&!Array.isArray(p)&&(c?ge.map(y=>y.id).every(y=>y in p)&&(l=p):l=p)}catch{}let r=e;if(l!==null)for(let[p,h]of Object.entries(l))typeof h=="string"&&h.length>0&&(r=F(r,p,h,s));else{let p=Se(u),h=r.discovery.currentQuestion,w=p[h];if(w===void 0)return e;r=F(r,w.id,n,s),r=ke(r)}return ve(r.discovery.answers)&&(r=se(r)),r}case"DISCOVERY_REVIEW":{let t=n.trim().toLowerCase();if(t==="approve"){let i=G(e.discovery.answers);return i.detected&&i.proposals.length>=2?ne(e):e.discovery.mode!==void 0?ne(e):_(e)}if(t==="split")return await Me(d,e);if(t==="keep"){let i=ie(e,{id:`decision-split-keep-${Date.now()}`,question:"Split spec into separate areas?",choice:"Chose to keep as single spec despite multiple areas detected",promoted:!1,timestamp:new Date().toISOString()});return _(i)}let o=e.discovery.alternativesPresented===!0;if(e.discovery.approved&&!o){let i;if(t==="skip"||t==="none")i=te(e);else{let c=!1;try{let l=JSON.parse(n);if(l!==null&&typeof l=="object"&&"approach"in l){let r={id:String(l.approach),name:String(l.name??l.approach),summary:String(l.summary??""),effort:String(l.effort??""),risk:String(l.risk??""),user:s?.name??"Unknown User",timestamp:new Date().toISOString()};i=Ce(e,r),c=!0}}catch{}c||(i=te(e))}return _(i)}try{let i=JSON.parse(n);if(typeof i.revise=="object"&&i.revise!==null){let c=e;for(let[l,r]of Object.entries(i.revise))typeof r=="string"&&r.length>0&&(c=F(c,l,r,s));return c}}catch{}return e}case"SPEC_DRAFT":{if(n.trim().toLowerCase()==="save")return e;if(e.classification===null){let t,o=n.trim().toLowerCase();if(o==="none"||o==="skip")t={involvesWebUI:!1,involvesCLI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1};else try{let c=JSON.parse(n);t={involvesWebUI:c.involvesWebUI===!0||c.involvesUI===!0,involvesCLI:c.involvesCLI===!0||c.involvesUI===!0,involvesPublicAPI:c.involvesPublicAPI===!0,involvesMigration:c.involvesMigration===!0,involvesDataHandling:c.involvesDataHandling===!0}}catch{t={involvesWebUI:!1,involvesCLI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1}}let i={...e,classification:t};try{await be(d,i,u)}catch{}return i}try{let t=JSON.parse(n);if(typeof t.refinement=="string"&&t.refinement.length>0){let o=t.refinement;if(e.spec!==null){let i=`${d}/${R.specFile(e.spec)}`,c=await D.fs.readTextFile(i);if(o.includes("task-")){let r=je(o).map(w=>`- [ ] ${w}`).join(`
|
|
3
|
-
`),p=/## Tasks\n\n([\s\S]*?)(?=\n## |\n*$)/,h=c.replace(p,`## Tasks
|
|
4
|
-
|
|
5
|
-
${r}
|
|
6
|
-
`);await D.fs.writeTextFile(i,h)}}return e}}catch{}return e}case"SPEC_APPROVED":{if(n.trim().toLowerCase()==="save")return e;let t=Ae(e);return t.spec!==null&&(await Ee(d,t.spec,"executing"),await Oe(d,t.spec,"executing")),t}case"EXECUTING":{if(!e.execution.awaitingStatusReport){let t={...e,execution:{...e.execution,lastProgress:n}};if(a.verifyCommand!==null&&a.verifyCommand!==void 0&&a.verifyCommand.length>0){let o=await Ve(d,a.verifyCommand);if(t={...t,execution:{...t.execution,lastVerification:o}},!o.passed)return t}return t={...t,execution:{...t.execution,awaitingStatusReport:!0}},t}return await qe(d,e,n,u)}case"BLOCKED":{let t=e.execution.lastProgress??"Unknown",o={id:`d${e.decisions.length+1}`,question:t.replace(/^BLOCKED:\s*/,""),choice:n,promoted:!1,timestamp:new Date().toISOString()},i=ie(e,o);return i=xe(i,"EXECUTING"),i={...i,execution:{...i.execution,lastProgress:`Resolved: ${n}`}},i}default:return e}},Me=async(d,e)=>{let a=G(e.discovery.answers);if(!a.detected||a.proposals.length===0)return e;let u=[];for(let s of a.proposals){let t=`${d}/${R.specDir(s.name)}`;await D.fs.mkdir(t,{recursive:!0});let o=e.discovery.answers.filter(l=>s.relevantAnswers.includes(l.questionId)),c=De(oe(),s.name,`spec/${s.name}`);for(let l of o)c=F(c,l.questionId,l.answer);c=se(c),await de(d,s.name,c),u.push(s.name)}return Pe(e,"cancelled",`Split into: ${u.join(", ")}`)},je=d=>d.split(/(?=task-\d+:)/).map(e=>e.replace(/[,;\n\s]+$/,"").trim()).filter(e=>/^task-\d+:/.test(e)),qe=async(d,e,a,u)=>{let n;try{n=JSON.parse(a)}catch{return{...e,execution:{...e.execution,lastProgress:a,awaitingStatusReport:!1}}}let s=e;if(e.execution.debt!==null&&e.execution.debt.items.length>0&&typeof e.execution.debt.items[0]=="string"){let k=e.execution.debt.items.map((I,S)=>({id:`legacy-${S+1}`,text:I,since:e.execution.debt.fromIteration}));s={...e,execution:{...e.execution,debt:{...e.execution.debt,items:k}}};let P=new TextEncoder,x=D.process.stderr.getWriter();await x.write(P.encode(`noskills: migrated legacy string[] debt to DebtItem[] format
|
|
7
|
-
`)),x.releaseLock()}let t=new Set(["mandatory-tests","mandatory-docs"]),i=(n.na??[]).filter(v=>t.has(v));if(i.length>0)return{...s,execution:{...s.execution,lastProgress:`REJECTED: Tests and documentation ACs require explicit justification to mark as N/A. Explain why tests or docs are not needed for this spec. Rejected IDs: ${i.join(", ")}`,awaitingStatusReport:!0}};let c=n.completed??[],l=new Set(c),r=n.na??[],p=new Set(r),h=n.newIssues??[],w=n.remaining??[],y=n.blocked??[],H=s.execution.debt?.unaddressedIterations??0,O=s.execution.debt!==null?s.execution.debt.items.filter(v=>!l.has(v.id)&&!p.has(v.id)):[],T=s.execution.debtCounter??0,$=h.map((v,k)=>({id:`debt-${T+k+1}`,text:v,since:s.execution.iteration})),L=[...O,...$],E=w.length===0&&y.length===0&&h.length===0||L.length===0?null:{items:L,fromIteration:s.execution.debt?.fromIteration??s.execution.iteration,unaddressedIterations:O.length>0?H+1:1},m=[...new Set([...s.execution.naItems??[],...r])],f=[];c.length>0&&f.push(`Completed: ${c.join(", ")}`),r.length>0&&f.push(`N/A: ${r.join(", ")}`);let g=f.length>0?f.join("; "):"Status report submitted",U=s.execution.lastVerification===null||s.execution.lastVerification.passed===!0,N=E===null&&U,M=T+h.length;if(N&&s.spec!==null){let v=await W(d,s.spec);if(v!==null){let k=s.execution.completedTasks??[],P=new Set(k),x=[];try{let S=JSON.parse(s.execution.lastProgress??"");Array.isArray(S.completed)&&(x=S.completed.filter(A=>!P.has(A)&&v.tasks.some(Q=>Q.id===A)))}catch{}if(x.length===0){let S=v.tasks.find(A=>!P.has(A.id));S!==void 0&&(x=[S.id])}let I=[];for(let S of x)await Re(d,s.spec,S),await Fe(d,s.spec,S,"done"),I.push(S);if(I.length>0){let S=I.length===1?`Task ${I[0]} accepted`:`Tasks ${I.join(", ")} accepted`;return{...s,execution:{...s.execution,lastProgress:`${S}: ${g}`,awaitingStatusReport:!1,debt:E,completedTasks:[...k,...I],debtCounter:M,naItems:m}}}}}return{...s,execution:{...s.execution,lastProgress:N?g:`Task not accepted \u2014 remaining items must be addressed first. ${g}`,awaitingStatusReport:!1,debt:E,debtCounter:M,naItems:m}}},Ve=async(d,e)=>{try{let{execSync:a}=await import("node:child_process"),u=a(e,{cwd:d,encoding:"utf-8",timeout:6e4,stdio:["pipe","pipe","pipe"]});return{passed:!0,output:String(u).slice(0,4e3),timestamp:new Date().toISOString()}}catch(a){let u=a,n=((u.stdout??"")+(u.stderr??"")).slice(0,4e3);return u.status!==void 0?{passed:!1,output:n||"Verification failed with no output",timestamp:new Date().toISOString()}:{passed:!1,output:`Verification command failed to execute: ${a instanceof Error?a.message:String(a)}`,timestamp:new Date().toISOString()}}},Te=async(d,e)=>{let a=[...e.execution.modifiedFiles??[]],u=await _e(d);return[...new Set([...a,...u])]},_e=async d=>{let e=`${d}/${R.stateDir}/files-changed.jsonl`;try{let u=(await D.fs.readTextFile(e)).trim().split(`
|
|
8
|
-
`).filter(Boolean),n=[];for(let s of u)try{let t=JSON.parse(s);n.includes(t.file)||n.push(t.file)}catch{}return n}catch{return[]}};export{Ne as handleAnswer,at as main,je as parseRefinementTasks};
|