lastlight 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/config/default.yaml +7 -0
  2. package/dist/cli/fork-cli.d.ts +2 -1
  3. package/dist/cli/fork-cli.js +33 -1
  4. package/dist/cli/fork-cli.js.map +1 -1
  5. package/dist/engine/llm.d.ts +12 -3
  6. package/dist/engine/llm.js +16 -3
  7. package/dist/engine/llm.js.map +1 -1
  8. package/dist/engine/router.js +47 -5
  9. package/dist/engine/router.js.map +1 -1
  10. package/dist/engine/screen/classifier.d.ts +40 -12
  11. package/dist/engine/screen/classifier.js +105 -175
  12. package/dist/engine/screen/classifier.js.map +1 -1
  13. package/dist/workflows/loader.d.ts +9 -0
  14. package/dist/workflows/loader.js +66 -1
  15. package/dist/workflows/loader.js.map +1 -1
  16. package/dist/workflows/schema.d.ts +18 -0
  17. package/dist/workflows/schema.js +42 -0
  18. package/dist/workflows/schema.js.map +1 -1
  19. package/package.json +1 -1
  20. package/plugins/lastlight/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lastlight/skills/lastlight-overlay/SKILL.md +38 -2
  22. package/plugins/lastlight/skills/lastlight-overlay/references/forking.md +27 -4
  23. package/plugins/lastlight/skills/lastlight-overlay/references/overlay-layout.md +8 -0
  24. package/workflows/answer.yaml +7 -0
  25. package/workflows/build.yaml +15 -0
  26. package/workflows/demo.yaml +7 -0
  27. package/workflows/explore.yaml +8 -0
  28. package/workflows/issue-triage.yaml +6 -0
  29. package/workflows/pr-review.yaml +8 -0
  30. package/workflows/prompts/classifier.md +60 -0
  31. package/workflows/prompts/classify-adds-info.md +17 -0
  32. package/workflows/qa-test.yaml +7 -0
  33. package/workflows/security-review.yaml +8 -0
  34. package/workflows/verify.yaml +8 -0
