noskills 4.1.42 → 4.1.44
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/README.md +128 -55
- package/chunks/{approve-CC43I73M.js → approve-NPG6X7O6.js} +1 -1
- package/chunks/{block-5KC7PUH6.js → block-LSEXCK45.js} +1 -1
- package/chunks/cancel-BK6GCIIY.js +1 -0
- package/chunks/chunk-7GUYMD3Z.js +16 -0
- package/chunks/chunk-7UX6WIXX.js +1 -0
- package/chunks/chunk-MRZT23BL.js +1 -0
- package/chunks/chunk-TMC5H2A5.js +1 -0
- package/chunks/chunk-ZMVD5IU4.js +109 -0
- package/chunks/{concern-FBYT4WPA.js → concern-3K3QUYG4.js} +1 -1
- package/chunks/done-OMGLEA32.js +1 -0
- package/chunks/free-BO5UA5V2.js +1 -0
- package/chunks/init-M4MSHCVJ.js +1 -0
- package/chunks/invoke-hook-HB2TBCHD.js +10 -0
- package/chunks/next-4DJGEJBW.js +8 -0
- package/chunks/{reopen-TND2EX3W.js → reopen-EKSLLO54.js} +1 -1
- package/chunks/{reset-XSYKZNUI.js → reset-WRTVX7TT.js} +1 -1
- package/chunks/{rule-ZM34AO4G.js → rule-QP5BSH27.js} +1 -1
- package/chunks/run-3VWWQDN2.js +3 -0
- package/chunks/spec-HQZVVCBY.js +1 -0
- package/chunks/status-63TFVF7Y.js +1 -0
- package/chunks/{sync-DQYR4ZLK.js → sync-VS4HROEX.js} +1 -1
- package/chunks/{watch-CAD4JSTU.js → watch-4HJMGNF4.js} +6 -6
- package/chunks/wontfix-BOT7HHH2.js +1 -0
- package/noskills.js +1 -1
- package/package.json +1 -1
- package/chunks/cancel-EQVD54M2.js +0 -1
- package/chunks/chunk-2WH262CW.js +0 -1
- package/chunks/chunk-6AAKOXIS.js +0 -81
- package/chunks/chunk-ERUA3YBQ.js +0 -1
- package/chunks/chunk-XANYQUGJ.js +0 -16
- package/chunks/done-UNXXLE3Y.js +0 -1
- package/chunks/init-IFI75I3F.js +0 -1
- package/chunks/invoke-hook-227DMMXJ.js +0 -10
- package/chunks/next-6UT77PDL.js +0 -8
- package/chunks/run-UVYXW33C.js +0 -3
- package/chunks/spec-CTUSUGWH.js +0 -1
- package/chunks/status-4D5HFW4V.js +0 -1
- package/chunks/wontfix-6KJQNEEV.js +0 -1
package/README.md
CHANGED
|
@@ -109,9 +109,10 @@ contributor-friendliness checks into every review, and permissive-default
|
|
|
109
109
|
reminders into every task. Stack concerns to define your project's character.
|
|
110
110
|
|
|
111
111
|
**One source of truth for every tool.** Write rules once in `.eser/rules/`.
|
|
112
|
-
noskills generates CLAUDE.md, .cursorrules, Kiro steering files,
|
|
113
|
-
instructions,
|
|
114
|
-
|
|
112
|
+
noskills generates AGENTS.md CLAUDE.md, .cursorrules, Kiro steering files,
|
|
113
|
+
Copilot instructions, Windsurf rules, OpenCode AGENTS.md + plugins, Codex CLI
|
|
114
|
+
hooks + TOML agents, and Copilot CLI hooks + MCP config. Your teammate on Cursor
|
|
115
|
+
and your teammate on Claude Code both get the same conventions, automatically.
|
|
115
116
|
|
|
116
117
|
**A human who's always in charge.** noskills never makes decisions silently.
|
|
117
118
|
Discovery questions -> you answer. Spec approval -> you decide. Architectural
|
|
@@ -217,36 +218,41 @@ for human teams apply directly to AI agents — because the underlying problem i
|
|
|
217
218
|
the same: finite attention, drifting focus, and the need for structure to keep
|
|
218
219
|
work on track.
|
|
219
220
|
|
|
220
|
-
## Getting Started
|
|
221
|
+
## Getting Started
|
|
221
222
|
|
|
222
|
-
|
|
223
|
+
noskills supports multiple AI coding platforms. Pick yours:
|
|
223
224
|
|
|
224
|
-
|
|
225
|
+
### Claude Code
|
|
225
226
|
|
|
226
|
-
|
|
227
|
+
Open Claude Code and paste:
|
|
227
228
|
|
|
228
229
|
Run `npx eser@latest noskills init` — it will scaffold your project and guide you through setup.
|
|
229
230
|
|
|
230
|
-
That's it. The init command detects Claude Code, sets up hooks,
|
|
231
|
-
and
|
|
231
|
+
That's it. The init command detects Claude Code, sets up hooks, generates
|
|
232
|
+
`CLAUDE.md`, and presents your next options automatically.
|
|
232
233
|
|
|
233
|
-
|
|
234
|
-
noskills, the init scaffolds `.eser/` which should be committed to your repo.
|
|
234
|
+
### OpenCode / OpenAI Codex CLI / GitHub Copilot CLI / Kiro
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
Open your agent in your project and run in the terminal:
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
Run `npx eser@latest noskills init` — it will scaffold your project and guide you through setup.
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
noskills detects your agent, generates multi-file steering files (with `always`,
|
|
241
|
+
`auto`, and `fileMatch` inclusion modes), installs hook configs, and creates
|
|
242
|
+
executor/verifier agents.
|
|
241
243
|
|
|
242
|
-
|
|
244
|
+
### Other agents
|
|
243
245
|
|
|
244
|
-
|
|
246
|
+
noskills generates a generic `AGENTS.md` at the project root. Any agent that
|
|
247
|
+
reads instruction files can use it. Run `noskills sync` after adding rules to
|
|
248
|
+
regenerate all tool files.
|
|
249
|
+
|
|
250
|
+
### Adding to an existing team project
|
|
245
251
|
|
|
246
|
-
noskills
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
252
|
+
If teammates already use noskills, the `.eser/` directory should be committed to
|
|
253
|
+
your repo. Run `noskills init` to detect your tool and generate tool-specific
|
|
254
|
+
files. The init command won't overwrite existing `.eser/` config — it only
|
|
255
|
+
generates the sync output for your tool.
|
|
250
256
|
|
|
251
257
|
## Quick Start
|
|
252
258
|
|
|
@@ -261,11 +267,16 @@ eser noskills concern add open-source # Activate concerns
|
|
|
261
267
|
eser noskills spec new "photo upload" # Start spec -> DISCOVERY
|
|
262
268
|
# Agent takes over: calls noskills next, answers questions,
|
|
263
269
|
# builds to spec, reports progress. You approve transitions.
|
|
270
|
+
|
|
271
|
+
# Or skip structure entirely:
|
|
272
|
+
eser noskills free # FREE mode — no enforcement
|
|
273
|
+
# Work freely, then exit when you want structure back:
|
|
274
|
+
eser noskills free --exit # Back to IDLE
|
|
264
275
|
```
|
|
265
276
|
|
|
266
|
-
After `init`, your
|
|
267
|
-
`noskills next` at every step. The agent follows the JSON output. You
|
|
268
|
-
to prompt-engineer the agent's behavior — noskills handles that.
|
|
277
|
+
After `init`, your AGENTS.md (or CLAUDE.md, .cursorrules, etc.) tells the agent
|
|
278
|
+
to call `noskills next` at every step. The agent follows the JSON output. You
|
|
279
|
+
never need to prompt-engineer the agent's behavior — noskills handles that.
|
|
269
280
|
|
|
270
281
|
### Without an agent (agentless CLI mode)
|
|
271
282
|
|
|
@@ -349,13 +360,15 @@ Every spec follows a deterministic phase flow:
|
|
|
349
360
|
|
|
350
361
|
```
|
|
351
362
|
IDLE -> DISCOVERY -> DISCOVERY_REVIEW -> SPEC_DRAFT -> SPEC_APPROVED -> EXECUTING <-> BLOCKED
|
|
352
|
-
^
|
|
363
|
+
^ \ |
|
|
364
|
+
| <-> FREE |
|
|
353
365
|
+--------------------------------- DONE <---------------------------------+
|
|
354
366
|
```
|
|
355
367
|
|
|
356
368
|
| Phase | What happens |
|
|
357
369
|
| -------------------- | ---------------------------------------------------------------------- |
|
|
358
370
|
| **IDLE** | No active spec. Start one with `noskills spec new "..."` |
|
|
371
|
+
| **FREE** | No enforcement. Work freely. Agent has no restrictions from noskills |
|
|
359
372
|
| **DISCOVERY** | 6 blended questions probe product, engineering, and QA simultaneously |
|
|
360
373
|
| **DISCOVERY_REVIEW** | User reviews and confirms all discovery answers before spec generation |
|
|
361
374
|
| **SPEC_DRAFT** | Spec generated from discovery answers. Human reviews |
|
|
@@ -411,7 +424,7 @@ Every `noskills next` call returns a structured JSON payload:
|
|
|
411
424
|
"Do not refactor, improve, or modify code outside this task's scope.",
|
|
412
425
|
"Complete the task, then report progress. The user handles git."
|
|
413
426
|
],
|
|
414
|
-
"tone": "Direct.
|
|
427
|
+
"tone": "Direct. Orchestrate immediately — spawn sub-agents."
|
|
415
428
|
},
|
|
416
429
|
"context": {
|
|
417
430
|
"rules": ["Use Deno for all TypeScript"],
|
|
@@ -462,23 +475,43 @@ noskills status -o json # Structured status for scripts
|
|
|
462
475
|
Every `noskills next` output includes a `behavioral` block with phase-specific
|
|
463
476
|
rules. These tell the agent HOW to behave, not just WHAT to do:
|
|
464
477
|
|
|
465
|
-
| Phase | Behavioral tone
|
|
466
|
-
| ---------- |
|
|
467
|
-
|
|
|
468
|
-
|
|
|
469
|
-
|
|
|
470
|
-
|
|
|
471
|
-
|
|
|
478
|
+
| Phase | Behavioral tone | Key rules |
|
|
479
|
+
| ---------- | -------------------------------- | ------------------------------------------------------------- |
|
|
480
|
+
| IDLE | "Welcoming. Present choices" | No file edits until free mode or spec approved |
|
|
481
|
+
| FREE | "Quiet. No enforcement." | No restrictions — work freely |
|
|
482
|
+
| DISCOVERY | "Curious, has a stake" | Push back on shallow answers, probe for specifics, don't code |
|
|
483
|
+
| SPEC_DRAFT | "The user is reviewing" | Don't modify the spec, don't start coding |
|
|
484
|
+
| EXECUTING | "Orchestrate — spawn sub-agents" | Delegate to sub-agents, don't edit files directly |
|
|
485
|
+
| BLOCKED | "Brief. Decision time." | Present decision as-is, don't suggest preferences |
|
|
486
|
+
| DONE | "Celebrate briefly, then stop" | Don't start new work |
|
|
472
487
|
|
|
473
488
|
**Git is read-only** for agents (configurable via `allowGit: true` in manifest).
|
|
474
489
|
Agents may read (`git log`, `git diff`, `git status`) but never write
|
|
475
490
|
(`git commit`, `git push`, `git checkout`). This is enforced at three levels:
|
|
476
|
-
behavioral rules,
|
|
491
|
+
behavioral rules, AGENTS.md instruction, and PreToolUse hook.
|
|
477
492
|
|
|
478
493
|
When the agent's iteration count exceeds `maxIterationsBeforeRestart` (default
|
|
479
494
|
15), an `urgency` message warns that context is degrading and recommends a fresh
|
|
480
495
|
session.
|
|
481
496
|
|
|
497
|
+
### Platform Support
|
|
498
|
+
|
|
499
|
+
| Platform | Rules | Hooks | Agents | MCP | Enforcement |
|
|
500
|
+
| ----------- | -------------- | ----------- | ----------- | --- | --------------- |
|
|
501
|
+
| Claude Code | CLAUDE.md | full | Task tool | yes | Mechanical |
|
|
502
|
+
| Kiro | steering/ | Run Command | delegation | yes | Mechanical |
|
|
503
|
+
| Codex CLI | AGENTS.md | full | spawn_agent | yes | Mechanical |
|
|
504
|
+
| Copilot CLI | AGENTS.md | full | /fleet | yes | Mechanical |
|
|
505
|
+
| OpenCode | AGENTS.md | plugins | delegation | yes | Mechanical |
|
|
506
|
+
| Cursor | .cursorrules | none | none | yes | Behavioral only |
|
|
507
|
+
| Windsurf | .windsurfrules | none | none | yes | Behavioral only |
|
|
508
|
+
|
|
509
|
+
Platforms with **mechanical enforcement** use hooks to prevent unauthorized file
|
|
510
|
+
edits, block git write commands, and enforce phase transitions. Platforms with
|
|
511
|
+
**behavioral-only enforcement** rely on rules and instructions — the agent is
|
|
512
|
+
asked to follow the protocol but cannot be mechanically prevented from breaking
|
|
513
|
+
it.
|
|
514
|
+
|
|
482
515
|
**Convention discovery:** When the agent identifies a recurring pattern,
|
|
483
516
|
receives a correction from the user, or discovers a preference during work, the
|
|
484
517
|
behavioral rules instruct it to ask: _"Should this be a permanent rule for this
|
|
@@ -573,7 +606,7 @@ In monorepos, different packages have different constraints. Drop a
|
|
|
573
606
|
`.folder-rules.md` in any directory with markdown bullet rules:
|
|
574
607
|
|
|
575
608
|
```markdown
|
|
576
|
-
- Generated
|
|
609
|
+
- Generated AGENTS.md must preserve existing content outside noskills:start/end
|
|
577
610
|
markers
|
|
578
611
|
- All command references must use dynamic noskillsCmd prefix
|
|
579
612
|
- Sync output must be idempotent
|
|
@@ -608,6 +641,11 @@ Six questions, each probing product + engineering + QA at once:
|
|
|
608
641
|
Active concerns inject sub-questions. For example, with `open-source` active,
|
|
609
642
|
question 1 also asks: _"Is this workaround common in the community?"_
|
|
610
643
|
|
|
644
|
+
For larger specs, noskills may propose splitting the work into separate specs at
|
|
645
|
+
the end of discovery — for example, separating a bug fix from a feature
|
|
646
|
+
addition. You always decide: keep as one spec or split. noskills never splits on
|
|
647
|
+
its own.
|
|
648
|
+
|
|
611
649
|
### Spec Classification
|
|
612
650
|
|
|
613
651
|
After discovery answers are submitted, noskills asks the user to classify the
|
|
@@ -634,9 +672,10 @@ noskills next --answer='{"involvesWebUI":true,"involvesCLI":false,"involvesPubli
|
|
|
634
672
|
|
|
635
673
|
### Hooks — Zero-Token Bookkeeping
|
|
636
674
|
|
|
637
|
-
noskills installs hooks for Claude Code (`.claude/settings.json`)
|
|
638
|
-
(`.kiro/settings/hooks.json`)
|
|
639
|
-
|
|
675
|
+
noskills installs hooks for Claude Code (`.claude/settings.json`), Kiro
|
|
676
|
+
(`.kiro/settings/hooks.json`), OpenCode (`.opencode/plugins/noskills.ts`), Codex
|
|
677
|
+
CLI (`.codex/hooks.json`), and Copilot CLI (`.github/hooks/noskills.json`) that
|
|
678
|
+
handle state bookkeeping without spending LLM tokens. Claude Code hooks:
|
|
640
679
|
|
|
641
680
|
| Hook | Event | What it does |
|
|
642
681
|
| ------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -648,6 +687,11 @@ tokens. Claude Code hooks:
|
|
|
648
687
|
|
|
649
688
|
Kiro hooks map the same behavioral guarantees to Kiro-native triggers (Pre Tool
|
|
650
689
|
Use, Post Tool Use, Agent Stop, Prompt Submit) using Run Command actions.
|
|
690
|
+
OpenCode hooks use the plugin system (`.opencode/plugins/`) with event handlers
|
|
691
|
+
for session.created, tool.execute.before/after, and session.deleted. Codex CLI
|
|
692
|
+
hooks use `.codex/hooks.json` with PascalCase events (SessionStart, PreToolUse,
|
|
693
|
+
PostToolUse, Stop). Copilot CLI hooks use `.github/hooks/noskills.json` with a
|
|
694
|
+
versioned schema (`{"version": 1, "hooks": {...}}`) and array-format commands.
|
|
651
695
|
|
|
652
696
|
Hooks are CLI subcommands (`noskills invoke-hook <name>`), not generated script
|
|
653
697
|
files. This avoids ESM/CJS issues — the same Deno entry point handles
|
|
@@ -664,23 +708,40 @@ noskills generates instruction files for every AI tool your team uses:
|
|
|
664
708
|
```
|
|
665
709
|
.eser/ (single source of truth)
|
|
666
710
|
+-- noskills sync
|
|
667
|
-
|
|
668
|
-
|-- -> .
|
|
669
|
-
|-- -> .
|
|
670
|
-
|-- -> .
|
|
671
|
-
|-- -> .
|
|
672
|
-
|
|
673
|
-
|-- -> .kiro/
|
|
674
|
-
|-- -> .kiro/
|
|
675
|
-
|-- -> .kiro/
|
|
676
|
-
|-- -> .
|
|
677
|
-
|
|
711
|
+
| Claude Code
|
|
712
|
+
|-- -> CLAUDE.md (instructions)
|
|
713
|
+
|-- -> AGENTS.md (shared: Codex / Copilot / OpenCode)
|
|
714
|
+
|-- -> .claude/settings.json (hooks)
|
|
715
|
+
|-- -> .claude/agents/ (agents)
|
|
716
|
+
| Kiro
|
|
717
|
+
|-- -> .kiro/steering/*.md (steering files)
|
|
718
|
+
|-- -> .kiro/settings/hooks.json (hooks)
|
|
719
|
+
|-- -> .kiro/settings/mcp.json (MCP)
|
|
720
|
+
|-- -> .kiro/agents/*.json (agents)
|
|
721
|
+
|-- -> .kiro/specs/ (spec projection)
|
|
722
|
+
| Codex CLI
|
|
723
|
+
|-- -> .codex/hooks.json (hooks)
|
|
724
|
+
|-- -> .codex/agents/*.toml (agents)
|
|
725
|
+
|-- -> .codex/config.toml (MCP)
|
|
726
|
+
| Copilot CLI
|
|
727
|
+
|-- -> .github/hooks/noskills.json (hooks)
|
|
728
|
+
|-- -> .github/agents/*.agent.md (agents)
|
|
729
|
+
|-- -> .github/copilot-instructions.md (IDE instructions)
|
|
730
|
+
|-- -> .copilot/mcp.json (MCP)
|
|
731
|
+
| OpenCode
|
|
732
|
+
|-- -> .opencode/plugins/noskills.ts (hooks)
|
|
733
|
+
|-- -> .opencode/agents/*.md (agents)
|
|
734
|
+
|-- -> .opencode/skills/*.md (spec projection)
|
|
735
|
+
|-- -> opencode.json (MCP)
|
|
736
|
+
| Cursor / Windsurf / Copilot IDE
|
|
737
|
+
|-- -> .cursorrules (Cursor)
|
|
738
|
+
+-- -> .windsurfrules (Windsurf)
|
|
678
739
|
```
|
|
679
740
|
|
|
680
741
|
Write your rules once in `.eser/rules/`, run `noskills sync`, and every tool
|
|
681
742
|
gets the same instructions in its native format.
|
|
682
743
|
|
|
683
|
-
Generated
|
|
744
|
+
Generated AGENTS.md includes:
|
|
684
745
|
|
|
685
746
|
- Protocol instructions with 5 concrete trigger points
|
|
686
747
|
- Git read-only section (unless `allowGit: true`)
|
|
@@ -835,7 +896,7 @@ noskills:
|
|
|
835
896
|
```
|
|
836
897
|
|
|
837
898
|
During `init`, noskills detects how it was invoked (via `@eser/standards`
|
|
838
|
-
runtime) and stores it as `command`. All generated output — `
|
|
899
|
+
runtime) and stores it as `command`. All generated output — `AGENTS.md`
|
|
839
900
|
instructions, hook remediation messages, behavioral rules, transition hints —
|
|
840
901
|
uses this prefix. Users who invoke via `deno run`, `npx`, homebrew, or global
|
|
841
902
|
install all get correct command references.
|
|
@@ -843,7 +904,8 @@ install all get correct command references.
|
|
|
843
904
|
**Tools vs Providers:**
|
|
844
905
|
|
|
845
906
|
- **Tools** = the IDE or agent environment (`claude-code`, `cursor`, `kiro`,
|
|
846
|
-
`copilot`, `windsurf`). Affects which sync
|
|
907
|
+
`copilot`, `windsurf`, `opencode`, `codex`, `copilot-cli`). Affects which sync
|
|
908
|
+
output files are generated.
|
|
847
909
|
- **Providers** = AI model access methods (`anthropic`, `openai`, `ollama`,
|
|
848
910
|
`claude-code` CLI). Used by the Agent Bridge for validation and
|
|
849
911
|
`noskills run`.
|
|
@@ -917,12 +979,23 @@ noskills can call AI agents for validation via a fallback chain:
|
|
|
917
979
|
package.json)
|
|
918
980
|
- **CI** — GitHub Actions, GitLab CI, Jenkins, CircleCI
|
|
919
981
|
- **Test runner** — Deno, Vitest, Jest, Playwright
|
|
920
|
-
- **Coding tools
|
|
921
|
-
|
|
982
|
+
- **Coding tools:**
|
|
983
|
+
- **Claude Code** — `CLAUDE.md`, `.claude/` directory
|
|
984
|
+
- **Kiro** — `.kiro/` directory
|
|
985
|
+
- **Codex CLI** — `.codex/` directory, `.codex/config.toml`
|
|
986
|
+
- **Copilot CLI** — `.copilot/` directory, `.github/hooks/`
|
|
987
|
+
- **Copilot IDE** — `.github/copilot-instructions.md`
|
|
988
|
+
- **OpenCode** — `.opencode/` directory, `opencode.json`
|
|
989
|
+
- **Cursor** — `.cursorrules`, `.cursor/` directory
|
|
990
|
+
- **Windsurf** — `.windsurfrules`
|
|
991
|
+
- **Kilo Code** — `.kilo/` directory _(detection only — full adapter planned)_
|
|
992
|
+
- **Cline** — `.clinerules` file _(detection only — full adapter planned)_
|
|
993
|
+
- **Roo Code** — `.roo/` directory, `.roomodes` file _(detection only — full
|
|
994
|
+
adapter planned)_
|
|
922
995
|
|
|
923
996
|
Detected coding tools are auto-synced on init, including hook installation for
|
|
924
|
-
|
|
925
|
-
`noskills.command` — all output references use this prefix.
|
|
997
|
+
tools that support it. Invocation method is auto-detected and stored in
|
|
998
|
+
`manifest.yml` as `noskills.command` — all output references use this prefix.
|
|
926
999
|
|
|
927
1000
|
## License
|
|
928
1001
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-SNHYXBHM.js";import{a as x,d as F}from"./chunk-3SLKOP72.js";import"./chunk-VPXOI7CR.js";import{c as p}from"./chunk-YK6UG66R.js";import{
|
|
1
|
+
import{a as k}from"./chunk-SNHYXBHM.js";import{a as x,d as F}from"./chunk-3SLKOP72.js";import"./chunk-VPXOI7CR.js";import{c as p}from"./chunk-YK6UG66R.js";import{g as P,i as A}from"./chunk-TMC5H2A5.js";import{d as y,f as C,h as R,i as w,j as u,l as D,p as E}from"./chunk-LWCWPXCS.js";import{c as i,d as l,f as a,g as d,k as m,o as S,q as v,r as g}from"./chunk-Y6AFIAJP.js";import{a as h,b as n}from"./chunk-2N4GTHXQ.js";import{b as c}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var M=async _=>{let s=S({renderer:g.ansi(),sink:v.stdout()}),r=c.process.cwd(),o=R(_);if(!o.ok)return s.writeln(a(o.error)),await s.close(),n({exitCode:1});let t;try{t=await C(r,o.spec)}catch(e){let f=e instanceof Error?e.message:String(e);return s.writeln(a(f)),await s.close(),n({exitCode:1})}let $=await D(r);if(t.spec!==null){let e=`${r}/${y.specDir(t.spec)}`;try{await c.fs.stat(e)}catch{return s.writeln(a(`Active spec '${t.spec}' directory not found.`)),s.writeln(l("Run `noskills reset` to return to IDLE.")),await s.close(),n({exitCode:1})}}if(t.phase==="SPEC_DRAFT"){if(t.classification===null&&t.spec!==null){let b=(await E(r)).filter(I=>$?.concerns.includes(I.id)??!1);try{await k(r,t,b)}catch{}}let e=A(t);await w(r,e),e.spec!==null&&await u(r,e.spec,e),e.spec!==null&&(await x(r,e.spec,"approved"),await F(r,e.spec,"approved")),s.writeln(d("\u2714")," Spec approved. Phase: ",m("SPEC_APPROVED")),s.writeln("When ready, run ",i(`${p('next --answer="start"')}`)," to begin execution.")}else if(t.phase==="DISCOVERY_REVIEW"){let e=P(t);await w(r,e),e.spec!==null&&await u(r,e.spec,e),s.writeln(d("\u2714")," Discovery answers approved. Phase: ",m("SPEC_DRAFT")),s.writeln("Review the spec and run ",i(p("approve"))," again to approve.")}else t.phase==="DISCOVERY"&&t.discovery.completed?(s.writeln(l("Discovery complete. Spec draft already generated.")),s.writeln("Review the spec and run ",i(p("approve"))," again when in SPEC_DRAFT phase.")):s.writeln(a(`Cannot approve in phase: ${t.phase}`));return await s.close(),h(void 0)};export{M as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v}from"./chunk-YK6UG66R.js";import{
|
|
1
|
+
import{c as v}from"./chunk-YK6UG66R.js";import{k as A}from"./chunk-TMC5H2A5.js";import{d as k,f as S,h as y,i as x,j as C}from"./chunk-LWCWPXCS.js";import{c as d,d as l,f as i,h as f,o as w,q as h,r as g}from"./chunk-Y6AFIAJP.js";import{a as u,b as r}from"./chunk-2N4GTHXQ.js";import{b as c}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var q=async p=>{let e=w({renderer:g.ansi(),sink:h.stdout()}),n=c.process.cwd(),o=y(p);if(!o.ok)return e.writeln(i(o.error)),await e.close(),r({exitCode:1});let m=(p??[]).filter(t=>!t.startsWith("--spec=")).join(" ")||"No reason given",s;try{s=await S(n,o.spec)}catch(t){let E=t instanceof Error?t.message:String(t);return e.writeln(i(E)),await e.close(),r({exitCode:1})}if(s.spec!==null){let t=`${n}/${k.specDir(s.spec)}`;try{await c.fs.stat(t)}catch{return e.writeln(i(`Active spec '${s.spec}' directory not found.`)),e.writeln(l("Run `noskills reset` to return to IDLE.")),await e.close(),r({exitCode:1})}}if(s.phase!=="EXECUTING")return e.writeln(i(`Cannot block in phase: ${s.phase}`)),await e.close(),r({exitCode:1});let a=A(s,m);return await x(n,a),a.spec!==null&&await C(n,a.spec,a),e.writeln(f("\u26A0")," Spec blocked: ",l(m)),e.writeln("Resolve with: ",d(`${v('next --answer="resolution"')}`)),await e.close(),u(void 0)};export{q as main};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C,d as k}from"./chunk-3SLKOP72.js";import{m as y}from"./chunk-TMC5H2A5.js";import{d as w,f as h,h as S,i as g,j as E}from"./chunk-LWCWPXCS.js";import{d as l,f as n,g as m,o as u,q as d,r as f}from"./chunk-Y6AFIAJP.js";import{a as o,b as i}from"./chunk-2N4GTHXQ.js";import{b as p}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var F=async D=>{let e=u({renderer:f.ansi(),sink:d.stdout()}),r=p.process.cwd(),c=S(D);if(!c.ok)return e.writeln(n(c.error)),await e.close(),i({exitCode:1});let s;try{s=await h(r,c.spec)}catch(a){let I=a instanceof Error?a.message:String(a);return e.writeln(n(I)),await e.close(),i({exitCode:1})}if(s.phase==="IDLE"||s.phase==="FREE"||s.phase==="UNINITIALIZED"||s.phase==="COMPLETED")return e.writeln(n(`Cannot cancel in phase: ${s.phase}`)),await e.close(),i({exitCode:1});if(s.spec!==null){let a=`${r}/${w.specDir(s.spec)}`;try{await p.fs.stat(a)}catch{return e.writeln(n(`Active spec '${s.spec}' directory not found.`)),e.writeln(l("Run `noskills reset` to return to IDLE.")),await e.close(),i({exitCode:1})}}let t=y(s,"cancelled");return await g(r,t),t.spec!==null&&await E(r,t.spec,t),t.spec!==null&&(await C(r,t.spec,"cancelled"),await k(r,t.spec,"cancelled")),e.writeln(m("\u2714")," Spec cancelled."),await e.close(),o(void 0)};export{F as main};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{a as R,c as O,d as S,e as T}from"./chunk-MRZT23BL.js";import{a as P}from"./chunk-7UX6WIXX.js";import{c as N}from"./chunk-YK6UG66R.js";var q=[{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"]}],C=e=>q.map(t=>({...t,extras:O(e,t.id)}));var L=e=>{let t=new Set(e.map(n=>n.questionId));return q.every(n=>t.has(n.id))};var w=e=>N(e),o=(e,t)=>{if(t===null)return w(e);let n=e.indexOf(" ");if(n===-1)return w(`${e} --spec=${t}`);let s=e.slice(0,n),r=e.slice(n);return w(`${s} --spec=${t}${r}`)},Y="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.",F={hasAskUserTool:!0,optionPresentation:"tool",hasSubAgentDelegation:!0,subAgentMethod:"task"},M=(e,t,n,s,r=F)=>{let h=e.execution.iteration>=t,c="You are a senior engineer and a scrum master who takes pride in honest reporting. Your reputation depends on accuracy, not speed. You are responsible for others' toil, and you are a perfect example of a servant leader. When reporting progress: if something is NOT implemented, say so \u2014 don't hide it. If partially done, say 'partially done: [what works] / [what doesn't]'. If untested, say 'implemented but untested'. NEVER say 'done' for something you haven't verified yourself. Underpromise \u2014 4 of 6 done means '4 of 6 done, 2 remaining', not 'almost done'.",d="Never skip steps or make decisions without asking the user. If you think something can be skipped or inferred, ask first. Explicit > Clever.",f=r.hasAskUserTool?"At every decision point (discovery questions, classification, spec approval, expansion proposals, architectural decisions, rule promotion), you MUST use AskUserQuestion to get the user's input. You MUST NOT make decisions, infer preferences, or assume the user's intent. If you're unsure whether something is a decision point, it is \u2014 ask.":"At every decision point (discovery questions, classification, spec approval, expansion proposals, architectural decisions, rule promotion), you MUST ask the user. Present options as a numbered list and ask the user to pick a number. You MUST NOT make decisions, infer preferences, or assume the user's intent. If you're unsure whether something is a decision point, it is \u2014 ask.",g="At every decision point where you present options to the user, share your recommendation BEFORE asking. Say what you think and why, then ask if the user agrees. Format: 'I'd recommend X because [reason]. Agree, or would you prefer Y?' The user always has the final word, but you save them cognitive load by proposing first.",u="noskills is a live state machine the user watches in real-time. Call noskills ONCE per interaction. Ask ONE question, wait for the user's answer, submit it. Never batch-submit, never backfill, never answer questions yourself.",i=n?[c,d,f,g,u]:[Y,c,d,f,g,u],l=s?.outOfScope??[],p=e.spec;switch(e.phase){case"FREE":return{rules:[],tone:"Quiet. No enforcement."};case"IDLE":{let a=r.optionPresentation==="tool"?["When interactiveOptions are present, pass them DIRECTLY as the `options` array in AskUserQuestion \u2014 they are already in the correct {label, description} format. You MUST also provide a `header` field (max 12 chars, e.g. 'Action') and a `question` field. When the user picks an option, look up its label in the `commandMap` object to find the command to execute.","For availableConcerns: use AskUserQuestion with multiSelect:true. AskUserQuestion supports max 4 options per question and max 4 questions per call. If there are more than 4 concerns, split them across two questions within the same AskUserQuestion call (e.g., first 3 in question 1, remaining in question 2). NEVER silently drop concerns \u2014 present ALL available concerns to the user, even if it requires multiple questions."]:[`When interactiveOptions are present, present them as a numbered list. For each option show the number, label, and description. Ask the user to pick a number. When the user picks an option, look up its label in the \`commandMap\` object to find the command to execute. Example format:
|
|
2
|
+
|
|
3
|
+
1. Start a new spec \u2014 Begin discovery questions for a new feature
|
|
4
|
+
2. Add concerns \u2014 Shape how discovery and specs work
|
|
5
|
+
|
|
6
|
+
Pick a number:`,"For availableConcerns: present ALL available concerns as a numbered list. NEVER silently drop concerns \u2014 present ALL available concerns to the user. Ask the user to enter the numbers of the concerns they want to activate (comma-separated)."],m=r.hasAskUserTool?"For availableConcerns: use AskUserQuestion with multiSelect:true. AskUserQuestion supports max 4 options per question and max 4 questions per call. If there are more than 4 concerns, split them across two questions within the same AskUserQuestion call (e.g., first 3 in question 1, remaining in question 2). NEVER silently drop concerns \u2014 present ALL available concerns to the user, even if it requires multiple questions.":void 0,k=m!==void 0?[a[0],m]:a;return{rules:["You MUST NOT create, edit, or delete any project file until you have either entered free mode or created and approved a spec. No exceptions. No 'quick fixes'. Choose: `noskills free` for unstructured work, or `noskills spec new` for structured work.",...i,...k,"Do not take action without the user choosing an option first.","When the user wants to create a new spec, they can provide anything: a one-line description, a full task list, meeting notes, a kanban card, a customer email, or a detailed requirements document. Accept whatever format they provide. If it's long, summarize it into a spec title for the slug but preserve the full text as context for discovery.","After running spec new, ask the user if they want full discovery, quick discovery, or skip to spec draft. Full discovery: pre-scan, premise challenge, 6 questions, expansions, architecture, error map, synthesis. Quick discovery: only questions relevant to active concerns, skip expansions and error map. Skip to spec draft: classification \u2192 approve \u2192 execute. Never skip discovery without asking."],tone:"Welcoming. Present choices, then wait."}}case"DISCOVERY":{let a=r.hasAskUserTool?"You MUST ask each discovery question using AskUserQuestion tool. You MUST NOT answer questions yourself or infer answers from the spec description. You MUST NOT submit discovery answers without the user explicitly providing each answer through AskUserQuestion. Each question \u2192 one AskUserQuestion call \u2192 user answers \u2192 next question. If the user already gave a detailed description in spec new, you may PRE-FILL suggested answers as option descriptions in AskUserQuestion \u2014 but the user must still confirm or override each one. If the user provided a fully formed plan, you may skip Phase 2 (questions) but you MUST still run premise challenge and alternatives. Never skip premise challenge.":"You MUST ask each discovery question by presenting it to the user as text. You MUST NOT answer questions yourself or infer answers from the spec description. You MUST NOT submit discovery answers without the user explicitly providing each answer. Each question \u2192 present it \u2192 user answers \u2192 next question. If the user already gave a detailed description in spec new, you may PRE-FILL suggested answers \u2014 but the user must still confirm or override each one. If the user provided a fully formed plan, you may skip Phase 2 (questions) but you MUST still run premise challenge and alternatives. Never skip premise challenge.";return{modeOverride:"You are in plan mode. Do not attempt to create, edit, or write any files. Do not run any shell commands that modify state. You can read files and run read-only commands to understand the codebase. Your ONLY job right now is to think and talk. Read code to understand. Ask questions to discover. Challenge assumptions. Propose ideas. Debate tradeoffs. But NEVER create, edit, or delete project files. Discovery exists to catch what you don't yet know you don't know.",rules:[...i,a,"DO NOT create, edit, or write any files.","DO NOT run shell commands that modify state.","You MAY read files and run read-only commands (cat, ls, grep, git log, git diff).","BEFORE asking any discovery questions, conduct a pre-discovery codebase scan: read the project README, CLAUDE.md, and any design docs; check the last 20 git commits (git log --oneline -20); look for TODO files, open issue references, and existing specs; scan the directory structure to understand the project shape. Then present a brief 'Pre-discovery audit' summary: stack detected, recent work themes, open TODOs, existing specs. This gives you CONTEXT to ask INFORMED questions, not blind ones.","After the pre-discovery codebase scan and BEFORE starting questions, ask the user: 'What kind of discovery do you need? A) Explore scope \u2014 I'll help expand, find opportunities, think bigger. B) Technical depth \u2014 I'll focus on architecture, error handling, implementation strategy. C) Validate my plan \u2014 I already know what I want, challenge my assumptions. D) Ship fast \u2014 minimal scope, cut the fat, get to tasks quickly.' Adapt your discovery emphasis accordingly: Explore \u2192 heavy on expansion proposals and dream state; Technical \u2192 heavy on architectural decisions and error/rescue map; Validate \u2192 heavy on premise challenge and pushback; Ship fast \u2192 minimal questions, skip expansions, go direct to classification and tasks.","Before starting discovery questions, challenge the user's initial spec description against what you learned from the codebase scan. Look for: hidden complexity they haven't mentioned, conflicts with existing code, scope that's bigger or smaller than they think, existing modules that overlap with what they're asking for. Share your observations and ask clarifying follow-ups, then proceed to questions.","When asking discovery questions, use your codebase knowledge to offer concrete options alongside the open-ended question. For example, instead of just 'What does the user do today?' present: 'Based on the codebase, I see three likely scenarios: A) ... B) ... C) ... D) Something else \u2014 describe it. Which is closest?' The user can always pick 'something else' but concrete options speed up the conversation and force specificity.",r.hasAskUserTool?"Ask one question at a time using AskUserQuestion tool.":"Ask one question at a time. Present it as text and wait for the user's response.","Push back on vague answers \u2014 you will be the one executing this spec, vague answers make your job harder.","When the user gives a short answer, follow up: 'Can you be more specific?'","After collecting discovery answers, synthesize a CURRENT STATE \u2192 THIS SPEC \u2192 6-MONTH IDEAL vision before generating the spec. Show three columns: where the project is now, what this spec achieves, and where it could go in 6 months. Note: 'This spec moves you from column 1 to column 2. Column 3 is out of scope but worth knowing \u2014 every decision in this spec should keep column 3 possible.' This helps the user see if the scope is right.","When you spot expansion opportunities during discovery (from codebase scan, TODOs, concern requirements, synergies with the current plan), present each as a numbered proposal (1/N, 2/N...). Every proposal MUST include: clear description of WHAT and WHY (how it connects to the current plan); effort estimate as S/M/L/XL with human time and CC time estimates (e.g., 'S (human: ~1 day / CC: ~15 min)' \u2014 not just 'small'); risk assessment as Low/Low-Med/Med/Med-High/High naming the specific risk factor; completeness delta showing X/10 without this and Y/10 with this. Every proposal gets three options: A) Add to scope B) Defer to future spec C) Skip \u2014 not interested, plus 'Chat about this' and 'Skip remaining proposals' escape hatches.","After discovery questions and expansion proposals, identify architectural decisions that must be resolved before implementation. These are decisions where choosing A vs B changes the shape of multiple tasks, the data model, the API surface, or system boundaries. Present each as a concrete technical question with options, a RECOMMENDATION with reasoning, and completeness scores. Show how each option affects downstream work (e.g., 'If you choose B, tasks 3 and 4 need a job queue setup step added'). Only surface decisions that BLOCK implementation \u2014 not preferences or nice-to-haves. If the user says 'I don't know yet', mark it as a risk: 'UNRESOLVED: [decision] TBD. Tasks X-Y may change.' Never allow implementation to start with unresolved architectural decisions \u2014 flag them prominently in the spec.","Before finalizing, map error and rescue paths for every significant codepath in the planned work. Create a table: codepath | what can go wrong | how it's handled. Identify CRITICAL GAPS \u2014 failure modes that the plan doesn't address. Present each critical gap as a decision with options, a recommendation, and completeness scores, just like architectural decisions. Resolved gaps become tasks or acceptance criteria. Unresolved gaps become risk flags. Think like an SRE reviewing a design doc \u2014 what fails at 3am?","After all discovery questions, expansion proposals, architectural decisions, and error mapping are complete, present a DISCOVERY SUMMARY for the user to review: intent, ambition, reversibility, impact, verification, out of scope, the dream state table (current \u2192 this spec \u2192 future), accepted/deferred/skipped expansions, resolved architectural decisions, and the error/rescue map. Ask for confirmation before generating the spec. This is the last chance to catch misunderstandings.","Once you have a substantive answer for each question, collect all answers and submit them together in a single `noskills next --answer` call as a JSON object."],tone:"Curious interviewer who has a stake in the answers and comes PREPARED. You've read the codebase before asking. Challenge assumptions, offer concrete options, think about architecture and failure modes. Think deeply before asking each question."}}case"DISCOVERY_REVIEW":return{modeOverride:"You are in plan mode. Do not create, edit, or write any files. Present the discovery answers to the user for review and confirmation.",rules:[...i,"DO NOT create, edit, or write any files.","Present ALL discovery answers to the user clearly, one by one.",r.hasAskUserTool?"Use AskUserQuestion to ask: 'Are these answers correct, or would you like to revise any?'":"Ask the user: 'Are these answers correct, or would you like to revise any?' Present approval and revision as numbered options.","If the user approves, run the approve command.","If the user wants to revise, collect their corrections and submit them.","You MUST NOT approve on behalf of the user. The user must explicitly confirm.","If noskills output contains a splitProposal, present it to the user with the exact options shown. Do NOT split or merge specs on your own. Do NOT recommend one option over the other unless the user asks for your opinion. The user decides."],tone:"Careful reviewer. The user must confirm every answer."};case"SPEC_DRAFT":return{modeOverride:"You are in plan mode. Do not attempt to create, edit, or write any files. Do not run any shell commands that modify state. You can read files and run read-only commands to understand the codebase. Your ONLY job right now is to think and talk. Read code to understand. Ask questions to discover. Challenge assumptions. Propose ideas. Debate tradeoffs. But NEVER create, edit, or delete project files. Discovery exists to catch what you don't yet know you don't know.",rules:[...i,"DO NOT create, edit, or write any files.","Read the spec and present a summary to the user.","Flag any tasks that are too vague to execute.","Flag any missing acceptance criteria.","Ask the user if they want to refine before approving.",r.hasAskUserTool?"When presenting classification options, use AskUserQuestion with multiSelect:true. Do NOT infer classification yourself.":"When presenting classification options, present them as a numbered list with multiselect (user picks multiple numbers). Do NOT infer classification yourself.","If you identify issues in the spec (vague tasks, irrelevant sections, missing acceptance criteria), submit a refinement via: `"+o(`next --answer='{"refinement":"task-1: Add upload endpoint, task-2: Add validation middleware, task-3: Write integration tests"}'`,p)+"`. The spec will be updated and you can review again."],tone:"Thoughtful reviewer preparing to hand off to an implementer."};case"SPEC_APPROVED":return{rules:[...i,"The spec is approved but execution has not started.","Do not start coding until the user triggers execution.","If the user wants changes, they must reset and re-spec.",r.hasAskUserTool?"Before starting execution, show the spec summary to the user and ask for final confirmation via AskUserQuestion.":"Before starting execution, show the spec summary to the user and ask for final confirmation. Present 'Start execution' and 'Not yet' as numbered options."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let a=[];r.subAgentMethod==="task"?a.push(`When you receive a task from noskills next, do NOT execute it yourself. Spawn the noskills-executor sub-agent using the Agent tool. Pass it: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. When the sub-agent completes, review its results briefly, then report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,p)}\`. You are the orchestrator \u2014 the sub-agent is the implementer.`,"If the sub-agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the sub-agent failure in your next status report so it can be investigated.","After the noskills-executor sub-agent completes a task, spawn a noskills-verifier sub-agent to independently verify the work. Pass it: the list of changed files, the acceptance criteria, and the test commands. The verifier reports PASS/FAIL per criterion with evidence. Use the verifier's report as your status report to noskills. Do NOT submit status reports based solely on the executor's self-report.",`After spawning sub-agents, ALWAYS present a dispatch table showing the FULL pipeline \u2014 not just executors, but also verification and test steps:
|
|
7
|
+
|
|
8
|
+
| Step | Agent | Files | Tasks | Est. Time |
|
|
9
|
+
|------|-------|-------|-------|-----------|
|
|
10
|
+
| 1. Implement | noskills-executor | purge.ts | Tasks 1-6 | ~3 min |
|
|
11
|
+
| 2. Verify | noskills-verifier | purge.ts (read-only) | Validate ACs | ~1 min |
|
|
12
|
+
| 3. Write tests | noskills-executor | purge.test.ts | Task 7 | ~2 min |
|
|
13
|
+
|
|
14
|
+
When agents complete, update with actual time and status (Done / Failed / Found N issues). The user should see the complete plan upfront.
|
|
15
|
+
|
|
16
|
+
Estimate: S ~1min, M ~2min, L ~5min, XL ~10min.`,"The agent that writes implementation code must NOT write tests for that code. Spawn a SEPARATE sub-agent for test writing. This prevents the implementer from writing tests that only confirm what it already knows. The test writer reads the code fresh and tests what it actually does, not what the implementer intended.","When deciding how to split work across sub-agents: if all tasks touch the same file or tightly coupled files, batch them into one executor. If tasks touch independent files or modules, spawn parallel executors. Always err toward smaller, focused sub-agents over large batched ones \u2014 fresh context per task is better than accumulated context across tasks."):r.subAgentMethod==="delegation"?a.push(`When you receive a task from noskills next, use Kiro's agent delegation to spawn the noskills-executor agent. Pass it: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. When the agent completes, review its results briefly, then report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,p)}\`. You are the orchestrator \u2014 the delegated agent is the implementer.`,"If the delegated agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the agent failure in your next status report so it can be investigated.","After the noskills-executor agent completes a task, delegate to the noskills-verifier agent to independently verify the work. Pass it: the list of changed files, the acceptance criteria, and the test commands. The verifier reports PASS/FAIL per criterion with evidence. Use the verifier's report as your status report to noskills. Do NOT submit status reports based solely on the executor's self-report.","When deciding how to split work across delegated agents: if all tasks touch the same file or tightly coupled files, batch them into one executor. If tasks touch independent files or modules, spawn parallel executors. Always err toward smaller, focused agents over large batched ones \u2014 fresh context per task is better than accumulated context across tasks."):a.push("Execute tasks sequentially in this context. Do not attempt to spawn sub-agents \u2014 this tool does not support agent delegation. Complete each task yourself, verify your work (run type checks and tests), then report progress.",`After completing a task, report to noskills via \`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,p)}\`.`);let m=[...i,"You are the orchestrator, not the implementer. NEVER create, edit, or delete project files directly. ALWAYS delegate to noskills-executor sub-agent, even for single-line changes. There is no 'minor change' \u2014 every edit goes through the executor\u2192verifier pipeline. Your job: read noskills output, spawn sub-agents, report status.","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.",...a,`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: \`${w('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`];e.execution.lastVerification?.passed===!1&&m.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let k={rules:m,tone:"Direct. Orchestrate immediately \u2014 spawn sub-agents.",outOfScope:l.length>0?l:void 0};return h?{...k,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.`}:k}case"BLOCKED":return{rules:[...i,"Present the decision to the user exactly as described.","Do not suggest a preferred option unless the user asks for your opinion.","After the user decides, relay the answer immediately. Do not elaborate."],tone:"Brief. The user is making a decision, not having a discussion."};case"COMPLETED":return{rules:[...i,"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:[...i,`Run \`${o("next",p)}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},W=5*60*1e3,B=(e,t)=>{let n=e.spec,s;switch(e.phase){case"IDLE":s=`No active spec. Start one with: \`${w('spec new --name=<slug> "description"')}\``;break;case"DISCOVERY":s=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"DISCOVERY_REVIEW":s=`Discovery answers ready for review. ${e.discovery.answers.length} answers collected. Waiting for user confirmation.`;break;case"SPEC_DRAFT":s=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":s=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":s=e.execution.lastProgress!==null?`Executing "${e.spec}", iteration ${e.execution.iteration}. Last progress: ${e.execution.lastProgress}. Continue with the current task.`:`Executing "${e.spec}", iteration ${e.execution.iteration}. Start the first task.`;break;case"BLOCKED":s=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"COMPLETED":s=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:s=`Run \`${o("next",n)}\` to get started.`}return{protocol:`Run \`${o('next --answer="..."',n)}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:t.map(r=>r.id),resumeHint:s}},V=e=>{let t=e.spec;if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 COMPLETED",how:`Run \`${o("next",t)}\` for instructions. Submit results with \`${o('next --answer="..."',t)}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let n=new Date(e.lastCalledAt).getTime();if(Date.now()-n>W)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 COMPLETED",how:`Run \`${o("next",t)}\` for instructions. Submit results with \`${o('next --answer="..."',t)}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},re=(e,t,n,s,r,h,c,d)=>{let f=B(e,t),g=s?.maxIterationsBeforeRestart??15,u=s?.allowGit??!1,i=d??F,l=M(e,g,u,r,i),p=V(e),a;switch(e.phase){case"IDLE":a=U(t,R,n.length,c);break;case"DISCOVERY":a=H(e,t,n);break;case"DISCOVERY_REVIEW":a=G(e,t);break;case"SPEC_DRAFT":a=X(e);break;case"SPEC_APPROVED":a=K(e);break;case"EXECUTING":a=Z(e,t,n,g,r,h);break;case"BLOCKED":a=ee(e);break;case"COMPLETED":a=te(e);break;case"FREE":a={phase:"FREE",instruction:"Free mode \u2014 no enforcement active. Work as you wish."};break;default:a=U(t,R,n.length,c)}let m={...a,meta:f,behavioral:l};p!==void 0&&(m={...m,protocolGuide:p});let k=Q(e,t,c);if(k.length>0){let x=k.map(({label:y,description:b})=>({label:y,description:b})),I={};for(let y of k)I[y.label]=y.command;let D=i.optionPresentation==="tool"?"AskUserQuestion":"prose-numbered-list",E=i.optionPresentation==="tool"?"Use AskUserQuestion tool to present these options. Do NOT use prose.":"Present options as a numbered list. Ask user to pick a number.";m={...m,interactiveOptions:x,commandMap:I,toolHint:D,toolHintInstruction:E}}return m},Q=(e,t,n)=>{let s=e.spec;switch(e.phase){case"IDLE":{let r=[],c=(n?.existingSpecs??[]).filter(d=>d.phase!=="COMPLETED");t.length===0&&r.push({label:"Add concerns (Recommended)",description:"Shape how discovery and specs work by adding project concerns",command:w("concern add <id> [<id2> ...]")}),r.push({label:"Start a new spec",description:"Begin discovery questions for a new feature",command:w('spec new --name=<slug> "description"')}),r.push({label:"Free mode",description:"No enforcement \u2014 work freely until you want structure",command:w("free")});for(let d of c.slice(0,2))r.push({label:`Continue: ${d.name} (${d.phase})`,description:d.detail??`Iteration ${d.iteration}`,command:o("next",d.name)});return t.length>0&&r.push({label:"Edit concerns",description:`Currently: ${t.map(d=>d.id).join(", ")}`,command:w("concern list")}),r.slice(0,4)}case"DISCOVERY_REVIEW":return[{label:"Approve all answers",description:"Answers look correct \u2014 generate the spec",command:o('next --answer="approve"',s)},{label:"Revise answers",description:"Correct one or more discovery answers",command:o(`next --answer='{"revise":{...}}'`,s)},{label:"Split into separate specs",description:"Create one spec per independent area (if split proposed)",command:o('next --answer="split"',s)}];case"SPEC_DRAFT":return[{label:"Approve spec",description:"Review looks good \u2014 approve and move to execution",command:o("approve",s)},{label:"Refine spec",description:"Submit refinements to improve tasks or sections",command:o(`next --answer='{"refinement":"..."}'`,s)},{label:"Start over",description:"Reset the spec and start fresh",command:o("reset",s)}];case"SPEC_APPROVED":return[{label:"Start execution",description:"Begin implementing the tasks",command:o('next --answer="start"',s)},{label:"Not yet",description:'Save for later \u2014 resume with noskills next --answer="start"',command:""}];case"EXECUTING":return[];case"BLOCKED":return[{label:"Resolve block",description:"Provide a resolution to unblock execution",command:o('next --answer="resolution"',s)},{label:"Reset spec",description:"Abandon this spec and start over",command:o("reset",s)}];case"COMPLETED":return[{label:"New spec",description:"Start a new feature spec",command:w('spec new --name=<slug> "description"')},{label:"Reopen spec",description:"Reopen this spec for revision",command:o("reopen",s)},{label:"Check status",description:"Review completed spec summary",command:w("status")}];default:return[]}},j="noskills is a state-machine orchestrator that acts as a scrum master for both you and your agent \u2014 keeping work focused, decisions in your hands, and tokens efficient.",U=(e,t,n,s)=>({phase:"IDLE",instruction:"Present the welcome dashboard and interactive options to the user. Show existing specs if any, then present choices. IMPORTANT: Present ALL available concerns to the user \u2014 never truncate the list. Split across multiple AskUserQuestion calls if needed.",welcome:j,existingSpecs:s?.existingSpecs??[],availableConcerns:t.map(r=>({id:r.id,description:r.description})),activeConcerns:e.map(r=>r.id),activeRulesCount:s?.rulesCount??n,hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),H=(e,t,n)=>{let s=e.spec,r=C(t),h=e.discovery.answers.length,c=L(e.discovery.answers),d=e.discovery.audience==="agent";if(c)return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${o("approve",s)}\``,questions:[],answeredCount:h,context:{rules:n,concernReminders:[]},transition:{onComplete:o("approve",s)}};if(d){let u=e.discovery.currentQuestion,i=r[u];if(i===void 0)return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${o("approve",s)}\``,questions:[],answeredCount:h,context:{rules:n,concernReminders:[]},transition:{onComplete:o("approve",s)}};let l={id:i.id,text:i.text,concerns:[...i.concerns],extras:i.extras.map(p=>p.text)};return{phase:"DISCOVERY",instruction:`Ask this question to the user using AskUserQuestion. Submit the answer with: \`${o('next --agent --answer="<answer>"',s)}\``,questions:[l],answeredCount:h,currentQuestion:u,totalQuestions:r.length,context:{rules:n,concernReminders:S(t)},transition:{onComplete:`${o('next --agent --answer="<answer>"',s)}`}}}let f=new Set(e.discovery.answers.map(u=>u.questionId));return{phase:"DISCOVERY",instruction:"Conduct a thorough discovery conversation. FIRST: perform a pre-discovery codebase scan (README, CLAUDE.md, recent git log, TODOs, directory structure) and present a brief audit summary. THEN: challenge the user's spec description against your findings. THEN: ask the discovery questions one at a time, offering concrete options based on codebase knowledge. AFTER questions: present a dream state table (current \u2192 this spec \u2192 future), scored expansion proposals, architectural decisions, and an error/rescue map. FINALLY: present a complete discovery synthesis for user confirmation before submitting answers as a JSON object.",questions:r.filter(u=>!f.has(u.id)).map(u=>({id:u.id,text:u.text,concerns:[...u.concerns],extras:u.extras.map(i=>i.text)})),answeredCount:h,context:{rules:n,concernReminders:S(t)},transition:{onComplete:`${o(`next --answer='{"status_quo":"...","ambition":"...",...}'`,s)}`}}},G=(e,t)=>{let n=e.spec,s=C(t),r=e.discovery.answers.map(c=>{let d=s.find(f=>f.id===c.questionId);return{questionId:c.questionId,question:d?.text??c.questionId,answer:c.answer}}),h=P(e.discovery.answers);return{phase:"DISCOVERY_REVIEW",instruction:h.detected?"Present ALL discovery answers to the user for review. ALSO present the split proposal \u2014 noskills detected multiple independent areas.":"Present ALL discovery answers to the user for review. The user must confirm or correct each answer before the spec can be generated. Use AskUserQuestion to ask for confirmation.",answers:r,transition:{onApprove:o('next --answer="approve"',n),onRevise:o(`next --answer='{"revise":{"status_quo":"corrected answer"}}'`,n)},splitProposal:h.detected?h:void 0}},X=e=>{let t=e.spec;return e.classification===null?{phase:"SPEC_DRAFT",instruction:"Before generating the spec, classify what this spec involves. Ask the user to select all that apply.",specPath:e.specState.path??"",transition:{onApprove:`${o(`next --answer='{"involvesWebUI":false,"involvesCLI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`,t)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesWebUI",label:"Web/Mobile UI \u2014 layouts, responsive design, visual components"},{id:"involvesCLI",label:"CLI/Terminal UI \u2014 spinners, progress bars, interactive prompts"},{id:"involvesPublicAPI",label:"Public API changes"},{id:"involvesMigration",label:"Data migration or schema changes"},{id:"involvesDataHandling",label:"Data handling or privacy"}],instruction:"Select all that apply. Submit as JSON: `"+o(`next --answer='{"involvesWebUI":true,"involvesCLI":false,"involvesPublicAPI":false,...}'`,t)+"`. If none apply, answer with: `"+o('next --answer="none"',t)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:o("approve",t)}}},K=e=>{let t=e.spec;return{phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${o('next --answer="start"',t)}`}}},z=(e,t)=>{if(t===null)return!1;let n=e.toLowerCase();return n.includes("mobile")||n.includes("layout")||n.includes("interaction design")?t.involvesWebUI:n.includes("ui state")||n.includes("skeleton ui")?t.involvesWebUI||t.involvesCLI:n.includes("readme")||n.includes("documentation updated")||n.includes("reflected in")&&n.includes("docs")?!0:n.includes("api doc")||n.includes("public api")?t.involvesPublicAPI:n.includes("migration")||n.includes("backward compat")||n.includes("deprecat")?t.involvesMigration:n.includes("audit trail")||n.includes("access control")||n.includes("data handling")||n.includes("data retention")?t.involvesDataHandling:!0},J=(e,t,n,s,r,h,c,d)=>{let f=[],g=new Set(d??[]),u=0,i=()=>`ac-${++u}`;if(s!==null)for(let l of s.items)g.has(l.id)||f.push({id:l.id,text:`[DEBT from iteration ${l.since}] ${l.text}`});if(t&&f.push({id:i(),text:`[FAILED] Tests \u2014 fix this first: ${n.slice(0,200)}`}),h!=null)for(let l of h.verification){let p=i();g.has(p)||f.push({id:p,text:l})}for(let l of e)if(l.acceptanceCriteria!==void 0&&l.acceptanceCriteria.length>0)for(let p of l.acceptanceCriteria){if(!z(p,r))continue;let a=i();g.has(a)||f.push({id:a,text:`(${l.id}) ${p}`})}if(c!==void 0)for(let l of c){let p=i();g.has(p)||f.push({id:p,text:`(folder: ${l.folder}) ${l.rule}`})}return f},Z=(e,t,n,s,r,h)=>{let c=e.spec,d=T(t),f=e.execution.iteration>=s,g=e.execution.lastVerification?.passed===!1,u=e.execution.lastVerification?.output??"",i=r?.tasks??[],l=e.execution.completedTasks??[],p=new Set(l),a=i.find(v=>!p.has(v.id))??null,m=a!==null?{id:a.id,title:a.title,totalTasks:i.length,completedTasks:l.length}:void 0;if(e.execution.awaitingStatusReport){let v=J(t,g,u,e.execution.debt,e.classification,r,h,e.execution.naItems),A={phase:"EXECUTING",instruction:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:n,concernReminders:S(t)},transition:{onComplete:`${o(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`,c)}`,onBlocked:`${o('block "reason"',c)}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:v,reportFormat:{completed:"list item IDs you finished (e.g., ['debt-1', 'ac-3']) with evidence",remaining:"list item IDs not yet done",blocked:"list item IDs that need a decision from the user",na:"(optional) list item IDs that are not applicable to this task \u2014 they will be removed from future criteria",newIssues:"(optional) list NEW issues discovered during implementation \u2014 free text, will be assigned debt IDs automatically"}}};return g&&(A={...A,verificationFailed:!0,verificationOutput:u.slice(0,2e3)}),A}let k=(e.execution.lastProgress??"").includes("Task not accepted"),x=e.execution.debt?.items??[],I=e.execution.debt?.unaddressedIterations??0,D=m!==void 0?`Execute task ${m.id}: ${m.title} (${m.completedTasks}/${m.totalTasks} completed)`:"All tasks completed. Run `"+o("done",c)+"` to finish.",E;if(g)E="Verification FAILED. Fix the failing tests before continuing.";else if(k&&x.length>0){let v=I>=3?` These items have been outstanding for ${I} iterations.`:"";E=`Task not accepted \u2014 ${x.length} remaining item(s) must be addressed before this task can be completed.${v} Address them, then submit a new status report.`}else E=D;let y={phase:"EXECUTING",instruction:E,task:m,context:{rules:n,concernReminders:S(t)},transition:{onComplete:`${o('next --answer="..."',c)}`,onBlocked:`${o('block "reason"',c)}`,iteration:e.execution.iteration}};if(k&&x.length>0&&(y={...y,taskRejected:!0,rejectionReason:`${x.length} remaining item(s) must be addressed.`,rejectionRemaining:x.map(v=>v.text)}),e.execution.debt!==null&&e.execution.debt.items.length>0){let v=e.execution.debt.unaddressedIterations??0,A=v>=3?`URGENT: These items have been unaddressed for ${v} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";y={...y,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:A}}}if(g){let v=u.slice(0,2e3);y={...y,verificationFailed:!0,verificationOutput:v}}d.length>0&&(y={...y,concernTensions:d}),f&&(y={...y,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${o("next",c)}\` to resume - your progress is saved.`});let b=[...e.decisions].reverse().find(v=>!v.promoted);return b!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(y={...y,promotePrompt:{decisionId:b.id,question:b.question,choice:b.choice,prompt:`You just resolved a decision: "${b.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${w(`rule add "${b.choice}"`)}\``}}),y},ee=e=>{let t=e.spec;return{phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${o('next --answer="..."',t)}`}}},te=e=>({phase:"COMPLETED",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length,completionReason:e.completionReason,completionNote:e.completionNote}});export{q as a,C as b,L as c,re as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d={detected:!1,reason:"",proposals:[]},g=[/\badditionally\b/i,/\bseparately\b/i,/\band also\b/i,/\banother issue\b/i,/\bsecond problem\b/i,/\bon the other hand\b/i,/\bplus\b/i],p=/(?:^|[.!?]\s+)also[,\s]/im,h=/(?:^|\n|\.\s+)\s*(?:\(\d+\)|\d+\.\s|(?:first|second|third|fourth|fifth)[:;,])/im,b=/\b(fix|add|restore|update|remove|refactor|rewrite|implement|create|migrate|convert)\s+\S+(?:\s+\S+){0,4}\s+AND\s+(fix|add|restore|update|remove|refactor|rewrite|implement|create|migrate|convert)\s+/i,y=[/\buse\s+(?:the\s+)?(?:new\s+)?(\w+)\s+(?:type|interface|class|module|function)\b/i,/\bafter\s+(?:adding|creating|implementing)\b/i,/\bdepends\s+on\b/i,/\bprerequisite\b/i,/\brequires\s+(?:the\s+)?(?:above|previous|first)\b/i,/\bthen\s+use\b/i],E=(e,n)=>{if(n==="ship-fast")return d;let t=new Map;for(let l of e)t.set(l.questionId,l.answer);let r=t.get("status_quo")??"",s=t.get("ambition")??"",o=t.get("scope_boundary")??"",i=t.get("verification")??"",a=w(r,s,o,i);return a.length<2||a.reduce((l,m)=>l+m.estimatedTasks,0)<=3||R(a)?d:{detected:!0,reason:`Discovery answers cover ${a.length} independent areas that could be separate specs.`,proposals:a}},w=(e,n,t,r)=>{let s=A(e,n);if(s.length>=2)return s.map(u);let o=x(e,n);if(o.length>=2)return o.map(u);let i=P(e,n);return i.length>=2?i.map(u):[]},A=(e,n)=>{for(let[t,r]of[[e,"status_quo"],[n,"ambition"]]){if(!h.test(t))continue;let s=S(t);if(s.length>=2)return s.map(o=>({text:o.trim(),sourceQuestions:[r]}))}return[]},S=e=>{let t=e.split(/\(\d+\)\s*/).slice(1).map(c=>c.trim()).filter(c=>c.length>0);if(t.length>=2)return t;let r=e.split(/(?:^|\n|(?<=\.)\s+)\s*\d+\.\s+/),s=r.length>1?r.slice(1).map(c=>c.trim()).filter(c=>c.length>0):[];if(s.length>=2)return s;let o=/(?:^|\n|(?<=\.)\s+)\s*(?:first|second|third|fourth|fifth)[:;,]\s*/i,i=e.split(o),a=i.length>1?i.slice(1).map(c=>c.trim()).filter(c=>c.length>0):[];return a.length>=2?a:[]},x=(e,n)=>{for(let[t,r]of[[e,"status_quo"],[n,"ambition"]]){if(p.test(t)){let s=v(t,p);if(s.length>=2)return s.map(o=>({text:o.trim(),sourceQuestions:[r]}))}for(let s of g)if(s.test(t)){let o=t.split(s).map(i=>i.trim()).filter(i=>i.length>0);if(o.length>=2)return o.map(i=>({text:i,sourceQuestions:[r]}))}}return[]},v=(e,n)=>{let t=e.match(n);if(t===null||t.index===void 0)return[];let r=e.slice(0,t.index).trim(),s=e.slice(t.index+t[0].length).trim();return r.length>0&&s.length>0?[r,s]:[]},P=(e,n)=>{for(let[t,r]of[[e,"status_quo"],[n,"ambition"]]){let s=b.exec(t);if(s!==null&&s.index!==void 0){let o=t.toUpperCase().indexOf(" AND ",s.index);if(o>=0){let i=t.slice(0,o).trim(),a=t.slice(o+5).trim();if(i.length>0&&a.length>0)return[{text:i,sourceQuestions:[r]},{text:a,sourceQuestions:[r]}]}}}return[]},u=e=>{let n=T(e.text),t=N(e.text);return{name:n,description:e.text,estimatedTasks:t,relevantAnswers:[...e.sourceQuestions]}},T=e=>{let n=new Set(["the","a","an","is","are","was","were","be","been","being","have","has","had","do","does","did","will","would","shall","should","may","might","must","can","could","to","of","in","for","on","with","at","by","from","that","this","it","its","and","or","but","not","no","so","if","then","too","very","just"]),s=e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").split(/\s+/).filter(o=>o.length>0&&!n.has(o)).slice(0,4).join("-").replace(/--+/g,"-").replace(/^-|-$/g,"").slice(0,50);return s.length>0?s:"area"},N=e=>{let n=/\b(fix|add|restore|update|remove|refactor|rewrite|implement|create|migrate|convert|replace|extract|move|rename|split|merge|test|verify|validate|configure|setup|install|deploy)\b/gi,r=e.match(n)?.length??0;return Math.max(2,Math.min(r+1,5))},R=e=>{for(let n=0;n<e.length;n++)for(let t=n+1;t<e.length;t++){let r=e[n],s=e[t],o=`${r.description} ${s.description}`;for(let l of y)if(l.test(o))return!0;let i=f(r.description),a=f(s.description);if([...i].filter(l=>a.has(l)).some(l=>/^[A-Z]/.test(l)||l.includes(".")))return!0}return!1},f=e=>{let n=new Set,t=e.match(/\b[A-Z][a-zA-Z0-9]+\b/g);if(t!==null)for(let s of t)n.add(s);let r=e.match(/\b[\w-]+\.\w{1,4}\b/g);if(r!==null)for(let s of r)n.add(s);return n};export{E as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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","New features and API changes must be documented so contributors can discover and use them"],acceptanceCriteria:["Public API documented","Changes reflected in README or relevant docs","No exclusionary patterns introduced"]};var 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:"verification",text:"Is documentation (README, CHANGELOG, API docs) up to date with this change?"},{questionId:"scope_boundary",text:"What technical debt would this introduce?"}],specSections:["Migration & Deprecation","Backward Compatibility"],reminders:["Favor boring technology over shiny new tools","Every shortcut needs explicit justification","Consider maintenance burden for new dependencies","If this task changes public behavior, API, CLI flags, or configuration \u2014 update README and relevant docs in the SAME task. Documentation is not a follow-up."],acceptanceCriteria:["Backward compatibility preserved","Migration path documented if breaking","No unnecessary new dependencies","Documentation updated for any public-facing change"]};var 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 u={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 l=[s,r,a,c,d,u];var M=()=>Promise.resolve(l),T=(t,n)=>{let e=[];for(let i of t)for(let o of i.extras)o.questionId===n&&e.push(o);return e},U=t=>{let n=[];for(let e of t)for(let i of e.reminders)n.push(`${e.id}: ${i}`);return n},F=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{l as a,M as b,T as c,U as d,F as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./chunk-LWCWPXCS.js";var o={UNINITIALIZED:["IDLE"],IDLE:["DISCOVERY","COMPLETED","FREE"],FREE:["IDLE"],DISCOVERY:["DISCOVERY_REVIEW","COMPLETED"],DISCOVERY_REVIEW:["DISCOVERY_REVIEW","SPEC_DRAFT","COMPLETED"],SPEC_DRAFT:["SPEC_DRAFT","SPEC_APPROVED","COMPLETED"],SPEC_APPROVED:["EXECUTING","COMPLETED"],EXECUTING:["COMPLETED","BLOCKED"],BLOCKED:["EXECUTING","COMPLETED"],COMPLETED:["IDLE","DISCOVERY"]},c=(e,t)=>o[e].includes(t),s=(e,t)=>{if(!c(e,t))throw new Error(`Invalid phase transition: ${e} \u2192 ${t}. Allowed: ${o[e].join(", ")}`)},h=(e,t)=>(s(e.phase,t),{...e,phase:t}),E=(e,t,n)=>(s(e.phase,"DISCOVERY"),{...e,phase:"DISCOVERY",spec:t,branch:n,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[]}),u=e=>(s(e.phase,"FREE"),{...e,phase:"FREE"}),m=e=>(s(e.phase,"IDLE"),{...e,phase:"IDLE"}),d=(e,t,n)=>{if(e.phase!=="DISCOVERY"&&e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot add discovery answer in phase: ${e.phase}`);let i=[...e.discovery.answers.filter(r=>r.questionId!==t),{questionId:t,answer:n}];return{...e,discovery:{...e.discovery,answers:i}}},S=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot complete discovery in phase: ${e.phase}`);return{...e,phase:"DISCOVERY_REVIEW",discovery:{...e.discovery,completed:!0},specState:{path:a.specFile(e.spec),status:"draft"}}},C=e=>(s(e.phase,"SPEC_DRAFT"),{...e,phase:"SPEC_DRAFT"}),D=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot advance discovery question in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,currentQuestion:e.discovery.currentQuestion+1}}},F=e=>(s(e.phase,"SPEC_APPROVED"),{...e,phase:"SPEC_APPROVED",specState:{...e.specState,status:"approved"}}),I=e=>(s(e.phase,"EXECUTING"),{...e,phase:"EXECUTING",discovery:{answers:[],completed:!0,currentQuestion:0,audience:"human"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]}});var R=(e,t)=>(s(e.phase,"BLOCKED"),{...e,phase:"BLOCKED",execution:{...e.execution,lastProgress:`BLOCKED: ${t}`}}),P=(e,t)=>({...e,decisions:[...e.decisions,t]}),O=(e,t,n)=>(s(e.phase,"COMPLETED"),{...e,phase:"COMPLETED",completionReason:t,completedAt:new Date().toISOString(),completionNote:n??null}),x=e=>{if(e.phase!=="COMPLETED")throw new Error(`Cannot reopen in phase: ${e.phase}`);return{...e,phase:"DISCOVERY",reopenedFrom:e.completionReason,completionReason:null,completedAt:null,completionNote:null,discovery:{...e.discovery,completed:!1,currentQuestion:0},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},classification:null}},w=e=>({...e,phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null});export{h as a,E as b,u as c,m as d,d as e,S as f,C as g,D as h,F as i,I as j,R as k,P as l,O as m,x as n,w as o};
|