@1aboveio/skills 1.0.18 → 1.0.20
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/.codex-plugin/plugin.json +1 -1
- package/.codex-plugin/resources.json +151 -145
- package/package.json +4 -4
- package/skills/app-dev/airflow/SKILL.md +1 -1
- package/skills/app-dev/android-development/SKILL.md +1 -1
- package/skills/app-dev/app-debug/SKILL.md +1 -1
- package/skills/app-dev/better-auth/SKILL.md +1 -1
- package/skills/app-dev/data-catalog/SKILL.md +1 -1
- package/skills/app-dev/data-quality/SKILL.md +1 -1
- package/skills/app-dev/ios-foundation/SKILL.md +1 -1
- package/skills/app-dev/maestro/SKILL.md +1 -1
- package/skills/app-dev/monorepo/SKILL.md +1 -1
- package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
- package/skills/app-dev/prisma-setup/SKILL.md +1 -1
- package/skills/app-dev/pyspark/SKILL.md +1 -1
- package/skills/app-dev/python-backend/SKILL.md +1 -1
- package/skills/app-dev/shadcn/SKILL.md +1 -1
- package/skills/app-dev/zod-v4/SKILL.md +1 -1
- package/skills/cicd/cloud-build/SKILL.md +1 -1
- package/skills/cicd/cloud-debug/SKILL.md +1 -1
- package/skills/cicd/cloud-deploy/SKILL.md +1 -1
- package/skills/cicd/docker/SKILL.md +1 -1
- package/skills/cicd/github-actions/SKILL.md +1 -1
- package/skills/cicd/github-flow/SKILL.md +1 -1
- package/skills/cicd/google-cloud/SKILL.md +1 -1
- package/skills/cicd/mergify/SKILL.md +1 -1
- package/skills/cicd/podman/SKILL.md +1 -1
- package/skills/content/article-review/SKILL.md +1 -1
- package/skills/content/article-to-image/SKILL.md +1 -1
- package/skills/content/flowchart-svg/SKILL.md +1 -1
- package/skills/content/image-gen/SKILL.md +1 -1
- package/skills/content/mermaid/SKILL.md +1 -1
- package/skills/content/wechat-article-writer/SKILL.md +1 -1
- package/skills/content/wechat-publisher/SKILL.md +1 -1
- package/skills/content/wechat-search/SKILL.md +1 -1
- package/skills/content/xai-search/SKILL.md +1 -1
- package/skills/core/distill-writing/SKILL.md +1 -1
- package/skills/core/doc-to-md/SKILL.md +1 -1
- package/skills/core/editorial-review/SKILL.md +1 -1
- package/skills/core/house-style/SKILL.md +1 -1
- package/skills/core/plain-language/SKILL.md +1 -1
- package/skills/core/polish-cn/SKILL.md +1 -1
- package/skills/core/reg-parser/SKILL.md +1 -1
- package/skills/core/terminology/SKILL.md +1 -1
- package/skills/core/write-doc/SKILL.md +1 -1
- package/skills/core/write-report/SKILL.md +1 -1
- package/skills/engineering/better-review/SKILL.md +5 -4
- package/skills/engineering/better-review/references/passes.md +15 -0
- package/skills/engineering/better-review/references/result.md +14 -0
- package/skills/engineering/e2e-test/SKILL.md +1 -1
- package/skills/engineering/engineering/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
- package/skills/engineering/ensure-coverage/SKILL.md +1 -1
- package/skills/engineering/golden-path/SKILL.md +1 -1
- package/skills/engineering/harness-runtime/SKILL.md +1 -1
- package/skills/engineering/resolve-issues/SKILL.md +14 -9
- package/skills/engineering/resolve-issues/references/ci.md +3 -1
- package/skills/engineering/resolve-issues/references/delivery-progress.md +16 -0
- package/skills/engineering/resolve-issues/references/done.md +7 -0
- package/skills/engineering/resolve-issues/references/dropbox.md +31 -6
- package/skills/engineering/resolve-issues/references/expire.md +6 -3
- package/skills/engineering/resolve-issues/references/implementation.md +67 -6
- package/skills/engineering/resolve-issues/references/preflight.md +17 -3
- package/skills/engineering/resolve-issues/references/retention.md +162 -0
- package/skills/engineering/resolve-issues/references/review.md +42 -9
- package/skills/engineering/resolve-issues/references/task-plan.md +17 -2
- package/skills/engineering/resolve-issues/references/workspaces.md +40 -10
- package/skills/engineering/resolve-issues/scripts/daily-cleanup.mjs +169 -0
- package/skills/engineering/resolve-issues/scripts/dropbox.mjs +2 -1
- package/skills/engineering/resolve-issues/scripts/next-actions.mjs +79 -4
- package/skills/engineering/resolve-issues/scripts/resource-formats.mjs +625 -0
- package/skills/engineering/resolve-issues/scripts/retention-lock.mjs +548 -0
- package/skills/engineering/resolve-issues/scripts/retention-plans.mjs +57 -0
- package/skills/engineering/resolve-issues/scripts/retention.mjs +2314 -0
- package/skills/engineering/resolve-issues/scripts/review-verdict.mjs +63 -10
- package/skills/engineering/resolve-release/SKILL.md +1 -1
- package/skills/engineering/rush-issues/SKILL.md +1 -1
- package/skills/engineering/rush-release/SKILL.md +1 -1
- package/skills/engineering/test-quality/SKILL.md +1 -1
- package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
- package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
- package/skills/risk-compliance/contract-review/SKILL.md +1 -1
- package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
- package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
- package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
- package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// next-actions.mjs --run <run dir> [--capacity-json '<snapshot>' | --slots N] [--quiet-minutes 45] [--resume] [--sync] [--json] [--peek] [--mode full|narrow|off] [--rules] [--exit-due]
|
|
6
6
|
//
|
|
7
7
|
// Reads <run>/task-plan.json (units with status, stage, worker, workerSince, workspace,
|
|
8
|
-
// dependsOn, pr, headSha, reviewedHead) and <run>/reviews/<unit>-r<N>.json (+ .fix.json; its head, complete, and
|
|
8
|
+
// implementationOwner, dependsOn, pr, headSha, reviewedHead) and <run>/reviews/<unit>-r<N>.json (+ .fix.json; its head, complete, and
|
|
9
9
|
// external.awaiting, and whether it holds a P0/P1). A unit with `worker`
|
|
10
10
|
// set is busy. Actions, in priority order:
|
|
11
11
|
//
|
|
@@ -75,6 +75,28 @@
|
|
|
75
75
|
// fetch failed, it prints `sync` instead. A run never finishes on a tree it
|
|
76
76
|
// could not read
|
|
77
77
|
//
|
|
78
|
+
// A unit's optional `implementationOwner` is the retained implement-or-fix conversation that outlives
|
|
79
|
+
// the worker slot, recorded from the harness as { runId, sessionId?, cwd?, kind }: `runId` is the
|
|
80
|
+
// attempt to resume, `kind` ("implement" or "fix", default "implement") says which worker owned it,
|
|
81
|
+
// and `sessionId` and `cwd` (the unit's workspace) identify that conversation and its tree. It is
|
|
82
|
+
// independent of `worker`, which records whichever worker is active now, so the owner survives the
|
|
83
|
+
// review phase and a later fix continues the same conversation instead of starting over.
|
|
84
|
+
//
|
|
85
|
+
// Every action that spawns a worker therefore carries the structured continuation the coordinator
|
|
86
|
+
// launches, beside its name: `continuation: "fresh"` for a first start or a new worker, launched
|
|
87
|
+
// normally, with no retention argument (a saved conversation stays continuable by its id;
|
|
88
|
+
// `retain_session: true` is optional protection a caller adds only for a long wait before cleanup).
|
|
89
|
+
// Implement and fix sessions become the unit's owner; `continuation: "owner-resume"` with
|
|
90
|
+
// `owner: { runId, kind, sessionId?, cwd? }` for a fix, a restack, or an unfinished implementation
|
|
91
|
+
// whose owner is still usable (subagent_resume({ id: owner.runId, ... }) returns a new attempt on
|
|
92
|
+
// the same conversation). `workerKind` names the slot the action launches. A review round is
|
|
93
|
+
// always a fresh reviewer: a finished review
|
|
94
|
+
// is never resumed, and a review recorded as an owner is not usable. An owner without a `runId`,
|
|
95
|
+
// with a `kind` outside implement and fix, or whose `cwd` is not the unit's workspace is not usable,
|
|
96
|
+
// so a fresh action reports ownerUnavailable rather than claiming continuity. A `retentionReleased`
|
|
97
|
+
// marker records that optional protection lapsed, so it never makes an owner unusable. A completed
|
|
98
|
+
// worker holds no slot: the owner is a reference, never an occupancy.
|
|
99
|
+
//
|
|
78
100
|
// Text output ends with one short line pointing to the skill path. With --resume or --rules it
|
|
79
101
|
// ends with RULES instead, the rules a compaction summary most often drops (in narrow and off
|
|
80
102
|
// modes, a one-line rules reminder for that mode).
|
|
@@ -120,6 +142,13 @@ import { BLOCKING } from './review-verdict.mjs'
|
|
|
120
142
|
// No skill-owned concurrency default: the caller supplies fresh host capacity.
|
|
121
143
|
// The only workers a unit runs (SKILL.md, Your role). A watcher is not a worker.
|
|
122
144
|
export const WORKER_KINDS = Object.freeze(['implement', 'fix', 'review'])
|
|
145
|
+
// The worker each worker-spawning action launches, in the plan's `workerKind` vocabulary. These are
|
|
146
|
+
// the actions that carry a structured continuation (`continuation`, `workerKind`, `owner`) for the
|
|
147
|
+
// coordinator.
|
|
148
|
+
export const WORKER_ACTION_KINDS = Object.freeze({ 'fill-slot': 'implement', resume: 'implement', 'start-fix': 'fix', restack: 'fix', 'start-review': 'review' })
|
|
149
|
+
// The kinds that may own a unit's implementation. A review is never resumed for the next round, so
|
|
150
|
+
// it is not one.
|
|
151
|
+
export const IMPLEMENTATION_OWNER_KINDS = Object.freeze(['implement', 'fix'])
|
|
123
152
|
export const SKILL_PATH = join(dirname(dirname(fileURLToPath(import.meta.url))), 'SKILL.md')
|
|
124
153
|
// Printed after every text call, and by rehydrate.mjs after a compaction.
|
|
125
154
|
export const RULES = 'Per unit, run only implement, fix, and review workers, recorded as workerKind: no planning, architecture, product, or setup workers. You own preflight findings; use an optional explorer on the fleet explore row only for concrete planning unknowns (exploration.md). You coordinate: never edit product code. In full mode take every step from next-actions.mjs; in every mode the run ends only when it reports done. A HEAD after a passing review is carried; any other new HEAD takes the tier rereview-scope.mjs picks, never yours. Decide before you defer: a question a worker or review raises is answered and recorded, then the unit continues; retrying or deferring never answers it. Never block on the human: take the automatic answer and keep going. Fix the root cause, never only its symptom. Before each scheduling pass, refresh subagent_settings and pass its snapshot with --capacity-json; do not reuse a run-start budget or subtract workflow workers again.'
|
|
@@ -176,6 +205,25 @@ export function normalizeCapacity(input) {
|
|
|
176
205
|
const hasWorker = (u) => u.worker !== undefined && u.worker !== null && u.worker !== ''
|
|
177
206
|
const codeDone = (u) => u.stage === 'done'
|
|
178
207
|
|
|
208
|
+
// A unit's usable implementation owner, normalized to { runId, kind, sessionId?, cwd? }, or null.
|
|
209
|
+
// Usable means it names the attempt to resume (`runId`), its `kind` is an implement or fix worker
|
|
210
|
+
// (never a reviewer: a finished review is never resumed for the next round), and, when both are
|
|
211
|
+
// recorded, its `cwd` is the unit's workspace (a conversation cannot be resumed in another tree).
|
|
212
|
+
// A plan that records nothing here keeps today's behavior: a fresh worker.
|
|
213
|
+
export function implementationOwnerOf(unit) {
|
|
214
|
+
const saved = unit?.implementationOwner
|
|
215
|
+
if (!saved || typeof saved !== 'object' || Array.isArray(saved)) return null
|
|
216
|
+
if (saved.cwd !== undefined && saved.cwd !== null && typeof saved.cwd !== 'string') return null
|
|
217
|
+
const runId = typeof saved.runId === 'string' ? saved.runId.trim() : ''
|
|
218
|
+
const kind = saved.kind === undefined ? 'implement' : saved.kind
|
|
219
|
+
if (!runId || !IMPLEMENTATION_OWNER_KINDS.includes(kind)) return null
|
|
220
|
+
const cwd = typeof saved.cwd === 'string' ? saved.cwd.trim() : ''
|
|
221
|
+
const workspace = typeof unit.workspace === 'string' ? unit.workspace.trim() : ''
|
|
222
|
+
if (cwd && workspace && cwd !== workspace) return null
|
|
223
|
+
const sessionId = typeof saved.sessionId === 'string' ? saved.sessionId.trim() : ''
|
|
224
|
+
return { runId, kind, ...(sessionId ? { sessionId } : {}), ...(cwd ? { cwd } : {}) }
|
|
225
|
+
}
|
|
226
|
+
|
|
179
227
|
export function workspaceCleanupSettled(unit) {
|
|
180
228
|
const result = unit.lifecycle?.cleanup
|
|
181
229
|
return typeof unit.headSha === 'string' && unit.headSha.length > 0 && result?.headSha === unit.headSha &&
|
|
@@ -338,6 +386,18 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
338
386
|
}
|
|
339
387
|
const actions = []
|
|
340
388
|
const add = (action, u, detail) => actions.push({ action, unit: String(u.id), detail })
|
|
389
|
+
// Keep owners through delivery and their saved conversations through later repair.
|
|
390
|
+
// A new review round starts fresh even when the preceding session remains available.
|
|
391
|
+
const continuationFor = (u, workerKind) => {
|
|
392
|
+
const owner = workerKind === 'review' ? null : implementationOwnerOf(u)
|
|
393
|
+
if (owner) return { continuation: 'owner-resume', workerKind, owner }
|
|
394
|
+
const ownerUnavailable = workerKind !== 'review' && u.implementationOwner != null
|
|
395
|
+
? 'Saved implementationOwner is malformed, names another role, or does not match the unit workspace; record replacement and retain its evidence.' : undefined
|
|
396
|
+
return { continuation: 'fresh', workerKind, ...(ownerUnavailable ? { ownerUnavailable } : {}) }
|
|
397
|
+
}
|
|
398
|
+
// Appended to an owner-resumed action: the work is the same, so the action keeps its name; only
|
|
399
|
+
// the launch changes, and it is a resume rather than a second worker for the unit.
|
|
400
|
+
const ownerNote = (id, owner) => `; launch it as a resume of unit ${id}'s implementation owner: subagent_resume({ id: ${JSON.stringify(owner.runId)}, prompt: <that brief or task> }) returns a new attempt on the same conversation${owner.sessionId ? ` (session ${owner.sessionId})` : ''}${owner.cwd ? ` in ${owner.cwd}` : ''}; record the returned id as implementationOwner.runId and keep the owner through review`
|
|
341
401
|
const managed = (u) => plan.workspaceLifecycle === 1 || u.lifecycle?.version === 1
|
|
342
402
|
for (const u of units) {
|
|
343
403
|
if (TERMINAL.has(u.status) && hasWorker(u) && (u.status !== 'blocked' || reasonOk(u))) {
|
|
@@ -346,7 +406,7 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
346
406
|
}
|
|
347
407
|
if (!managed(u) || u.status !== 'succeeded' || !u.workspace) continue
|
|
348
408
|
if (!hasWorker(u) && !workspaceCleanupSettled(u)) {
|
|
349
|
-
add('cleanup-workspace', u, `unit ${u.id} landed: record lifecycle.cleanup with state applying and headSha ${u.headSha ?? '(record the delivered HEAD first)'}, then run cleanup-runs.mjs cleanup --run <run> --unit ${u.id} --revision <saved planRevision> --apply --json; inspect and persist the returned lifecycle. A refusal is retained with its reason, never complete; do this before finish and alongside independent units`)
|
|
409
|
+
add('cleanup-workspace', u, `unit ${u.id} landed: release any retain_session protection it still holds and record that acknowledgement (implementation.md#settle-session-retention), then record lifecycle.cleanup with state applying and headSha ${u.headSha ?? '(record the delivered HEAD first)'}, then run cleanup-runs.mjs cleanup --run <run> --unit ${u.id} --revision <saved planRevision> --apply --json; inspect and persist the returned lifecycle. A refusal is retained with its reason, never complete; do this before finish and alongside independent units`)
|
|
350
410
|
}
|
|
351
411
|
}
|
|
352
412
|
const chainReady = []
|
|
@@ -637,6 +697,16 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
637
697
|
// One restack per unit per pass: the first reason found; the next pass sees the new HEAD.
|
|
638
698
|
const restacked = new Set()
|
|
639
699
|
for (let i = 0; i < actions.length; i++) if (actions[i].action === 'restack') { if (restacked.has(actions[i].unit)) actions.splice(i--, 1); else restacked.add(actions[i].unit) }
|
|
700
|
+
// One place attaches each worker action's continuation, so no site can spawn a worker without
|
|
701
|
+
// saying whether it starts fresh or resumes the unit's owner.
|
|
702
|
+
for (const a of actions) {
|
|
703
|
+
const workerKind = WORKER_ACTION_KINDS[a.action]
|
|
704
|
+
if (!workerKind) continue
|
|
705
|
+
const continuation = continuationFor(byId.get(a.unit), workerKind)
|
|
706
|
+
Object.assign(a, continuation)
|
|
707
|
+
if (continuation.owner) a.detail += ownerNote(a.unit, continuation.owner)
|
|
708
|
+
if (continuation.ownerUnavailable) a.detail += `; ${continuation.ownerUnavailable}`
|
|
709
|
+
}
|
|
640
710
|
const busy = units.filter(hasWorker).length
|
|
641
711
|
// The Harness already counted our workers along with other work and reservations.
|
|
642
712
|
// Without a capacity source every worker-needing action is due: the harness spawn limit governs.
|
|
@@ -652,9 +722,14 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
652
722
|
const reviewReady = a.action !== 'start-review' || u.lifecycle?.resources?.some((r) => r.role === 'review' && r.state === 'ready')
|
|
653
723
|
const needsPreparation = managed(u) && (u.lifecycle?.workspace?.state !== 'ready' || !reviewReady)
|
|
654
724
|
const removalPending = managed(u) && u.lifecycle?.cleanup?.state === 'applying'
|
|
655
|
-
|
|
725
|
+
// A gating action keeps the worker action's continuation, so the launch stays explicit after
|
|
726
|
+
// the workspace is prepared or its cleanup is resolved.
|
|
727
|
+
const launch = { unit: a.unit, continuation: a.continuation, workerKind: a.workerKind,
|
|
728
|
+
...(a.owner ? { owner: a.owner } : {}),
|
|
729
|
+
...(a.ownerUnavailable ? { ownerUnavailable: a.ownerUnavailable } : {}) }
|
|
730
|
+
const admitted = removalPending ? { action: 'recover-workspace', ...launch,
|
|
656
731
|
detail: `before ${a.action} for unit ${a.unit}, resolve its applying cleanup: inspect cleanup-runs.mjs recover --repo <repo-root> --json, collect any running cleanup operation's terminal result, and verify its receipt and every owned resource before updating lifecycle. Never admit a worker while removal of its environment is unresolved` }
|
|
657
|
-
: needsPreparation ? { action: 'prepare-workspace',
|
|
732
|
+
: needsPreparation ? { action: 'prepare-workspace', ...launch,
|
|
658
733
|
detail: `before ${a.action} for unit ${a.unit}, record its exact workspace, branch, base SHA and lifecycle preparation intent${reviewReady ? '' : ', including its one review clone'}; run cleanup-runs.mjs prepare --run <run> --unit ${a.unit} --revision <saved planRevision> --apply --json and persist its returned ready identity. Reuse an existing matching workspace; never reset, replace or create another one on retry` } : a
|
|
659
734
|
due.push(unlimited ? { ...admitted, detail: `${admitted.detail} [needs a free worker slot]` } : admitted)
|
|
660
735
|
free--
|