@@ -364,6 +364,27 @@ export function phaseSkillNames(phase) {
364
364
  //
365
365
  // The `kind` field is purely a categorization label used by the dashboard
366
366
  // (e.g. to group runs by purpose). The runner ignores it.
367
+ /**
368
+ * Intents owned by the harness itself (workflow gates / session control), not by
369
+ * any workflow. A workflow's `classification.intent` may not claim one of these.
370
+ * The classifier keeps their category text + examples in its base prompt template.
371
+ */
372
+ export const RESERVED_CONTROL_INTENTS = [
373
+ "approve",
374
+ "reject",
375
+ "status",
376
+ "reset",
377
+ "chat",
378
+ ];
379
+ /**
380
+ * Uppercase prompt token for an intent — the string the classifier emits on its
381
+ * `INTENT:` line and parses back. `qa-test` → `QATEST`, `incident` → `INCIDENT`.
382
+ * Kept here (workflows layer) so the loader's validation and the classifier's
383
+ * prompt/parser derive tokens the same way.
384
+ */
385
+ export function intentToken(intent) {
386
+ return intent.toUpperCase().replace(/-/g, "");
387
+ }
367
388
  export const AgentWorkflowSchema = z.object({
368
389
  /** Categorization label — e.g. "build", "triage", "review", "health". Free string. */
369
390
  kind: z.string().default("agent"),
@@ -393,6 +414,27 @@ export const AgentWorkflowSchema = z.object({
393
414
  */
394
415
  final_message: z.string().optional(),
395
416
  variables: z.record(z.string(), z.string()).optional(),
417
+ /**
418
+ * How the free-text intent classifier should route to this workflow. When
419
+ * present, this workflow contributes one category to the composed classifier
420
+ * prompt (`src/engine/screen/classifier.ts`) AND claims the `intent` token:
421
+ * a comment/message the classifier tags with this intent routes here (via the
422
+ * router's `getWorkflowByIntent` fallback) unless a bespoke router branch
423
+ * already handles that intent. The prompt token is derived from `intent`
424
+ * (`intent.toUpperCase().replace(/-/g, "")` — e.g. `qa-test` → `QATEST`).
425
+ * Validated in the loader: `intent` must be unique across workflows and must
426
+ * not collide with a reserved control intent (approve/reject/status/reset/chat).
427
+ */
428
+ classification: z
429
+ .object({
430
+ /** Intent token this workflow owns (e.g. "build", "qa-test", "incident"). */
431
+ intent: z.string(),
432
+ /** The category paragraph, conventionally prefixed with its UPPER token. */
433
+ description: z.string(),
434
+ /** Optional one-line classifier examples (verbatim lines for the prompt). */
435
+ examples: z.array(z.string()).optional(),
436
+ })
437
+ .optional(),
396
438
  phases: z.array(PhaseDefinitionSchema),
397
439
  });
398
440
  // ── Cron workflow ─────────────────────────────────────────────────────
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/workflows/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yEAAyE;AAEzE,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,oDAAoD;IACpD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,4EAA4E;IAC5E,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3C,iFAAiF;IACjF,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IAC7C,cAAc,EAAE,gBAAgB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEH,yEAAyE;AAEzE,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,CAAC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EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,qEAAqE;IACrE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACtD,SAAS,EAAE,CAAC;SACT,MAAM,CAAC;QACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lastlight",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "GitHub repository maintenance agent — Agent SDK harness",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin.json",
3
3
  "name": "lastlight",
4
4
  "displayName": "Last Light",
5
- "version": "0.14.0",
5
+ "version": "0.15.0",
6
6
  "description": "Install, configure and operate Last Light (GitHub maintenance agent) — its server, CLI client, deployment overlay, and the Last Light Evals harness.",
7
7
  "author": {
8
8
  "name": "Clifton Cunningham"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: lastlight-overlay
3
3
  description: Create or customize a Last Light deployment OVERLAY (the private instance/ repo) — scaffold it, then fork built-in workflows, prompts, skills, or the agent persona (agent-context) so a deployment can override them. Use when the user wants to "create a Last Light overlay / instance repo", "customize / fork a workflow", "override a prompt or skill", "change the agent's persona/soul/rules", or tune a deployment's config without forking the whole codebase. For first-time server install use lastlight-server.
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  tags: [lastlight, overlay, instance, fork, workflows, customization]
6
6
  ---
7
7
 
@@ -38,6 +38,33 @@ Edit `instance/config.yaml` to set `managedRepos`, and optionally override
38
38
  `models`, `variants`, `routes`, `approvals`, `disabled.*`. Secrets stay in
39
39
  `instance/secrets/.env` (never in config.yaml).
40
40
 
41
+ ### Model setup
42
+
43
+ Two halves — the **credential** (env) and the **model choice** (config):
44
+
45
+ 1. **Provider API key → `instance/secrets/.env`.** Set the key matching the
46
+ provider you'll use, e.g. `ANTHROPIC_API_KEY=…` (or `OPENAI_API_KEY`,
47
+ `OPENROUTER_API_KEY`, … — see the repo's `src/providers.ts` for the full
48
+ registry). Keys are env-only, never in `config.yaml`.
49
+ 2. **Model choice → `config.yaml` `models:` map.** `default` is the model every
50
+ agent phase uses unless overridden; add per-task keys to override individual
51
+ phases or the cheap helpers:
52
+
53
+ ```yaml
54
+ models:
55
+ default: anthropic/claude-sonnet-4-6 # every phase, provider/model form
56
+ architect: anthropic/claude-opus-4-8 # a specific phase
57
+ classifier: anthropic/claude-haiku-4-5-20251001 # the intent-routing helper
58
+ screener: anthropic/claude-haiku-4-5-20251001 # the prompt-injection screener
59
+ ```
60
+
61
+ Keys are `provider/model` strings. A per-task entry wins over `default`.
62
+ `classifier` / `screener` are the cheap one-shot helpers — when unset they
63
+ fall back to the first configured provider's fast model (Anthropic Haiku when
64
+ `ANTHROPIC_API_KEY` is set), **not** `default`, so routing stays cheap unless
65
+ you deliberately pin it. `variants:` sets reasoning effort per task the same
66
+ way. See `references/overlay-layout.md`.
67
+
41
68
  ## 3. Fork built-in assets to customize them
42
69
 
43
70
  Use `lastlight fork` — it copies a built-in into `instance/` so your edited copy
@@ -51,13 +78,22 @@ copies and the editing workflow.
51
78
  > core) when you're standing up a deployment, not to fork into an existing overlay.
52
79
 
53
80
  ```bash
54
- lastlight fork # list forkable workflows + agent-context (marks what's already forked)
81
+ lastlight fork # list forkable workflows + agent-context + classifier (marks what's already forked)
55
82
  lastlight fork <workflow> # copy a workflow YAML + every prompt & skill its phases reference
56
83
  lastlight fork agent-context # copy soul.md / rules.md / security.md (the persona)
57
84
  lastlight fork agent-context soul.md # just one persona file
85
+ lastlight fork classifier # copy the base intent-classifier prompts (classifier.md + classify-adds-info.md)
58
86
  # add --force to overwrite an existing overlay copy; --home <dir> to target a specific working dir
59
87
  ```
60
88
 
89
+ > **Routing / the intent classifier.** The classifier prompt is composed from a
90
+ > forkable base (`workflows/prompts/classifier.md`) plus a `classification:`
91
+ > block in each workflow YAML. To retune *how* free-text is routed, either
92
+ > `fork classifier` and edit the base, or edit a forked workflow's
93
+ > `classification:` block. A **new** overlay workflow that declares its own
94
+ > `classification.intent` becomes routable with no core change — the classifier
95
+ > learns the category and the router routes it. See `references/forking.md`.
96
+
61
97
  Then edit the copied files under `instance/…`.
62
98
 
63
99
  ## 4. Apply
@@ -26,11 +26,12 @@ either way it reads the defaults bundled with the CLI.
26
26
  ## Commands
27
27
 
28
28
  ```bash
29
- lastlight fork # list forkable workflows + agent-context files; marks what's already forked
30
- lastlight fork all # fork EVERY workflow (+ prompts & skills) plus all agent-context
29
+ lastlight fork # list forkable workflows + agent-context + classifier; marks what's already forked
30
+ lastlight fork all # fork EVERY workflow (+ prompts & skills) + all agent-context + the classifier
31
31
  lastlight fork <workflow> # e.g. `lastlight fork build`
32
32
  lastlight fork agent-context # all of soul.md / rules.md / security.md
33
33
  lastlight fork agent-context <file> # a single persona file, e.g. soul.md
34
+ lastlight fork classifier # the base intent-classifier prompts
34
35
  ```
35
36
 
36
37
  `lastlight fork all` is the "fully fork the defaults" shortcut — handy for an
@@ -51,9 +52,31 @@ are skipped); `--home <dir>` targets a specific working directory.
51
52
  (`agent-context/*.md` — typically `soul.md`, `rules.md`, `security.md`) into
