@1aboveio/skills 1.0.9 → 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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## Feature delivery
|
|
2
|
+
|
|
3
|
+
Prioritize the requested business outcome. Supporting engineering work must
|
|
4
|
+
directly enable it, satisfy a binding requirement, or fix a concrete defect.
|
|
5
|
+
Do not expand feature work into hardening, frameworks, coverage campaigns,
|
|
6
|
+
or new gates without approval. Preserve required safety and correctness.
|
|
7
|
+
Reuse sufficient proof and stop when the outcome and agreed checks pass.
|
|
8
|
+
Report unrelated debt without implementing it.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# What initialization includes
|
|
2
|
+
|
|
3
|
+
The default is durable project guidance, not an orchestration or infrastructure setup.
|
|
4
|
+
This review covers every active first-party skill in the Engineering package and
|
|
5
|
+
the related delivery, CI, and merge-queue convention owners. Archived skills are
|
|
6
|
+
not initialization sources; pinned external skills keep their upstream ownership.
|
|
7
|
+
|
|
8
|
+
| Skill | Include in guidance | Keep as a separate action |
|
|
9
|
+
| --- | --- | --- |
|
|
10
|
+
| engineering (formerly contributing) | Feature priorities, guidance lookup, tracker routing | Tracker refresh or project-policy changes |
|
|
11
|
+
| resolve-issues | Agreed outcome, bounded supporting work, explicit stopping point | Issue planning, workers, PRs, scheduling |
|
|
12
|
+
| rush-issues | Same delivery principles as resolve-issues | Shortcut workflow invocation |
|
|
13
|
+
| ensure-coverage | Smallest sufficient proof, stable acceptance, required checks preserved | Ledger adoption, broad audits, new gates |
|
|
14
|
+
| test-quality | Canonical seven-principle `Testing conventions` section, added only when missing | Refreshing existing testing policy or suite cleanup |
|
|
15
|
+
| e2e-test | Focus on affected journeys; distinguish real browser/backend proof | Harness, manifest, whole-app sweep |
|
|
16
|
+
| better-review | Concrete blockers, optional improvements do not enlarge acceptance | Review passes, JSON records, re-review workflow |
|
|
17
|
+
| golden-path | People choose release-blocking journeys | Path selection, contract, workflow and gate generation |
|
|
18
|
+
| resolve-release | Respect existing release ownership and permissions | Flow selection, tags, deployment, promotion |
|
|
19
|
+
| rush-release | Same release boundaries as resolve-release | Shortcut release invocation |
|
|
20
|
+
| engineering-runtime | No user convention; support-only | Runtime installation or configuration |
|
|
21
|
+
| harness-runtime | No user convention; support-only | Harness setup or configuration |
|
|
22
|
+
| github-flow | Follow existing delivery policy; do not infer authorization | Declaring or changing Delivery and CI sections |
|
|
23
|
+
| github-actions | Preserve existing required checks | Workflow generation, runner/caching/security policy |
|
|
24
|
+
| mergify | Honor an existing queue policy | Queue installation, configuration, or enqueueing |
|
|
25
|
+
| data-catalog | No general default; warehouse-specific rules need explicit setup | Data catalog conventions, catalog generation and CI |
|
|
26
|
+
|
|
27
|
+
Do not invoke the separate actions as a side effect of `init`. In particular, do
|
|
28
|
+
not call other skills' convention writers: they own their sections and may need
|
|
29
|
+
additional decisions. Init reads `test-quality`'s canonical template directly;
|
|
30
|
+
the testing owner and `conventions:testing` section identity remain unchanged.
|
|
31
|
+
Existing project sections, including old testing and tracker blocks, stay unchanged.
|
|
32
|
+
Delivery, CI, and Data Catalog conventions require separate explicit setup with
|
|
33
|
+
their owning skills. Setup may point to these capabilities without requiring them.
|
|
34
|
+
|
|
35
|
+
Stack-specific tools, commands, cloud projects, release branches, required gates,
|
|
36
|
+
and golden paths are project facts, not defaults to manufacture. Read established
|
|
37
|
+
guidance; ask for missing decisions only when a requested action needs them.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// Explicit project setup. Preview by default; preserve existing policy on every run.
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { spawnSync } from 'node:child_process'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
|
|
7
|
+
const reference = name => fs.readFileSync(fileURLToPath(new URL(`../references/${name}.md`, import.meta.url)), 'utf8').trim()
|
|
8
|
+
const usage = 'node init.mjs [--repo-root <dir>] [--github-repo <owner/name>] [--linear-project <name>]... [--write]'
|
|
9
|
+
|
|
10
|
+
function parseArgs(argv) {
|
|
11
|
+
const options = { write: false, linearProjects: [] }
|
|
12
|
+
for (let i = 0; i < argv.length; i++) {
|
|
13
|
+
const arg = argv[i]
|
|
14
|
+
if (arg === '--write') options.write = true
|
|
15
|
+
else if (arg === '--help') options.help = true
|
|
16
|
+
else if (['--repo-root', '--github-repo', '--linear-project'].includes(arg)) {
|
|
17
|
+
const value = argv[++i]
|
|
18
|
+
if (!value || value.startsWith('--') || /[\r\n]/.test(value)) throw new Error(`missing or invalid value for ${arg}`)
|
|
19
|
+
if (arg === '--repo-root') options.repoRoot = path.resolve(value)
|
|
20
|
+
else if (arg === '--github-repo') {
|
|
21
|
+
if (!/^[\w.-]+\/[\w.-]+$/.test(value)) throw new Error('invalid GitHub repository; use owner/name')
|
|
22
|
+
options.githubRepo = value
|
|
23
|
+
} else options.linearProjects.push(value)
|
|
24
|
+
} else throw new Error(`unknown argument ${arg}`)
|
|
25
|
+
}
|
|
26
|
+
return options
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function gitOutput(root, args) {
|
|
30
|
+
const result = spawnSync('git', ['-C', root, ...args], { encoding: 'utf8' })
|
|
31
|
+
return result.status === 0 ? result.stdout.trim() : null
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function githubRepo(root) {
|
|
35
|
+
const remote = gitOutput(root, ['remote', 'get-url', 'origin'])
|
|
36
|
+
return remote?.match(/^(?:git@github\.com:|https:\/\/github\.com\/|ssh:\/\/git@github\.com\/)([\w.-]+\/[\w.-]+?)(?:\.git)?\/?$/)?.[1] ?? null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function inspectTarget(root, name) {
|
|
40
|
+
const file = path.join(root, name)
|
|
41
|
+
const stat = fs.lstatSync(file, { throwIfNoEntry: false })
|
|
42
|
+
if (!stat) return { name, file, target: file, current: null }
|
|
43
|
+
const target = fs.realpathSync(file)
|
|
44
|
+
const relative = path.relative(root, target)
|
|
45
|
+
if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
|
|
46
|
+
throw new Error(`${name} resolves outside the selected project`)
|
|
47
|
+
}
|
|
48
|
+
if (!fs.statSync(target).isFile()) throw new Error(`${name} is not a regular file`)
|
|
49
|
+
return { name, file, target, current: new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(fs.readFileSync(target)) }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function append(current, body) {
|
|
53
|
+
const separator = current.endsWith('\n\n') ? '' : current.endsWith('\n') ? '\n' : '\n\n'
|
|
54
|
+
return `${current}${separator}${body.trim()}\n`
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function preserveOrAdd(current, title, id, body) {
|
|
58
|
+
const start = `<!-- conventions:${id}:start -->`
|
|
59
|
+
const end = `<!-- conventions:${id}:end -->`
|
|
60
|
+
const starts = current.split(start).length - 1
|
|
61
|
+
const ends = current.split(end).length - 1
|
|
62
|
+
if (starts !== ends || starts > 1 || (starts && current.indexOf(start) > current.indexOf(end))) {
|
|
63
|
+
throw new Error(`malformed ${title} section markers; preserve and repair existing guidance first`)
|
|
64
|
+
}
|
|
65
|
+
if (starts || current.split(/\r?\n/).some(line => line.trim() === `## ${title}`)) return current
|
|
66
|
+
return append(current, `${start}\n${body}\n${end}`)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function linkFrom(from, to) {
|
|
70
|
+
return path.relative(path.dirname(from.target), to.file).split(path.sep).join('/')
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function hasLoader(current, from, to) {
|
|
74
|
+
const links = /\[[^\]\r\n]*\]\(\s*(?:<([^>]+)>|([^\s)]+))(?:\s+["'][^"'\r\n]*["'])?\s*\)/g
|
|
75
|
+
for (const match of current.matchAll(links)) {
|
|
76
|
+
const href = (match[1] ?? match[2]).split(/[?#]/)[0]
|
|
77
|
+
if (!href || /^[a-z][a-z\d+.-]*:|^\/\//i.test(href)) continue
|
|
78
|
+
let target
|
|
79
|
+
try {
|
|
80
|
+
target = path.resolve(path.dirname(from.target), decodeURIComponent(href))
|
|
81
|
+
} catch {
|
|
82
|
+
continue
|
|
83
|
+
}
|
|
84
|
+
if (fs.existsSync(target)) target = fs.realpathSync(target)
|
|
85
|
+
if (target === to.target) return true
|
|
86
|
+
}
|
|
87
|
+
return false
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function trackerBody(repo, projects) {
|
|
91
|
+
if (repo) {
|
|
92
|
+
return reference('tracker-conventions')
|
|
93
|
+
.replaceAll('{{githubRepo}}', repo)
|
|
94
|
+
.replaceAll('{{linearProjects}}', projects.length ? ` (projects: ${projects.join(', ')})` : '')
|
|
95
|
+
}
|
|
96
|
+
return [
|
|
97
|
+
'## Issue tracking',
|
|
98
|
+
'',
|
|
99
|
+
'Follow existing project tracker decisions; an explicit user destination wins.',
|
|
100
|
+
'Use GitHub for engineering implementation and Linear for product requirements',
|
|
101
|
+
'and delivery summaries where the project uses those trackers. Before creating',
|
|
102
|
+
'an issue, resolve the actual repository from project guidance or the source',
|
|
103
|
+
'requirement; ask if it is unknown. Do not invent a repository or create trackers.',
|
|
104
|
+
'Search for duplicates and link implementation work back to its requirement.',
|
|
105
|
+
'Do not create implementation children in Linear.',
|
|
106
|
+
...(projects.length ? ['', `Known Linear projects: ${projects.join(', ')}.`] : []),
|
|
107
|
+
].join('\n')
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function planInitialization(root, options) {
|
|
111
|
+
const [agents, contributing] = ['AGENTS.md', 'CONTRIBUTING.md']
|
|
112
|
+
.map(name => inspectTarget(root, name))
|
|
113
|
+
if (agents.target === contributing.target) {
|
|
114
|
+
throw new Error('agent instructions and CONTRIBUTING.md must use distinct files')
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
let agentText = preserveOrAdd(agents.current ?? '# Agent instructions\n', 'Feature delivery',
|
|
118
|
+
'feature-delivery', reference('feature-delivery'))
|
|
119
|
+
if (!hasLoader(agentText, agents, contributing)) {
|
|
120
|
+
agentText = append(agentText, `## Contributing\n\nFollow [CONTRIBUTING.md](${linkFrom(agents, contributing)}) for this project's engineering conventions and existing delivery requirements.`)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let contributingText = preserveOrAdd(contributing.current ?? '# Contributing\n', 'Engineering conventions',
|
|
124
|
+
'engineering', reference('engineering-conventions'))
|
|
125
|
+
const testing = fs.readFileSync(new URL('../../test-quality/references/testing-conventions.md', import.meta.url), 'utf8').trim()
|
|
126
|
+
contributingText = preserveOrAdd(contributingText, 'Testing conventions', 'testing', testing)
|
|
127
|
+
contributingText = preserveOrAdd(contributingText, 'Issue tracking', 'tracker',
|
|
128
|
+
trackerBody(options.githubRepo ?? githubRepo(root), options.linearProjects))
|
|
129
|
+
|
|
130
|
+
return [
|
|
131
|
+
{ ...agents, next: agentText },
|
|
132
|
+
{ ...contributing, next: contributingText },
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function main(argv) {
|
|
137
|
+
const options = parseArgs(argv)
|
|
138
|
+
if (options.help) {
|
|
139
|
+
console.log(usage)
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
const selected = options.repoRoot ?? gitOutput(process.cwd(), ['rev-parse', '--show-toplevel']) ?? process.cwd()
|
|
143
|
+
const root = fs.realpathSync(selected)
|
|
144
|
+
if (!fs.statSync(root).isDirectory()) throw new Error('project root is not a directory')
|
|
145
|
+
const plan = planInitialization(root, options)
|
|
146
|
+
console.log(`engineering init: ${options.write ? 'write' : 'preview only'} (${root})`)
|
|
147
|
+
for (const entry of plan) {
|
|
148
|
+
const action = entry.current === entry.next ? 'unchanged' : entry.current === null ? 'create' : 'update'
|
|
149
|
+
if (options.write && action !== 'unchanged') fs.writeFileSync(entry.target, entry.next)
|
|
150
|
+
console.log(` ${entry.name}: ${!options.write && action !== 'unchanged' ? 'would ' : ''}${action}`)
|
|
151
|
+
}
|
|
152
|
+
console.log('Existing sections are preserved; initialization does not refresh project policy or authorize delivery actions.')
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
main(process.argv.slice(2))
|
|
157
|
+
} catch (error) {
|
|
158
|
+
console.error(`engineering init: ${error.message}`)
|
|
159
|
+
process.exitCode = 2
|
|
160
|
+
}
|
|
@@ -77,7 +77,7 @@ function main(argv, { log = console.log } = {}) {
|
|
|
77
77
|
return 0
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
const section = { id: ID, owner: '
|
|
80
|
+
const section = { id: ID, owner: 'engineering', title: 'Issue tracking', body: renderBody(githubRepo, linearProjects) }
|
|
81
81
|
return runCli(rest, section, { log })
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -3,7 +3,7 @@ name: engineering-runtime
|
|
|
3
3
|
description: Internal support package for shared Engineering Workflow executable behavior. Never select or invoke this package as a user capability.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
user-invocable: false
|
|
6
|
-
release-version: 0.
|
|
6
|
+
release-version: 0.45.0
|
|
7
7
|
---
|
|
8
8
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
9
|
# Engineering Runtime
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"golden-path",
|
|
12
12
|
"test-quality",
|
|
13
13
|
"better-review",
|
|
14
|
-
"
|
|
14
|
+
"engineering",
|
|
15
15
|
"engineering-runtime"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": [
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"repository": "1aboveio/ai",
|
|
370
370
|
"revision": "main"
|
|
371
371
|
},
|
|
372
|
-
"contentDigest": "
|
|
372
|
+
"contentDigest": "8ab89f526fd30be9a81c8dc602d797e7aa8d2f09c63da0b56d8d214966e7e1fc",
|
|
373
373
|
"digestExcludes": []
|
|
374
374
|
},
|
|
375
375
|
{
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"repository": "1aboveio/ai",
|
|
383
383
|
"revision": "main"
|
|
384
384
|
},
|
|
385
|
-
"contentDigest": "
|
|
385
|
+
"contentDigest": "386ab76e0a90f031da690ca27ee5066684d895290ae0c97faabf6aaad94cd495",
|
|
386
386
|
"digestExcludes": []
|
|
387
387
|
},
|
|
388
388
|
{
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
"repository": "1aboveio/ai",
|
|
396
396
|
"revision": "main"
|
|
397
397
|
},
|
|
398
|
-
"contentDigest": "
|
|
398
|
+
"contentDigest": "0399fc78af9e7823ace55e04aa867b30b12c738f2a47e28395184512525861bf",
|
|
399
399
|
"digestExcludes": []
|
|
400
400
|
},
|
|
401
401
|
{
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
"repository": "1aboveio/ai",
|
|
409
409
|
"revision": "main"
|
|
410
410
|
},
|
|
411
|
-
"contentDigest": "
|
|
411
|
+
"contentDigest": "2bc51a5c6ed89007075d51f174c7b76d0a743b61f0d299c2067487679c86dd3f",
|
|
412
412
|
"digestExcludes": []
|
|
413
413
|
},
|
|
414
414
|
{
|
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
"repository": "1aboveio/ai",
|
|
422
422
|
"revision": "main"
|
|
423
423
|
},
|
|
424
|
-
"contentDigest": "
|
|
424
|
+
"contentDigest": "c3cd951d823c6ce4f2b9b229892e450ad285e27cda157c5eead0d8ddc3d550f5",
|
|
425
425
|
"digestExcludes": []
|
|
426
426
|
},
|
|
427
427
|
{
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
"repository": "1aboveio/ai",
|
|
435
435
|
"revision": "main"
|
|
436
436
|
},
|
|
437
|
-
"contentDigest": "
|
|
437
|
+
"contentDigest": "639a25b40d67942c5355abee9d791b02784bedc50fa1f5fb8b4d90125f0b95e7",
|
|
438
438
|
"digestExcludes": []
|
|
439
439
|
},
|
|
440
440
|
{
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
"repository": "1aboveio/ai",
|
|
448
448
|
"revision": "main"
|
|
449
449
|
},
|
|
450
|
-
"contentDigest": "
|
|
450
|
+
"contentDigest": "c595e281773af00b485dcb7d18e762f487b85761db42afa8287015581acdd8b5",
|
|
451
451
|
"digestExcludes": []
|
|
452
452
|
},
|
|
453
453
|
{
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
"repository": "1aboveio/ai",
|
|
461
461
|
"revision": "main"
|
|
462
462
|
},
|
|
463
|
-
"contentDigest": "
|
|
463
|
+
"contentDigest": "ec21e8eb116ccf6b3c1e798f4039fc2fa05558e63cae157e0bcb75ea81627d68",
|
|
464
464
|
"digestExcludes": []
|
|
465
465
|
},
|
|
466
466
|
{
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"repository": "1aboveio/ai",
|
|
474
474
|
"revision": "main"
|
|
475
475
|
},
|
|
476
|
-
"contentDigest": "
|
|
476
|
+
"contentDigest": "d973f6bb977f4cba06e26afa42a54bbaa90d29001086c87a83d84f335df590d4",
|
|
477
477
|
"digestExcludes": []
|
|
478
478
|
},
|
|
479
479
|
{
|
|
@@ -486,20 +486,20 @@
|
|
|
486
486
|
"repository": "1aboveio/ai",
|
|
487
487
|
"revision": "main"
|
|
488
488
|
},
|
|
489
|
-
"contentDigest": "
|
|
489
|
+
"contentDigest": "43d2be290e65e536f0b9ff21087cce81c337158948edbdf901c609d3e73b9b0b",
|
|
490
490
|
"digestExcludes": []
|
|
491
491
|
},
|
|
492
492
|
{
|
|
493
|
-
"installName": "
|
|
493
|
+
"installName": "engineering",
|
|
494
494
|
"ownership": "owned",
|
|
495
|
-
"sourcePath": "skills/engineering/
|
|
495
|
+
"sourcePath": "skills/engineering/engineering",
|
|
496
496
|
"expectedSource": {
|
|
497
497
|
"id": "first-party",
|
|
498
498
|
"type": "first-party",
|
|
499
499
|
"repository": "1aboveio/ai",
|
|
500
500
|
"revision": "main"
|
|
501
501
|
},
|
|
502
|
-
"contentDigest": "
|
|
502
|
+
"contentDigest": "73163c04711d6901162bd3cdb3a847db2845e8e51dbd53169ad13e7d2817f45c",
|
|
503
503
|
"digestExcludes": []
|
|
504
504
|
},
|
|
505
505
|
{
|
|
@@ -512,13 +512,13 @@
|
|
|
512
512
|
"repository": "1aboveio/ai",
|
|
513
513
|
"revision": "main"
|
|
514
514
|
},
|
|
515
|
-
"contentDigest": "
|
|
515
|
+
"contentDigest": "9086b011f69d48e264c00241c6c1864e04678f791f575625cff2e788a2b58163",
|
|
516
516
|
"digestExcludes": [
|
|
517
517
|
"coherence/workflow.json"
|
|
518
518
|
]
|
|
519
519
|
}
|
|
520
520
|
],
|
|
521
|
-
"releaseIdentity": "
|
|
521
|
+
"releaseIdentity": "986e36012356e16fd54d77f0844860cd5ed9c4cac6f18ef1d3d540a3697dcfdf",
|
|
522
522
|
"lifecycleAuthority": "native-skills-cli",
|
|
523
523
|
"repairRecipe": {
|
|
524
524
|
"id": "engineering-workflow-dependency-first",
|
|
@@ -589,17 +589,17 @@
|
|
|
589
589
|
"golden-path",
|
|
590
590
|
"test-quality",
|
|
591
591
|
"better-review",
|
|
592
|
-
"
|
|
592
|
+
"engineering",
|
|
593
593
|
"engineering-runtime"
|
|
594
594
|
],
|
|
595
595
|
"commands": [
|
|
596
596
|
{
|
|
597
597
|
"transport": "https",
|
|
598
|
-
"command": "npx skills@1.5.22 add 1aboveio/ai --global --agent universal claude-code --skill harness-runtime e2e-test ensure-coverage rush-issues resolve-issues rush-release resolve-release golden-path test-quality better-review
|
|
598
|
+
"command": "npx skills@1.5.22 add 1aboveio/ai --global --agent universal claude-code --skill harness-runtime e2e-test ensure-coverage rush-issues resolve-issues rush-release resolve-release golden-path test-quality better-review engineering engineering-runtime && npm --prefix \"$(realpath \"$HOME/.agents/skills/engineering-runtime/scripts\")\" ci --ignore-scripts"
|
|
599
599
|
},
|
|
600
600
|
{
|
|
601
601
|
"transport": "ssh",
|
|
602
|
-
"command": "npx skills@1.5.22 add git@github.com:1aboveio/ai.git --global --agent universal claude-code --skill harness-runtime e2e-test ensure-coverage rush-issues resolve-issues rush-release resolve-release golden-path test-quality better-review
|
|
602
|
+
"command": "npx skills@1.5.22 add git@github.com:1aboveio/ai.git --global --agent universal claude-code --skill harness-runtime e2e-test ensure-coverage rush-issues resolve-issues rush-release resolve-release golden-path test-quality better-review engineering engineering-runtime && npm --prefix \"$(realpath \"$HOME/.agents/skills/engineering-runtime/scripts\")\" ci --ignore-scripts"
|
|
603
603
|
}
|
|
604
604
|
],
|
|
605
605
|
"onFailure": {
|
|
@@ -2,128 +2,41 @@
|
|
|
2
2
|
name: ensure-coverage
|
|
3
3
|
description: "Define or audit behavior-first test criteria — ACs, required test levels, mock/integration/E2E policy — across three axes: breadth (Coverage Ledger), depth (over-mocking), presentation (perceivability of browser surfaces). NOT judging whether a single test is any good (test-quality), authoring browser tests (e2e-test), reviewing a PR (better-review), or delivering issues (resolve-issues)."
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
-
release-version: 0.
|
|
5
|
+
release-version: 0.45.0
|
|
6
6
|
---
|
|
7
7
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
8
8
|
# Ensure Coverage
|
|
9
9
|
|
|
10
|
-
Define
|
|
10
|
+
Define what must be proven for the agreed business outcome and material risks. This skill scopes criteria and grades evidence; it does not implement tests, wire gates, or issue a merge verdict.
|
|
11
11
|
|
|
12
|
-
- **Create mode
|
|
13
|
-
- **Audit mode
|
|
12
|
+
- **Create mode:** agree observable criteria and suitable proof before implementation. Record them in the issue or conversation; create a criteria document only when requested or required by the repository.
|
|
13
|
+
- **Audit mode:** assess evidence against the agreed scope. A feature audit stays scoped to the feature; a whole-repo census is appropriate only for an explicitly requested broad audit. Use the [audit guidance](references/process/audit-mode.md) and [optional output template](references/process/output-template.md).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Read the relevant source and governing project guidance. When product behavior or authorization is unclear and blocks the task, ask the owner; do not invent semantics or add planning handoffs for ordinary implementation choices. Keep agreed criteria stable during implementation and proof. A newly discovered concrete defect may need a fix; speculative robustness ideas and test preferences are follow-ups, not new acceptance conditions. Escalate a proposed scope change for agreement.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Scope and proof
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
- Choose the smallest sufficient proof for the outcome and material risks; reuse existing tests and required CI results when they prove the behavior. Do not automatically require multiple test layers, a ledger, a criteria document, a presentation campaign, or reconciliation of every ADR.
|
|
20
|
+
- Existing required repository checks and adopted coverage floors remain binding unless an approved change alters them. Authentication, money, tenancy, and data-integrity protections remain binding. Read applicable ADRs and project policy for the touched work, not every ADR in the repository.
|
|
21
|
+
- Consider breadth, depth, and presentation where relevant: what behavior is in scope, whether evidence actually exercises it, and whether a user can perceive and use a changed interface. Do not turn every axis or hypothetical state into a separate blocking obligation.
|
|
22
|
+
- The [surface baseline](references/breadth/surface-baseline.md) is guidance for selecting proof, not a universal new floor. The bundled ledger and presentation tools implement stricter mechanical rules; use them only when requested or already required, and report their actual results without claiming their defaults are new policy.
|
|
23
|
+
- Avoid tests that bypass the behavior they claim to prove, especially for security or durable state. Select boundaries and test levels for the risk, following applicable repo rules ([mock policy](references/depth/mock-policy.md), [strategy](references/process/test-strategy.md)). A relevant existing test can suffice; characterization and fails-first runs are useful when warranted, not automatic requirements ([characterization](references/depth/characterization.md)).
|
|
24
|
+
- Do not weaken or disable tests merely to get green. Report a required check that cannot run or fails; do not claim it passed.
|
|
25
|
+
- Do not recommend or wire new CI gates unless asked. Existing required checks still apply ([CI contract](references/enforcement/ci-contract.md)). Integrated release campaigns run at their assigned gate, not automatically for each feature.
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
- Walk what a user does first — open the page, fill the form, submit, hit the error path — and name the test that proves each step.
|
|
23
|
-
- Name the concrete failure ("username dropped, submit returns 400"), not "coverage is partial."
|
|
24
|
-
- End with an explicit ship / no-ship call and the counts that drive it. Never round up to `Covered` to be agreeable.
|
|
27
|
+
## Grade honestly
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
Inspect the relevant test and its assertions before claiming it proves a behavior. A passing execution proves it ran, not that it covered every claim. Use [grading](references/depth/grading.md): `Covered`, `Partial`, `Missing`, `Wrong Level`, `Over-mocked`, `Unverified`, `Excluded`, or `BLOCKED`. Describe what the evidence proves and what remains unverified; never promote a hypothetical state to a blocker merely because it lacks a test. Missing agreed proof, a concrete material defect, or a failed required check can block; distinguish those from follow-ups. Report unavailable evidence or unresolved decisions without a false success.
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
## Workflow and output
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
1. Identify the agreed outcome, touched behavior, material risks, required repo checks, and applicable guidance. Resolve only decisions needed to proceed.
|
|
34
|
+
2. Agree observable acceptance criteria and sufficient proof before implementation. Note existing proof and select focused additions only where needed.
|
|
35
|
+
3. For an audit, inspect relevant tests and results, grade the agreed scope, and report concrete gaps, blockers, and non-blocking follow-ups. Do not expand criteria after the fact. An explicitly requested broad audit may use [surface discovery](references/breadth/surface-discovery.md) and the [coverage ledger](references/breadth/coverage-ledger.md); state any limits on its completeness.
|
|
36
|
+
4. Record what was verified, what was not, and why. Use the repository's existing format or a concise response; no new document is required by default.
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
**Every surface owes a floor the moment it exists.** A requirement doc is not a precondition. The floor keys off the surface's kind and class, computed mechanically; humans may raise it or exclude through a gated path, never lower it. A reachable mutation route can never be excluded. Full table, taxonomy keys, exclusion gate: [surface-baseline](references/breadth/surface-baseline.md).
|
|
37
|
-
|
|
38
|
-
| kind | class | owes | the test must show |
|
|
39
|
-
|---|---|---|---|
|
|
40
|
-
| route | read / detail | browser-journey | real rendered data, no first-party mock |
|
|
41
|
-
| route | mutation | browser-journey | fill the real form → backend accepts → durable state changes |
|
|
42
|
-
| route | +sensitive | + api | + auth / tenant isolation |
|
|
43
|
-
| api | read | api | status, shape, auth |
|
|
44
|
-
| api | mutation | api + integration | durable state changed |
|
|
45
|
-
| api | +sensitive | + auth | mandatory auth / tenant isolation |
|
|
46
|
-
| table / event / job | — | none (transitive) | dead-surface warning if nothing reaches it |
|
|
47
|
-
|
|
48
|
-
**Every browser route also owes the presentation floor**, proven only against a real rendered page at `[375, 1280]`: `render-health` (no page error, console error, error boundary, or first-party 5xx, held *through* interactions), `spatial` (no overflow or overlap), `perceivability` (visible, contrast-passing controls; absent things are absent), `reachability` (navigable from an entry point, focus visible, ≥44px targets), `temporal` (no first-party layout shift). A functional journey satisfies none of these; a DOM-only assertion is `Over-mocked`. A unit that cites a design source also owes `fidelity`: expected values read off the source, rendered side by side ([axis](references/presentation/axis.md)).
|
|
49
|
-
|
|
50
|
-
**Real internals, faked externals, nothing in between.** Substitute only at a boundary you do not own (third-party APIs, providers, clock, randomness). Never mock-only: DB transactions, idempotency, concurrency, events/outbox/retry, auth and tenant isolation, schema compatibility, orchestrator recovery. A journey that intercepts first-party traffic proves proxy wiring, not behavior. Over-mocked is worse than untested: fix it or delete it ([policy](references/depth/mock-policy.md)).
|
|
51
|
-
|
|
52
|
-
**Prove the test would fail.** Modifying existing behavior owes a characterization test that passes on the pre-change tree. A bug fix owes a test red before the fix. A feature test counts only if it would go red were the behavior removed ([characterization](references/depth/characterization.md)).
|
|
53
|
-
|
|
54
|
-
**No test is skipped, disabled, guarded into a no-op, or weakened to get green.** Missing state is seeded. Un-sandboxable flake goes to a quarantine lane that still runs and reports. Obsolete tests are deleted ([strategy](references/process/test-strategy.md)).
|
|
55
|
-
|
|
56
|
-
**Every accepted ADR with runtime behavior owns a criteria doc and a coverage file.** An ADR that changes behavior with no proof attached is the un-spec'd route's mirror image: stated intent nobody checked. An ADR with no runtime behavior says so in its text; a known gap names a tracked issue. Mechanized by the ledger's acceptance gate ([ledger](references/breadth/coverage-ledger.md)).
|
|
57
|
-
|
|
58
|
-
**Every AC maps to a named test at the required level.** Read the test to judge what it proves. A green run of it (exit 0) is the only execution proof needed: do not collect logs, screenshots, traces, or read-backs on top. Prior docs and PR summaries are leads, never proof.
|
|
59
|
-
|
|
60
|
-
**Assign each obligation to its gate.** Coding acceptance is proven per change, by the tests at the required level, and stops once they pass. Integrated release acceptance (a device or system campaign, all-ABI or signed builds, cross-feature journeys) runs once at the release or campaign gate the spec or repository assigns it. A change's verdict never depends on that campaign and never claims it passed; record it once, as pending, in its owning issue. Define the criteria before execution; never expand them or add evidence obligations while proving them.
|
|
61
|
-
|
|
62
|
-
**Gates are added by humans only.** Do not recommend, require, wire, or audit for CI gates unless the user explicitly asks. A repo with no coverage gates in CI is not a finding. The gate menu ([ci-contract](references/enforcement/ci-contract.md)) and `ci-audit.mjs` are opt-in tools for when the user asks for gates.
|
|
63
|
-
|
|
64
|
-
**CI has one supported gate: curated golden-path smoke.** The ledger, inventory freshness, presentation sweep, broad E2E suite, test lint, over-mock scan, design parity, and quarantine expiry are audit and review evidence, not CI gates. When the user asks about CI coverage, propose or audit only the real-app golden-path smoke contract ([ci-contract](references/enforcement/ci-contract.md)); `ci-audit.mjs` checks only that smoke wiring.
|
|
65
|
-
|
|
66
|
-
## Classifications
|
|
67
|
-
|
|
68
|
-
Full definitions: [grading](references/depth/grading.md). Whether a single test is any good is `test-quality`'s call; how its labels become these grades, and which smells are lint rules versus reviewer leads: [test-smells](references/depth/test-smells.md). A self-declared level is a claim to refute, never a pass.
|
|
69
|
-
|
|
70
|
-
- **`Covered`** — inspected test proves the behavior at the required level, acceptable mocks. The ledger shows it once the test is marked read (`verified: true`).
|
|
71
|
-
- **`Partial`** — some behavior tested; edge cases, failures, permissions, state, or evidence incomplete.
|
|
72
|
-
- **`Missing`** — no meaningful test maps to the obligation.
|
|
73
|
-
- **`Wrong Level`** — a test exists but is too shallow for the risk.
|
|
74
|
-
- **`Over-mocked`** — mocks bypass the behavior under test.
|
|
75
|
-
- **`Unverified`** — satisfied statically; nobody has marked the test read yet. A warning, not a block, unless the user turns on `unverifiedBlocks`. No evidence is required unless the user asks for it.
|
|
76
|
-
- **`Excluded`** — human-declared out of scope with category and reason, permitted by the gate, visible in the census.
|
|
77
|
-
- **`BLOCKED`** — source, code, tests, environment, or a product decision is unavailable.
|
|
78
|
-
|
|
79
|
-
## Workflow
|
|
80
|
-
|
|
81
|
-
1. **Understand the source.** Read the accepted ADRs (`docs/adr`, status accepted) that govern the touched surfaces; they are a requirement source, not background. Pick the output path; list observable behavior; mark assumptions and blockers.
|
|
82
|
-
2. **Model correctness.** Number the ACs, name the critical journeys, assign each a required level ([levels](references/process/test-strategy.md)).
|
|
83
|
-
3. **Plan coverage.** Test matrix, mock policy, E2E needs.
|
|
84
|
-
4. **Grade all three axes.** Enumerate every surface ([discovery protocol](references/breadth/surface-discovery.md); the adapter's output shape is the [inventory contract](references/breadth/inventory-contract.md)), grade each test by reading it, confirm each browser route's presentation floor. Reconcile every accepted ADR against the census: one with runtime behavior and no coverage file is a finding.
|
|
85
|
-
5. **Validate and decide.** Reject implementation-shaped, over-mocked, skipped, or incomplete coverage. Verdict at the top.
|
|
86
|
-
|
|
87
|
-
## Deliverable
|
|
88
|
-
|
|
89
|
-
Verdict first, then the evidence that justifies it ([full template](references/process/output-template.md); worked examples: [refund flow](references/examples/refund-flow.md), [ledger](references/examples/coverage-ledger.md)):
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
## Verdict: Ship / No-ship — <one-sentence reason with the driving counts>
|
|
93
|
-
## Source · Scope · Assumptions · Blockers · Design source (or `none`)
|
|
94
|
-
## Acceptance Criteria (numbered, observable, independently testable)
|
|
95
|
-
## Critical Journeys (actor, start state, trigger, end state, side effects)
|
|
96
|
-
## Test Matrix (scenario · AC · level · mock policy · setup · assertions · proving test)
|
|
97
|
-
## Surface Census (audit) — one row per surface, status, proving test or —
|
|
98
|
-
## Gaps and follow-ups (each with level, setup, assertions)
|
|
99
|
-
## Blocking Decisions (product choices that change the verdict)
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Common wrong answers
|
|
103
|
-
|
|
104
|
-
- Green CI is not coverage. Read the test.
|
|
105
|
-
- An API test under a page does not prove the page.
|
|
106
|
-
- "Every ADR covered" is not "every surface covered." And an accepted ADR with no coverage file is a gap, not a pass.
|
|
107
|
-
- A write form covered by a validator or schema test is not covered. Only a rendered-form submission proves the form emits what the backend accepts.
|
|
108
|
-
- Excluding a surface is not fixing it. Exclusion is gated and visible.
|
|
109
|
-
- "The script isn't in the audited repo" is not `BLOCKED`. The scripts live in this skill; run them against the repo.
|
|
110
|
-
- A top-3 gap list is not an audit. Emit the census.
|
|
111
|
-
- "Out of scope" excludes behaviors, never the axis the unit is about.
|
|
112
|
-
|
|
113
|
-
## Mechanization
|
|
114
|
-
|
|
115
|
-
The decidable parts of these obligations are decided by scripts, not prose. Every script lives under **this skill's directory** (the path you read this file from). Set `SKILL_DIR` to it and run `node "$SKILL_DIR/scripts/<name>.mjs"`. Never resolve a script against your CWD, and never locate one with `find` over `$HOME`; if `SKILL_DIR` is unknown, stop and ask. Usage and flags: [scripts/README.md](scripts/README.md).
|
|
116
|
-
|
|
117
|
-
| script | decides |
|
|
118
|
-
|---|---|
|
|
119
|
-
| `coverage-ledger.mjs` | breadth accounting: every surface's floor owned and proven; grades depth and presentation from `@covers`/`@level`; with `requirementGlobs`, every accepted ADR or PRD owns a coverage file with criteria or a tracked gap |
|
|
120
|
-
| `lint-tests.mjs` | added skips, fixed timeouts, empty tests, swallowed assertions, and mocks of first-party seams (zero-tolerance) |
|
|
121
|
-
| `design-parity.mjs` | the built page matches the cited design source |
|
|
122
|
-
| `check-quarantine-expiry.mjs` | a dated quarantine exit re-blocks when it expires |
|
|
123
|
-
| `ci-audit.mjs` | CI wires curated golden-path smoke as a blocking check |
|
|
124
|
-
|
|
125
|
-
In audit mode, always run the over-mock scan whole-tree and count every hit in the verdict.
|
|
38
|
+
The scripts in this skill are optional tools unless the repo already requires them. Set `SKILL_DIR` to this skill's directory and see [scripts/README.md](scripts/README.md) for usage. Their fixed checks and outputs can be broader or stricter than the agreed feature scope; do not silently change or bypass an adopted gate. Escalate conflicts rather than presenting tool defaults as policy.
|
|
126
39
|
|
|
127
40
|
## Downstream
|
|
128
41
|
|
|
129
|
-
|
|
42
|
+
`test-quality` judges individual tests; `e2e-test` authors browser tests; `golden-path` owns curated release-critical journeys; `resolve-issues` delivers and `better-review` provides independent review. Other skills and existing repository policy may still carry stricter requirements: preserve them and surface conflicts to the appropriate owner rather than silently overriding them.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> Read when: building or auditing the breadth axis — reconciling requirement sources against the surface inventory. Holds both the **doctrine** (what the ledger is) and the **mechanics** (how to operate it). Siblings: [surface-baseline.md](surface-baseline.md) (the floor each surface owes), [surface-discovery.md](surface-discovery.md) (how surfaces are found), [inventory-contract.md](inventory-contract.md) (the discovery adapter), [examples/coverage-ledger.md](../examples/coverage-ledger.md) (worked shapes).
|
|
4
4
|
|
|
5
|
+
This reference describes an optional ledger and its existing mechanical behavior, not a requirement to create a ledger or reconcile all ADRs for routine features. Use it when requested or already required by the repository. Its errors and floors remain binding when an existing required check enforces them; seek approval rather than bypassing or silently changing that policy. A whole-repo census requires an explicitly requested broad audit.
|
|
6
|
+
|
|
5
7
|
## Doctrine: the ledger is a reconciliation, not an anchor
|
|
6
8
|
|
|
7
9
|
Breadth is a reconciliation of independent enumerations, never a single anchor. **No one requirement source is complete** — anchoring only on ADRs misses surfaces nobody wrote an ADR for; anchoring only on code misses intent that was never built.
|
|
@@ -22,7 +24,7 @@ Once a row is `Aligned` (or an `Orphan surface` carrying its baseline floor), th
|
|
|
22
24
|
|
|
23
25
|
## Three layers
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
When using the ledger, separate discovery, curated intent, and the generated aggregation; reconcile them where requested or already required. Status is **computed, never stored**, so per-requirement files for a shared surface cannot diverge — there is no status field to disagree on.
|
|
26
28
|
|
|
27
29
|
- **Generated inventory** (never hand-edited): surface discovery from code — routes, APIs, tables, events. Regenerated on every change.
|
|
28
30
|
- **Curated coverage** (hand-maintained, one file per requirement at `docs/tests/<adr|prd|design>/<id>-<slug>.coverage.yml`): the surfaces that requirement owns, each with required test level, `uiOnly`, criteria link, optional gap issue. Ownership and intent only — **not** status.
|
|
@@ -53,9 +55,9 @@ The aggregation maps `@covers` → surface, checks required levels, flags intern
|
|
|
53
55
|
|
|
54
56
|
## Acceptance gate
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
When the repository has adopted this ledger acceptance gate, follow its configured requirements. Otherwise this is an optional mechanism, not a new acceptance gate.
|
|
57
59
|
|
|
58
|
-
-
|
|
60
|
+
- If the adopted gate requires it, an accepted requirement with runtime behavior owns `docs/tests/<source>/<id>-*.coverage.yml` linked to its `criteria` doc.
|
|
59
61
|
- A known gap is declared, not hidden: the coverage file names a `gapIssue` or `gapDoc` in place of `criteria` while the gap is open.
|
|
60
62
|
- A requirement with no runtime behavior (pure architecture, terminology) says "no runtime behavior" in its own text and needs no coverage file.
|
|
61
63
|
- The gate is mechanical: `coverage.config.json` → `requirementGlobs: { adr: "docs/adr" }` (and `prd`, `design`, …); `coverage-ledger.mjs validate` then errors on every accepted document with no coverage file, or a coverage file with neither criteria nor a tracked gap. `acceptedMarker` overrides the default `status: accepted` / `**Status:** accepted` match.
|
|
@@ -74,7 +76,7 @@ The breadth axis is enforced by checks that fail (error) or warn:
|
|
|
74
76
|
- required level is integration/API/journey but only unit/mock evidence resolves;
|
|
75
77
|
- internal interception counted as behavior coverage (`Over-mocked`).
|
|
76
78
|
|
|
77
|
-
Run reconciliation
|
|
79
|
+
Run reconciliation when requested or required by the repository, within the authorized scope. Keep generated inputs deterministic and report stale inventory rather than repairing it during an audit. Existing required CI checks remain binding; do not add a gate without authorization ([CI contract](../enforcement/ci-contract.md)).
|
|
78
80
|
|
|
79
81
|
## Reference validator
|
|
80
82
|
|
|
@@ -87,6 +89,6 @@ node ~/.agents/skills/ensure-coverage/scripts/coverage-ledger.mjs validate [--co
|
|
|
87
89
|
node ~/.agents/skills/ensure-coverage/scripts/coverage-ledger.mjs report # markdown index + ADR matrix view
|
|
88
90
|
```
|
|
89
91
|
|
|
90
|
-
**Outputs.** `aggregate` writes the surface-keyed `coverage-index.json` **and** a sibling `coverage-metrics.json` — roll-up counts plus the **over-mock rate** (`overMocked / tested` depth-graded surfaces, split `overMockedBehavior` / `overMockedPresentation`). The metric is a separate file, not a key in the index. `validate` and the `report` header print the rate inline (`N/T tested surfaces over-mocked (X%)`).
|
|
92
|
+
**Outputs.** `aggregate` writes the surface-keyed `coverage-index.json` **and** a sibling `coverage-metrics.json` — roll-up counts plus the **over-mock rate** (`overMocked / tested` depth-graded surfaces, split `overMockedBehavior` / `overMockedPresentation`). The metric is a separate file, not a key in the index. `validate` and the `report` header print the rate inline (`N/T tested surfaces over-mocked (X%)`). Treat the over-mock count as a lead to inspect in context ([../depth/mock-policy.md](../depth/mock-policy.md)); the *rate* is a trend signal, not an automatic feature blocker. An adopted required gate retains its configured result.
|
|
91
93
|
|
|
92
94
|
Surface *discovery* is the one repo-specific piece — supply an inventory adapter per [inventory-contract.md](inventory-contract.md) (a reference Next.js one ships at `scripts/adapters/nextjs-inventory.mjs`). Curated files follow `schemas/coverage-file.schema.json`.
|