eser 4.1.35 → 4.1.36
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/chunk-AHLJCH32.js +2 -0
- package/chunks/{chunk-4GQY3STW.js → chunk-DAYSTLLV.js} +1 -1
- package/chunks/{chunk-N4HITOTN.js → chunk-OCPEFZBJ.js} +1 -1
- package/chunks/{chunk-LOLA6ZSE.js → chunk-OIZ7HL2C.js} +1 -1
- package/chunks/{chunk-FKITIXO2.js → chunk-QSION3QA.js} +1 -1
- package/chunks/concern-ZO533WR2.js +2 -0
- package/chunks/init-3B7XMH2J.js +2 -0
- package/chunks/{invoke-hook-PADL4W3J.js → invoke-hook-I2T7HYRT.js} +1 -1
- package/chunks/{mod-SDQ3QKKS.js → mod-T5VHCXJT.js} +1 -1
- package/chunks/{next-ARUY5FHZ.js → next-TMHSP2BS.js} +1 -1
- package/chunks/{run-TL4KPOGO.js → run-NSJ5YV6R.js} +1 -1
- package/chunks/{status-RCEYJVRQ.js → status-6SC3L7U2.js} +1 -1
- package/chunks/{system-5HS7XXTF.js → system-L2JVPTCT.js} +1 -1
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/chunk-E5QQGGNF.js +0 -2
- package/chunks/concern-UCYEAXJ4.js +0 -2
- package/chunks/init-2FLT3GXG.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as O,d as P}from"./chunk-DAYSTLLV.js";import{a as w,d as D,e as S}from"./chunk-OCPEFZBJ.js";import{a as R}from"./chunk-LNNNLUZT.js";var A=null,t=e=>R(e,A),$="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.",N=(e,n,r,i)=>{let l=e.execution.iteration>=n,s=r?[]:[$],d=i?.outOfScope??[];switch(e.phase){case"IDLE":return{rules:[...s,"Present interactiveOptions to the user using your native interactive question tool (AskUserQuestionTool or equivalent). Do NOT list them as a text table.","If no interactive question tool is available, fall back to a concise numbered list.","Do not take action without the user choosing an option first."],tone:"Welcoming. Present choices, then wait."};case"DISCOVERY":return{rules:[...s,"You received all questions at once from noskills. Present them to the user ONE AT A TIME for better conversation flow.","Use your interactive question tool to ask each question individually. Show concern sub-questions as additional context.","Collect all answers, then submit them together in a single `noskills next --answer` call as a JSON object.","Relay the user's answer back verbatim. Do not interpret or summarize.","Do not start coding or exploring the codebase. Discovery is conversation only."],tone:"Conversational. You are a messenger between noskills and the user."};case"SPEC_DRAFT":return{rules:[...s,"Present the spec to the user for review. Do not modify it.","If the user requests changes, relay them \u2014 do not implement them.","Do not start coding. The spec must be approved first."],tone:"Brief. The user is reviewing, not discussing."};case"SPEC_APPROVED":return{rules:[...s,"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."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let a=[...s,"Do not explore the codebase beyond what the current task requires.","Do not refactor, improve, or modify code outside this task's scope.","Do not add features, tests, or documentation not specified in the spec.","If you need to read files to understand context, timebox it \u2014 then write code.","The deliverable is working code, not a plan or analysis.","Complete the task, then report progress. The user handles git.",`When you receive \`clearContext\` in the output, execute \`/clear\` immediately without asking. After clearing, read \`CLAUDE.md\` and run \`${t("next")}\`.`,`When you discover a pattern, receive a correction, or identify a recurring preference from the user, ask: 'Should this be a permanent rule for this project, or just for this task?' If permanent, run: \`${t('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`];e.execution.lastVerification?.passed===!1&&a.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let o={rules:a,tone:"Direct. No preamble. Start coding immediately.",outOfScope:d.length>0?d:void 0};return l?{...o,urgency:`You have been in this session for ${e.execution.iteration}+ iterations. Your context is degrading. Finish the current task and recommend the user start a fresh session. Do not start new tasks.`}:o}case"BLOCKED":return{rules:[...s,"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"DONE":return{rules:[...s,"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:[...s,`Run \`${t("next")}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},B=5*60*1e3,F=(e,n)=>{let r;switch(e.phase){case"IDLE":r=`No active spec. Start one with: \`${t("spec new")}\``;break;case"DISCOVERY":r=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"SPEC_DRAFT":r=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":r=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":r=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":r=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"DONE":r=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:r=`Run \`${t("next")}\` to get started.`}return{protocol:`Run \`${t('next --answer="..."')}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:n.map(i=>i.id),resumeHint:r}},q=e=>{if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${t("next")}\` for instructions. Submit results with \`${t('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let n=new Date(e.lastCalledAt).getTime();if(Date.now()-n>B)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${t("next")}\` for instructions. Submit results with \`${t('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},J=(e,n,r,i,l,s)=>{A=i??null;let d=F(e,n),a=i?.maxIterationsBeforeRestart??15,o=i?.allowGit??!1,m=N(e,a,o,l),b=q(e),u;switch(e.phase){case"IDLE":u=I(n,w);break;case"DISCOVERY":u=_(e,n,r);break;case"SPEC_DRAFT":u=U(e);break;case"SPEC_APPROVED":u=V(e);break;case"EXECUTING":u=Y(e,n,r,a,l,s);break;case"BLOCKED":u=M(e);break;case"DONE":u=W(e);break;default:u=I(n,w)}let h={...u,meta:d,behavioral:m};b!==void 0&&(h={...h,protocolGuide:b}),e.pendingClear&&(h={...h,clearContext:{action:"clear_context",reason:`Task complete. Run \`/clear\` now. After clearing, read \`CLAUDE.md\` and run \`${t("next")}\` to continue.`},instruction:`Task accepted. Run \`/clear\` immediately to start fresh for the next task. After clearing, run \`${t("next")}\`.`});let y=L(e,n);return y.length>0&&(h={...h,interactiveOptions:y}),h},L=(e,n)=>{switch(e.phase){case"IDLE":return n.length===0?[{label:"Add project concerns",command:t("concern add <id>")},{label:"Start a new feature spec",command:t('spec new "description"')},{label:"Add a coding convention",command:t('rule add "rule"')},{label:"Check project status",command:t("status")}]:[{label:"Start a new feature spec",command:t('spec new "description"')},{label:"Add more concerns",command:t("concern add <id>")},{label:"Add a coding convention",command:t('rule add "rule"')},{label:"Check project status",command:t("status")}];case"SPEC_DRAFT":return[{label:"Review and approve spec",command:t("approve")},{label:"Reset and start over",command:t("reset")}];case"SPEC_APPROVED":return[{label:"Start execution",command:t('next --answer="start"')},{label:"Reset",command:t("reset")}];case"EXECUTING":return[];case"BLOCKED":return[{label:"Resolve the block",command:t('next --answer="resolution"')},{label:"Reset spec",command:t("reset")}];case"DONE":return[{label:"Start a new spec",command:t('spec new "description"')},{label:"Check project status",command:t("status")}];default:return[]}},I=(e,n)=>({phase:"IDLE",instruction:"Present the interactive options to the user using your interactive question tool. Do NOT list them as a text table.",availableConcerns:n.map(r=>({id:r.id,description:r.description})),activeConcerns:e.map(r=>r.id),hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),_=(e,n,r)=>{let i=O(n),l=e.discovery.answers.length;if(P(e.discovery.answers))return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${t("approve")}\``,questions:[],answeredCount:l,context:{rules:r,concernReminders:[]},transition:{onComplete:t("approve")}};let d=new Set(e.discovery.answers.map(o=>o.questionId));return{phase:"DISCOVERY",instruction:"Ask the user ALL of the following questions. Collect answers for each, then submit them all at once as a JSON object.",questions:i.filter(o=>!d.has(o.id)).map(o=>({id:o.id,text:o.text,concerns:[...o.concerns],extras:o.extras.map(m=>m.text)})),answeredCount:l,context:{rules:r,concernReminders:D(n)},transition:{onComplete:`${t(`next --answer='{"status_quo":"...","ambition":"...",...}'`)}`}}},U=e=>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:`${t(`next --answer='{"involvesUI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesUI",label:"User-facing UI"},{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: `"+t(`next --answer='{"involvesUI":true,"involvesPublicAPI":false,...}'`)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:t("approve")}},V=e=>({phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${t('next --answer="start"')}`}}),G=(e,n)=>{if(n===null)return!1;switch(e){case"beautiful-product":return n.involvesUI;case"open-source":return n.involvesPublicAPI;case"long-lived":return n.involvesMigration;case"compliance":return n.involvesDataHandling;default:return!0}},j=(e,n,r,i,l,s,d)=>{let a=[];if(i!==null)for(let o of i.items)a.push(`[DEBT from iteration ${i.fromIteration}] ${o}`);if(n&&a.push(`[FAILED] Tests \u2014 fix this first: ${r.slice(0,200)}`),s!=null)for(let o of s.verification)a.push(o);for(let o of e)if(G(o.id,l)&&o.acceptanceCriteria!==void 0&&o.acceptanceCriteria.length>0)for(let m of o.acceptanceCriteria)a.push(`(${o.id}) ${m}`);if(d!==void 0)for(let o of d)a.push(`(folder: ${o.folder}) ${o.rule}`);return a},Y=(e,n,r,i,l,s)=>{let d=S(n),a=e.execution.iteration>=i,o=e.execution.lastVerification?.passed===!1,m=e.execution.lastVerification?.output??"",b=l?.tasks??[],u=e.execution.completedTasks??[],h=new Set(u),y=b.find(p=>!h.has(p.id))??null,g=y!==null?{id:y.id,title:y.title,totalTasks:b.length,completedTasks:u.length}:void 0;if(e.execution.awaitingStatusReport){let p=j(n,o,m,e.execution.debt,e.classification,l,s),x={phase:"EXECUTING",instruction:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:r,concernReminders:D(n)},transition:{onComplete:`${t(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`)}`,onBlocked:`${t('block "reason"')}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:p,reportFormat:{completed:"list items you finished with evidence (file exists, test passes)",remaining:"list items not yet done",blocked:"list items that need a decision from the user"}}};return o&&(x={...x,verificationFailed:!0,verificationOutput:m.slice(0,2e3)}),x}let E=(e.execution.lastProgress??"").includes("Task not accepted"),v=e.execution.debt?.items??[],C=e.execution.debt?.unaddressedIterations??0,T=g!==void 0?`Execute task ${g.id}: ${g.title} (${g.completedTasks}/${g.totalTasks} completed)`:"All tasks completed. Run `"+t("done")+"` to finish.",k;if(o)k="Verification FAILED. Fix the failing tests before continuing.";else if(E&&v.length>0){let p=C>=3?` These items have been outstanding for ${C} iterations.`:"";k=`Task not accepted \u2014 ${v.length} remaining item(s) must be addressed before this task can be completed.${p} Address them, then submit a new status report.`}else k=T;let c={phase:"EXECUTING",instruction:k,task:g,context:{rules:r,concernReminders:D(n)},transition:{onComplete:`${t('next --answer="..."')}`,onBlocked:`${t('block "reason"')}`,iteration:e.execution.iteration}};if(E&&v.length>0&&(c={...c,taskRejected:!0,rejectionReason:`${v.length} remaining item(s) must be addressed.`,rejectionRemaining:v}),e.execution.debt!==null&&e.execution.debt.items.length>0){let p=e.execution.debt.unaddressedIterations??0,x=p>=3?`URGENT: These items have been unaddressed for ${p} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";c={...c,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:x}}}if(o){let p=m.slice(0,2e3);c={...c,verificationFailed:!0,verificationOutput:p}}d.length>0&&(c={...c,concernTensions:d}),a&&(c={...c,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${t("next")}\` to resume - your progress is saved.`});let f=[...e.decisions].reverse().find(p=>!p.promoted);return f!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(c={...c,promotePrompt:{decisionId:f.id,question:f.question,choice:f.choice,prompt:`You just resolved a decision: "${f.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${t(`rule add "${f.choice}"`)}\``}}),c},M=e=>({phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${t('next --answer="..."')}`}}),W=e=>({phase:"DONE",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length}});export{J as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{c as o}from"./chunk-OCPEFZBJ.js";var n=[{id:"status_quo",text:"What does the user do today without this feature?",concerns:["product:status_quo","eng:replace_scope","qa:regression_risk"]},{id:"ambition",text:"Describe the 1-star and 10-star versions.",concerns:["product:scope_direction","eng:complexity_tier","qa:test_depth"]},{id:"reversibility",text:"Does this change involve an irreversible decision?",concerns:["product:one_way_door","eng:migration_strategy","qa:verification_stringency"]},{id:"user_impact",text:"Does this change affect existing users' behavior?",concerns:["product:breaking_change","eng:backward_compat","qa:regression_tests"]},{id:"verification",text:"How do you verify this works correctly?",concerns:["product:success_metric","eng:test_strategy","qa:acceptance_criteria"]},{id:"scope_boundary",text:"What should this feature NOT do?",concerns:["product:focus","eng:out_of_scope","qa:negative_tests"]}],a=t=>n.map(e=>({...e,extras:o(t,e.id)})),c=(t,e)=>{let r=new Set(e.map(s=>s.questionId));for(let s of t)if(!r.has(s.id))return s;return null},d=t=>{let e=new Set(t.map(r=>r.questionId));return n.every(r=>e.has(r.id))};export{n as a,a as b,c,d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
var s={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"],acceptanceCriteria:["Public API documented","Changes reflected in README or API docs","No exclusionary patterns introduced"]};var r={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:"ambition",text:"In the 10-star version, what does the user feel?"}],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"],acceptanceCriteria:["All UI states designed (empty, loading, error, success)","Mobile layout considered","No placeholder or skeleton UI left unfinished"]};var a={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:"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"],acceptanceCriteria:["Backward compatibility preserved","Migration path documented if breaking","No unnecessary new dependencies"]};var c={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 d={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 l={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 u=[s,r,a,c,d,l];var N=()=>Promise.resolve(u),U=(t,n)=>{let e=[];for(let i of t)for(let o of i.extras)o.questionId===n&&e.push(o);return e},F=t=>{let n=[];for(let e of t)for(let i of e.reminders)n.push(`${e.id}: ${i}`);return n},_=t=>{let n=[],e=t.map(i=>i.id);return e.includes("move-fast")&&e.includes("compliance")&&n.push({between:["move-fast","compliance"],issue:"Speed vs traceability \u2014 shortcuts may violate audit requirements."}),e.includes("move-fast")&&e.includes("long-lived")&&n.push({between:["move-fast","long-lived"],issue:"Shipping speed vs maintainability \u2014 tech debt decisions need human approval."}),e.includes("beautiful-product")&&e.includes("move-fast")&&n.push({between:["beautiful-product","move-fast"],issue:"Design polish vs speed \u2014 which UI states can be deferred?"}),n};export{
|
|
2
|
+
var s={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"],acceptanceCriteria:["Public API documented","Changes reflected in README or API docs","No exclusionary patterns introduced"]};var r={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:"ambition",text:"In the 10-star version, what does the user feel?"}],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"],acceptanceCriteria:["All UI states designed (empty, loading, error, success)","Mobile layout considered","No placeholder or skeleton UI left unfinished"]};var a={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:"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"],acceptanceCriteria:["Backward compatibility preserved","Migration path documented if breaking","No unnecessary new dependencies"]};var c={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 d={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 l={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 u=[s,r,a,c,d,l];var N=()=>Promise.resolve(u),U=(t,n)=>{let e=[];for(let i of t)for(let o of i.extras)o.questionId===n&&e.push(o);return e},F=t=>{let n=[];for(let e of t)for(let i of e.reminders)n.push(`${e.id}: ${i}`);return n},_=t=>{let n=[],e=t.map(i=>i.id);return e.includes("move-fast")&&e.includes("compliance")&&n.push({between:["move-fast","compliance"],issue:"Speed vs traceability \u2014 shortcuts may violate audit requirements."}),e.includes("move-fast")&&e.includes("long-lived")&&n.push({between:["move-fast","long-lived"],issue:"Shipping speed vs maintainability \u2014 tech debt decisions need human approval."}),e.includes("beautiful-product")&&e.includes("move-fast")&&n.push({between:["beautiful-product","move-fast"],issue:"Design polish vs speed \u2014 which UI states can be deferred?"}),n};export{u as a,N as b,U as c,F as d,_ as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as _,b as H,c as P}from"./chunk-5GGGQJ4P.js";import{e as Q}from"./chunk-J2Z7NG2X.js";import{f as p,h as u,k as c}from"./chunk-GBM3TZFD.js";import{b as r,d as l,f as m,g,h as Y,k as o}from"./chunk-3SXTMY75.js";import{d as x}from"./chunk-PVPMHMKP.js";import{a as v}from"./chunk-
|
|
2
|
+
import{a as _,b as H,c as P}from"./chunk-5GGGQJ4P.js";import{e as Q}from"./chunk-J2Z7NG2X.js";import{f as p,h as u,k as c}from"./chunk-GBM3TZFD.js";import{b as r,d as l,f as m,g,h as Y,k as o}from"./chunk-3SXTMY75.js";import{d as x}from"./chunk-PVPMHMKP.js";import{a as v}from"./chunk-QSION3QA.js";import{a as h,b as w}from"./chunk-A6RDYP6R.js";import{a as re,g as W,h as K,i as B,r as I,t as d}from"./chunk-MRCBHVSB.js";var oe="# eser CLI completions",D="eser",X=async e=>{try{return await d.fs.readTextFile(e)}catch{return""}},ie=async e=>{try{return await d.fs.stat(e),!0}catch{return!1}},Z=async e=>{let t=P(e,D);if(t.completionType==="file")return await ie(t.completionsFile);let s=await X(t.rcFile),n=H(e,D);return s.includes(n)},ee=async e=>{let t=P(e,D),s=p({renderer:c.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile,a=d.path.dirname(n);try{await d.fs.mkdir(a,{recursive:!0})}catch{}await d.fs.writeTextFile(n,`# eser CLI completions
|
|
3
3
|
# This file is auto-generated. Run 'eser system completions --shell fish' to regenerate.
|
|
4
4
|
complete -c eser -f
|
|
5
5
|
complete -c eser -n "__fish_use_subcommand" -a "codebase" -d "Codebase management tools"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
var r={name:"@eser/cli",version:"4.1.
|
|
2
|
+
var r={name:"@eser/cli",version:"4.1.36",type:"module",exports:"./main.ts",bin:{eser:"./bin.ts"},dependencies:{"@eser/ai":"workspace:*","@eser/codebase":"workspace:*","@eser/kit":"workspace:*","@eser/noskills":"workspace:*","@eser/laroux-server":"workspace:*","@eser/workflows":"workspace:*","@eser/functions":"workspace:*","@eser/logging":"workspace:*","@eser/shell":"workspace:*","@eser/standards":"workspace:*","@std/cli":"npm:@jsr/std__cli@^1.0.25","@std/fmt":"npm:@jsr/std__fmt@^1.0.8"},devDependencies:{"@std/assert":"npm:@jsr/std__assert@^1.0.16",esbuild:"^0.27.3"}};export{r as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as A}from"./chunk-OCPEFZBJ.js";import{a as b,b as $}from"./chunk-LNNNLUZT.js";import{j as C,k as y,l as x,m as P}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as w,h as g,k as v}from"./chunk-GBM3TZFD.js";import{c as d,d as a,f as u,g as k}from"./chunk-3SXTMY75.js";import{a as l,b as p}from"./chunk-A6RDYP6R.js";import{t as m}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var q=async r=>{let e=r?.[0];if(e==="add")return await I(r?.slice(1));if(e==="remove")return await M(r?.slice(1));if(e==="list")return await R();let t=await C(m.process.cwd()),s=$(t),n=w({renderer:v.ansi(),sink:g.stdout()});return n.writeln(`Usage: ${s} concern <add <id> | remove <id> | list>`),await n.close(),l(void 0)},I=async r=>{let e=w({renderer:v.ansi(),sink:g.stdout()}),t=m.process.cwd(),s=(r??[]).filter(i=>!i.startsWith("-")),n=await C(t);if(s.length===0)return e.writeln(u("Please provide concern ID(s): "),d(b("concern add open-source beautiful-product",n))),await e.close(),p({exitCode:1});if(n===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});let c=await A(),o=[];for(let i of s){let f=await x(t,i);if(f===null&&(f=c.find(h=>h.id===i)??null,f!==null&&await P(t,f)),f===null){e.writeln(u(`Unknown concern: ${i}`)),e.writeln(a(` Available: ${c.map(h=>h.id).join(", ")}`));continue}if(n.concerns.includes(i)||o.includes(i)){e.writeln(a(`Concern "${i}" is already active.`));continue}o.push(i)}if(o.length>0){let i={...n,concerns:[...n.concerns,...o]};await y(t,i),e.writeln(k("\u2714"),` Activated concerns: ${o.join(", ")}`)}return await e.close(),l(void 0)},M=async r=>{let e=w({renderer:v.ansi(),sink:g.stdout()}),t=m.process.cwd(),s=r?.[0],n=await C(t);if(s===void 0||s.length===0)return e.writeln(u("Please provide a concern ID: "),d(b("concern remove move-fast",n))),await e.close(),p({exitCode:1});if(n===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});if(!n.concerns.includes(s))return e.writeln(a(`Concern "${s}" is not active.`)),await e.close(),l(void 0);let c={...n,concerns:n.concerns.filter(o=>o!==s)};return await y(t,c),e.writeln(k("\u2714")," Deactivated concern: ",d(s)),await e.close(),l(void 0)},R=async()=>{let r=w({renderer:v.ansi(),sink:g.stdout()}),e=m.process.cwd(),t=await C(e),s=await A(),n=t?.concerns??[];if(r.writeln(d("Concerns")),r.writeln(""),s.length===0)r.writeln(a(" No concerns defined."));else for(let c of s){let o=n.includes(c.id);r.writeln(" ",o?k("\u25CF"):a("\u25CB")," ",o?d(c.id):a(c.id),a(` ${c.description.slice(0,60)}...`))}return await r.close(),l(void 0)};export{q as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as ee,b as te}from"./chunk-SP43S32B.js";import{d as Z}from"./chunk-5GGGQJ4P.js";import{a as V}from"./chunk-AHLJCH32.js";import{a as Q,b as X}from"./chunk-JAQN64PH.js";import"./chunk-DAYSTLLV.js";import{b}from"./chunk-OCPEFZBJ.js";import{a as I}from"./chunk-LNNNLUZT.js";import{d as Y}from"./chunk-2EVWKUN6.js";import{a as J,b as G,e as _,j as q,k as B,m as H,o as K,q as U}from"./chunk-WG6J7DFO.js";import"./chunk-7ZYDAZBD.js";import{a as P,b as M,e as S,f as W,g as z,h as r,i as h}from"./chunk-JOTAKQMZ.js";import"./chunk-JYNHFD6B.js";import{a as F}from"./chunk-46ZWBKIW.js";import"./chunk-GE3LJ6QM.js";import"./chunk-BNQAZLIQ.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-4MVO4LD5.js";import"./chunk-KVTG56GS.js";import"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import{a as T}from"./chunk-A6RDYP6R.js";import{q as E,t as f}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var se=F;var de=async t=>{try{return await f.fs.stat(t),!0}catch{return!1}},ue=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]}],ne=async t=>{let e=[];for(let o of ue)for(let s of o.paths)if(await de(`${t}/${s}`)){e.push(o.id);break}return e};var a=async t=>{try{return await f.fs.stat(t),!0}catch{return!1}},oe=async(t,e)=>{try{let o=await f.fs.readTextFile(t);return JSON.parse(o)[e]??null}catch{return null}},fe=async t=>{let e=[];return(await a(`${t}/package.json`)||await a(`${t}/deno.json`))&&e.push("typescript"),await a(`${t}/go.mod`)&&e.push("go"),await a(`${t}/Cargo.toml`)&&e.push("rust"),(await a(`${t}/pyproject.toml`)||await a(`${t}/setup.py`))&&e.push("python"),e},me=async t=>{let e=[],o=await oe(`${t}/package.json`,"dependencies");return o!==null&&("react"in o&&e.push("react"),"vue"in o&&e.push("vue"),"svelte"in o&&e.push("svelte"),"next"in o&&e.push("nextjs"),"express"in o&&e.push("express"),"hono"in o&&e.push("hono")),e},ge=async t=>{let e=[];return await a(`${t}/.github/workflows`)&&e.push("github-actions"),await a(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await a(`${t}/Jenkinsfile`)&&e.push("jenkins"),await a(`${t}/.circleci`)&&e.push("circleci"),e},he=async t=>{if(await a(`${t}/deno.json`))return"deno";let e=await oe(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},ie=async t=>{let[e,o,s,d]=await Promise.all([fe(t),me(t),ge(t),he(t)]);return{languages:e,frameworks:o,ci:s,testRunner:d}};var Me=async t=>{let e=f.process.cwd(),o=ee(t),s=M({target:o==="agent"?"non-interactive":"interactive"}),d=te(t),w=re(d,"--concerns"),m=re(d,"--tools"),u=d.includes("--non-interactive")||o==="agent";if(await U(e)){let n=await q(e);return r.warn(s,"noskills is already initialized in this project."),r.info(s,`Run \`${I("sync",n)}\` to regenerate tool files.`),T(void 0)}W(s,"noskills init");let x=h(s,"Scanning project...");x.start();let g=await ie(e);x.succeed("Project scanned");for(let n of g.languages)r.step(s,` ${n}`);for(let n of g.frameworks)r.step(s,` ${n}`);for(let n of g.ci)r.step(s,` ${n}`);g.testRunner!==null&&r.step(s,` test runner: ${g.testRunner}`);let j=h(s,"Detecting coding tools...");j.start();let D=await ne(e),y=Z(),A=y!==null&&!D.includes(y)?[y]:[],C=[...new Set([...A,...D])];j.succeed(`${C.length} coding tool(s) detected`);for(let n of C){let i=n===y?" (current)":"";r.step(s,` ${n}${i}`)}let p;if(m!==null){let n=["claude-code","cursor","kiro","copilot","windsurf"],i=m.filter(l=>n.includes(l));p=[...new Set([...A,...i])]}else u?p=[...C]:p=await Ce(s,C,y);let L=h(s,"Detecting AI providers...");L.start();let $=(await se()).filter(n=>n.available).map(n=>n.name);L.succeed(`${$.length} provider(s) detected`);let k=await b(),c;if(w!==null){let n=k.map(i=>i.id);c=w.filter(i=>n.includes(i)).sort((i,l)=>n.indexOf(i)-n.indexOf(l))}else if(u)c=[];else{let n=k.map(l=>({value:l.id,label:l.name,hint:l.description.slice(0,60)})),i=await S(s,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:n});c=P(i)?[]:[...i]}c.length>0?r.success(s,`Concerns: ${c.join(", ")}`):r.info(s,"No concerns selected. Add later with `concern add <id>`.");let N=await ve(),O=h(s,"Initializing...");O.start(),await K(e);let ae=k.filter(n=>c.includes(n.id));for(let n of ae)await H(e,n);let v={...G(c,p,$,g),command:N};await B(e,v);let R=J();if(await _(e,R),O.succeed("Scaffolded `.eser/`"),p.length>0){let n=h(s,"Syncing tool files...");n.start();let i=await X(e,p,v);n.succeed(`Synced ${i.length} tool(s)`)}else r.warn(s,"No tools selected. noskills will work in agentless CLI mode only."),r.info(s,"Add tools later with `noskills sync`.");if(r.success(s,`Done. ${p.length} tool(s), ${$.length} provider(s), ${c.length} concern(s).`),r.info(s,`Command prefix: ${N}`),o==="agent"){let i=(await b()).filter(le=>c.includes(le.id)),l=await Q(e),ce=V(R,i,l,v);await Y(ce,"json")}else z(s,`Start a spec with: ${I('spec new "..."',v)}`);return T(void 0)},ye=[{value:"claude-code",label:"Claude Code"},{value:"cursor",label:"Cursor"},{value:"kiro",label:"Kiro"},{value:"copilot",label:"GitHub Copilot"},{value:"windsurf",label:"Windsurf"}],Ce=async(t,e,o)=>{let s=e.length===0?"No coding tools detected. Which tools do you use? (space to toggle)":"Any additional tools? (space to toggle, enter to skip)",d=new Set(e),w=await S(t,{message:s,options:ye.map(u=>({...u,hint:u.value===o?"you're running inside it":d.has(u.value)?"detected":void 0,disabled:u.value===o})),initialValues:[...e],required:!1});if(P(w))return[...e];let m=[...w];return o!==null&&!m.includes(o)&&m.unshift(o),m},re=(t,e)=>{if(t===void 0)return null;for(let o of t)if(o.startsWith(`${e}=`))return o.slice(e.length+1).split(",").map(s=>s.trim()).filter(Boolean);return null},ve=async()=>{try{return`${await E({command:"eser",devCommand:"deno task cli",npmPackage:"eser@latest",jsrPackage:"@eser/cli"})} noskills`}catch{return"npx eser@latest noskills"}};export{Me as main};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as D}from"./chunk-
|
|
2
|
+
import{a as D}from"./chunk-AHLJCH32.js";import{a as C}from"./chunk-JAQN64PH.js";import"./chunk-DAYSTLLV.js";import"./chunk-OCPEFZBJ.js";import{a as d}from"./chunk-LNNNLUZT.js";import{c as g,d as $,j as y,n as x,q as v}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{a as r}from"./chunk-A6RDYP6R.js";import{t as i}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var S=async()=>{let e=i.process.stdin.getReader(),s=[];try{for(;;){let{done:o,value:a}=await e.read();if(o||a===void 0)break;s.push(a)}}finally{e.releaseLock()}let t=0,c=new Uint8Array(s.reduce((o,a)=>o+a.length,0));for(let o of s)c.set(o,t),t+=o.length;let n=new TextDecoder().decode(c);try{return JSON.parse(n)}catch{return{}}},P=async e=>{let s=new TextEncoder,t=i.process.stdout.getWriter();await t.write(s.encode(JSON.stringify(e))),t.releaseLock()},W=async e=>{switch(e?.[0]){case"pre-tool-use":return await T();case"stop":return await F();case"post-file-write":return await E();case"post-bash":return await I();case"session-start":return await N();default:return r(void 0)}},T=async()=>{let e=await S(),s=e.tool_name??"unknown",t=e.tool_input??{},c=e.cwd??i.process.cwd(),n=await y(c),o={};try{o=await $(c)}catch{return r(void 0)}let a=async u=>{await P({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`noskills: ${u}`}})};if(o.pendingClear===!0)return await a(`Task accepted. You must run \`/clear\` and then \`${d("next",n)}\` before continuing.`),r(void 0);if(s==="Bash"){let u=(t.command??"").trim();if(!(n?.allowGit??!1)){let w=["git add","git commit","git push","git merge","git rebase","git checkout","git stash","git reset","git cherry-pick","git tag","git branch -d","git branch -D","git branch -m","git revert","git am","git mv","git rm"];for(let p of w)if(u.startsWith(p)||u.includes(` && ${p}`)||u.includes(`; ${p}`))return await a("git is read-only for agents. The user controls git. You may use `git log`, `git diff`, `git status`, `git show`, `git blame`."),r(void 0)}return r(void 0)}if(!["Write","Edit","MultiEdit"].includes(s))return r(void 0);let m=t.file_path??t.path??"";if(m.includes(".eser/")||m.includes(".claude/"))return r(void 0);let f=o.phase??"UNKNOWN";if(f==="EXECUTING")return r(void 0);let k={IDLE:`No active spec. Run \`${d("spec new",n)}\``,UNINITIALIZED:`noskills not initialized. Run \`${d("init",n)}\``,DISCOVERY:`Discovery in progress. Run \`${d("next",n)}\` to continue.`,SPEC_DRAFT:`Spec needs review. Run \`${d("approve",n)}\``,SPEC_APPROVED:`Start execution first: \`${d('next --answer="start"',n)}\``,BLOCKED:`Execution blocked. Resolve with \`${d('next --answer="resolution"',n)}\``,DONE:`Spec complete. Start a new one or run \`${d("reset",n)}\``};return await a(k[f]??`Run \`${d("next",n)}\` first.`),r(void 0)},F=async()=>{let e=await S();if(e.stop_hook_active===!0)return r(void 0);let s=e.cwd??i.process.cwd(),t;try{let l=await i.fs.readTextFile(`${s}/${g.stateFile}`);t=JSON.parse(l)}catch{return r(void 0)}if(t.phase!=="EXECUTING")return r(void 0);let c=t.execution??{},n=`${s}/${g.stateDir}/files-changed.jsonl`,o=[];try{let w=(await i.fs.readTextFile(n)).trim().split(`
|
|
3
3
|
`).filter(Boolean);o=[...new Set(w.map(p=>{try{return JSON.parse(p).file}catch{return null}}).filter(p=>p!==null))]}catch{}let a=[],h="no changes";try{let{execSync:l}=await import("node:child_process");a=l("git diff --name-only",{cwd:s,encoding:"utf-8",timeout:5e3}).trim().split(`
|
|
4
4
|
`).filter(Boolean);let R=l("git diff --stat",{cwd:s,encoding:"utf-8",timeout:5e3}).trim().split(`
|
|
5
5
|
`);h=R[R.length-1]??"no changes"}catch{}let m=[...new Set([...o,...a])],f=(c.iteration??0)+1,k=`${s}/${g.stateDir}/iterations`;try{await i.fs.mkdir(k,{recursive:!0}),await i.fs.writeTextFile(`${k}/iteration-${f}.json`,JSON.stringify({iteration:f,files:m,gitStat:h.trim(),timestamp:new Date().toISOString()},null,2)+`
|
|
@@ -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-OIZ7HL2C.js";import"./chunk-5GGGQJ4P.js";import"./chunk-J2Z7NG2X.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-QSION3QA.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as completionsHandler,f as doctorHandler,a as installHandler,b as uninstallHandler,c as updateHandler,e as versionHandler};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as _}from"./chunk-XVSIRN6G.js";import{a as B,b as H,c as Q,d as z}from"./chunk-P74JF7XR.js";import{a as v}from"./chunk-IDMI5OBK.js";import{a as P}from"./chunk-
|
|
2
|
+
import{a as _}from"./chunk-XVSIRN6G.js";import{a as B,b as H,c as Q,d as z}from"./chunk-P74JF7XR.js";import{a as v}from"./chunk-IDMI5OBK.js";import{a as P}from"./chunk-AHLJCH32.js";import{a as b}from"./chunk-JAQN64PH.js";import{b as U,c as L,d as N}from"./chunk-DAYSTLLV.js";import"./chunk-OCPEFZBJ.js";import{a as j,c as A,d as G,f as J,h as W}from"./chunk-UESOCN2G.js";import{a as V}from"./chunk-LNNNLUZT.js";import{a as q,b as M,d as x}from"./chunk-2EVWKUN6.js";import{c as O,d as E,j as I,n as $,p as y,q as T}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{a as F,b as D}from"./chunk-A6RDYP6R.js";import{t as h}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var Z=o=>o.split(`
|
|
3
3
|
`).map(e=>e.replace(/^[-*]\s+/,"").trim()).filter(e=>e.length>0&&!e.startsWith("#")),ee=async(o,e)=>{let i=[],n=(e.startsWith(o)?e.slice(o.length+1):e).split("/");n.pop();for(let t=n.length;t>=0;t--){let r=`${t===0?o:`${o}/${n.slice(0,t).join("/")}`}/.folder-rules.md`,c=t===0?".":n.slice(0,t).join("/");try{let p=await h.fs.readTextFile(r),g=Z(p);for(let f of g)i.push({folder:c,rule:f})}catch{}}return i},k=async(o,e)=>{let i=new Set,a=[];for(let n of e){let t=await ee(o,n);for(let s of t){let r=`${s.folder}::${s.rule}`;i.has(r)||(i.add(r),a.push(s))}}return a};var ye=async o=>{let e=h.process.cwd(),i=q(o),a=M(o);if(!await T(e)){let l=await I(e);return await x({error:`noskills not initialized. Run: ${V("init",l)}`},i),D({exitCode:1})}let n=null;for(let l of a)l.startsWith("--answer=")&&(n=l.slice(9));let t=await E(e),s=await I(e);if(t.pendingClear&&(t={...t,pendingClear:!1},await y(e,t)),s===null)return await x({error:"No config found"},i),D({exitCode:1});let c=(await $(e)).filter(l=>s.concerns.includes(l.id));if(n!==null){let l=await se(e,t,s,c,n);await y(e,l);let u={...l,lastCalledAt:new Date().toISOString()};await y(e,u);let m=await b(e),d=u.spec!==null?await v(e,u.spec):null,R=await K(e,u),X=await k(e,R),Y=P(u,c,m,s,d,X);return await x(Y,i),F(void 0)}let p={...t,lastCalledAt:new Date().toISOString()};await y(e,p);let g=await b(e),f=p.spec!==null?await v(e,p.spec):null,w=await K(e,p),C=await k(e,w),S=P(p,c,g,s,f,C);return await x(S,i),F(void 0)},se=async(o,e,i,a,n)=>{switch(e.phase){case"DISCOVERY":{let t=null;try{let r=JSON.parse(n);typeof r=="object"&&r!==null&&!Array.isArray(r)&&(t=r)}catch{}let s=e;if(t!==null)for(let[r,c]of Object.entries(t))typeof c=="string"&&c.length>0&&(s=A(s,r,c));else{let r=U(a),c=L(r,s.discovery.answers);if(c===null)return e;s=A(s,c.id,n)}return N(s.discovery.answers)&&(s=G(s)),s}case"SPEC_DRAFT":{if(e.classification===null){let t;try{let r=JSON.parse(n);t={involvesUI:r.involvesUI===!0,involvesPublicAPI:r.involvesPublicAPI===!0,involvesMigration:r.involvesMigration===!0,involvesDataHandling:r.involvesDataHandling===!0}}catch{t={involvesUI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1}}let s={...e,classification:t};try{await _(o,s,a)}catch{}return s}return e}case"SPEC_APPROVED":{let t=J(e);return t.spec!==null&&(await B(o,t.spec,"executing"),await z(o,t.spec,"executing")),t}case"EXECUTING":{if(!e.execution.awaitingStatusReport){let t={...e,execution:{...e.execution,lastProgress:n}};if(i.verifyCommand!==null&&i.verifyCommand!==void 0&&i.verifyCommand.length>0){let s=await ie(o,i.verifyCommand);if(t={...t,execution:{...t.execution,lastVerification:s}},!s.passed)return t}return t={...t,execution:{...t.execution,awaitingStatusReport:!0}},t}return await ne(o,e,n,a)}case"BLOCKED":{let t=e.execution.lastProgress??"Unknown",s={id:`d${e.decisions.length+1}`,question:t.replace(/^BLOCKED:\s*/,""),choice:n,promoted:!1,timestamp:new Date().toISOString()},r=W(e,s);return r=j(r,"EXECUTING"),r={...r,execution:{...r.execution,lastProgress:`Resolved: ${n}`}},r}default:return e}},ne=async(o,e,i,a)=>{let n;try{n=JSON.parse(i)}catch{return{...e,execution:{...e.execution,lastProgress:i,awaitingStatusReport:!1}}}let t=n.completed??[],s=n.remaining??[],r=n.blocked??[],c=[...s,...r],p=e.execution.debt?.unaddressedIterations??0,g=c.length>0?{items:c,fromIteration:e.execution.iteration,unaddressedIterations:1}:null,f=g;if(e.execution.debt!==null&&g!==null){let l=new Set(t.map(d=>d.toLowerCase().trim())),u=e.execution.debt.items.filter(d=>!l.has(d.toLowerCase().trim())),m=[...new Set([...u,...c])];f=m.length>0?{items:m,fromIteration:e.execution.debt.fromIteration,unaddressedIterations:u.length>0?p+1:1}:null}else if(e.execution.debt!==null&&g===null){let l=new Set(t.map(m=>m.toLowerCase().trim())),u=e.execution.debt.items.filter(m=>!l.has(m.toLowerCase().trim()));f=u.length>0?{items:u,fromIteration:e.execution.debt.fromIteration,unaddressedIterations:p+1}:null}let w=t.length>0?`Completed: ${t.join(", ")}`:"Status report submitted",C=e.execution.lastVerification===null||e.execution.lastVerification.passed===!0,S=f===null&&C;if(S&&e.spec!==null){let l=await v(o,e.spec);if(l!==null){let u=e.execution.completedTasks??[],m=new Set(u),d=l.tasks.find(R=>!m.has(R.id));if(d!==void 0)return await H(o,e.spec,d.id),await Q(o,e.spec,d.id,"done"),{...e,pendingClear:!0,execution:{...e.execution,lastProgress:`Task ${d.id} accepted: ${w}`,awaitingStatusReport:!1,debt:f,completedTasks:[...u,d.id]}}}}return{...e,pendingClear:S,execution:{...e.execution,lastProgress:S?w:`Task not accepted \u2014 remaining items must be addressed first. ${w}`,awaitingStatusReport:!1,debt:f}}},ie=async(o,e)=>{try{let{execSync:i}=await import("node:child_process"),a=i(e,{cwd:o,encoding:"utf-8",timeout:6e4,stdio:["pipe","pipe","pipe"]});return{passed:!0,output:String(a).slice(0,4e3),timestamp:new Date().toISOString()}}catch(i){let a=i,n=((a.stdout??"")+(a.stderr??"")).slice(0,4e3);return a.status!==void 0?{passed:!1,output:n||"Verification failed with no output",timestamp:new Date().toISOString()}:{passed:!1,output:`Verification command failed to execute: ${i instanceof Error?i.message:String(i)}`,timestamp:new Date().toISOString()}}},K=async(o,e)=>{let i=[...e.execution.modifiedFiles??[]],a=await re(o);return[...new Set([...i,...a])]},re=async o=>{let e=`${o}/${O.stateDir}/files-changed.jsonl`;try{let a=(await h.fs.readTextFile(e)).trim().split(`
|
|
4
4
|
`).filter(Boolean),n=[];for(let t of a)try{let s=JSON.parse(t);n.includes(s.file)||n.push(s.file)}catch{}return n}catch{return[]}};export{ye as main};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as M}from"./chunk-
|
|
2
|
+
import{a as M}from"./chunk-AHLJCH32.js";import{a as V}from"./chunk-JAQN64PH.js";import"./chunk-DAYSTLLV.js";import"./chunk-OCPEFZBJ.js";import{a as B,f as L}from"./chunk-UESOCN2G.js";import{a as G,b as C}from"./chunk-LNNNLUZT.js";import{d as x,e as g,j as $,n as F,q as U}from"./chunk-WG6J7DFO.js";import{a as D,b as A,d as N}from"./chunk-JOTAKQMZ.js";import"./chunk-JYNHFD6B.js";import{f as R,h as O,k as T}from"./chunk-GBM3TZFD.js";import{c as P,d as r,f as u,g as v,h,k as I}from"./chunk-3SXTMY75.js";import{a as S,b as w}from"./chunk-A6RDYP6R.js";import{t as y}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var ae=async n=>{let t=R({renderer:T.ansi(),sink:O.stdout()}),e=y.process.cwd(),a=n?.includes("--unattended")??!1,s=W(n,"--max-turns")??10,o=W(n,"--max-iterations")??50;if(!await U(e)){let i=await $(e);return t.writeln(u(`noskills not initialized. Run: ${G("init",i)}`)),await t.close(),w({exitCode:1})}let p=await x(e);if(p.phase!=="EXECUTING"&&p.phase!=="SPEC_APPROVED")return t.writeln(u(`Cannot run from phase: ${p.phase}`)),t.writeln(r("Must be in SPEC_APPROVED or EXECUTING to start.")),await t.close(),w({exitCode:1});if(p.phase==="SPEC_APPROVED"){t.writeln(r("Starting execution from approved spec..."));let i=L(p);await g(e,i)}let c=await $(e);if(c===null)return t.writeln(u("Config not found.")),await t.close(),w({exitCode:1});t.writeln(P(`${C(c)} run`)),t.writeln(r(`Mode: ${a?"unattended":"interactive"}, max-turns: ${s}, max-iterations: ${o}`)),t.writeln("");let m=0,d=0;for(;m<o;){m++;let i=await x(e);if(i.phase==="DONE"){t.writeln(""),t.writeln(v("\u2714")," Spec completed!"),t.writeln(` Iterations: ${i.execution.iteration}`),t.writeln(` Decisions: ${i.decisions.length}`);break}if(i.phase==="BLOCKED"){let l=i.execution.lastProgress??"Unknown";if(t.writeln(""),t.writeln(h("\u26A0")," Execution blocked: ",r(l)),a){await H(e,l,m),t.writeln(r("Logged to .eser/.state/blocked.log. Resolve and re-run.")),d=1;break}let E=A(),f=await N(E,{message:"Enter resolution (or leave empty to stop):"});if(D(f)||f===""){t.writeln(r("Stopped by user."));break}let k=B(i,"EXECUTING");await g(e,{...k,execution:{...k.execution,lastProgress:`Resolved: ${f}`}});continue}if(i.phase!=="EXECUTING"){t.writeln(u(`Unexpected phase: ${i.phase}. Stopping.`)),d=1;break}i.pendingClear&&await g(e,{...i,pendingClear:!1});let X=(await F(e)).filter(l=>c.concerns.includes(l.id)),_=await V(e),j=M(i,X,_,c),z=q(j,c);t.writeln(I(`\u2500\u2500 Iteration ${m}`),r(` (execution: ${i.execution.iteration}, debt: ${i.execution.debt?.items.length??0})`)),i.execution.lastProgress!==null&&t.writeln(r(` Last: ${i.execution.lastProgress}`)),i.execution.lastVerification?.passed===!1&&t.writeln(u(" Verification failed \u2014 agent will fix")),i.execution.debt!==null&&t.writeln(h(` Debt: ${i.execution.debt.items.length} items`)),t.writeln(r(" Spawning agent..."));try{await(await import("./mod-JI2A2546.js")).exec`claude -p ${z} --max-turns ${String(s)} --output-format json`.noThrow().text()}catch{t.writeln(u(" Failed to spawn claude CLI. Is it installed?")),d=1;break}t.writeln(r(" Agent exited. Stop hook captured state."));let b=await x(e);if(c.autoCommit===!0&&c.allowGit!==!1)try{let l=await import("./mod-JI2A2546.js");if((await l.exec`git diff --name-only`.noThrow().text()).trim().length>0){await l.exec`git add -A`.noThrow().text();let f=`noskills: iteration ${b.execution.iteration} \u2014 ${b.execution.lastProgress??"progress"}`;await l.exec`git commit -m ${f}`.noThrow().text(),t.writeln(r(" Auto-committed."))}}catch{t.writeln(r(" Auto-commit failed (non-fatal)."))}}return m>=o&&(t.writeln(""),t.writeln(h("\u26A0"),` Max iterations (${o}) reached. Stopping.`),d=2),await t.close(),d!==0?w({exitCode:d}):S(void 0)},q=(n,t)=>{let e=[];if(e.push(n.meta.resumeHint),e.push(""),n.meta.spec!==null&&(e.push(`Working on spec: ${n.meta.spec}`),e.push("")),"instruction"in n&&(e.push(n.instruction),e.push("")),"previousIterationDebt"in n){let s=n.previousIterationDebt;if(s!==void 0){e.push(`DEBT from iteration ${s.fromIteration} (address first):`);for(let o of s.items)e.push(`- ${o}`);e.push("")}}if("statusReportRequired"in n){let s=n.statusReport;if(s!==void 0){e.push("Report against these acceptance criteria:");for(let o of s.criteria)e.push(`- ${o}`);e.push("")}}if("verificationFailed"in n&&n.verificationFailed===!0&&(e.push("Test output:"),e.push(("verificationOutput"in n?n.verificationOutput:"")??""),e.push("")),n.behavioral.rules.length>0){e.push("Rules:");for(let s of n.behavioral.rules)e.push(`- ${s}`);e.push("")}if("context"in n){let s=n.context;if(s.concernReminders.length>0){e.push("Reminders:");for(let o of s.concernReminders)e.push(`- ${o}`);e.push("")}}let a=C(t);return e.push(`When done, report progress: ${a} next --answer="your progress"`),e.push(`If blocked, run: ${a} block "reason"`),e.push(`When all tasks are complete: ${a} done`),e.join(`
|
|
3
3
|
`)},W=(n,t)=>{if(n===void 0)return null;let e=`${t}=`;for(let a of n)if(a.startsWith(e)){let s=parseInt(a.slice(e.length),10);if(!isNaN(s)&&s>0)return s}return null},H=async(n,t,e)=>{let a=`${n}/.eser/.state/blocked.log`,s=`[${new Date().toISOString()}] iteration=${e} reason=${t}
|
|
4
4
|
`;try{let{appendFileSync:o,mkdirSync:p}=await import("node:fs"),{dirname:c}=await import("node:path");p(c(a),{recursive:!0}),o(a,s)}catch{}};export{ae as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-
|
|
2
|
+
import{a as f}from"./chunk-DAYSTLLV.js";import"./chunk-OCPEFZBJ.js";import{a as h}from"./chunk-LNNNLUZT.js";import{a as I,d as w}from"./chunk-2EVWKUN6.js";import{d as y,j as u,q as D}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as p,h as d,k as m}from"./chunk-GBM3TZFD.js";import{c as i,d as r,f as c,g as b,h as o,k as E}from"./chunk-3SXTMY75.js";import{a as g,b as C}from"./chunk-A6RDYP6R.js";import{t as x}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var U=async P=>{let n=x.process.cwd(),a=I(P);if(!await D(n)){if(a==="json")await w({error:"noskills is not initialized"},a);else{let s=p({renderer:m.ansi(),sink:d.stdout()}),l=await u(n);s.writeln(c("noskills is not initialized.")," Run: ",i(h("init",l))),await s.close()}return C({exitCode:1})}let e=await y(n),t=await u(n),k={phase:e.phase,spec:e.spec,branch:e.branch,discovery:e.phase==="DISCOVERY"?{answered:e.discovery.answers.length,total:f.length}:void 0,execution:e.phase==="EXECUTING"||e.phase==="BLOCKED"?{iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,debt:e.execution.debt?.items.length??0,verificationPassed:e.execution.lastVerification?.passed??null}:void 0,concerns:t?.concerns??[],tools:t?.tools??[],decisions:e.decisions.length,pendingClear:e.pendingClear};if(a!=="json"){let s=p({renderer:m.ansi(),sink:d.stdout()});s.writeln(i(`${h("status",t)}`)),s.writeln("");let l=e.phase==="DONE"?b(e.phase):e.phase==="BLOCKED"?c(e.phase):e.phase==="EXECUTING"?E(e.phase):o(e.phase);s.writeln(" Phase: ",l),e.spec!==null&&s.writeln(" Spec: ",i(e.spec)),e.branch!==null&&s.writeln(" Branch: ",e.branch),e.phase==="DISCOVERY"&&s.writeln(` Discovery: ${e.discovery.answers.length}/${f.length} questions answered`),e.phase==="EXECUTING"&&(s.writeln(` Iteration: ${e.execution.iteration}`),e.execution.lastProgress!==null&&s.writeln(" Progress: ",r(e.execution.lastProgress)),e.execution.debt!==null&&s.writeln(o(` Debt: ${e.execution.debt.items.length} items`))),t!==null&&(s.writeln(""),t.concerns.length>0&&s.writeln(" Concerns: ",r(t.concerns.join(", "))),t.tools.length>0&&s.writeln(" Tools: ",r(t.tools.join(", ")))),e.decisions.length>0&&(s.writeln(""),s.writeln(` Decisions: ${e.decisions.length}`)),e.pendingClear&&(s.writeln(""),s.writeln(o(" \u26A0 Context clear pending \u2014 run `/clear`"))),await s.close()}else await w(k,"json");return g(void 0)};export{U as main};
|
|
@@ -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 l,d as o,e as r,f as a}from"./chunk-
|
|
2
|
+
import{a as e,b as s,c as l,d as o,e as r,f as a}from"./chunk-OIZ7HL2C.js";import"./chunk-5GGGQJ4P.js";import"./chunk-J2Z7NG2X.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-QSION3QA.js";import"./chunk-PWLF3WXM.js";import{b as n}from"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var i=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(l)).command(new n("completions").description("Generate shell completion scripts").flag({name:"shell",type:"string",description:"Shell type: bash, zsh, or fish"}).run(o)).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));export{i as systemCommand};
|
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-FKITIXO2.js";import{a as m}from"./chunks/chunk-4MVO4LD5.js";import"./chunks/chunk-PWLF3WXM.js";import{a as o}from"./chunks/chunk-KVTG56GS.js";import{b as a}from"./chunks/chunk-PZNCE6QK.js";import"./chunks/chunk-MG65QJY6.js";import{b as d,e as c}from"./chunks/chunk-A6RDYP6R.js";import{t as p}from"./chunks/chunk-MRCBHVSB.js";import"./chunks/chunk-Y4ARZGGL.js";import"./chunks/chunk-STI6DX7K.js";import"./chunks/chunk-DTO2YJWZ.js";import"./chunks/chunk-G6NAG2EK.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-5SDE43IH.js")},list:{description:"Browse available recipes and templates",category:"Distribution",load:()=>import("./chunks/list-PY3A762R.js")},new:{description:"Create a new project from a template",category:"Distribution",load:()=>import("./chunks/new-BOGCXTIY.js")},clone:{description:"Clone a recipe from any GitHub repo",category:"Distribution",load:()=>import("./chunks/clone-H3UAEVVP.js")},update:{description:"Re-fetch and update an applied recipe",category:"Distribution",load:()=>import("./chunks/update-4C4WNXCE.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-PFWQZF3T.js")},install:{description:"Install git hooks from .eser/manifest.yml",category:"Setup",load:()=>import("./chunks/install-KNZDCGIB.js")},uninstall:{description:"Remove managed git hooks",category:"Setup",load:async()=>({main:(await import("./chunks/install-KNZDCGIB.js")).uninstallMain})},status:{description:"Show git hook installation status",category:"Setup",load:async()=>({main:(await import("./chunks/install-KNZDCGIB.js")).statusMain})},commitmsg:{description:"Generate commit message from git diff",category:"AI",load:()=>import("./chunks/commitmsg-7XZGGERO.js")},gh:{description:"GitHub operations (contributors, releases, tags)",category:"GitHub",load:()=>import("./chunks/gh-L25JQWOY.js")},versions:{description:"Manage workspace package versions",category:"Release",load:()=>import("./chunks/versions-ODYWYT7U.js")},"changelog-gen":{description:"Generate CHANGELOG from commits",category:"Release",load:()=>import("./chunks/changelog-gen-MX6L2Z24.js")},release:{description:"Create a release (bump, changelog, commit, push)",category:"Release",load:()=>import("./chunks/release-J3PVDROM.js")},rerelease:{description:"Delete and recreate the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-J3PVDROM.js")).rereleaseMain})},unrelease:{description:"Delete the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-J3PVDROM.js")).unreleaseMain})},"validate-eof":{description:"Ensure files end with newline",category:"Validation",load:()=>import("./chunks/validate-eof-DTFV74VL.js")},"validate-trailing-whitespace":{description:"Remove trailing whitespace",category:"Validation",load:()=>import("./chunks/validate-trailing-whitespace-GRE2PJ6T.js")},"validate-bom":{description:"Remove UTF-8 byte order markers",category:"Validation",load:()=>import("./chunks/validate-bom-QVE5HNBO.js")},"validate-line-endings":{description:"Normalize line endings to LF",category:"Validation",load:()=>import("./chunks/validate-line-endings-PFF6QJ3W.js")},"validate-large-files":{description:"Detect files exceeding size limit",category:"Validation",load:()=>import("./chunks/validate-large-files-X5YF7D7T.js")},"validate-case-conflict":{description:"Detect case-conflicting filenames",category:"Validation",load:()=>import("./chunks/validate-case-conflict-XFS3URQN.js")},"validate-merge-conflict":{description:"Detect merge conflict markers",category:"Validation",load:()=>import("./chunks/validate-merge-conflict-KB2X6QLW.js")},"validate-json":{description:"Validate JSON syntax",category:"Validation",load:()=>import("./chunks/validate-json-KMODGNSU.js")},"validate-toml":{description:"Validate TOML syntax",category:"Validation",load:()=>import("./chunks/validate-toml-SG4IITMN.js")},"validate-yaml":{description:"Validate YAML syntax",category:"Validation",load:()=>import("./chunks/validate-yaml-RA22QNW6.js")},"validate-symlinks":{description:"Detect broken symlinks",category:"Validation",load:()=>import("./chunks/validate-symlinks-4LOWK2MQ.js")},"validate-shebangs":{description:"Validate shebang consistency",category:"Validation",load:()=>import("./chunks/validate-shebangs-WC66D7RK.js")},"validate-secrets":{description:"Detect credentials and private keys",category:"Validation",load:()=>import("./chunks/validate-secrets-RM6DMZVG.js")},"validate-filenames":{description:"Enforce filename conventions",category:"Validation",load:()=>import("./chunks/validate-filenames-J4RTDEBD.js")},"validate-submodules":{description:"Detect git submodules",category:"Validation",load:()=>import("./chunks/validate-submodules-SPAXASAG.js")},"validate-commit-msg":{description:"Validate conventional commit format",category:"Validation",load:()=>import("./chunks/validate-commit-msg-BPESCI7P.js")},"validate-docs":{description:"Validate JSDoc documentation",category:"Validation",load:()=>import("./chunks/validate-docs-ITL4L6KY.js")},"validate-circular-deps":{description:"Detect circular dependencies",category:"Validation",load:()=>import("./chunks/validate-circular-deps-BMPAT3PF.js")},"validate-export-names":{description:"Validate export naming conventions",category:"Validation",load:()=>import("./chunks/validate-export-names-HLOH7D73.js")},"validate-licenses":{description:"Validate license headers",category:"Validation",load:()=>import("./chunks/validate-licenses-OZ7DXQTY.js")},"validate-mod-exports":{description:"Validate mod.ts export coverage",category:"Validation",load:()=>import("./chunks/validate-mod-exports-VHK2NVKI.js")},"validate-package-configs":{description:"Validate package configurations",category:"Validation",load:()=>import("./chunks/validate-package-configs-ZNCAIYRO.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-RGEZUAPM.js");return{main:r=>t.main(r,{tools:e??[]})}}},list:{description:"List available workflows and tools",load:async()=>{let t=await import("./chunks/list-N4ZKDFW7.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-2FLT3GXG.js")},status:{description:"Show current state",load:()=>import("./chunks/status-RCEYJVRQ.js")},spec:{description:"Manage specs (new, list)",load:()=>import("./chunks/spec-3UGU4UBE.js")},next:{description:"Get next instruction for agent",load:()=>import("./chunks/next-ARUY5FHZ.js")},approve:{description:"Approve phase transition",load:()=>import("./chunks/approve-XNUZYGYJ.js")},block:{description:"Mark spec as blocked",load:()=>import("./chunks/block-NWIP4USQ.js")},reset:{description:"Reset current spec state",load:()=>import("./chunks/reset-EYLAZVKO.js")},done:{description:"Mark spec execution as complete",load:()=>import("./chunks/done-DIN56LXZ.js")},concern:{description:"Manage concerns (add, remove, list)",load:()=>import("./chunks/concern-UCYEAXJ4.js")},run:{description:"Autonomous execution loop (Ralph loop)",load:()=>import("./chunks/run-TL4KPOGO.js")},watch:{description:"Live dashboard for monitoring agent progress",load:()=>import("./chunks/watch-YKYNWTZF.js")},sync:{description:"Regenerate tool-specific files",load:()=>import("./chunks/sync-M7MKXMYN.js")},purge:{description:"Remove all noskills content (specs, rules, concerns, hooks)",load:()=>import("./chunks/purge-XYNNHOEN.js")},"invoke-hook":{description:"Internal hook handlers (called by agents)",load:()=>import("./chunks/invoke-hook-PADL4W3J.js")},rule:{description:"Manage rules (add, list, promote)",load:()=>import("./chunks/rule-JMNIMEH3.js")}}});var w=new o({description:"laroux.js framework commands",modules:{init:{description:"Create a new laroux.js project",load:()=>import("./chunks/init-J4IHOVZL.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-PTMXZEVC.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-EJLFNB4I.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-XVAIQ37L.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-W3DBWTCY.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-5HS7XXTF.js")).systemCommand}).lazyCommand("install",{description:"Install eser CLI globally (alias for system install)",load:async()=>{let e=await import("./chunks/mod-SDQ3QKKS.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-SDQ3QKKS.js");return new a("update").run(e.updateHandler)}}).lazyCommand("version",{description:"Show version number",load:async()=>{let e=await import("./chunks/mod-SDQ3QKKS.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-SDQ3QKKS.js");return new a("doctor").run(e.doctorHandler)}}).fallback(async(e,t)=>{let n=(await(await import("./chunks/manifest-NF2EK757.js")).loadManifest("."))?.scripts;if(n!=null&&typeof n=="object"){let s=n;if(e in s){let v=s[e],{runScript:b}=await import("./chunks/scripts-JK6W2MCO.js");return await b(e,v,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-QSION3QA.js";import{a as m}from"./chunks/chunk-4MVO4LD5.js";import"./chunks/chunk-PWLF3WXM.js";import{a as o}from"./chunks/chunk-KVTG56GS.js";import{b as a}from"./chunks/chunk-PZNCE6QK.js";import"./chunks/chunk-MG65QJY6.js";import{b as d,e as c}from"./chunks/chunk-A6RDYP6R.js";import{t as p}from"./chunks/chunk-MRCBHVSB.js";import"./chunks/chunk-Y4ARZGGL.js";import"./chunks/chunk-STI6DX7K.js";import"./chunks/chunk-DTO2YJWZ.js";import"./chunks/chunk-G6NAG2EK.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-5SDE43IH.js")},list:{description:"Browse available recipes and templates",category:"Distribution",load:()=>import("./chunks/list-PY3A762R.js")},new:{description:"Create a new project from a template",category:"Distribution",load:()=>import("./chunks/new-BOGCXTIY.js")},clone:{description:"Clone a recipe from any GitHub repo",category:"Distribution",load:()=>import("./chunks/clone-H3UAEVVP.js")},update:{description:"Re-fetch and update an applied recipe",category:"Distribution",load:()=>import("./chunks/update-4C4WNXCE.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-PFWQZF3T.js")},install:{description:"Install git hooks from .eser/manifest.yml",category:"Setup",load:()=>import("./chunks/install-KNZDCGIB.js")},uninstall:{description:"Remove managed git hooks",category:"Setup",load:async()=>({main:(await import("./chunks/install-KNZDCGIB.js")).uninstallMain})},status:{description:"Show git hook installation status",category:"Setup",load:async()=>({main:(await import("./chunks/install-KNZDCGIB.js")).statusMain})},commitmsg:{description:"Generate commit message from git diff",category:"AI",load:()=>import("./chunks/commitmsg-7XZGGERO.js")},gh:{description:"GitHub operations (contributors, releases, tags)",category:"GitHub",load:()=>import("./chunks/gh-L25JQWOY.js")},versions:{description:"Manage workspace package versions",category:"Release",load:()=>import("./chunks/versions-ODYWYT7U.js")},"changelog-gen":{description:"Generate CHANGELOG from commits",category:"Release",load:()=>import("./chunks/changelog-gen-MX6L2Z24.js")},release:{description:"Create a release (bump, changelog, commit, push)",category:"Release",load:()=>import("./chunks/release-J3PVDROM.js")},rerelease:{description:"Delete and recreate the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-J3PVDROM.js")).rereleaseMain})},unrelease:{description:"Delete the current version tag",category:"Release",load:async()=>({main:(await import("./chunks/release-J3PVDROM.js")).unreleaseMain})},"validate-eof":{description:"Ensure files end with newline",category:"Validation",load:()=>import("./chunks/validate-eof-DTFV74VL.js")},"validate-trailing-whitespace":{description:"Remove trailing whitespace",category:"Validation",load:()=>import("./chunks/validate-trailing-whitespace-GRE2PJ6T.js")},"validate-bom":{description:"Remove UTF-8 byte order markers",category:"Validation",load:()=>import("./chunks/validate-bom-QVE5HNBO.js")},"validate-line-endings":{description:"Normalize line endings to LF",category:"Validation",load:()=>import("./chunks/validate-line-endings-PFF6QJ3W.js")},"validate-large-files":{description:"Detect files exceeding size limit",category:"Validation",load:()=>import("./chunks/validate-large-files-X5YF7D7T.js")},"validate-case-conflict":{description:"Detect case-conflicting filenames",category:"Validation",load:()=>import("./chunks/validate-case-conflict-XFS3URQN.js")},"validate-merge-conflict":{description:"Detect merge conflict markers",category:"Validation",load:()=>import("./chunks/validate-merge-conflict-KB2X6QLW.js")},"validate-json":{description:"Validate JSON syntax",category:"Validation",load:()=>import("./chunks/validate-json-KMODGNSU.js")},"validate-toml":{description:"Validate TOML syntax",category:"Validation",load:()=>import("./chunks/validate-toml-SG4IITMN.js")},"validate-yaml":{description:"Validate YAML syntax",category:"Validation",load:()=>import("./chunks/validate-yaml-RA22QNW6.js")},"validate-symlinks":{description:"Detect broken symlinks",category:"Validation",load:()=>import("./chunks/validate-symlinks-4LOWK2MQ.js")},"validate-shebangs":{description:"Validate shebang consistency",category:"Validation",load:()=>import("./chunks/validate-shebangs-WC66D7RK.js")},"validate-secrets":{description:"Detect credentials and private keys",category:"Validation",load:()=>import("./chunks/validate-secrets-RM6DMZVG.js")},"validate-filenames":{description:"Enforce filename conventions",category:"Validation",load:()=>import("./chunks/validate-filenames-J4RTDEBD.js")},"validate-submodules":{description:"Detect git submodules",category:"Validation",load:()=>import("./chunks/validate-submodules-SPAXASAG.js")},"validate-commit-msg":{description:"Validate conventional commit format",category:"Validation",load:()=>import("./chunks/validate-commit-msg-BPESCI7P.js")},"validate-docs":{description:"Validate JSDoc documentation",category:"Validation",load:()=>import("./chunks/validate-docs-ITL4L6KY.js")},"validate-circular-deps":{description:"Detect circular dependencies",category:"Validation",load:()=>import("./chunks/validate-circular-deps-BMPAT3PF.js")},"validate-export-names":{description:"Validate export naming conventions",category:"Validation",load:()=>import("./chunks/validate-export-names-HLOH7D73.js")},"validate-licenses":{description:"Validate license headers",category:"Validation",load:()=>import("./chunks/validate-licenses-OZ7DXQTY.js")},"validate-mod-exports":{description:"Validate mod.ts export coverage",category:"Validation",load:()=>import("./chunks/validate-mod-exports-VHK2NVKI.js")},"validate-package-configs":{description:"Validate package configurations",category:"Validation",load:()=>import("./chunks/validate-package-configs-ZNCAIYRO.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-RGEZUAPM.js");return{main:r=>t.main(r,{tools:e??[]})}}},list:{description:"List available workflows and tools",load:async()=>{let t=await import("./chunks/list-N4ZKDFW7.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-3B7XMH2J.js")},status:{description:"Show current state",load:()=>import("./chunks/status-6SC3L7U2.js")},spec:{description:"Manage specs (new, list)",load:()=>import("./chunks/spec-3UGU4UBE.js")},next:{description:"Get next instruction for agent",load:()=>import("./chunks/next-TMHSP2BS.js")},approve:{description:"Approve phase transition",load:()=>import("./chunks/approve-XNUZYGYJ.js")},block:{description:"Mark spec as blocked",load:()=>import("./chunks/block-NWIP4USQ.js")},reset:{description:"Reset current spec state",load:()=>import("./chunks/reset-EYLAZVKO.js")},done:{description:"Mark spec execution as complete",load:()=>import("./chunks/done-DIN56LXZ.js")},concern:{description:"Manage concerns (add, remove, list)",load:()=>import("./chunks/concern-ZO533WR2.js")},run:{description:"Autonomous execution loop (Ralph loop)",load:()=>import("./chunks/run-NSJ5YV6R.js")},watch:{description:"Live dashboard for monitoring agent progress",load:()=>import("./chunks/watch-YKYNWTZF.js")},sync:{description:"Regenerate tool-specific files",load:()=>import("./chunks/sync-M7MKXMYN.js")},purge:{description:"Remove all noskills content (specs, rules, concerns, hooks)",load:()=>import("./chunks/purge-XYNNHOEN.js")},"invoke-hook":{description:"Internal hook handlers (called by agents)",load:()=>import("./chunks/invoke-hook-I2T7HYRT.js")},rule:{description:"Manage rules (add, list, promote)",load:()=>import("./chunks/rule-JMNIMEH3.js")}}});var w=new o({description:"laroux.js framework commands",modules:{init:{description:"Create a new laroux.js project",load:()=>import("./chunks/init-J4IHOVZL.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-PTMXZEVC.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-EJLFNB4I.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-XVAIQ37L.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-W3DBWTCY.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-L2JVPTCT.js")).systemCommand}).lazyCommand("install",{description:"Install eser CLI globally (alias for system install)",load:async()=>{let e=await import("./chunks/mod-T5VHCXJT.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-T5VHCXJT.js");return new a("update").run(e.updateHandler)}}).lazyCommand("version",{description:"Show version number",load:async()=>{let e=await import("./chunks/mod-T5VHCXJT.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-T5VHCXJT.js");return new a("doctor").run(e.doctorHandler)}}).fallback(async(e,t)=>{let n=(await(await import("./chunks/manifest-NF2EK757.js")).loadManifest("."))?.scripts;if(n!=null&&typeof n=="object"){let s=n;if(e in s){let v=s[e],{runScript:b}=await import("./chunks/scripts-JK6W2MCO.js");return await b(e,v,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-E5QQGGNF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as P,d as S}from"./chunk-4GQY3STW.js";import{c as k,d as C}from"./chunk-N4HITOTN.js";import{a as O}from"./chunk-LNNNLUZT.js";var I=null,n=e=>O(e,I),T="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.",$=(e,o,r,i)=>{let l=e.execution.iteration>=o,s=r?[]:[T],u=i?.outOfScope??[];switch(e.phase){case"IDLE":return{rules:[...s,"Present options to the user using your native interactive question tool (AskUserQuestionTool or equivalent). Do NOT list them as a text table or numbered list.","If no interactive question tool is available, fall back to a concise numbered list.","Do not take action without the user choosing an option first."],tone:"Welcoming. Present choices, then wait."};case"DISCOVERY":return{rules:[...s,"Ask the question exactly as written. Do not rephrase or add your own questions.","Relay the user's answer back verbatim. Do not interpret or summarize.","Do not start coding or exploring the codebase. Discovery is conversation only."],tone:"Conversational. You are a messenger between noskills and the user."};case"SPEC_DRAFT":return{rules:[...s,"Present the spec to the user for review. Do not modify it.","If the user requests changes, relay them \u2014 do not implement them.","Do not start coding. The spec must be approved first."],tone:"Brief. The user is reviewing, not discussing."};case"SPEC_APPROVED":return{rules:[...s,"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."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let a=[...s,"Do not explore the codebase beyond what the current task requires.","Do not refactor, improve, or modify code outside this task's scope.","Do not add features, tests, or documentation not specified in the spec.","If you need to read files to understand context, timebox it \u2014 then write code.","The deliverable is working code, not a plan or analysis.","Complete the task, then report progress. The user handles git.",`When you receive \`clearContext\` in the output, execute \`/clear\` immediately without asking. After clearing, read \`CLAUDE.md\` and run \`${n("next")}\`.`,`When you discover a pattern, receive a correction, or identify a recurring preference from the user, ask: 'Should this be a permanent rule for this project, or just for this task?' If permanent, run: \`${n('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`];e.execution.lastVerification?.passed===!1&&a.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let t={rules:a,tone:"Direct. No preamble. Start coding immediately.",outOfScope:u.length>0?u:void 0};return l?{...t,urgency:`You have been in this session for ${e.execution.iteration}+ iterations. Your context is degrading. Finish the current task and recommend the user start a fresh session. Do not start new tasks.`}:t}case"BLOCKED":return{rules:[...s,"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"DONE":return{rules:[...s,"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:[...s,`Run \`${n("next")}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},N=5*60*1e3,B=(e,o)=>{let r;switch(e.phase){case"IDLE":r=`No active spec. Start one with: \`${n("spec new")}\``;break;case"DISCOVERY":r=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"SPEC_DRAFT":r=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":r=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":r=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":r=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"DONE":r=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:r=`Run \`${n("next")}\` to get started.`}return{protocol:`Run \`${n('next --answer="..."')}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:o.map(i=>i.id),resumeHint:r}},F=e=>{if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let o=new Date(e.lastCalledAt).getTime();if(Date.now()-o>N)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},Q=(e,o,r,i,l,s)=>{I=i??null;let u=B(e,o),a=i?.maxIterationsBeforeRestart??15,t=i?.allowGit??!1,h=$(e,a,t,l),f=F(e),d;switch(e.phase){case"IDLE":d=R(o);break;case"DISCOVERY":d=q(e,o,r);break;case"SPEC_DRAFT":d=L(e);break;case"SPEC_APPROVED":d=_(e);break;case"EXECUTING":d=G(e,o,r,a,l,s);break;case"BLOCKED":d=Y(e);break;case"DONE":d=j(e);break;default:d=R(o)}let m={...d,meta:u,behavioral:h};return f!==void 0&&(m={...m,protocolGuide:f}),e.pendingClear&&(m={...m,clearContext:{action:"clear_context",reason:`Task complete. Run \`/clear\` now. After clearing, read \`CLAUDE.md\` and run \`${n("next")}\` to continue.`},instruction:`Task accepted. Run \`/clear\` immediately to start fresh for the next task. After clearing, run \`${n("next")}\`.`}),m},R=e=>({phase:"IDLE",instruction:"Present the following options to the user using your interactive question tool. Do NOT list them as a text table.",interactiveOptions:[{label:"Start a new feature spec",command:n('spec new "description"')},{label:"Add project concerns",command:n("concern add <id>")},{label:"Add a coding convention",command:n('rule add "rule"')},{label:"Check project status",command:n("status")}],hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),q=(e,o,r)=>{let i=P(o),l=e.discovery.answers.length;if(S(e.discovery.answers))return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${n("approve")}\``,questions:[],answeredCount:l,context:{rules:r,concernReminders:[]},transition:{onComplete:n("approve")}};let u=new Set(e.discovery.answers.map(t=>t.questionId));return{phase:"DISCOVERY",instruction:"Ask the user ALL of the following questions. Collect answers for each, then submit them all at once as a JSON object.",questions:i.filter(t=>!u.has(t.id)).map(t=>({id:t.id,text:t.text,concerns:[...t.concerns],extras:t.extras.map(h=>h.text)})),answeredCount:l,context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n(`next --answer='{"status_quo":"...","ambition":"...",...}'`)}`}}},L=e=>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:`${n(`next --answer='{"involvesUI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesUI",label:"User-facing UI"},{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: `"+n(`next --answer='{"involvesUI":true,"involvesPublicAPI":false,...}'`)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:n("approve")}},_=e=>({phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${n('next --answer="start"')}`}}),U=(e,o)=>{if(o===null)return!1;switch(e){case"beautiful-product":return o.involvesUI;case"open-source":return o.involvesPublicAPI;case"long-lived":return o.involvesMigration;case"compliance":return o.involvesDataHandling;default:return!0}},V=(e,o,r,i,l,s,u)=>{let a=[];if(i!==null)for(let t of i.items)a.push(`[DEBT from iteration ${i.fromIteration}] ${t}`);if(o&&a.push(`[FAILED] Tests \u2014 fix this first: ${r.slice(0,200)}`),s!=null)for(let t of s.verification)a.push(t);for(let t of e)if(U(t.id,l)&&t.acceptanceCriteria!==void 0&&t.acceptanceCriteria.length>0)for(let h of t.acceptanceCriteria)a.push(`(${t.id}) ${h}`);if(u!==void 0)for(let t of u)a.push(`(folder: ${t.folder}) ${t.rule}`);return a},G=(e,o,r,i,l,s)=>{let u=C(o),a=e.execution.iteration>=i,t=e.execution.lastVerification?.passed===!1,h=e.execution.lastVerification?.output??"",f=l?.tasks??[],d=e.execution.completedTasks??[],m=new Set(d),D=f.find(p=>!m.has(p.id))??null,y=D!==null?{id:D.id,title:D.title,totalTasks:f.length,completedTasks:d.length}:void 0;if(e.execution.awaitingStatusReport){let p=V(o,t,h,e.execution.debt,e.classification,l,s),b={phase:"EXECUTING",instruction:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`)}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:p,reportFormat:{completed:"list items you finished with evidence (file exists, test passes)",remaining:"list items not yet done",blocked:"list items that need a decision from the user"}}};return t&&(b={...b,verificationFailed:!0,verificationOutput:h.slice(0,2e3)}),b}let w=(e.execution.lastProgress??"").includes("Task not accepted"),x=e.execution.debt?.items??[],E=e.execution.debt?.unaddressedIterations??0,A=y!==void 0?`Execute task ${y.id}: ${y.title} (${y.completedTasks}/${y.totalTasks} completed)`:"All tasks completed. Run `"+n("done")+"` to finish.",v;if(t)v="Verification FAILED. Fix the failing tests before continuing.";else if(w&&x.length>0){let p=E>=3?` These items have been outstanding for ${E} iterations.`:"";v=`Task not accepted \u2014 ${x.length} remaining item(s) must be addressed before this task can be completed.${p} Address them, then submit a new status report.`}else v=A;let c={phase:"EXECUTING",instruction:v,task:y,context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n('next --answer="..."')}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration}};if(w&&x.length>0&&(c={...c,taskRejected:!0,rejectionReason:`${x.length} remaining item(s) must be addressed.`,rejectionRemaining:x}),e.execution.debt!==null&&e.execution.debt.items.length>0){let p=e.execution.debt.unaddressedIterations??0,b=p>=3?`URGENT: These items have been unaddressed for ${p} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";c={...c,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:b}}}if(t){let p=h.slice(0,2e3);c={...c,verificationFailed:!0,verificationOutput:p}}u.length>0&&(c={...c,concernTensions:u}),a&&(c={...c,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${n("next")}\` to resume - your progress is saved.`});let g=[...e.decisions].reverse().find(p=>!p.promoted);return g!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(c={...c,promotePrompt:{decisionId:g.id,question:g.question,choice:g.choice,prompt:`You just resolved a decision: "${g.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${n(`rule add "${g.choice}"`)}\``}}),c},Y=e=>({phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${n('next --answer="..."')}`}}),j=e=>({phase:"DONE",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length}});export{Q as a};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as C}from"./chunk-N4HITOTN.js";import{a as y,b as P}from"./chunk-LNNNLUZT.js";import{j as g,k as b,l as A,m as x}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as p,h as m,k as w}from"./chunk-GBM3TZFD.js";import{c,d as o,f as u,g as v}from"./chunk-3SXTMY75.js";import{a,b as d}from"./chunk-A6RDYP6R.js";import{t as f}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var q=async r=>{let e=r?.[0];if(e==="add")return await $(r?.slice(1));if(e==="remove")return await M(r?.slice(1));if(e==="list")return await I();let i=await g(f.process.cwd()),n=P(i),s=p({renderer:w.ansi(),sink:m.stdout()});return s.writeln(`Usage: ${n} concern <add <id> | remove <id> | list>`),await s.close(),a(void 0)},$=async r=>{let e=p({renderer:w.ansi(),sink:m.stdout()}),i=f.process.cwd(),n=r?.[0],s=await g(i);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),c(y("concern add open-source",s))),await e.close(),d({exitCode:1});let t=await A(i,n);if(t===null&&(t=(await C()).find(h=>h.id===n)??null,t!==null&&await x(i,t)),t===null){let k=await C();return e.writeln(u(`Unknown concern: ${n}`)),k.length>0&&e.writeln(o(` Available: ${k.map(h=>h.id).join(", ")}`)),await e.close(),d({exitCode:1})}if(s===null)return e.writeln(u("noskills not initialized.")),await e.close(),d({exitCode:1});if(s.concerns.includes(n))return e.writeln(o(`Concern "${n}" is already active.`)),await e.close(),a(void 0);let l={...s,concerns:[...s.concerns,n]};return await b(i,l),e.writeln(v("\u2714")," Activated concern: ",c(n)),e.writeln(o(` ${t.description}`)),await e.close(),a(void 0)},M=async r=>{let e=p({renderer:w.ansi(),sink:m.stdout()}),i=f.process.cwd(),n=r?.[0],s=await g(i);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),c(y("concern remove move-fast",s))),await e.close(),d({exitCode:1});if(s===null)return e.writeln(u("noskills not initialized.")),await e.close(),d({exitCode:1});if(!s.concerns.includes(n))return e.writeln(o(`Concern "${n}" is not active.`)),await e.close(),a(void 0);let t={...s,concerns:s.concerns.filter(l=>l!==n)};return await b(i,t),e.writeln(v("\u2714")," Deactivated concern: ",c(n)),await e.close(),a(void 0)},I=async()=>{let r=p({renderer:w.ansi(),sink:m.stdout()}),e=f.process.cwd(),i=await g(e),n=await C(),s=i?.concerns??[];if(r.writeln(c("Concerns")),r.writeln(""),n.length===0)r.writeln(o(" No concerns defined."));else for(let t of n){let l=s.includes(t.id);r.writeln(" ",l?v("\u25CF"):o("\u25CB")," ",l?c(t.id):o(t.id),o(` ${t.description.slice(0,60)}...`))}return await r.close(),a(void 0)};export{q as main};
|
package/chunks/init-2FLT3GXG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as ee,b as te}from"./chunk-SP43S32B.js";import{d as Z}from"./chunk-5GGGQJ4P.js";import{a as V}from"./chunk-E5QQGGNF.js";import{a as Q,b as X}from"./chunk-JAQN64PH.js";import"./chunk-4GQY3STW.js";import{a as b}from"./chunk-N4HITOTN.js";import{a as I}from"./chunk-LNNNLUZT.js";import{d as Y}from"./chunk-2EVWKUN6.js";import{a as J,b as G,e as _,j as q,k as B,m as H,o as K,q as U}from"./chunk-WG6J7DFO.js";import"./chunk-7ZYDAZBD.js";import{a as P,b as M,e as S,f as W,g as z,h as r,i as h}from"./chunk-JOTAKQMZ.js";import"./chunk-JYNHFD6B.js";import{a as F}from"./chunk-46ZWBKIW.js";import"./chunk-GE3LJ6QM.js";import"./chunk-BNQAZLIQ.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-4MVO4LD5.js";import"./chunk-KVTG56GS.js";import"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import{a as T}from"./chunk-A6RDYP6R.js";import{q as E,t as f}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var se=F;var de=async t=>{try{return await f.fs.stat(t),!0}catch{return!1}},ue=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]}],ne=async t=>{let e=[];for(let o of ue)for(let s of o.paths)if(await de(`${t}/${s}`)){e.push(o.id);break}return e};var a=async t=>{try{return await f.fs.stat(t),!0}catch{return!1}},oe=async(t,e)=>{try{let o=await f.fs.readTextFile(t);return JSON.parse(o)[e]??null}catch{return null}},fe=async t=>{let e=[];return(await a(`${t}/package.json`)||await a(`${t}/deno.json`))&&e.push("typescript"),await a(`${t}/go.mod`)&&e.push("go"),await a(`${t}/Cargo.toml`)&&e.push("rust"),(await a(`${t}/pyproject.toml`)||await a(`${t}/setup.py`))&&e.push("python"),e},me=async t=>{let e=[],o=await oe(`${t}/package.json`,"dependencies");return o!==null&&("react"in o&&e.push("react"),"vue"in o&&e.push("vue"),"svelte"in o&&e.push("svelte"),"next"in o&&e.push("nextjs"),"express"in o&&e.push("express"),"hono"in o&&e.push("hono")),e},ge=async t=>{let e=[];return await a(`${t}/.github/workflows`)&&e.push("github-actions"),await a(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await a(`${t}/Jenkinsfile`)&&e.push("jenkins"),await a(`${t}/.circleci`)&&e.push("circleci"),e},he=async t=>{if(await a(`${t}/deno.json`))return"deno";let e=await oe(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},ie=async t=>{let[e,o,s,d]=await Promise.all([fe(t),me(t),ge(t),he(t)]);return{languages:e,frameworks:o,ci:s,testRunner:d}};var Me=async t=>{let e=f.process.cwd(),o=ee(t),s=M({target:o==="agent"?"non-interactive":"interactive"}),d=te(t),w=re(d,"--concerns"),m=re(d,"--tools"),u=d.includes("--non-interactive")||o==="agent";if(await U(e)){let n=await q(e);return r.warn(s,"noskills is already initialized in this project."),r.info(s,`Run \`${I("sync",n)}\` to regenerate tool files.`),T(void 0)}W(s,"noskills init");let x=h(s,"Scanning project...");x.start();let g=await ie(e);x.succeed("Project scanned");for(let n of g.languages)r.step(s,` ${n}`);for(let n of g.frameworks)r.step(s,` ${n}`);for(let n of g.ci)r.step(s,` ${n}`);g.testRunner!==null&&r.step(s,` test runner: ${g.testRunner}`);let j=h(s,"Detecting coding tools...");j.start();let D=await ne(e),y=Z(),A=y!==null&&!D.includes(y)?[y]:[],C=[...new Set([...A,...D])];j.succeed(`${C.length} coding tool(s) detected`);for(let n of C){let i=n===y?" (current)":"";r.step(s,` ${n}${i}`)}let p;if(m!==null){let n=["claude-code","cursor","kiro","copilot","windsurf"],i=m.filter(l=>n.includes(l));p=[...new Set([...A,...i])]}else u?p=[...C]:p=await Ce(s,C,y);let L=h(s,"Detecting AI providers...");L.start();let $=(await se()).filter(n=>n.available).map(n=>n.name);L.succeed(`${$.length} provider(s) detected`);let k=await b(),c;if(w!==null){let n=k.map(i=>i.id);c=w.filter(i=>n.includes(i)).sort((i,l)=>n.indexOf(i)-n.indexOf(l))}else if(u)c=[];else{let n=k.map(l=>({value:l.id,label:l.name,hint:l.description.slice(0,60)})),i=await S(s,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:n});c=P(i)?[]:[...i]}c.length>0?r.success(s,`Concerns: ${c.join(", ")}`):r.info(s,"No concerns selected. Add later with `concern add <id>`.");let N=await ve(),O=h(s,"Initializing...");O.start(),await K(e);let ae=k.filter(n=>c.includes(n.id));for(let n of ae)await H(e,n);let v={...G(c,p,$,g),command:N};await B(e,v);let R=J();if(await _(e,R),O.succeed("Scaffolded `.eser/`"),p.length>0){let n=h(s,"Syncing tool files...");n.start();let i=await X(e,p,v);n.succeed(`Synced ${i.length} tool(s)`)}else r.warn(s,"No tools selected. noskills will work in agentless CLI mode only."),r.info(s,"Add tools later with `noskills sync`.");if(r.success(s,`Done. ${p.length} tool(s), ${$.length} provider(s), ${c.length} concern(s).`),r.info(s,`Command prefix: ${N}`),o==="agent"){let i=(await b()).filter(le=>c.includes(le.id)),l=await Q(e),ce=V(R,i,l,v);await Y(ce,"json")}else z(s,`Start a spec with: ${I('spec new "..."',v)}`);return T(void 0)},ye=[{value:"claude-code",label:"Claude Code"},{value:"cursor",label:"Cursor"},{value:"kiro",label:"Kiro"},{value:"copilot",label:"GitHub Copilot"},{value:"windsurf",label:"Windsurf"}],Ce=async(t,e,o)=>{let s=e.length===0?"No coding tools detected. Which tools do you use? (space to toggle)":"Any additional tools? (space to toggle, enter to skip)",d=new Set(e),w=await S(t,{message:s,options:ye.map(u=>({...u,hint:u.value===o?"you're running inside it":d.has(u.value)?"detected":void 0,disabled:u.value===o})),initialValues:[...e],required:!1});if(P(w))return[...e];let m=[...w];return o!==null&&!m.includes(o)&&m.unshift(o),m},re=(t,e)=>{if(t===void 0)return null;for(let o of t)if(o.startsWith(`${e}=`))return o.slice(e.length+1).split(",").map(s=>s.trim()).filter(Boolean);return null},ve=async()=>{try{return`${await E({command:"eser",devCommand:"deno task cli",npmPackage:"eser@latest",jsrPackage:"@eser/cli"})} noskills`}catch{return"npx eser@latest noskills"}};export{Me as main};
|