52
53
  `instance/agent-context/`. With no file argument it forks all of them; pass a
53
54
  filename for just one.
55
+ - **`lastlight fork classifier`** copies the base intent-classifier prompts
56
+ (`workflows/prompts/classifier.md` — the framing + disambiguation + control
57
+ categories the router's classification is composed from — and
58
+ `workflows/prompts/classify-adds-info.md`). Each **workflow's own** category
59
+ text lives in that workflow's `classification:` block, so it already travels
60
+ with `lastlight fork <workflow>` — fork the classifier only to retune the
61
+ shared base or add/adjust the control categories.
54
62
 
55
- `agent-context` is forked only via the literal `agent-context` target — a bare
56
- name is always treated as a workflow.
63
+ `agent-context` and `classifier` are forked only via their literal targets — a
64
+ bare name is always treated as a workflow.
65
+
66
+ ### The intent classifier is workflow-driven
67
+
68
+ The classifier that routes free-text comments/messages to a workflow composes
69
+ its prompt from the forkable base **plus one `classification:` block per
70
+ workflow YAML** (`intent` + `description` + `examples`). Two ways to customise
71
+ routing in an overlay:
72
+
73
+ - **Retune existing routing** — `fork classifier` and edit the base, or fork a
74
+ workflow and edit its `classification:` block.
75
+ - **Add a new routable intent** — add a new workflow YAML in the overlay with
76
+ its own `classification.intent` (e.g. `intent: incident`). The classifier
77
+ learns the category, the parser learns the token, and the router routes it to
78
+ that workflow — **no core change**. The intent must be unique and must not be
79
+ a reserved control intent (`approve`/`reject`/`status`/`reset`/`chat`).
57
80
 
