@1aboveio/skills 1.0.10 → 1.0.11
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 +297 -216
- package/README.md +3 -3
- package/package.json +10 -8
- package/skills/app-dev/airflow/SKILL.md +1 -1
- package/skills/app-dev/android-foundation/SKILL.md +35 -37
- package/skills/app-dev/android-foundation/references/delivery-focus.md +4 -2
- package/skills/app-dev/android-foundation/references/feature-work.md +50 -0
- package/skills/app-dev/android-foundation/references/setup.md +24 -9
- package/skills/app-dev/android-foundation/references/workspace.md +81 -0
- package/skills/app-dev/android-foundation/scripts/workspace-runtime/bin/workspaces.mjs +52 -0
- package/skills/app-dev/android-foundation/scripts/workspace-runtime/native-workspace.mjs +239 -0
- package/skills/app-dev/android-foundation/scripts/workspace-runtime/workspace-lifecycle.mjs +2154 -0
- 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 +15 -10
- package/skills/app-dev/ios-foundation/references/setup.md +25 -9
- package/skills/app-dev/ios-foundation/references/workspace.md +82 -0
- package/skills/app-dev/ios-foundation/scripts/workspace-runtime/bin/workspaces.mjs +52 -0
- package/skills/app-dev/ios-foundation/scripts/workspace-runtime/native-workspace.mjs +239 -0
- package/skills/app-dev/ios-foundation/scripts/workspace-runtime/workspace-lifecycle.mjs +2154 -0
- 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 +3 -3
- package/skills/core/distill-writing/references/extraction.md +1 -1
- package/skills/core/doc-to-md/SKILL.md +1 -1
- package/skills/core/editorial-review/SKILL.md +82 -12
- package/skills/core/editorial-review/references/checklist.md +26 -1
- package/skills/core/house-style/SKILL.md +8 -3
- package/skills/core/house-style/references/analytical-reporting.md +123 -0
- package/skills/core/house-style/references/analytical-writing-patterns.md +79 -0
- package/skills/core/house-style/references/analytical-writing-research.md +129 -0
- package/skills/core/{write-doc → house-style}/references/bilingual.md +7 -5
- package/skills/core/house-style/references/definitions-and-metrics.md +86 -0
- package/skills/core/house-style/references/document-workflow.md +193 -0
- package/skills/core/house-style/references/initialization.md +66 -0
- package/skills/core/house-style/references/persistence.md +9 -4
- package/skills/core/house-style/references/rules.md +11 -4
- package/skills/core/house-style/scripts/init-guidance.mjs +213 -0
- package/skills/core/house-style/templates/analytical-report.md +54 -0
- package/skills/core/house-style/templates/gap-analysis.md +1 -1
- package/skills/core/plain-language/SKILL.md +2 -2
- package/skills/core/polish-cn/SKILL.md +9 -2
- package/skills/core/reg-parser/SKILL.md +3 -3
- package/skills/core/terminology/SKILL.md +8 -4
- package/skills/core/write-doc/SKILL.md +40 -151
- package/skills/core/write-report/SKILL.md +129 -0
- package/skills/core/{write-doc → write-report}/references/compliance-reports.md +4 -4
- package/skills/engineering/better-review/SKILL.md +37 -37
- package/skills/engineering/better-review/references/passes.md +35 -41
- package/skills/engineering/better-review/references/result.md +10 -9
- package/skills/engineering/e2e-test/SKILL.md +17 -17
- package/skills/engineering/e2e-test/references/authoring/playwright-config.md +11 -13
- package/skills/engineering/e2e-test/references/presentation-sweep.md +7 -7
- package/skills/engineering/e2e-test/references/reviewing.md +9 -11
- package/skills/engineering/e2e-test/references/route-manifest.md +1 -1
- package/skills/engineering/engineering/SKILL.md +124 -0
- package/skills/engineering/engineering/references/engineering-conventions.md +32 -0
- package/skills/engineering/engineering/references/feature-delivery.md +8 -0
- package/skills/engineering/engineering/references/init-scope.md +37 -0
- package/skills/engineering/engineering/scripts/init.mjs +160 -0
- package/skills/engineering/{contributing → engineering}/scripts/persist-conventions.mjs +1 -1
- package/skills/engineering/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/coherence/workflow.json +19 -19
- package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
- package/skills/engineering/ensure-coverage/SKILL.md +22 -109
- package/skills/engineering/ensure-coverage/references/breadth/coverage-ledger.md +7 -5
- package/skills/engineering/ensure-coverage/references/breadth/surface-baseline.md +4 -4
- package/skills/engineering/ensure-coverage/references/breadth/surface-discovery.md +3 -3
- package/skills/engineering/ensure-coverage/references/depth/characterization.md +4 -65
- package/skills/engineering/ensure-coverage/references/depth/grading.md +5 -7
- package/skills/engineering/ensure-coverage/references/depth/mock-policy.md +6 -12
- package/skills/engineering/ensure-coverage/references/enforcement/ci-contract.md +1 -1
- package/skills/engineering/ensure-coverage/references/presentation/axis.md +6 -6
- package/skills/engineering/ensure-coverage/references/process/audit-mode.md +7 -23
- package/skills/engineering/ensure-coverage/references/process/output-template.md +18 -133
- package/skills/engineering/ensure-coverage/references/process/test-strategy.md +7 -12
- package/skills/engineering/ensure-coverage/scripts/README.md +12 -4
- package/skills/engineering/golden-path/SKILL.md +1 -1
- package/skills/engineering/harness-runtime/SKILL.md +3 -1
- package/skills/engineering/harness-runtime/bin/workspaces.mjs +52 -0
- package/skills/engineering/harness-runtime/native-workspace.mjs +239 -0
- package/skills/engineering/harness-runtime/references/workspaces.md +78 -0
- package/skills/engineering/harness-runtime/workspace-lifecycle.mjs +2154 -0
- package/skills/engineering/resolve-issues/SKILL.md +40 -61
- package/skills/engineering/resolve-issues/references/ci.md +13 -3
- package/skills/engineering/resolve-issues/references/delivery-progress.md +4 -3
- package/skills/engineering/resolve-issues/references/done.md +11 -2
- package/skills/engineering/resolve-issues/references/expire.md +9 -2
- package/skills/engineering/resolve-issues/references/implementation.md +33 -17
- package/skills/engineering/resolve-issues/references/preflight.md +3 -1
- package/skills/engineering/resolve-issues/references/principles.md +52 -0
- package/skills/engineering/resolve-issues/references/review.md +25 -15
- package/skills/engineering/resolve-issues/references/task-plan.md +64 -27
- package/skills/engineering/resolve-issues/references/workspaces.md +164 -0
- package/skills/engineering/resolve-issues/scripts/cleanup-runs.mjs +185 -317
- package/skills/engineering/resolve-issues/scripts/next-actions.mjs +44 -7
- package/skills/engineering/resolve-issues/scripts/rehydrate.mjs +36 -2
- package/skills/engineering/resolve-issues/scripts/review-verdict.mjs +9 -8
- package/skills/engineering/resolve-issues/scripts/workspace-lifecycle.mjs +1 -0
- package/skills/engineering/resolve-release/SKILL.md +1 -1
- package/skills/engineering/rush-issues/SKILL.md +7 -5
- package/skills/engineering/rush-release/SKILL.md +1 -1
- package/skills/engineering/test-quality/SKILL.md +19 -4
- package/skills/engineering/test-quality/references/lint.md +1 -1
- package/skills/engineering/test-quality/references/principles.md +2 -2
- package/skills/engineering/test-quality/references/testing-conventions.md +1 -1
- package/skills/risk-compliance/compliance-audit/SKILL.md +4 -8
- package/skills/risk-compliance/compliance-audit/references/audience-and-reports.md +12 -0
- package/skills/risk-compliance/contract-compare/SKILL.md +17 -1
- package/skills/risk-compliance/contract-review/SKILL.md +6 -1
- package/skills/risk-compliance/contract-review/references/report-stage.md +17 -0
- package/skills/risk-compliance/doc-authenticity/SKILL.md +11 -1
- package/skills/risk-compliance/fraud-detection/LICENSE +3 -0
- package/skills/risk-compliance/fraud-detection/SKILL.md +148 -0
- package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/archetypes/first-party-fraud.md +3 -2
- package/skills/risk-compliance/fraud-detection/references/archetypes/third-party-fraud.md +47 -0
- package/skills/risk-compliance/fraud-detection/references/collection-payout-features.md +151 -0
- package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/contexts/bank-transfer.md +4 -3
- package/skills/risk-compliance/fraud-detection/references/contexts/card-payment.md +70 -0
- package/skills/risk-compliance/fraud-detection/references/contexts/payment-collection.md +34 -0
- package/skills/risk-compliance/fraud-detection/references/contexts/payout.md +34 -0
- package/skills/risk-compliance/fraud-detection/references/enrichment.md +74 -0
- package/skills/risk-compliance/fraud-detection/references/entities.md +48 -0
- package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/feature-engineering.md +69 -33
- package/skills/risk-compliance/fraud-detection/references/feature-sql.md +150 -0
- package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/report-rationale.md +4 -2
- package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/report-template.md +45 -23
- package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/review-checklist.md +60 -20
- package/skills/risk-compliance/fraud-detection/references/workflow.md +216 -0
- package/skills/risk-compliance/fraud-detection/release-check.mjs +95 -0
- package/skills/risk-compliance/payment-analysis/SKILL.md +36 -17
- package/skills/risk-compliance/payment-analysis/references/auth-rate-actions.md +2 -2
- package/skills/risk-compliance/payment-analysis/references/report-template.md +10 -2
- package/skills/risk-compliance/payment-analysis/references/visualization.md +11 -1
- package/skills/risk-compliance/portfolio-payment-analysis/LICENSE +3 -0
- package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +170 -0
- package/skills/risk-compliance/portfolio-payment-analysis/references/identity-and-reconciliation.md +46 -0
- package/skills/risk-compliance/portfolio-payment-analysis/references/metrics-and-reporting.md +170 -0
- package/skills/risk-compliance/portfolio-payment-analysis/references/risk-history.md +89 -0
- package/skills/risk-compliance/portfolio-payment-analysis/release-check.mjs +95 -0
- package/skills/risk-compliance/portfolio-payment-analysis/scripts/analyze.py +636 -0
- package/skills/risk-compliance/portfolio-payment-analysis/scripts/build_report.py +386 -0
- package/skills/risk-compliance/portfolio-payment-analysis/scripts/comparison_charts.py +425 -0
- package/skills/risk-compliance/portfolio-payment-analysis/scripts/csv_export.py +52 -0
- package/skills/risk-compliance/portfolio-payment-analysis/scripts/render.py +160 -0
- package/skills/risk-compliance/portfolio-payment-analysis/scripts/risk_history.py +435 -0
- package/skills/risk-compliance/similar-domain/SKILL.md +9 -4
- package/skills/risk-compliance/tld-detection/SKILL.md +124 -239
- package/skills/risk-compliance/tld-detection/agents/openai.yaml +1 -1
- package/skills/risk-compliance/tld-detection/references/clean.md +18 -51
- package/skills/risk-compliance/tld-detection/references/fx-conversion.md +56 -219
- package/skills/risk-compliance/tld-detection/references/metric-contract.md +109 -0
- package/skills/risk-compliance/tld-detection/references/pattern.md +99 -0
- package/skills/risk-compliance/tld-detection/references/report-template.md +49 -272
- package/skills/risk-compliance/tld-detection/scripts/detect_ladders.py +46 -13
- package/skills/risk-compliance/tld-detection/scripts/detect_patterns.py +346 -0
- package/skills/risk-compliance/tld-detection/scripts/detect_streams.py +51 -19
- package/skills/risk-compliance/tld-detection/scripts/profile_groups.py +109 -0
- package/skills/risk-compliance/tld-detection/scripts/render_charts.py +218 -0
- package/skills/risk-compliance/tld-detection/scripts/tld_common.py +243 -0
- package/skills/engineering/contributing/SKILL.md +0 -70
- package/skills/risk-compliance/fraud-analysis/SKILL.md +0 -114
- package/skills/risk-compliance/fraud-analysis/references/archetypes/third-party-fraud.md +0 -27
- package/skills/risk-compliance/fraud-analysis/references/contexts/card-payment.md +0 -30
- package/skills/risk-compliance/fraud-analysis/references/contexts/payment-collection.md +0 -20
- package/skills/risk-compliance/fraud-analysis/references/contexts/payout.md +0 -20
- package/skills/risk-compliance/fraud-analysis/references/workflow.md +0 -175
- package/skills/risk-compliance/tld-detection/references/chinese-polish.md +0 -55
- package/skills/risk-compliance/tld-detection/references/clustering.md +0 -235
- package/skills/risk-compliance/tld-detection/references/decision.md +0 -189
- package/skills/risk-compliance/tld-detection/references/streams.md +0 -141
- package/skills/risk-compliance/tld-detection/references/terminology.md +0 -95
- package/skills/risk-compliance/tld-detection/references/workflow.md +0 -95
- /package/skills/{engineering/contributing → core/write-report}/LICENSE +0 -0
- /package/skills/core/{write-doc → write-report}/references/reports/audit-report-template.md +0 -0
- /package/skills/core/{write-doc → write-report}/references/reports/external-assessment-template.md +0 -0
- /package/skills/core/{write-doc → write-report}/references/reports/management-report-template.md +0 -0
- /package/skills/core/{write-doc → write-report}/references/reports/vars-report-template.md +0 -0
- /package/skills/{engineering/contributing → core/write-report}/release-check.mjs +0 -0
- /package/skills/{risk-compliance/fraud-analysis → engineering/engineering}/LICENSE +0 -0
- /package/skills/engineering/{contributing → engineering}/references/tracker-conventions.md +0 -0
- /package/skills/{risk-compliance/fraud-analysis → engineering/engineering}/release-check.mjs +0 -0
- /package/skills/engineering/{contributing → engineering}/scripts/persist-conventions-core.mjs +0 -0
- /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/archetypes/authorized-payment-scam.md +0 -0
- /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/mechanisms/account-takeover.md +0 -0
- /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/taxonomy.md +0 -0
- /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/terminology.md +0 -0
|
@@ -5,16 +5,17 @@ worker and stage transition.
|
|
|
5
5
|
|
|
6
6
|
## Initialize the run
|
|
7
7
|
|
|
8
|
-
1.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
1. Create the run directory, and reclaim nothing by age: a tree is removed only
|
|
9
|
+
by its own unit's proven cleanup ([workspaces.md](workspaces.md#cleanup-after-delivery-before-finish)).
|
|
10
|
+
Record `workspaceLifecycle: 1`, `repoRoot` (the canonical absolute main
|
|
11
|
+
checkout) and `targetBranch`. After the approval, plan each unit a branch and
|
|
12
|
+
workspace on the target, or on its blocking parent's branch in `stack` or
|
|
13
|
+
`chain` mode, and prepare it when its first worker is admitted
|
|
14
|
+
([workspaces.md](workspaces.md#prepare-at-admission-once)). Never reuse a
|
|
15
|
+
dirty, unrelated checkout. On start and on resume, first run
|
|
16
|
+
`cleanup-runs.mjs recover --repo <repo-root> --json`: read-only, it reports
|
|
17
|
+
unfinished prepare and cleanup operations of any age, and hands the plan back
|
|
18
|
+
([workspaces.md](workspaces.md#resume-recover-inventory)).
|
|
18
19
|
2. Make each issue one unit: every open issue in the spec's tree with no
|
|
19
20
|
open sub-issue (a plain issue, an epic's open leaf, or a rollup whose
|
|
20
21
|
sub-issues all closed); a spec without issues is one unit.
|
|
@@ -50,9 +51,10 @@ worker and stage transition.
|
|
|
50
51
|
task-plan.json
|
|
51
52
|
issue-tree.json # spec's GitHub issue tree, saved by each sync
|
|
52
53
|
exploration/findings.json
|
|
53
|
-
units/<unit>/ # unit workspace;
|
|
54
|
+
units/<unit>/ # the unit's workspace; removed by its cleanup after the merge
|
|
55
|
+
resources/<unit>/<role>/ # scratch or tool cache, only when the unit needs one
|
|
54
56
|
splits/<unit>.md # drafted sub-issues for a held unit
|
|
55
|
-
reviews/<unit>/
|
|
57
|
+
reviews/<unit>/clone/ # the unit's one review clone, reused every round
|
|
56
58
|
reviews/<unit>-r<N>.json # one per round
|
|
57
59
|
reviews/<unit>-r<N>.fix.json # fixBrief from review-verdict.mjs
|
|
58
60
|
reviews/<unit>-r<N>.decide.json # question from review-verdict.mjs verdict decide
|
|
@@ -63,6 +65,12 @@ worker and stage transition.
|
|
|
63
65
|
|
|
64
66
|
## Shape
|
|
65
67
|
|
|
68
|
+
Write each unit's `title` as a short action in plain language, usually 3-7 words:
|
|
69
|
+
"Fix checkout errors" or "Add the Todo toggle". Keep implementation details and
|
|
70
|
+
acceptance criteria in the source and findings, not the Todo label. A long GitHub
|
|
71
|
+
issue heading need not be copied verbatim; preserve its issue reference and full
|
|
72
|
+
source requirements.
|
|
73
|
+
|
|
66
74
|
Fleet rows: `explore`, then per unit `implement`, `review`, `ci`, `canary`.
|
|
67
75
|
Fleet `status`: `pending`, `in-flight`, `succeeded`, `failed`,
|
|
68
76
|
`blocked`, `cancelled`, `not-applicable`, or `merged` (`ci` only). Set
|
|
@@ -72,6 +80,7 @@ Fleet `status`: `pending`, `in-flight`, `succeeded`, `failed`,
|
|
|
72
80
|
|---|---|
|
|
73
81
|
| `id`, `title`, `issue`, `source` | Identity and locator |
|
|
74
82
|
| `workspace`, `branch`, `base` | Absolute workspace, branch, and base |
|
|
83
|
+
| `lifecycle` | The owned workspace and resources with their kind, base SHA, identity, and cleanup state, as `cleanup-runs.mjs` returns them ([workspaces.md](workspaces.md)) |
|
|
75
84
|
| `dependsOn`, `stacksOn` | Blocking and shared-surface parent ids (in `stack` and `chain` mode, `stacksOn` is the parent `next-actions.mjs` names at open) |
|
|
76
85
|
| `files` | The unit's own changed files, recorded when its code is done (`stack` and `chain` mode pick the parent from them) |
|
|
77
86
|
| `parentHead` | `stack` and `chain` mode: the parent's HEAD this branch is rebased on; a line ships only when every link matches |
|
|
@@ -100,7 +109,8 @@ and nothing earlier. Until the merge it stays
|
|
|
100
109
|
Example: #1201's code is done and its PR is in review, so it is
|
|
101
110
|
`stage: done`, `status: in-flight`, `delivery: review`. In `supervised` mode, a
|
|
102
111
|
merge-ready PR handed back stays `in-flight` with the note "merge-ready,
|
|
103
|
-
handed back"; it is never `succeeded` until the human merges it.
|
|
112
|
+
handed back"; it is never `succeeded` until the human merges it. Its
|
|
113
|
+
`lifecycle.cleanup` follows that merge and never changes `status`.
|
|
104
114
|
|
|
105
115
|
Run fields: optional `installation` holds the explicit native installation descriptor
|
|
106
116
|
(one absolute root, layout, resource metadata path/digest, release identity, and
|
|
@@ -108,6 +118,7 @@ pinned external root mappings). Capture from the selected bundle and preserve it
|
|
|
108
118
|
through workers and recovery; never replace it with a newer cache or shared copy.
|
|
109
119
|
Other run fields: `skill` (`resolve-issues` or `rush-issues`; the scheduler and
|
|
110
120
|
rehydrate read it, and `next-actions.mjs` exits 2 without it), `planRevision`, models and efforts, `targetBranch`,
|
|
121
|
+
`workspaceLifecycle: 1` and `repoRoot` ([workspaces.md](workspaces.md)),
|
|
111
122
|
`deliveryMode` and its check, `mergeMode`, run directory, `specLocator`
|
|
112
123
|
(`owner/name#N` or an issue URL; any other name turns off the issue-tree sync),
|
|
113
124
|
exploration path, `decisions`, `standingOrders`, `schedulerMode` (`full`, `narrow`, or `off`), timestamps, and `excluded` (issues in the
|
|
@@ -152,8 +163,8 @@ run state.** Every open issue in the tree with no open sub-issue is a unit,
|
|
|
152
163
|
ordered by `blocked_by` links. On every call with
|
|
153
164
|
[live capacity arguments](implementation.md#live-capacity), `next-actions.mjs` diffs the plan against
|
|
154
165
|
the tree and prints `add-unit`, `drop-unit`, `set-deps`,
|
|
155
|
-
`move-link`, and `blocked-outside` first; apply each through
|
|
156
|
-
for `move-link`, on GitHub) before anything else. A unit waits only on its own
|
|
166
|
+
`move-link`, and `blocked-outside` first; apply each through the available
|
|
167
|
+
checkpoint mechanism below (or, for `move-link`, on GitHub) before anything else. A unit waits only on its own
|
|
157
168
|
issue's `blocked_by` links, never on a link on its parent issue.
|
|
158
169
|
Example: someone files #61 under epic #12 mid-run; the next resume prints
|
|
159
170
|
`add-unit 61`, so explore it, rerun the size check, and schedule it.
|
|
@@ -192,10 +203,28 @@ normally.
|
|
|
192
203
|
|
|
193
204
|
## Checkpoints
|
|
194
205
|
|
|
195
|
-
###
|
|
206
|
+
### Optional Harness Outcome & Todo
|
|
207
|
+
|
|
208
|
+
Use only tools advertised in the current turn. Pi's `/harness-settings` Outcome & Todo
|
|
209
|
+
feature defaults to off; never enable it or make it a precondition. When `update_todo`
|
|
210
|
+
is available, capture the known objective before substantive work with
|
|
211
|
+
`update_todo({outcome:{objective:<objective>}})`. An outcome alone is valid; a checklist
|
|
212
|
+
is not required. Include known criteria, boundaries or source only when useful; do not
|
|
213
|
+
invent criteria or duplicate a large canonical requirement. The source requirements and
|
|
214
|
+
criteria remain authoritative. The latest user correction takes precedence, and a reminder
|
|
215
|
+
does not authorize continuing work. Merely discovering or reading this skill never
|
|
216
|
+
initializes an outcome; capture it only for the accepted task being executed.
|
|
217
|
+
There is no separate setup step. Goal controls triggering and continuation, not
|
|
218
|
+
the business outcome.
|
|
219
|
+
|
|
220
|
+
When the workflow plan exists, read its `planRevision`, then bind it using `update_todo`
|
|
221
|
+
with the absolute path and that revision, optionally including the known outcome:
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
update_todo({workflow:{path:<absolute-plan-path>,revision:<persisted-planRevision>}, outcome:{objective:<objective>}})
|
|
225
|
+
```
|
|
196
226
|
|
|
197
|
-
|
|
198
|
-
`planRevision`, then bind it with the absolute path and that revision:
|
|
227
|
+
For example, the workflow payload is:
|
|
199
228
|
|
|
200
229
|
```json
|
|
201
230
|
{"workflow":{"path":"/absolute/project/.resolve-issues/rush/<run-id>/task-plan.json","revision":12}}
|
|
@@ -207,11 +236,11 @@ With no `event`, this is a read-only binding: it does not mutate the plan or
|
|
|
207
236
|
bump its revision. Do not invent a transition just to display or reload the
|
|
208
237
|
board.
|
|
209
238
|
|
|
210
|
-
After binding, save each transition through `
|
|
239
|
+
After binding, save each transition through `update_todo`, using the current
|
|
211
240
|
persisted revision and the tool's supported change entries:
|
|
212
241
|
|
|
213
242
|
```text
|
|
214
|
-
|
|
243
|
+
update_todo({workflow:{event:"unit-validated",revision:12,changes:[...],decision?}})
|
|
215
244
|
```
|
|
216
245
|
|
|
217
246
|
`decision?` denotes an optional field, not a literal key; supply it when the
|
|
@@ -222,20 +251,28 @@ transition. Binding and the first transition may be one call with
|
|
|
222
251
|
`path`, `revision`, `event`, and `changes` inside the same `workflow` object
|
|
223
252
|
(and `decision` when needed).
|
|
224
253
|
|
|
225
|
-
|
|
254
|
+
While the interface is enabled and bound, never edit `task-plan.json` directly. On rejection, reread the
|
|
226
255
|
saved plan, reconcile the intended changes, and retry with its persisted revision; use a path-and-revision
|
|
227
256
|
call with no event when only reloading. Never force a stale revision or
|
|
228
257
|
display rejected changes as saved.
|
|
229
258
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
259
|
+
`get_todo`, when advertised, reads the outcome, checklist and workflow. Generic work
|
|
260
|
+
may use `update_todo({todo:[...]})` with the tool's `id`, `step`, `status` and
|
|
261
|
+
`dependsOn` fields. It is not a workflow binding or transition: never copy this
|
|
262
|
+
run's units into a generic editable checklist. Todo is an interface label, not a
|
|
263
|
+
rename of `task-plan.json`, `planRevision`, profiling or their schemas.
|
|
233
264
|
|
|
234
265
|
### Other harnesses and display
|
|
235
266
|
|
|
236
|
-
|
|
237
|
-
the
|
|
238
|
-
|
|
267
|
+
With `update_todo` absent or disabled, including on Codex and other harnesses,
|
|
268
|
+
the skill still owns its canonical run records. Use the existing file transition:
|
|
269
|
+
edit run state, preserve the schema and existing records, bump `planRevision`, and
|
|
270
|
+
record any profiling entry the workflow requires. A binding retained after the
|
|
271
|
+
human disables the interface is history, not an active exclusive writer. Reload
|
|
272
|
+
the actual persisted revision if the interface is later enabled again.
|
|
273
|
+
`plan-sync.mjs` only reports scope differences; it is not a transition API. Never
|
|
274
|
+
use this fallback to bypass a rejected update from an available tool: reconcile
|
|
275
|
+
and retry through that tool. A validation error is not tool absence.
|
|
239
276
|
|
|
240
277
|
Render the board from the saved plan only. Without a harness view, show the
|
|
241
278
|
text board. Keep the board and file in agreement. Never show an unsaved transition or reuse an old board.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Workspaces
|
|
2
|
+
|
|
3
|
+
One rule set for the trees a run creates. A unit's workspace and resources are
|
|
4
|
+
owned by the plan, never by a path pattern or a timestamp: nothing is created
|
|
5
|
+
before the plan records it, and nothing is removed without proof of ownership
|
|
6
|
+
and delivery.
|
|
7
|
+
|
|
8
|
+
## What the plan records
|
|
9
|
+
|
|
10
|
+
Run fields: `workspaceLifecycle: 1`, `repoRoot` (the canonical absolute main
|
|
11
|
+
checkout) and `targetBranch`. A unit already records `workspace`, `branch` and
|
|
12
|
+
`base`; with `workspaceLifecycle` it also records `lifecycle`:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{ "version": 1,
|
|
16
|
+
"workspace": { "kind": "worktree|clone", "state": "preparing|ready",
|
|
17
|
+
"baseSha": "<exact SHA>", "identity": "<returned by the helper>" },
|
|
18
|
+
"resources": [ { "role": "review|scratch|tools", "kind": "directory|clone|worktree",
|
|
19
|
+
"path": "<absolute>", "disposable": true,
|
|
20
|
+
"state": "preparing|ready", "identity": "<returned by the helper>" } ],
|
|
21
|
+
"cleanup": { "state": "pending|applying|complete|retained",
|
|
22
|
+
"headSha": "<the unit's headSha>", "reason": "<retained only>" } }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
| Tree | Path |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Workspace | `<run>/units/<unit>` |
|
|
28
|
+
| Review clone | `<run>/reviews/<unit>/clone`, the resource with `role: review` |
|
|
29
|
+
| Scratch, tool cache | `<run>/resources/<unit>/<role>` |
|
|
30
|
+
|
|
31
|
+
A resource is a path strictly inside one of those three roots (the workspace's
|
|
32
|
+
children, `<run>/resources/<unit>/`, `<run>/reviews/<unit>/`), and it is planned
|
|
33
|
+
before it exists. Nothing else in the run is an owned tree. Record every path in
|
|
34
|
+
the canonical form the helper resolves (a `/var` path and its `/private/var`
|
|
35
|
+
realpath are different strings): `repoRoot`, the run directory, the workspace and
|
|
36
|
+
every resource.
|
|
37
|
+
|
|
38
|
+
`identity` is the helper's own observation (real path, device, inode, Git
|
|
39
|
+
common dir, head): persist what it returns, never compose or edit it. You are
|
|
40
|
+
the plan's only writer ([task-plan.md](task-plan.md)); the helper returns
|
|
41
|
+
observations and the next lifecycle value, and writes no plan.
|
|
42
|
+
Persist every lifecycle transition using the canonical
|
|
43
|
+
[checkpoint mechanism](task-plan.md#checkpoints): the optional bound harness
|
|
44
|
+
interface when enabled, otherwise the revisioned file transition. The optional
|
|
45
|
+
interface's absence never blocks workspace preparation or cleanup.
|
|
46
|
+
|
|
47
|
+
Prepare materializes each resource according to its recorded kind: a review clone
|
|
48
|
+
must be a real independent Git tree before it becomes ready. Its empty
|
|
49
|
+
`<run>/reviews/<unit>` parent is a run container, not a second clone.
|
|
50
|
+
|
|
51
|
+
## Prepare: at admission, once
|
|
52
|
+
|
|
53
|
+
Prepare a unit's workspace when its **first worker is admitted**, not for every
|
|
54
|
+
planned unit up front and not at the approval. Disk then tracks live workers,
|
|
55
|
+
not plan size. Prepare the review resource when its reviewer is admitted.
|
|
56
|
+
Do not admit another worker while that owner's cleanup is `applying`; the
|
|
57
|
+
`recover-workspace` action resolves the existing operation and its postconditions first.
|
|
58
|
+
|
|
59
|
+
1. Before `--apply`, record through the checkpoint mechanism: the unit's workspace, branch,
|
|
60
|
+
base SHA, `lifecycle.workspace` intent (`state: preparing`, chosen `kind`)
|
|
61
|
+
and each resource you will use (`state: preparing`). The helper refuses a
|
|
62
|
+
workspace or resource path the plan does not own, and creates only the
|
|
63
|
+
resources the plan lists.
|
|
64
|
+
2. Run it. Without `--apply` it creates nothing and names the action
|
|
65
|
+
(`create` or `verify`):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
node <skill-base-dir>/scripts/cleanup-runs.mjs prepare --run <run> --unit <unit> \
|
|
69
|
+
--revision <saved planRevision> [--kind worktree|clone] --apply --json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Exit 0 is a create or a verification; exit 2 is a refusal with a code
|
|
73
|
+
(`workspace-layout`, `revision-mismatch`, `unowned-tree`, `locked`, ...): fix
|
|
74
|
+
the plan or the call, never the tree.
|
|
75
|
+
3. Persist the returned `nextLifecycle` on the unit **before** spawning the
|
|
76
|
+
worker, and give the worker that workspace path and only the resources it
|
|
77
|
+
needs. Resources are recorded before they are used.
|
|
78
|
+
4. Reuse it. Retries, fix rounds, and every review round run in the same
|
|
79
|
+
workspace and the same review clone; a later prepare verifies identity,
|
|
80
|
+
branch, and base instead of recreating. Never reset, replace, or allocate a
|
|
81
|
+
second tree for one attempt, and plan a private tool cache or scratch copy
|
|
82
|
+
only when the work needs one.
|
|
83
|
+
|
|
84
|
+
`kind`: a linked `worktree` where a plain checkout is enough; an independent
|
|
85
|
+
`clone` when the first Git-mutating worker runs in a sandbox that cannot write a
|
|
86
|
+
linked worktree's `.git` file. Prepare falls back to a clone only when it
|
|
87
|
+
created nothing it can identify. Once the clone exists, do not pass the
|
|
88
|
+
harness's `git_clone_workspace` again, and never turn the sandbox off to work
|
|
89
|
+
around it: the prepared tree already isolates the unit.
|
|
90
|
+
|
|
91
|
+
## Cleanup: after delivery, before finish
|
|
92
|
+
|
|
93
|
+
Clean a unit when it is `status: succeeded` with `delivery: merged`, and in
|
|
94
|
+
`supervised` mode once the human has merged the handed-back PR. Cleanup runs
|
|
95
|
+
alongside every independent unit and in every scheduler mode (`full`, `narrow`,
|
|
96
|
+
`off`), and settles before the run's handoff.
|
|
97
|
+
|
|
98
|
+
1. Record the intent first, so a crash cannot hide it: `lifecycle.cleanup`
|
|
99
|
+
`{state: "applying", headSha: <the unit's headSha>}` through the checkpoint mechanism.
|
|
100
|
+
2. Run:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
node <skill-base-dir>/scripts/cleanup-runs.mjs cleanup --run <run> --unit <unit> \
|
|
104
|
+
--revision <saved planRevision> --apply --json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
3. Persist the returned `nextLifecycle`: `complete` with its receipt, or
|
|
108
|
+
`retained` with the current head and the helper's reason. Exit 0 is a removal
|
|
109
|
+
or an `already-complete` postcondition, 1 is a retention (read `action` and
|
|
110
|
+
`reason`; do not retry the same removal to make it pass), and 2 is a refusal
|
|
111
|
+
or a bad call that must be fixed. A refusal is never recorded as complete.
|
|
112
|
+
|
|
113
|
+
The helper removes exactly the recorded workspace and its declared disposable
|
|
114
|
+
resources, and only after it proved: the unit is completed and its delivery
|
|
115
|
+
merged; its owner has no recorded running worker and no process uses any removal
|
|
116
|
+
path (unrelated workers continue); the tree matches its recorded
|
|
117
|
+
identity, kind, branch, and head; no process uses it; no stash, interrupted Git
|
|
118
|
+
operation, nested repository, uncommitted or untracked path, undeclared ignored
|
|
119
|
+
path, local ref, or reflog commit is unpublished; and the head is on a freshly
|
|
120
|
+
fetched target. A squash merge instead needs the provider's PR identity (repo,
|
|
121
|
+
number, head repo/branch/SHA, destination) with a merge commit on that fresh
|
|
122
|
+
target.
|
|
123
|
+
|
|
124
|
+
It removes nothing else: no ignored-file stripping, no pruning, and no
|
|
125
|
+
`--merged <path>` on its own, because a path proves no owner. Every unknown
|
|
126
|
+
answer retains everything, whole. Keep, never clean: a blocked, cancelled,
|
|
127
|
+
pending, or supervised merge-ready unit's environment, whatever its timestamp; a
|
|
128
|
+
tree a worker may still use; a tree whose ownership or delivery cannot be proved.
|
|
129
|
+
No cleanup runs by age, idle time, or a name pattern, and a legacy
|
|
130
|
+
`*-workspaces` directory is never adopted or deleted.
|
|
131
|
+
|
|
132
|
+
## Evidence and handoff
|
|
133
|
+
|
|
134
|
+
Record required evidence while the unit runs as
|
|
135
|
+
`lifecycle.evidence: [{path, required: true}]`, each path outside every
|
|
136
|
+
disposable path. The helper retains an environment whose required evidence still
|
|
137
|
+
lives inside it. Copy no logs, transcripts, or screenshots just to free a tree.
|
|
138
|
+
|
|
139
|
+
`retained` is an honest handback: report the environment as **not cleaned** with
|
|
140
|
+
the helper's reason, and name it in the run record. `pending` and `applying`
|
|
141
|
+
cleanup block `finish`; settle each delivered unit's cleanup first
|
|
142
|
+
([done.md](done.md#clean-before-handoff)).
|
|
143
|
+
|
|
144
|
+
## Resume, recover, inventory
|
|
145
|
+
|
|
146
|
+
On startup, before scheduling, read only:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
node <skill-base-dir>/scripts/cleanup-runs.mjs recover --repo <repo-root> --json
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
It lists unfinished recorded operations — a `preparing` workspace, an `applying`
|
|
153
|
+
cleanup, a lock, an orphaned worktree — in every run regardless of age. It
|
|
154
|
+
activates no workflow and cleans nothing by itself: continue the plan, then
|
|
155
|
+
prepare or clean what it names and persist the result.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
node <skill-base-dir>/scripts/cleanup-runs.mjs inventory --repo <repo-root> [--root <explicit root>] --json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
is read-only and bounded: it lists the managed root (`<repo>/.resolve-issues/rush`)
|
|
162
|
+
with each tree's owning unit, and marks unowned entries. Use it to answer what is
|
|
163
|
+
on disk, never as authority to delete. Legacy `*-workspaces` directories and
|
|
164
|
+
unrecorded trees appear there as inventory only.
|