lastlight 0.13.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 (47) hide show
  1. package/config/default.yaml +15 -3
  2. package/dist/admin/routes.js +17 -1
  3. package/dist/admin/routes.js.map +1 -1
  4. package/dist/cli/fork-cli.d.ts +2 -1
  5. package/dist/cli/fork-cli.js +33 -1
  6. package/dist/cli/fork-cli.js.map +1 -1
  7. package/dist/connectors/github-webhook.d.ts +7 -0
  8. package/dist/connectors/github-webhook.js +42 -1
  9. package/dist/connectors/github-webhook.js.map +1 -1
  10. package/dist/engine/github/github.d.ts +8 -0
  11. package/dist/engine/github/github.js +11 -0
  12. package/dist/engine/github/github.js.map +1 -1
  13. package/dist/engine/llm.d.ts +12 -3
  14. package/dist/engine/llm.js +16 -3
  15. package/dist/engine/llm.js.map +1 -1
  16. package/dist/engine/router.js +47 -5
  17. package/dist/engine/router.js.map +1 -1
  18. package/dist/engine/screen/classifier.d.ts +40 -12
  19. package/dist/engine/screen/classifier.js +105 -175
  20. package/dist/engine/screen/classifier.js.map +1 -1
  21. package/dist/index.js +17 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/managed-repos.d.ts +19 -0
  24. package/dist/managed-repos.js +54 -1
  25. package/dist/managed-repos.js.map +1 -1
  26. package/dist/workflows/loader.d.ts +9 -0
  27. package/dist/workflows/loader.js +66 -1
  28. package/dist/workflows/loader.js.map +1 -1
  29. package/dist/workflows/schema.d.ts +18 -0
  30. package/dist/workflows/schema.js +42 -0
  31. package/dist/workflows/schema.js.map +1 -1
  32. package/package.json +1 -1
  33. package/plugins/lastlight/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lastlight/skills/lastlight-overlay/SKILL.md +38 -2
  35. package/plugins/lastlight/skills/lastlight-overlay/references/forking.md +27 -4
  36. package/plugins/lastlight/skills/lastlight-overlay/references/overlay-layout.md +8 -0
  37. package/workflows/answer.yaml +7 -0
  38. package/workflows/build.yaml +15 -0
  39. package/workflows/demo.yaml +7 -0
  40. package/workflows/explore.yaml +8 -0
  41. package/workflows/issue-triage.yaml +6 -0
  42. package/workflows/pr-review.yaml +8 -0
  43. package/workflows/prompts/classifier.md +60 -0
  44. package/workflows/prompts/classify-adds-info.md +17 -0
  45. package/workflows/qa-test.yaml +7 -0
  46. package/workflows/security-review.yaml +8 -0
  47. package/workflows/verify.yaml +8 -0
@@ -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