58
81
  ## Editing workflow
59
82
 
@@ -43,6 +43,14 @@ instance/
43
43
  effort), `routes`, `approvals`, and `disabled.*`. See the repo's
44
44
  `config/default.yaml` for the authoritative shape and keys.
45
45
 
46
+ **Models.** `models.default` is the fallback for every agent phase; per-task
47
+ keys (a phase name like `architect`, or a cheap helper `classifier` / `screener`)
48
+ override it, each a `provider/model` string. The provider **API key** is env-only
49
+ (`secrets/.env`), never in `config.yaml`. The `classifier`/`screener` helpers fall
50
+ back to the first provider's fast model — not `models.default` — when unset, so an
51
+ unpinned deployment routes cheaply. (Env `OPENCODE_MODELS` still works and is
52
+ layered on top of the `models` map at load, so env wins over `config.yaml`.)
53
+
46
54
  ## Applying changes
47
55
 
48
56
  - config.yaml change, or an added/changed `.env` value → `lastlight server
@@ -1,5 +1,12 @@
1
1
  kind: answer
2
2
  name: answer
3
+ classification:
4
+ intent: question
5
+ description: |
6
+ QUESTION — The user is asking a substantive INFORMATIONAL question that warrants research to answer well: "how does X work?", "what's the difference between X and Y?", "how does <repo> compare to <other tool>?", "is it possible to do Z?", "why does X happen?". The deliverable is an ANSWER, not code and not a spec. QUESTION is for real questions that benefit from reading docs/code or searching the web — NOT casual chat, thanks, or one-word replies (those stay CHAT). EXPLORE shapes a NEW idea into a spec; QUESTION answers an EXISTING question about how something works or compares.
7
+ examples:
8
+ - '"how does cliftonc/lastlight compare to Vercel''s Eve framework?" → INTENT: QUESTION, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
9
+ - '"what''s the difference between a sandbox phase and a chat session in cliftonc/lastlight?" → INTENT: QUESTION, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
3
10
  description: |
4
11
  Answer a question issue directly. Used when a newly-opened issue asks for
5
12
  information, an explanation, or a comparison rather than a code change — the
@@ -1,5 +1,20 @@
1
1
  kind: build
2
2
  name: build
3
+ classification:
4
+ intent: build
5
+ description: |
6
+ BUILD — The user is ASKING YOU (the bot) to make code changes NOW in a GitHub repo: implement a feature, fix a bug, create/send a PR, resolve an issue with code. BUILD requires a GitHub target — either an explicit repo reference (owner/name or github.com URL) in the message, OR an ISSUE TITLE context line indicating the comment is a reply on an existing issue/PR. If neither is present, classify as CHAT — local filesystem operations ("delete files in ~/foo", "clean up my downloads"), shell-style commands, or vague "build something" with no target are NOT BUILD.
7
+ BUILD is a REQUEST for NEW work directed at you. A comment that merely REPORTS work the human has ALREADY done is NOT BUILD — it is CHAT. Tells: past-tense ("fixed", "done", "implemented", "added a test", "pushed a fix", "handled it"), a reference to a commit the human made ("addressed in <sha>", "see commit abc123"), thanking you, or explaining/justifying a change they made in response to your review. These are status reports, not requests — classify them CHAT even when the comment is on a PR and even when it @-mentions you. Only classify BUILD when the human asks you to do NEW work (imperative request: "fix X", "now also handle Y", "can you update Z").
8
+ examples:
9
+ - '"build cliftonc/drizzle-cube#42" → INTENT: BUILD, REPO: cliftonc/drizzle-cube, ISSUE: 42, REASON: NONE'
10
+ - '"lets build this!" with ISSUE TITLE "Security Review" → INTENT: BUILD, REPO: NONE, ISSUE: NONE, REASON: NONE'
11
+ - '"go ahead" with ISSUE TITLE "Add CSV export" → INTENT: BUILD, REPO: NONE, ISSUE: NONE, REASON: NONE'
12
+ - '"now also handle the GET /sql case please" with ISSUE TITLE "Port adapters" → INTENT: BUILD, REPO: NONE, ISSUE: NONE, REASON: NONE'
13
+ - '"Thanks @last-light — addressed in 49ccadf. Fixed the nested body in the core and added a regression test; point 3 is intentional, confirmed with the maintainer." with ISSUE TITLE "Port fastify/hono/nextjs adapters" → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
14
+ - '"done, pushed a fix for the type error in 1a2b3c4" with ISSUE TITLE "Fix build" → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
15
+ - '"delete any files in ~/work/lastlight/docs" → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
16
+ - '"can you remove the old docs folder for me" (no ISSUE TITLE, no repo) → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
17
+ - '"build something cool" (no repo, no ISSUE TITLE) → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
3
18
  description: "Architect -> Executor -> Reviewer build cycle"
4
19
  trigger: build
5
20
  # Render progress as a single in-place task-list comment/message that updates
@@ -1,5 +1,12 @@
1
1
  kind: demo
2
2
  name: demo
3
+ classification:
4
+ intent: demo
5
+ description: |
6
+ DEMO — The user wants you to record a DEMO VIDEO of a feature/PR: "demo this", "record a demo of the new dashboard", "make a video showing the dark-mode toggle", "show me a before/after of the fix". The deliverable is a short screen-recorded mp4 of the running web UI, not a pass/fail report and not a verdict. Prefer DEMO over QATEST/VERIFY when the user explicitly asks for a recording, a video, or "show"/"demo" rather than to test or confirm a behaviour.
7
+ examples:
8
+ - '"record a demo of this" with ISSUE TITLE "Add dark-mode toggle" → INTENT: DEMO, REPO: NONE, ISSUE: NONE, REASON: NONE'
9
+ - '"make a short before/after video of the fix on cliftonc/foo#12" → INTENT: DEMO, REPO: cliftonc/foo, ISSUE: 12, REASON: NONE'
3
10
  description: |
4
11
  Record a short demo VIDEO of a PR or feature and post it. Drives the repo's
5
12
  web UI in a real headless browser, screen-records the session, and composites
@@ -1,5 +1,13 @@
1
1
  kind: explore
2
2
  name: explore
3
+ classification:
4
+ intent: explore
5
+ description: |
6
+ EXPLORE — The user wants help shaping an idea BEFORE writing code: "help me think through X", "brainstorm Y", "spec this out", "explore an idea for Z". A bare "explore" / "explore this" / "let's explore" is also EXPLORE — especially as a reply on an existing issue (ISSUE TITLE present), where the implicit object is the issue's idea. EXPLORE = shape the idea / write a spec; BUILD = write the code now.
7
+ examples:
8
+ - '"explore adding webhooks to cliftonc/drizby" → INTENT: EXPLORE, REPO: cliftonc/drizby, ISSUE: NONE, REASON: NONE'
9
+ - '"explore" with ISSUE TITLE "Feature: Allow configuration of otel endpoints" → INTENT: EXPLORE, REPO: NONE, ISSUE: NONE, REASON: NONE'
10
+ - '"explore this" with ISSUE TITLE "Add webhook support" → INTENT: EXPLORE, REPO: NONE, ISSUE: NONE, REASON: NONE'
3
11
  description: |
4
12
  Socratic idea-shaping loop: read the existing issue/thread for context, ask
5
13
  clarifying questions in a reply-gated loop until the shape is clear, then
@@ -1,5 +1,11 @@
1
1
  kind: triage
2
2
  name: issue-triage
3
+ classification:
4
+ intent: triage
5
+ description: |
6
+ TRIAGE — The user wants to scan/triage issues on a repo: "triage cliftonc/repo", "scan for new issues", "can you triage <repo>?".
7
+ examples:
8
+ - '"could you triage https://github.com/foo/bar?" → INTENT: TRIAGE, REPO: foo/bar, ISSUE: NONE, REASON: NONE'
3
9
  description: |
4
10
  Triage a GitHub issue: read it, classify it, label it, and act on stale or
5
11
  incomplete reports. Single agent invocation, no PR creation.
@@ -1,5 +1,13 @@
1
1
  kind: review
2
2
  name: pr-review
3
+ classification:
4
+ intent: review
5
+ description: |
6
+ REVIEW — The user wants a code review. Either repo-wide ("review cliftonc/repo", "check PRs", "can you review PRs on <repo>?") OR, when the comment is a reply on a PR (ISSUE TITLE present), a request to review THIS PR: "review this", "can you review this?", "please review", "take a look at this PR", "give this a review". The deliverable is a formal PR review (inline comments on the diff). Prefer REVIEW over CHAT whenever there's a clear "review"/"take a look" request on a PR.
7
+ examples:
8
+ - '"please review https://github.com/foo/bar/pull/42" → INTENT: REVIEW, REPO: foo/bar, ISSUE: 42, REASON: NONE'
9
+ - '"can you review this?" with ISSUE TITLE "Add HTML sanitizer for messages" → INTENT: REVIEW, REPO: NONE, ISSUE: NONE, REASON: NONE'
10
+ - '"take a look at this PR when you get a chance" with ISSUE TITLE "Port fastify adapter" → INTENT: REVIEW, REPO: NONE, ISSUE: NONE, REASON: NONE'
3
11
  description: |
4
12
  Review a single GitHub pull request: read the diff, check for issues, and
5
13
  post structured feedback. Does not run a full build cycle and does not
@@ -0,0 +1,60 @@
1
+ You are a router for messages directed at a GitHub/Slack bot.
2
+ Classify the user's message into exactly one category, and extract any repository or issue references.
3
+
4
+ Categories:
5
+ {{categories}}
6
+ APPROVE — The user is approving a pending gate: "approve", "go ahead", "looks good, continue", "yes proceed".
7
+ REJECT — The user is rejecting a pending gate: "reject", "abort", "cancel this", "no don't proceed". Extract any reason given.
8
+ STATUS — The user wants to know what's running: "status", "what's running", "any tasks active?".
9
+ RESET — The user wants to start a fresh session: "new", "reset", "start over", "fresh session".
10
+ CHAT — Anything else: questions, conversation, thanks, general discussion, and status reports of work the human already did ("thanks, fixed in <sha>", "addressed your comments", "done — added tests").
11
+
12
+ Polite or question phrasings are still clear intent. "Can you do a security review of X?",
13
+ "could you triage <repo>?", "please review PRs on <repo>" are SECURITY, TRIAGE, REVIEW
14
+ respectively — not CHAT. The "prefer CHAT when ambiguous" rule only applies when the
15
+ message has no clear action verb. Presence of "security review", "triage", "review PRs",
16
+ "scan for vulnerabilities", etc. makes the intent unambiguous regardless of politeness.
17
+
18
+ When ambiguous between EXPLORE and CHAT, prefer CHAT. Only pick EXPLORE when the user is explicitly asking for brainstorming / spec-shaping / design exploration — OR gives a bare "explore"/"explore this" command (see the issue-reply rule below), which is unambiguous, not chat.
19
+ When ambiguous between QUESTION and CHAT, prefer CHAT — only pick QUESTION for a substantive informational question that genuinely benefits from research (reading docs/code or a web search). Casual conversation, greetings, thanks, and trivial one-liners stay CHAT.
20
+ When ambiguous between BUILD and CHAT, prefer CHAT.
21
+ When ambiguous between VERIFY/QATEST and REVIEW/CHAT, prefer the existing category — only pick VERIFY or QATEST when the user explicitly asks you to test, run, confirm, or exercise a behaviour/flow.
22
+ When ambiguous between DEMO and VERIFY/QATEST, prefer the existing category — only pick DEMO when the user explicitly asks for a video, a recording, or to "demo"/"show" the feature.
23
+ When ambiguous between APPROVE/REJECT and CHAT, prefer CHAT — only classify as APPROVE/REJECT when the intent is clearly about a pending workflow gate.
24
+
25
+ Repo extraction: always emit REPO as "owner/name" (never a URL). If the message contains
26
+ a github.com URL, convert it: https://github.com/cliftonc/lastlight → cliftonc/lastlight.
27
+ URL paths like /issues/42 or /pull/5 should populate ISSUE as well.
28
+
29
+ When the message is a reply on an existing issue/PR, the issue title is provided
30
+ as ISSUE TITLE. Short imperative replies classify by their verb, with the issue
31
+ as the implicit object — the "prefer CHAT when ambiguous" rule does NOT apply to
32
+ a clear command directed at the issue's subject:
33
+ - "lets build this", "build it", "go ahead", "ship it", "do it", "implement
34
+ this", "make it so" → BUILD (write the code now).
35
+ - "explore", "explore this", "let's explore", "think this through", "spec this
36
+ out", "brainstorm this" → EXPLORE (shape the idea / write a spec first).
37
+ - "review this", "can you review this", "please review", "take a look",
38
+ "give this a review" → REVIEW (do a real code review now; on a PR this means
39
+ review the current PR's diff).
40
+ A bare command word ("explore", "build", "review") on an existing issue/PR is a
41
+ clear command, NOT ambiguous chat.
42
+ This verb rule is for IMPERATIVE requests only. A PR/issue reply that REPORTS
43
+ already-completed work or responds to your review — "thanks, fixed in <sha>",
44
+ "addressed in commit abc123", "done, added a regression test", "this is
45
+ intentional, confirmed with the maintainer" — is a status report, NOT a
46
+ command. Classify it CHAT regardless of the ISSUE TITLE or an @mention. Do not
47
+ let words like "fix"/"build"/"add" inside a past-tense report flip it to BUILD.
48
+
49
+ Respond in exactly this format (each on its own line, no extra text):
50
+ INTENT: {{intentTokens}}
51
+ REPO: owner/name or NONE
52
+ ISSUE: number or NONE
53
+ REASON: text or NONE
54
+
55
+ Examples:
56
+ {{examples}}
57
+ "thanks, that makes sense!" → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE
58
+ "approve" → INTENT: APPROVE, REPO: NONE, ISSUE: NONE, REASON: NONE
59
+ "reject, the plan is too complex" → INTENT: REJECT, REPO: NONE, ISSUE: NONE, REASON: the plan is too complex
60
+ "what's running?" → INTENT: STATUS, REPO: NONE, ISSUE: NONE, REASON: NONE
@@ -0,0 +1,17 @@
1
+ You are deciding whether a new comment on a GitHub issue,
2
+ written by the issue's reporter, should re-open triage of that issue.
3
+
4
+ ADDS_INFO — the comment adds NEW substantive information that changes the problem
5
+ statement: extra details, reproduction steps, environment specifics, a concrete
6
+ example, clarification of the request, a scope change, or an answer to a question
7
+ triage previously asked. The kind of comment that would make a maintainer re-read
8
+ and re-classify the issue.
9
+
10
+ NOISE — the comment adds nothing that changes triage: thanks, acknowledgement,
11
+ agreement ("sounds good", "yes please"), a "+1"/me-too, a status update with no
12
+ new specifics, a question directed back at the maintainer, or general chatter.
13
+
14
+ When genuinely unsure, answer NOISE — re-triage should only fire on a clear
15
+ addition of information.
16
+
17
+ Respond with exactly one word on its own line: ADDS_INFO or NOISE
@@ -1,5 +1,12 @@
1
1
  kind: qa-test
2
2
  name: qa-test
3
+ classification:
4
+ intent: qa-test
5
+ description: |
6
+ QATEST — The user wants you to drive an app or CLI through a flow and report step-level pass/fail: "qa test the signup flow", "run through login and tell me what breaks", "smoke-test the CLI commands", "exercise the checkout flow". The deliverable is a step-by-step QA report. Prefer QATEST over VERIFY when it's a multi-step flow to exercise rather than a single claim to confirm.
7
+ examples:
8
+ - '"qa test the login flow on this PR" with ISSUE TITLE "Add login" → INTENT: QATEST, REPO: NONE, ISSUE: NONE, REASON: NONE'
9
+ - '"run through the signup flow and tell me what breaks" with ISSUE TITLE "Signup v2" → INTENT: QATEST, REPO: NONE, ISSUE: NONE, REASON: NONE'
3
10
  description: |
4
11
  Run an automated QA flow against a repo's CLI or locally-served app and report
5
12
  step-level pass/fail with evidence. It installs and runs the code in the
@@ -1,5 +1,13 @@
1
1
  kind: health
2
2
  name: security-review
3
+ classification:
4
+ intent: security
5
+ description: |
6
+ SECURITY — The user wants a security scan/review of a repo: "security review cliftonc/repo", "scan for vulnerabilities", "check security", "can you do a security review of <repo>?".
7
+ examples:
8
+ - '"run a security review on cliftonc/lastlight" → INTENT: SECURITY, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
9
+ - '"can you do a security review of https://github.com/cliftonc/lastlight" → INTENT: SECURITY, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
10
+ - '"scan https://github.com/cliftonc/lastlight for vulnerabilities" → INTENT: SECURITY, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
3
11
  description: |
4
12
  Scan the target repository for security issues using open-source tools
5
13
  (npm audit, semgrep, gitleaks) plus AI code review. Files ONE summary
@@ -1,5 +1,13 @@
1
1
  kind: verify
2
2
  name: verify
3
+ classification:
4
+ intent: verify
5
+ description: |
6
+ VERIFY — The user wants you to TEST whether a specific claim or behaviour is actually true and report the evidence: "verify that the rate limiter blocks", "does this PR really fix the crash?", "confirm X actually works", "check that Y no longer happens", "prove the --fork flag creates a new session". The deliverable is a CONFIRMED/REFUTED verdict backed by RUNNING the code — not a code change and not a code-quality review. Prefer VERIFY over REVIEW when the user wants proof a behaviour works/is fixed, rather than an assessment of the diff.
7
+ examples:
8
+ - '"verify that the --fork flag creates a new session in cliftonc/foo#12" → INTENT: VERIFY, REPO: cliftonc/foo, ISSUE: 12, REASON: NONE'
9
+ - '"does this actually fix the crash?" with ISSUE TITLE "Fix null deref on resize" → INTENT: VERIFY, REPO: NONE, ISSUE: NONE, REASON: NONE'
10
+ - '"can you confirm the rate limiter actually blocks at 100 req/s?" with ISSUE TITLE "Add rate limiter" → INTENT: VERIFY, REPO: NONE, ISSUE: NONE, REASON: NONE'
3
11
  description: |
4
12
  Verify a behaviour claim against a repo or PR and report whether the evidence
5
13
  confirms or refutes it. It installs and runs the code in the sandbox, captures