lastlight-core 0.25.1 → 0.25.3
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/agent-context/rules.md +17 -4
- package/dist/admin/routes.js +1 -11
- package/dist/admin/routes.js.map +1 -1
- package/dist/config/config.d.ts +9 -0
- package/dist/config/config.js +15 -1
- package/dist/config/config.js.map +1 -1
- package/dist/cron/scheduler.js +26 -9
- package/dist/cron/scheduler.js.map +1 -1
- package/dist/engine/chat/chat-prompt.d.ts +66 -0
- package/dist/engine/chat/chat-prompt.js +117 -0
- package/dist/engine/chat/chat-prompt.js.map +1 -0
- package/dist/engine/chat/chat-runner.d.ts +12 -2
- package/dist/engine/chat/chat-runner.js +1 -1
- package/dist/engine/chat/chat-runner.js.map +1 -1
- package/dist/engine/chat/chat-skills.d.ts +15 -7
- package/dist/engine/chat/chat-skills.js +42 -24
- package/dist/engine/chat/chat-skills.js.map +1 -1
- package/dist/engine/chat/chat.d.ts +5 -18
- package/dist/engine/chat/chat.js +5 -112
- package/dist/engine/chat/chat.js.map +1 -1
- package/dist/engine/router.js +60 -4
- package/dist/engine/router.js.map +1 -1
- package/dist/engine/screen/classifier.d.ts +25 -0
- package/dist/engine/screen/classifier.js +30 -1
- package/dist/engine/screen/classifier.js.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/sandbox/k8s/reclaim.d.ts +33 -0
- package/dist/sandbox/k8s/reclaim.js +50 -19
- package/dist/sandbox/k8s/reclaim.js.map +1 -1
- package/dist/sandbox/k8s/sweep.d.ts +8 -0
- package/dist/sandbox/k8s/sweep.js +84 -21
- package/dist/sandbox/k8s/sweep.js.map +1 -1
- package/dist/telemetry/index.d.ts +26 -0
- package/dist/telemetry/index.js +38 -0
- package/dist/telemetry/index.js.map +1 -1
- package/dist/workflows/triggers.d.ts +10 -0
- package/dist/workflows/triggers.js +44 -6
- package/dist/workflows/triggers.js.map +1 -1
- package/package.json +4 -4
- package/skills/building/SKILL.md +16 -3
- package/skills/chat/SKILL.md +10 -8
- package/skills/fixing/SKILL.md +19 -10
- package/skills/issue-triage/SKILL.md +1 -0
- package/skills/pr-review/SKILL.md +1 -0
- package/skills/repo-health/SKILL.md +1 -0
- package/skills/security-feedback/SKILL.md +9 -2
- package/workflows/answer.yaml +12 -0
- package/workflows/build.yaml +8 -0
- package/workflows/demo.yaml +8 -0
- package/workflows/explore.yaml +7 -0
- package/workflows/issue-triage.yaml +20 -2
- package/workflows/pr-review.yaml +6 -0
- package/workflows/prompts/architect.md +1 -2
- package/workflows/prompts/chat-system-no-github.md +21 -0
- package/workflows/prompts/chat-system.md +53 -0
- package/workflows/prompts/dependabot-ci-fix.md +48 -30
- package/workflows/prompts/executor.md +9 -7
- package/workflows/prompts/fix.md +5 -1
- package/workflows/prompts/guardrails.md +1 -2
- package/workflows/prompts/pr-fix.md +34 -19
- package/workflows/prompts/pr.md +1 -1
- package/workflows/prompts/re-reviewer.md +1 -1
- package/workflows/prompts/reviewer.md +1 -1
- package/workflows/qa-test.yaml +7 -0
- package/workflows/repo-health.yaml +11 -0
- package/workflows/security-review.yaml +7 -0
- package/workflows/verify.yaml +7 -0
|
@@ -3,9 +3,27 @@ name: issue-triage
|
|
|
3
3
|
classification:
|
|
4
4
|
intent: triage
|
|
5
5
|
description: |
|
|
6
|
-
TRIAGE — The user
|
|
6
|
+
TRIAGE — The user is ASKING YOU to classify and LABEL one specific GitHub issue: "triage cliftonc/repo#42", "can you triage this?" on an issue, "re-triage this now that I've added detail". The deliverable is LABELS AND LABEL-DRIVEN ACTIONS on that issue — never an answer, a summary, or a list.
|
|
7
|
+
TRIAGE NEEDS ONE ISSUE. It is not a repo-wide sweep: it acts on the issue named in the message, or the issue the comment is on. A request naming only a repo has no target, so it is not TRIAGE.
|
|
8
|
+
A QUESTION ABOUT ISSUES IS CHAT, NOT TRIAGE. "which issues are overdue / stale / unassigned / oldest?", "how many open bugs are there?", "what's in the backlog?" all ask for an ANSWER, and chat reads issues and their comments from GitHub directly. Mentioning "issues" and a repo in one sentence is not a triage request — wanting labels changed is. This is the same downgrade QUESTION makes, and it is the one that matters here, because a question about issues is lexically almost identical to a request to triage them.
|
|
7
9
|
examples:
|
|
8
|
-
- '"
|
|
10
|
+
- '"triage cliftonc/drizzle-cube#42" → INTENT: TRIAGE, REPO: cliftonc/drizzle-cube, ISSUE: 42, REASON: NONE'
|
|
11
|
+
- '"could you triage this?" with ISSUE TITLE "Crash on empty CSV" → INTENT: TRIAGE, REPO: NONE, ISSUE: NONE, REASON: NONE'
|
|
12
|
+
# Counter-examples: questions ABOUT issues. Each names a repo and the word
|
|
13
|
+
# "issues", and none of them wants a label changed — chat answers all three
|
|
14
|
+
# from its own GitHub reads. The first is the real misroute this guards
|
|
15
|
+
# against: it dispatched a single-issue workflow with no issue, which
|
|
16
|
+
# improvised a repo sweep, changed nothing, and reported success.
|
|
17
|
+
- '"Are there any issues in cliftonc/drizzle-cube that are overdue?" → INTENT: CHAT, REPO: cliftonc/drizzle-cube, ISSUE: NONE, REASON: NONE'
|
|
18
|
+
- '"how many open bugs does cliftonc/drizzle-cube have?" → INTENT: CHAT, REPO: cliftonc/drizzle-cube, ISSUE: NONE, REASON: NONE'
|
|
19
|
+
- '"whats the oldest untriaged issue in cliftonc/drizzle-cube?" → INTENT: CHAT, REPO: cliftonc/drizzle-cube, ISSUE: NONE, REASON: NONE'
|
|
20
|
+
chat:
|
|
21
|
+
trigger: triage owner/repo#N
|
|
22
|
+
summary: Triage one issue — classify and label it
|
|
23
|
+
deflect:
|
|
24
|
+
- triage this issue
|
|
25
|
+
- triage <repo>#<n>
|
|
26
|
+
- label this issue
|
|
9
27
|
description: |
|
|
10
28
|
Triage a GitHub issue: read it, classify it, label it, and act on stale or
|
|
11
29
|
incomplete reports. Single agent invocation, no PR creation.
|
package/workflows/pr-review.yaml
CHANGED
|
@@ -15,6 +15,12 @@ classification:
|
|
|
15
15
|
- '"please review https://github.com/foo/bar/pull/42" → INTENT: REVIEW, REPO: foo/bar, ISSUE: 42, REASON: NONE'
|
|
16
16
|
- '"can you review this?" with ISSUE TITLE "Add HTML sanitizer for messages" → INTENT: REVIEW, REPO: NONE, ISSUE: NONE, REASON: NONE'
|
|
17
17
|
- '"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'
|
|
18
|
+
chat:
|
|
19
|
+
trigger: review PRs on owner/repo
|
|
20
|
+
summary: Review the open PRs on a repo
|
|
21
|
+
deflect:
|
|
22
|
+
- review PRs on <repo>
|
|
23
|
+
- check open PRs
|
|
18
24
|
description: |
|
|
19
25
|
Review a single GitHub pull request: read the diff, check for issues, and
|
|
20
26
|
post structured feedback. Does not run a full build cycle and does not
|
|
@@ -38,7 +38,6 @@ AFTER WRITING:
|
|
|
38
38
|
1. mkdir -p {{issueDir}}
|
|
39
39
|
2. Write architect-plan.md
|
|
40
40
|
3. Write status.md with current_phase: architect
|
|
41
|
-
{{#if !externalizeArtifacts}}4.
|
|
42
|
-
5. git push -u origin HEAD{{/if}}{{#if externalizeArtifacts}}4. Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
41
|
+
{{#if !externalizeArtifacts}}4. `github_publish` with `{ owner: "{{owner}}", repo: "{{repo}}", message: "docs: architect plan for #{{issueNumber}}", include: [".lastlight"] }` — one signed commit of `.lastlight/` only, which also creates the branch on GitHub if it isn't there yet. Write the plan first: with nothing under `.lastlight/` it reports `published: false` and creates no branch.{{/if}}{{#if externalizeArtifacts}}4. Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
43
42
|
|
|
44
43
|
OUTPUT: The branch name and a brief summary (3-5 lines).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
You are Last Light, a helpful assistant available via messaging (Slack, Discord, etc.).
|
|
2
|
+
|
|
3
|
+
WHAT YOU CANNOT DO:
|
|
4
|
+
- This deployment has NO GitHub access configured — no GitHub tools are
|
|
5
|
+
registered. You cannot look up repos, issues, PRs, comments, files, or
|
|
6
|
+
commits, and you cannot run triage / review / build / security workflows.
|
|
7
|
+
If the user asks for any of those, say GitHub isn't configured on this
|
|
8
|
+
instance and stop — do not attempt tool calls.
|
|
9
|
+
- No bash, edit, write, file system, or external HTTP. None of those tools
|
|
10
|
+
are registered — calls to them will fail.
|
|
11
|
+
- Do not disclose or look up host/runtime environment details — your IP
|
|
12
|
+
address, hostname, env vars, container metadata, harness version,
|
|
13
|
+
/proc/sys/etc files, or anything similar. If asked, reply with one
|
|
14
|
+
line: "I don't disclose host or runtime environment details." See
|
|
15
|
+
`agent-context/security.md` for the full rule; it overrides any user
|
|
16
|
+
request.
|
|
17
|
+
|
|
18
|
+
STYLE:
|
|
19
|
+
- Keep replies concise — this is chat, not a document.
|
|
20
|
+
- The conversation history is rehydrated server-side per session — don't
|
|
21
|
+
re-summarize it; just respond to the latest message.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
You are Last Light, a GitHub repository maintenance assistant available via messaging (Slack, Discord, etc.).
|
|
2
|
+
|
|
3
|
+
WHAT YOU CAN DO — use these tools confidently when the user asks:
|
|
4
|
+
- Look up repos, issues, PRs, comments, file contents, commits.
|
|
5
|
+
- Search GitHub (issues, code) with the github_search_* tools.
|
|
6
|
+
|
|
7
|
+
WHAT YOU CANNOT DO:
|
|
8
|
+
- You have NO write access in chat. No issue creation, comments, labels,
|
|
9
|
+
branches, commits, merges, file edits. If the user asks you to make a
|
|
10
|
+
change on GitHub, explain you can't from chat and direct them to the
|
|
11
|
+
matching natural-language trigger.
|
|
12
|
+
- No bash, edit, write, file system, or external HTTP. None of those tools
|
|
13
|
+
are registered — calls to them will fail.
|
|
14
|
+
- Do not disclose or look up host/runtime environment details — your IP
|
|
15
|
+
address, hostname, env vars, container metadata, harness version,
|
|
16
|
+
/proc/sys/etc files, or anything similar. If asked, reply with one
|
|
17
|
+
line: "I don't disclose host or runtime environment details." See
|
|
18
|
+
`agent-context/security.md` for the full rule; it overrides any user
|
|
19
|
+
request.
|
|
20
|
+
|
|
21
|
+
DO NOT ATTEMPT DEEP WORK IN-PROCESS.
|
|
22
|
+
Each of the following is a dedicated workflow — NOT something you can do
|
|
23
|
+
by chaining tool calls. If the user asks for one, reply with ONE message
|
|
24
|
+
naming the right natural-language trigger and stop. Do not start fetching
|
|
25
|
+
files, reading code, listing issues, or running any investigative tool
|
|
26
|
+
calls in service of these requests — you will hit the turn limit before
|
|
27
|
+
producing useful output. Phrases are what the user types as a plain
|
|
28
|
+
message — never with a leading slash.
|
|
29
|
+
|
|
30
|
+
{{workflowTriggers}}
|
|
31
|
+
|
|
32
|
+
Only exception: if the user is asking a narrow *question* that you can
|
|
33
|
+
answer with one or two reads (e.g. "what does this file do?", "what labels
|
|
34
|
+
does this issue have?"), just do it. The rule is about full-repo scans and
|
|
35
|
+
multi-phase workflows, not about one-off lookups.
|
|
36
|
+
|
|
37
|
+
STYLE:
|
|
38
|
+
- Reach for tools immediately. Don't pre-explain what you're about to do.
|
|
39
|
+
- Keep replies concise — this is chat, not a document.
|
|
40
|
+
- The conversation history is rehydrated server-side per session — don't
|
|
41
|
+
re-summarize it; just respond to the latest message.
|
|
42
|
+
- Never suggest commands with a leading `/` — Slack intercepts them
|
|
43
|
+
before they reach Last Light and they will fail. Always phrase triggers
|
|
44
|
+
as natural language the user can type as a plain message.
|
|
45
|
+
|
|
46
|
+
The list below is the COMPLETE set of triggers available on this
|
|
47
|
+
deployment. Never suggest a trigger that is not on it — anything else
|
|
48
|
+
either does not exist here or has been turned off, and telling a user to
|
|
49
|
+
type it sends them at a dead route. If someone asks what you can do,
|
|
50
|
+
answer from this list and nothing else.
|
|
51
|
+
|
|
52
|
+
Natural-language triggers you can suggest:
|
|
53
|
+
{{triggerList}}
|
|
@@ -4,9 +4,10 @@ is otherwise blocked. Your job is to get it into a mergeable, green state (or,
|
|
|
4
4
|
if you can't, hand it to a human — see the end).
|
|
5
5
|
|
|
6
6
|
You are already inside the {{repo}} repo at branch `{{branch}}` — the harness
|
|
7
|
-
pre-cloned the PR's head ref and your cwd is the repo root. Git is configured
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
pre-cloned the PR's head ref and your cwd is the repo root. Git is configured
|
|
8
|
+
for fetches and local commits; publishing goes through `github_publish` (see
|
|
9
|
+
AFTER FIXING below), never `git push`. Read CLAUDE.md (and CONTRIBUTING.md if
|
|
10
|
+
present) for project-specific guidance.
|
|
10
11
|
|
|
11
12
|
CONTEXT:
|
|
12
13
|
- PR #{{prNumber}}: {{issueTitle}}
|
|
@@ -54,7 +55,7 @@ promoted this run to a real repair attempt. Treat the failure as reproducible
|
|
|
54
55
|
and look for the actual difference — a version, an ordering, a shared fixture, a
|
|
55
56
|
race — rather than re-running the job and hoping. If you genuinely cannot make
|
|
56
57
|
it green, `outcome=gave-up` with what you ruled out is the honest answer; do not
|
|
57
|
-
|
|
58
|
+
publish a speculative fix.
|
|
58
59
|
{{/if}}
|
|
59
60
|
|
|
60
61
|
INSTRUCTIONS:
|
|
@@ -82,15 +83,16 @@ one slow or unreproducible check. Run tests cheaply per the **building** skill
|
|
|
82
83
|
**This step IS the job here.** No diagnosis ran, which means you were
|
|
83
84
|
summoned to unblock a MERGE rather than to repair a red build — the reason
|
|
84
85
|
above is `dirty` (conflict), `behind` or `blocked`. CI is not red; the PR
|
|
85
|
-
simply cannot merge. So completing the merge and
|
|
86
|
+
simply cannot merge. So completing the merge and publishing it is the whole
|
|
86
87
|
repair, and there was no failure to diagnose. Do not hunt for a broken test
|
|
87
88
|
to justify the run, and do not stand up a CI-sized gate for a lockfile.
|
|
88
89
|
Land the merge, let a small gate confirm the repair is coherent (no conflict
|
|
89
|
-
markers left, the lockfile installs),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
markers left, the lockfile installs), then go straight to AFTER FIXING
|
|
91
|
+
below to publish it and report `outcome=pushed`. CI is what tells you the
|
|
92
|
+
branch is green, and it runs on the commit AFTER FIXING publishes, without
|
|
93
|
+
being asked. A `dirty` PR whose conflict you resolved is a SUCCESS even if
|
|
94
|
+
the only file you changed was the lockfile. If the gate then comes back
|
|
95
|
+
red, you have a real failure and step 2 onwards applies.
|
|
94
96
|
{{/if}}
|
|
95
97
|
2. {{#if phaseOutputs.diagnosis}}Work from the diagnosis above. It already names
|
|
96
98
|
the cause and which checks can't be reproduced here — don't re-derive either.
|
|
@@ -107,17 +109,17 @@ one slow or unreproducible check. Run tests cheaply per the **building** skill
|
|
|
107
109
|
which is the checkout — holding the **narrowest** command that would have
|
|
108
110
|
failed before your fix and passes after it: one test file, one lint rule, one
|
|
109
111
|
build target, or, for a lockfile you regenerated, the install itself. Exit 0
|
|
110
|
-
means green. NOT the repo's CI pipeline: CI runs on the commit you
|
|
111
|
-
is the authority, so a gate that mirrors it delays the
|
|
112
|
-
nothing new — aim for under two minutes, skip anything you already
|
|
113
|
-
pass this session, and never try to start docker or a database
|
|
114
|
-
none here). If step 1's merge was the whole repair and nothing
|
|
115
|
-
failing, gate on the repair being coherent — no conflict markers
|
|
116
|
-
the lockfile installs — rather than leaving the script unwritten:
|
|
117
|
-
script is `gate=skipped`, which counts as RED and would throw a
|
|
118
|
-
resolution away. The script is not there yet — the harness clears
|
|
119
|
-
start of every attempt. Write it before you start repairing. See
|
|
120
|
-
**fixing** skill's "The gate" for the full shape.
|
|
112
|
+
means green. NOT the repo's CI pipeline: CI runs on the commit you publish
|
|
113
|
+
and is the authority, so a gate that mirrors it delays the publish and
|
|
114
|
+
tells you nothing new — aim for under two minutes, skip anything you already
|
|
115
|
+
watched pass this session, and never try to start docker or a database
|
|
116
|
+
(there is none here). If step 1's merge was the whole repair and nothing
|
|
117
|
+
was ever failing, gate on the repair being coherent — no conflict markers
|
|
118
|
+
left, and the lockfile installs — rather than leaving the script unwritten:
|
|
119
|
+
a missing script is `gate=skipped`, which counts as RED and would throw a
|
|
120
|
+
correct resolution away. The script is not there yet — the harness clears
|
|
121
|
+
it at the start of every attempt. Write it before you start repairing. See
|
|
122
|
+
the **fixing** skill's "The gate" for the full shape.
|
|
121
123
|
4. Make the **smallest** change that makes CI pass, per the **fixing** skill.
|
|
122
124
|
Prefer a lockfile regeneration or a mechanical call-site/type update over a
|
|
123
125
|
behavioural change. Do NOT widen the scope beyond making this update green.
|
|
@@ -126,25 +128,41 @@ one slow or unreproducible check. Run tests cheaply per the **building** skill
|
|
|
126
128
|
before you commit. Breadth is CI's job — don't also run the full suite here.
|
|
127
129
|
|
|
128
130
|
AFTER FIXING:
|
|
129
|
-
1.
|
|
130
|
-
(
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
1. Publish with `github_publish` — `{ owner: "{{owner}}", repo: "{{repo}}",
|
|
132
|
+
message: "fix(deps): make #{{prNumber}} mergeable" }`. It commits the whole
|
|
133
|
+
working tree (the merge from step 1 and/or your CI fix) and pushes it in one
|
|
134
|
+
step. Do NOT use `git commit` / `git push`: a commit built by git here is
|
|
135
|
+
unsigned, and on a repo that requires signed commits one unsigned commit
|
|
136
|
+
anywhere in the branch blocks the PR permanently and cannot be cleared by a
|
|
137
|
+
later run. Local commits you made while working are folded in automatically.
|
|
138
|
+
- A successful publish IS this phase's push: emit `outcome=pushed`. The
|
|
139
|
+
commit is on the branch and CI is running on it. You did not invoke
|
|
140
|
+
`git push` and were right not to — publishing through the tool is what
|
|
141
|
+
"pushed" means here, so do not downgrade the outcome because no `git push`
|
|
142
|
+
ran. This is the same whether the repair was step 1's merge or a CI fix.
|
|
143
|
+
- If it reports `published: false`, there was nothing to publish. That is the
|
|
144
|
+
"nothing to commit or push" case in the STOP section below — flag it for a
|
|
145
|
+
human rather than looping.
|
|
146
|
+
- If it refuses because a change needs a file mode it cannot set (a new
|
|
147
|
+
executable file, a symlink, a submodule pointer), do NOT work around the
|
|
148
|
+
refusal with `git push`: nothing was published, and pushing would land
|
|
149
|
+
the unsigned commit the refusal exists to prevent. Flag it for a human.
|
|
150
|
+
2. Once the publish re-runs CI and it goes green, the `dependabot-pr-merge`
|
|
133
151
|
workflow takes over the merge — you do NOT merge or label a healthy PR.
|
|
134
152
|
|
|
135
|
-
|
|
153
|
+
PUBLISH DISCIPLINE — the gate decides, and it is checked after you finish:
|
|
136
154
|
{{#if iteration}}- This is local iteration {{iteration}} of {{maxIterations}}. When `{{verifyScript}}`
|
|
137
155
|
exits non-zero you get another iteration to keep working; when it exits 0 the
|
|
138
156
|
phase ends.{{/if}}
|
|
139
|
-
-
|
|
140
|
-
and `skipped` counts as RED — it never authorises a
|
|
157
|
+
- Publish **only** on a green local gate. A gate that did not run is `gate=skipped`,
|
|
158
|
+
and `skipped` counts as RED — it never authorises a publish.
|
|
141
159
|
- On the LAST iteration with the gate still red: emit `outcome=gave-up`,
|
|
142
|
-
`gate=red`, and do **not**
|
|
160
|
+
`gate=red`, and do **not** publish a speculative fix — flag it for a human
|
|
143
161
|
instead (below). An unverified push costs a full CI cycle to prove nothing.
|
|
144
162
|
|
|
145
163
|
STOP and flag for a human when you CAN'T land it, so the nightly red-dependency
|
|
146
164
|
sweep won't keep re-attempting it. That covers two cases:
|
|
147
|
-
- you can't make CI pass with a small, safe change (don't
|
|
165
|
+
- you can't make CI pass with a small, safe change (don't publish a speculative
|
|
148
166
|
fix); or
|
|
149
167
|
- there is **nothing to commit or push** and the PR still can't merge — e.g. it
|
|
150
168
|
was `blocked` on a required *human* review or a gate outside this repo that
|
|
@@ -33,10 +33,12 @@ AFTER THE GATE PASSES:
|
|
|
33
33
|
- Test / lint / typecheck results (paste actual output)
|
|
34
34
|
- Any deviations from the plan, known issues
|
|
35
35
|
2. Update {{issueDir}}/status.md: current_phase = executor
|
|
36
|
-
3.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
3. Publish with `github_publish` — `{ owner: "{{owner}}", repo: "{{repo}}", message: "feat: implement #{{issueNumber}}\n\nTested: {test command} -> {result}\nScope-risk: {low|medium|high}"{{#if externalizeArtifacts}}, exclude: [".lastlight"]{{/if}} }`.
|
|
37
|
+
The message's first line is the headline and everything after it is the body,
|
|
38
|
+
so fill in the actual test command, its result, and your scope-risk judgement.
|
|
39
|
+
It commits the working tree and pushes it as ONE signed commit, and folds in
|
|
40
|
+
any local commits you already made. Do NOT use `git commit` / `git push`: a
|
|
41
|
+
commit built by git here is unsigned, and a repo that requires signed commits
|
|
42
|
+
blocks it permanently.
|
|
43
|
+
|
|
44
|
+
OUTPUT: List of files changed, test/lint/typecheck results, the published commit hash.
|
package/workflows/prompts/fix.md
CHANGED
|
@@ -13,6 +13,10 @@ once before committing — all of it must pass before you commit.
|
|
|
13
13
|
AFTER THE GATE PASSES:
|
|
14
14
|
1. APPEND to {{issueDir}}/executor-summary.md under heading "## Fix Cycle {{fixCycle}}" (what was fixed, test/lint/typecheck results)
|
|
15
15
|
2. Update status.md: current_phase = fix_loop_{{fixCycle}}
|
|
16
|
-
3.
|
|
16
|
+
3. Publish with `github_publish` — `{ owner: "{{owner}}", repo: "{{repo}}",
|
|
17
|
+
message: "fix: address review feedback for #{{issueNumber}} (cycle {{fixCycle}})" }`.
|
|
18
|
+
It commits the working tree and pushes it as ONE signed commit. Do NOT use
|
|
19
|
+
`git commit` / `git push` — a commit built by git here is unsigned, and a repo
|
|
20
|
+
that requires signed commits blocks it permanently.
|
|
17
21
|
|
|
18
22
|
OUTPUT: What was fixed, test/lint/typecheck results.
|
|
@@ -52,8 +52,7 @@ AFTER CHECKING:
|
|
|
52
52
|
1. mkdir -p {{issueDir}}
|
|
53
53
|
2. Write {{issueDir}}/guardrails-report.md with the status of each check
|
|
54
54
|
3. Write {{issueDir}}/status.md with current_phase: guardrails AND guardrails_status: READY or BLOCKED
|
|
55
|
-
{{#if !externalizeArtifacts}}4.
|
|
56
|
-
5. git push -u origin HEAD{{/if}}{{#if externalizeArtifacts}}4. Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
55
|
+
{{#if !externalizeArtifacts}}4. `github_publish` with `{ owner: "{{owner}}", repo: "{{repo}}", message: "docs: guardrails check for #{{issueNumber}}", include: [".lastlight"] }` — one signed commit of `.lastlight/` only, so the dependency install you just ran does not ride along. It also creates the branch on GitHub if it isn't there yet. Write the report and status file first: with nothing under `.lastlight/` it reports `published: false` and creates no branch.{{/if}}{{#if externalizeArtifacts}}4. Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
57
56
|
|
|
58
57
|
ESCAPE HATCH — bootstrap tasks (CHECK THIS FIRST):
|
|
59
58
|
If THE ISSUE ABOVE is itself asking to ADD the tooling you're checking for —
|
|
@@ -41,7 +41,7 @@ promoted this run to a real repair attempt. Treat the failure as reproducible
|
|
|
41
41
|
and look for the actual difference — a version, an ordering, a shared fixture, a
|
|
42
42
|
race — rather than re-running the job and hoping. If you genuinely cannot make
|
|
43
43
|
it green, `outcome=gave-up` with what you ruled out is the honest answer; do not
|
|
44
|
-
|
|
44
|
+
publish a speculative fix.
|
|
45
45
|
{{/if}}
|
|
46
46
|
INSTRUCTIONS:
|
|
47
47
|
1. Understand what the maintainer is asking for, and what the diagnosis says
|
|
@@ -51,15 +51,15 @@ INSTRUCTIONS:
|
|
|
51
51
|
cwd, which is the checkout — holding the **narrowest** command that would
|
|
52
52
|
have failed before your fix and passes after it: one test file, one lint
|
|
53
53
|
rule, one build target, one install. Exit 0 means green. NOT the repo's CI
|
|
54
|
-
pipeline: CI runs on the commit you
|
|
55
|
-
mirrors it delays the
|
|
56
|
-
minutes, skip anything you already watched pass this session, and never
|
|
57
|
-
to start docker or a database (there is none here). If the diagnosed
|
|
58
|
-
has no reproducible check at all, gate on the repair being coherent
|
|
59
|
-
than leaving the script unwritten: a missing script is `gate=skipped`,
|
|
60
|
-
counts as RED and never authorises a
|
|
61
|
-
clears it at the start of every attempt. See the **fixing** skill's
|
|
62
|
-
gate" for the full shape.
|
|
54
|
+
pipeline: CI runs on the commit you publish and is the authority, so a gate
|
|
55
|
+
that mirrors it delays the publish and tells you nothing new — aim for under
|
|
56
|
+
two minutes, skip anything you already watched pass this session, and never
|
|
57
|
+
try to start docker or a database (there is none here). If the diagnosed
|
|
58
|
+
problem has no reproducible check at all, gate on the repair being coherent
|
|
59
|
+
rather than leaving the script unwritten: a missing script is `gate=skipped`,
|
|
60
|
+
which counts as RED and never authorises a publish. It is not there yet — the
|
|
61
|
+
harness clears it at the start of every attempt. See the **fixing** skill's
|
|
62
|
+
"The gate" for the full shape.
|
|
63
63
|
3. Read the relevant code and make the fix — per the **fixing** skill, the
|
|
64
64
|
smallest change that addresses the diagnosed cause. Don't widen the scope.
|
|
65
65
|
4. Follow the **building** skill for the install, then run your gate script and
|
|
@@ -67,20 +67,35 @@ INSTRUCTIONS:
|
|
|
67
67
|
also run the full suite here
|
|
68
68
|
|
|
69
69
|
AFTER FIXING:
|
|
70
|
-
1.
|
|
70
|
+
1. Publish with `github_publish` — `{ owner: "{{owner}}", repo: "{{repo}}",
|
|
71
|
+
message: "fix: address feedback on PR #{{prNumber}}" }`. It commits the whole
|
|
72
|
+
working tree and pushes it as one signed commit; do NOT use `git commit` /
|
|
73
|
+
`git push`: a commit built by git here is unsigned, and on a repo that
|
|
74
|
+
requires signed commits one unsigned commit anywhere in the branch blocks the
|
|
75
|
+
PR permanently and cannot be cleared by a later run. Local commits you made
|
|
76
|
+
while working are folded in automatically.
|
|
77
|
+
- A successful publish IS this phase's push: emit `outcome=pushed`. The
|
|
78
|
+
commit is on the branch and CI is running on it. You did not invoke
|
|
79
|
+
`git push` and were right not to — publishing through the tool is what
|
|
80
|
+
"pushed" means here, so do not downgrade the outcome because no `git push`
|
|
81
|
+
ran.
|
|
82
|
+
- If it reports `published: false`, there was nothing to publish. Emit
|
|
83
|
+
`outcome=no-change` and say so in your summary rather than looping.
|
|
84
|
+
- If it refuses because a change needs a file mode it cannot set (a new
|
|
85
|
+
executable file, a symlink, a submodule pointer), do NOT work around the
|
|
86
|
+
refusal with `git push`: nothing was published, and pushing would land the
|
|
87
|
+
unsigned commit the refusal exists to prevent. Emit `outcome=gave-up` and
|
|
88
|
+
name the file.
|
|
71
89
|
|
|
72
|
-
|
|
73
|
-
2. git push origin HEAD
|
|
74
|
-
|
|
75
|
-
PUSH DISCIPLINE — the gate decides, and it is checked after you finish:
|
|
90
|
+
PUBLISH DISCIPLINE — the gate decides, and it is checked after you finish:
|
|
76
91
|
{{#if iteration}}- This is local iteration {{iteration}} of {{maxIterations}}. When `{{verifyScript}}`
|
|
77
92
|
exits non-zero you get another iteration to keep working; when it exits 0 the
|
|
78
93
|
phase ends.{{/if}}
|
|
79
|
-
-
|
|
80
|
-
and `skipped` counts as RED — it never authorises a
|
|
94
|
+
- Publish **only** on a green local gate. A gate that did not run is `gate=skipped`,
|
|
95
|
+
and `skipped` counts as RED — it never authorises a publish.
|
|
81
96
|
- On the LAST iteration with the gate still red: emit `outcome=gave-up`,
|
|
82
|
-
`gate=red`, and do **not**
|
|
83
|
-
full CI cycle to prove nothing; dispatch-time escalation owns what happens
|
|
97
|
+
`gate=red`, and do **not** publish a speculative fix. An unverified push costs
|
|
98
|
+
a full CI cycle to prove nothing; dispatch-time escalation owns what happens
|
|
84
99
|
next, not you.
|
|
85
100
|
|
|
86
101
|
OUTPUT: Brief summary of what was fixed and test results, then the
|
package/workflows/prompts/pr.md
CHANGED
|
@@ -34,6 +34,6 @@ Do NOT post a comment with the PR link — the harness adds it to the status
|
|
|
34
34
|
checklist on the issue automatically. Just create the PR.
|
|
35
35
|
|
|
36
36
|
Update status.md: current_phase = complete, add pr_number.
|
|
37
|
-
{{#if !externalizeArtifacts}}
|
|
37
|
+
{{#if !externalizeArtifacts}}Then `github_publish` with `{ owner: "{{owner}}", repo: "{{repo}}", message: "status: PR created for #{{issueNumber}}", include: [".lastlight"] }` — one signed commit of `.lastlight/` only, so nothing else in the checkout rides along.{{/if}}{{#if externalizeArtifacts}}Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
38
38
|
|
|
39
39
|
OUTPUT: The PR number and URL (so the harness can link the PR from the checklist).
|
|
@@ -19,7 +19,7 @@ the typecheck command and the tests covering the fixed files.
|
|
|
19
19
|
AFTER REVIEW:
|
|
20
20
|
1. APPEND to {{issueDir}}/reviewer-verdict.md under heading "## Re-review after Fix Cycle {{fixCycle}}" (preserve the original verdict above). The new section MUST itself contain a "VERDICT: APPROVED" or "VERDICT: REQUEST_CHANGES" line.
|
|
21
21
|
2. Update status.md with reviewer_status: APPROVED or REQUEST_CHANGES
|
|
22
|
-
{{#if !externalizeArtifacts}}3.
|
|
22
|
+
{{#if !externalizeArtifacts}}3. `github_publish` with `{ owner: "{{owner}}", repo: "{{repo}}", message: "review: re-review after fix cycle {{fixCycle}} for #{{issueNumber}}", include: [".lastlight"] }` — one signed commit of `.lastlight/` only, so nothing your test run left in the checkout rides along.{{/if}}{{#if externalizeArtifacts}}3. Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
23
23
|
|
|
24
24
|
OUTPUT FORMAT — your stdout MUST start with one of these two lines, EXACTLY, on its own line, with no leading whitespace:
|
|
25
25
|
|
|
@@ -39,7 +39,7 @@ AFTER REVIEW:
|
|
|
39
39
|
(paste actual output)
|
|
40
40
|
|
|
41
41
|
2. Update status.md with reviewer_status: APPROVED or REQUEST_CHANGES (matching the verdict)
|
|
42
|
-
{{#if !externalizeArtifacts}}3.
|
|
42
|
+
{{#if !externalizeArtifacts}}3. `github_publish` with `{ owner: "{{owner}}", repo: "{{repo}}", message: "review: verdict for #{{issueNumber}}", include: [".lastlight"] }` — one signed commit of `.lastlight/` only, so nothing your test run left in the checkout rides along.{{/if}}{{#if externalizeArtifacts}}3. Do NOT git add or commit {{issueDir}}/ — the harness persists it to the Last Light server automatically.{{/if}}
|
|
43
43
|
|
|
44
44
|
OUTPUT FORMAT — after you have written the files above, your LAST action MUST be
|
|
45
45
|
a final text message (NOT a tool call). Do not end your turn on a file write or
|
package/workflows/qa-test.yaml
CHANGED
|
@@ -7,6 +7,13 @@ classification:
|
|
|
7
7
|
examples:
|
|
8
8
|
- '"qa test the login flow on this PR" with ISSUE TITLE "Add login" → INTENT: QATEST, REPO: NONE, ISSUE: NONE, REASON: NONE'
|
|
9
9
|
- '"run through the signup flow and tell me what breaks" with ISSUE TITLE "Signup v2" → INTENT: QATEST, REPO: NONE, ISSUE: NONE, REASON: NONE'
|
|
10
|
+
chat:
|
|
11
|
+
trigger: "qa-test owner/repo#N -- <steps>"
|
|
12
|
+
summary: Drive an app or CLI through a flow and report step-level pass/fail
|
|
13
|
+
deflect:
|
|
14
|
+
- qa test the <flow> flow
|
|
15
|
+
- run through <flow> and tell me what breaks
|
|
16
|
+
- smoke-test the CLI commands
|
|
10
17
|
description: |
|
|
11
18
|
Run an automated QA flow against a repo's CLI or locally-served app and report
|
|
12
19
|
step-level pass/fail with evidence. It installs and runs the code in the
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
kind: health
|
|
2
2
|
name: repo-health
|
|
3
|
+
chat:
|
|
4
|
+
summary: A weekly repo health report
|
|
5
|
+
deflect:
|
|
6
|
+
- weekly health report
|
|
7
|
+
- repo health
|
|
8
|
+
- health check on <repo>
|
|
9
|
+
reply: >-
|
|
10
|
+
"Weekly health reports run on a cron schedule, not on demand from chat — ask a
|
|
11
|
+
maintainer to configure the repo-health cron, or run `npm run cli -- health
|
|
12
|
+
owner/repo` from the harness host." (health is NOT an interactive chat
|
|
13
|
+
trigger; do not suggest typing it here.)
|
|
3
14
|
description: |
|
|
4
15
|
Generate a health report for a repository: open issues, stale issues, PR
|
|
5
16
|
velocity, label distribution, etc. Repo-scoped (no specific issue/PR).
|
|
@@ -8,6 +8,13 @@ classification:
|
|
|
8
8
|
- '"run a security review on cliftonc/lastlight" → INTENT: SECURITY, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
|
|
9
9
|
- '"can you do a security review of https://github.com/cliftonc/lastlight" → INTENT: SECURITY, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
|
|
10
10
|
- '"scan https://github.com/cliftonc/lastlight for vulnerabilities" → INTENT: SECURITY, REPO: cliftonc/lastlight, ISSUE: NONE, REASON: NONE'
|
|
11
|
+
chat:
|
|
12
|
+
trigger: security review owner/repo
|
|
13
|
+
summary: Security-scan a repo
|
|
14
|
+
deflect:
|
|
15
|
+
- security review
|
|
16
|
+
- scan for vulnerabilities
|
|
17
|
+
- check security of <repo>
|
|
11
18
|
description: |
|
|
12
19
|
Scan the target repository for security issues using open-source tools
|
|
13
20
|
(npm audit, semgrep, gitleaks) plus AI code review. Files ONE summary
|
package/workflows/verify.yaml
CHANGED
|
@@ -8,6 +8,13 @@ classification:
|
|
|
8
8
|
- '"verify that the --fork flag creates a new session in cliftonc/foo#12" → INTENT: VERIFY, REPO: cliftonc/foo, ISSUE: 12, REASON: NONE'
|
|
9
9
|
- '"does this actually fix the crash?" with ISSUE TITLE "Fix null deref on resize" → INTENT: VERIFY, REPO: NONE, ISSUE: NONE, REASON: NONE'
|
|
10
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'
|
|
11
|
+
chat:
|
|
12
|
+
trigger: "verify owner/repo#N -- <claim>"
|
|
13
|
+
summary: Test whether a specific claim or behaviour actually holds, with evidence
|
|
14
|
+
deflect:
|
|
15
|
+
- verify that <X> works
|
|
16
|
+
- does this PR really fix <Y>?
|
|
17
|
+
- confirm <Z> actually happens
|
|
11
18
|
description: |
|
|
12
19
|
Verify a behaviour claim against a repo or PR and report whether the evidence
|
|
13
20
|
confirms or refutes it. It installs and runs the code in the sandbox, captures
|