@1aboveio/skills 1.0.10 → 1.0.12
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 +298 -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 +201 -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 +45 -0
- package/skills/engineering/engineering/references/scope-management.md +85 -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,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: engineering
|
|
3
|
+
description: "Engineering conventions: feature-delivery priorities, focused verification and review, operational boundaries, and tracker routing. Standalone /engineering offers Global, Project, or Session setup and targeted resets for configured scopes; /engineering init keeps explicit project setup. Use when setting up AGENTS.md or CONTRIBUTING.md, saving or resetting engineering defaults, or before creating an engineering issue, spec, epic, ticket, or sub-issue on GitHub or Linear. Reads existing policy without writing during ordinary work. NOT the issue-to-PR workflow (resolve-issues), release execution (resolve-release), Git delivery (github-flow), or CI setup (github-actions)."
|
|
4
|
+
release-version: 0.45.1
|
|
5
|
+
---
|
|
6
|
+
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
|
+
# Engineering
|
|
8
|
+
|
|
9
|
+
Keep engineering work focused on the requested business outcome. Read the project's
|
|
10
|
+
existing `AGENTS.md` and `CONTRIBUTING.md` and the relevant domain
|
|
11
|
+
hazards or ADRs. Follow binding local requirements. Do not turn ordinary feature
|
|
12
|
+
work into a setup, audit, framework, or gate project.
|
|
13
|
+
|
|
14
|
+
## Find the task
|
|
15
|
+
|
|
16
|
+
| Task | Action |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| Standalone `/engineering` or `engineering`, with no other task or scope | [Choose the scope](#choose-the-scope); ask before writing |
|
|
19
|
+
| `/engineering init` or an explicit request to register project defaults | [Initialize](#initialize-project-guidance) |
|
|
20
|
+
| Explicit request to save global defaults or use session-only defaults | Honor the named scope using [Choose the scope](#choose-the-scope); do not ask again |
|
|
21
|
+
| Explicit request to reset one or more scopes | [Reset and clean up](references/scope-management.md#reset-and-clean-up) only the named scopes |
|
|
22
|
+
| Ordinary implementation or review | Read applicable guidance; apply the defaults below without writing files |
|
|
23
|
+
| Create an issue, spec, epic, or sub-issue | [Tracker routing](#tracker-routing); do not initialize as a side effect |
|
|
24
|
+
| Existing guidance conflicts with a proposed default | Preserve it; ask for a decision only if the requested action needs one |
|
|
25
|
+
| Choose additional setup capabilities | [Initialization scope](references/init-scope.md); route to the owning skill |
|
|
26
|
+
|
|
27
|
+
## Choose the scope
|
|
28
|
+
|
|
29
|
+
For every standalone invocation, inspect the known global instruction file, selected
|
|
30
|
+
project guidance, and session choice without writing. Read
|
|
31
|
+
[scope management](references/scope-management.md) for configuration detection,
|
|
32
|
+
ownership records, and reset cleanup. Do not infer session setup from an automatic
|
|
33
|
+
skill load or from inherited global or project rules.
|
|
34
|
+
|
|
35
|
+
Ask one structured single-choice question when available. With no configured scope,
|
|
36
|
+
ask "Where should the engineering rules apply?" with these options:
|
|
37
|
+
|
|
38
|
+
| Choice | Meaning |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| Global | Save defaults in the current agent's global instructions for future projects and sessions |
|
|
41
|
+
| Project | Save defaults in this project's `AGENTS.md` and `CONTRIBUTING.md` |
|
|
42
|
+
| Session | Apply defaults for this session only; do not write files |
|
|
43
|
+
|
|
44
|
+
When any scope is configured, ask "Which engineering scope should I set up or reset?"
|
|
45
|
+
Keep all three scopes visible: offer `Reset Global`, `Reset Project`, or `Reset Session`
|
|
46
|
+
for each configured scope, and `Set up Global`, `Set up Project`, or `Use for Session`
|
|
47
|
+
for each unconfigured scope. Describe what is set, inherited, partial, or unresolved
|
|
48
|
+
and name known target paths. Never label an unreadable or unknown scope as unset.
|
|
49
|
+
A reset selection authorizes cleanup only for that scope. If the user explicitly
|
|
50
|
+
requests several resets, process those scopes without asking them to choose one again.
|
|
51
|
+
|
|
52
|
+
Wait for the answer before writing. If the user cancels or makes no selection,
|
|
53
|
+
leave files unchanged.
|
|
54
|
+
Automatic discovery, a handoff, quoted examples, and a task that merely mentions
|
|
55
|
+
engineering do not show this question or authorize setup. A request to edit this
|
|
56
|
+
skill is not an invocation to save its rules.
|
|
57
|
+
|
|
58
|
+
- **Project:** The selection authorizes [project initialization](#initialize-project-guidance)
|
|
59
|
+
in the selected project, with its existing preservation and validation rules.
|
|
60
|
+
`/engineering init` remains a direct project setup request and skips this question.
|
|
61
|
+
- **Session:** Read the delivery defaults, [engineering conventions](references/engineering-conventions.md),
|
|
62
|
+
[testing conventions](../test-quality/references/testing-conventions.md), and
|
|
63
|
+
[tracker routing](#tracker-routing), and apply them without saving guidance or
|
|
64
|
+
changing agent settings. Keep this choice across reload or compaction within
|
|
65
|
+
the current session; it expires in a new session. Existing binding requirements
|
|
66
|
+
and permissions still apply.
|
|
67
|
+
- **Global:** The selection authorizes only the global guidance procedure below,
|
|
68
|
+
not project initialization. Do not pass a home or agent directory to `init.mjs`.
|
|
69
|
+
|
|
70
|
+
### Save global defaults
|
|
71
|
+
|
|
72
|
+
1. Resolve the current agent's supported user-level instruction file from the
|
|
73
|
+
active environment or its documented configuration. Show the exact path before
|
|
74
|
+
editing. If the destination is unknown or ambiguous, ask for it; do not guess
|
|
75
|
+
a path or write every agent's global files.
|
|
76
|
+
2. Read existing global guidance and the feature-delivery, engineering, and testing
|
|
77
|
+
templates linked under project initialization. Use the scope-neutral rules from
|
|
78
|
+
those templates and tracker routing above; never copy the current project's
|
|
79
|
+
repository, Linear project, stack, commands, or delivery policy into global defaults.
|
|
80
|
+
3. Validate the target before editing. Refuse unreadable or invalid files, dangling
|
|
81
|
+
links, and symlinks escaping the selected global instruction directory; preserve
|
|
82
|
+
valid links and edit their resolved target only once. Create only the selected
|
|
83
|
+
instruction file if missing. Keep the rules directly in that loaded file so future
|
|
84
|
+
sessions do not depend on a pointer to this skill's installation path.
|
|
85
|
+
4. Add only missing defaults under `## Engineering defaults`, preserving existing
|
|
86
|
+
equivalent rules, hand edits, and unrelated instructions. Do not replace conflicting
|
|
87
|
+
policy without separate agreement. Repeating the same save is a no-op; a skill
|
|
88
|
+
update does not authorize refreshing saved rules. State that these are defaults
|
|
89
|
+
and that binding project requirements and action permissions still apply.
|
|
90
|
+
Record only this save's additions using the [ownership record](references/scope-management.md#record-ownership).
|
|
91
|
+
5. Report the global scope, exact file created, updated, or already configured, and
|
|
92
|
+
any unresolved conflict or write failure. Do not change project files, install
|
|
93
|
+
dependencies, or perform delivery actions as part of saving defaults.
|
|
94
|
+
|
|
95
|
+
## Delivery defaults
|
|
96
|
+
|
|
97
|
+
Prioritize the requested outcome. Supporting code, tests, and infrastructure need
|
|
98
|
+
a direct dependency, a binding requirement, or a demonstrated defect. Reuse existing
|
|
99
|
+
patterns and sufficient proof. Preserve security, tenancy, financial correctness,
|
|
100
|
+
data integrity, and cleanup. Do not invent recovery, compatibility, test layers,
|
|
101
|
+
frameworks, or gates for speculative scenarios. Keep acceptance stable and stop when
|
|
102
|
+
the outcome works and the agreed checks pass. Report unrelated debt without fixing it.
|
|
103
|
+
|
|
104
|
+
These defaults do not waive project rules, authorize external actions, or require
|
|
105
|
+
extra planning roles. Ordinary implementation choices stay with the implementer.
|
|
106
|
+
|
|
107
|
+
## Initialize project guidance
|
|
108
|
+
|
|
109
|
+
An explicit `/engineering init`, a Project selection above, or an explicit request
|
|
110
|
+
to save project defaults authorizes the additions described here in the selected
|
|
111
|
+
project. Automatic skill discovery, an issue-routing trigger, installation,
|
|
112
|
+
updates, and quoted examples do not authorize writes. When defaults would help an
|
|
113
|
+
unconfigured project, offer init once and continue; setup is not a feature prerequisite.
|
|
114
|
+
|
|
115
|
+
1. Read existing project guidance and check for policy conflicts. The script preserves
|
|
116
|
+
existing sections; it does not interpret or replace the project's decisions.
|
|
117
|
+
Retain the before-state so the ownership record can distinguish new additions
|
|
118
|
+
from preserved sections and links.
|
|
119
|
+
2. Set `SKILL_DIR` to this installed skill's directory. Preview:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
node "$SKILL_DIR/scripts/init.mjs" [--repo-root <project-root>] \
|
|
123
|
+
[--github-repo <owner/name>] [--linear-project "<name>"]...
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
3. For the explicitly authorized init, run the same command with `--write`. A preview
|
|
127
|
+
request alone stays read-only. No second approval is needed for the additions
|
|
128
|
+
already requested; a conflicting policy change needs separate agreement.
|
|
129
|
+
Record only newly added blocks, pointers, and created files using the
|
|
130
|
+
[ownership record](references/scope-management.md#record-ownership). A no-op init
|
|
131
|
+
does not adopt existing guidance or create an ownership record for it.
|
|
132
|
+
4. Report created, updated, and preserved files and any unresolved project decisions.
|
|
133
|
+
Do not install dependencies, generate CI, create issues, push, or deploy as part of init.
|
|
134
|
+
|
|
135
|
+
The default scope is the nearest Git root, or the current directory without a Git
|
|
136
|
+
repository. `--repo-root` explicitly selects a different project. Do not walk parent
|
|
137
|
+
projects or edit global agent files. A GitHub origin or explicit `--github-repo` supplies
|
|
138
|
+
the known issue destination; without one, write neutral routing instructions and
|
|
139
|
+
resolve the destination before any issue creation. Never infer a Linear project.
|
|
140
|
+
|
|
141
|
+
| File or section | Init owns |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| `AGENTS.md` | Missing `Feature delivery` section and a pointer to `CONTRIBUTING.md` |
|
|
144
|
+
| `CONTRIBUTING.md` | Missing `Engineering conventions`, `Testing conventions`, and `Issue tracking` sections |
|
|
145
|
+
|
|
146
|
+
The templates are [feature delivery](references/feature-delivery.md),
|
|
147
|
+
[engineering conventions](references/engineering-conventions.md),
|
|
148
|
+
[testing conventions](../test-quality/references/testing-conventions.md), and
|
|
149
|
+
[tracker conventions](references/tracker-conventions.md). Install `engineering` with
|
|
150
|
+
its required sibling `test-quality`; init reads that skill's canonical template
|
|
151
|
+
without invoking its writer. `test-quality` owns the testing rules and deliberate
|
|
152
|
+
updates; init only adds a missing section. The [skill review](references/init-scope.md)
|
|
153
|
+
explains what is included and what remains opt-in.
|
|
154
|
+
|
|
155
|
+
Existing sections, including legacy `conventions:tracker` blocks written by
|
|
156
|
+
`contributing`, are preserved byte-for-byte. Repeated init is not a refresh and
|
|
157
|
+
leaves manual edits unchanged. No force/update mode is implied. If policy needs to
|
|
158
|
+
change, agree the specific change rather than rerunning setup over it.
|
|
159
|
+
|
|
160
|
+
Every target is checked before writing. Invalid targets, unreadable files, malformed
|
|
161
|
+
owned markers, dangling links, and links outside the selected project refuse setup.
|
|
162
|
+
Valid in-project symlinks are preserved. Keep distinct agent-instruction and
|
|
163
|
+
contributor-guide files. Init does not read, create, or update `CLAUDE.md`.
|
|
164
|
+
Report a write error honestly; do not claim setup completed when it did not.
|
|
165
|
+
|
|
166
|
+
## Tracker routing
|
|
167
|
+
|
|
168
|
+
Read the destination from project guidance first, then the GitHub resources linked
|
|
169
|
+
from a source Linear project; ask if unresolved. An explicit user destination wins.
|
|
170
|
+
|
|
171
|
+
| Work | Default tracker |
|
|
172
|
+
| --- | --- |
|
|
173
|
+
| Product goals, business requirements, consulting work, delivery summaries | Linear where used by the project |
|
|
174
|
+
| Engineering specs, implementation epics, technical tasks, engineering bugs | GitHub |
|
|
175
|
+
|
|
176
|
+
Before creating work:
|
|
177
|
+
|
|
178
|
+
1. Classify the work, not the conversation it came from. Engineering implementation
|
|
179
|
+
stays in GitHub even when the request started in Linear.
|
|
180
|
+
2. Resolve the actual repository. Do not guess among multiple repos or fall back to
|
|
181
|
+
Linear because the GitHub destination is missing.
|
|
182
|
+
3. Search the destination for duplicates and reuse a match.
|
|
183
|
+
4. Link the GitHub epic to its Linear source requirement once. Do not create
|
|
184
|
+
implementation children in Linear or mirror every ticket there.
|
|
185
|
+
5. Report engineering delivery in Linear as a linked summary; the requester owns
|
|
186
|
+
product acceptance.
|
|
187
|
+
|
|
188
|
+
The retained tracker-only helper supports explicit requests to persist or update
|
|
189
|
+
that section:
|
|
190
|
+
|
|
191
|
+
```sh
|
|
192
|
+
node "$SKILL_DIR/scripts/persist-conventions.mjs" --repo-root <project-root> \
|
|
193
|
+
[--github-repo <owner/name>] [--linear-project "<name>"]... [--if-missing] [--write]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
It previews without `--write`; `--if-missing` preserves an existing tracker block.
|
|
197
|
+
Without that flag, an authorized tracker refresh replaces only its managed block.
|
|
198
|
+
It retains the existing shared convention-writer behavior; use `init.mjs` for
|
|
199
|
+
project setup with the all-target validation and preservation rules above. Ordinary
|
|
200
|
+
issue routing never runs either writer automatically. The old `contributing` name
|
|
201
|
+
is archived, not a second active policy owner.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
## Engineering conventions
|
|
2
|
+
|
|
3
|
+
### Deliver the requested outcome
|
|
4
|
+
|
|
5
|
+
Build the smallest complete end-to-end change using existing patterns and tools.
|
|
6
|
+
Supporting code, tests, and infrastructure need a direct dependency, a binding
|
|
7
|
+
requirement, or a concrete defect. Do not invent fallback values, retries,
|
|
8
|
+
compatibility modes, or abstractions for hypothetical future needs. Preserve
|
|
9
|
+
necessary input validation and report unexpected failures through existing boundaries.
|
|
10
|
+
|
|
11
|
+
### Verify proportionately
|
|
12
|
+
|
|
13
|
+
Reuse tests and checks that already prove the changed behavior. Add focused proof
|
|
14
|
+
for material risks at the lowest level that observes the real outcome. Mocks do
|
|
15
|
+
not prove the persistence, authorization, or transaction behavior they replace.
|
|
16
|
+
Do not duplicate proof across layers, pin source text instead of behavior, or
|
|
17
|
+
start a whole-app audit for a local change. Run the project's required checks;
|
|
18
|
+
report failed or unavailable checks honestly, without weakening them to get green.
|
|
19
|
+
|
|
20
|
+
### Review and finish
|
|
21
|
+
|
|
22
|
+
Block delivery for a concrete supported failure, an explicit unmet requirement,
|
|
23
|
+
or missing agreed required proof, not speculative hardening or optional tests.
|
|
24
|
+
Keep acceptance criteria stable; new scope needs agreement. Stop when the outcome
|
|
25
|
+
works and the agreed checks pass. Report unrelated debt without fixing it.
|
|
26
|
+
|
|
27
|
+
### Respect operational boundaries
|
|
28
|
+
|
|
29
|
+
Preserve authentication, tenant isolation, financial correctness, data integrity,
|
|
30
|
+
and cleanup. Follow this project's existing commit, PR, queue, and release policy.
|
|
31
|
+
Do not invent a delivery flow, introduce new CI gates, or treat initialization as
|
|
32
|
+
authorization to push, deploy, migrate shared data, change permissions, or release.
|
|
@@ -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,45 @@
|
|
|
1
|
+
# What initialization includes
|
|
2
|
+
|
|
3
|
+
Standalone `/engineering` first asks for Global, Project, or Session scope. Only a
|
|
4
|
+
Project selection, `/engineering init`, or an explicit project save uses the project
|
|
5
|
+
initializer described here. Global saving follows `SKILL.md`'s separate procedure;
|
|
6
|
+
Session keeps the rules in conversation context without writing files.
|
|
7
|
+
On later standalone calls, configured scopes offer a targeted reset with
|
|
8
|
+
[owned-guidance cleanup](scope-management.md#reset-and-clean-up); setup does not
|
|
9
|
+
grant permission to remove pre-existing rules.
|
|
10
|
+
|
|
11
|
+
Project initialization creates durable guidance, not an orchestration or infrastructure setup.
|
|
12
|
+
This review covers every active first-party skill in the Engineering package and
|
|
13
|
+
the related delivery, CI, and merge-queue convention owners. Archived skills are
|
|
14
|
+
not initialization sources; pinned external skills keep their upstream ownership.
|
|
15
|
+
|
|
16
|
+
| Skill | Include in guidance | Keep as a separate action |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| engineering (formerly contributing) | Feature priorities, guidance lookup, tracker routing | Tracker refresh or project-policy changes |
|
|
19
|
+
| resolve-issues | Agreed outcome, bounded supporting work, explicit stopping point | Issue planning, workers, PRs, scheduling |
|
|
20
|
+
| rush-issues | Same delivery principles as resolve-issues | Shortcut workflow invocation |
|
|
21
|
+
| ensure-coverage | Smallest sufficient proof, stable acceptance, required checks preserved | Ledger adoption, broad audits, new gates |
|
|
22
|
+
| test-quality | Canonical seven-principle `Testing conventions` section, added only when missing | Refreshing existing testing policy or suite cleanup |
|
|
23
|
+
| e2e-test | Focus on affected journeys; distinguish real browser/backend proof | Harness, manifest, whole-app sweep |
|
|
24
|
+
| better-review | Concrete blockers, optional improvements do not enlarge acceptance | Review passes, JSON records, re-review workflow |
|
|
25
|
+
| golden-path | People choose release-blocking journeys | Path selection, contract, workflow and gate generation |
|
|
26
|
+
| resolve-release | Respect existing release ownership and permissions | Flow selection, tags, deployment, promotion |
|
|
27
|
+
| rush-release | Same release boundaries as resolve-release | Shortcut release invocation |
|
|
28
|
+
| engineering-runtime | No user convention; support-only | Runtime installation or configuration |
|
|
29
|
+
| harness-runtime | No user convention; support-only | Harness setup or configuration |
|
|
30
|
+
| github-flow | Follow existing delivery policy; do not infer authorization | Declaring or changing Delivery and CI sections |
|
|
31
|
+
| github-actions | Preserve existing required checks | Workflow generation, runner/caching/security policy |
|
|
32
|
+
| mergify | Honor an existing queue policy | Queue installation, configuration, or enqueueing |
|
|
33
|
+
| data-catalog | No general default; warehouse-specific rules need explicit setup | Data catalog conventions, catalog generation and CI |
|
|
34
|
+
|
|
35
|
+
Do not invoke the separate actions as a side effect of `init`. In particular, do
|
|
36
|
+
not call other skills' convention writers: they own their sections and may need
|
|
37
|
+
additional decisions. Init reads `test-quality`'s canonical template directly;
|
|
38
|
+
the testing owner and `conventions:testing` section identity remain unchanged.
|
|
39
|
+
Existing project sections, including old testing and tracker blocks, stay unchanged.
|
|
40
|
+
Delivery, CI, and Data Catalog conventions require separate explicit setup with
|
|
41
|
+
their owning skills. Setup may point to these capabilities without requiring them.
|
|
42
|
+
|
|
43
|
+
Stack-specific tools, commands, cloud projects, release branches, required gates,
|
|
44
|
+
and golden paths are project facts, not defaults to manufacture. Read established
|
|
45
|
+
guidance; ask for missing decisions only when a requested action needs them.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Scope management
|
|
2
|
+
|
|
3
|
+
This procedure governs standalone setup and reset. It does not authorize cleanup
|
|
4
|
+
while the skill is loaded for implementation, review, or tracker routing.
|
|
5
|
+
|
|
6
|
+
## Detect configuration
|
|
7
|
+
|
|
8
|
+
- Global uses only the current agent's supported user-level instruction file.
|
|
9
|
+
Project uses the selected Git root, or current directory without Git, and its
|
|
10
|
+
`AGENTS.md` and `CONTRIBUTING.md`. Apply the save procedure's target validation
|
|
11
|
+
before setup or reset. Do not scan unrelated projects or agent installations.
|
|
12
|
+
- A valid ownership record, equivalent existing engineering rules, or an explicit
|
|
13
|
+
active session choice means the corresponding scope is configured. Distinguish
|
|
14
|
+
fully configured, partially configured, and existing rules not owned by this skill.
|
|
15
|
+
Rules inherited from another scope do not mean this scope is configured.
|
|
16
|
+
- Inspect files afresh on every standalone call. Keep the session choice in context
|
|
17
|
+
across reload or compaction; a new session starts without that temporary choice.
|
|
18
|
+
A reset session choice remains off until the user explicitly enables it again.
|
|
19
|
+
- Report unknown, unreadable, invalid, and conflicting guidance honestly. Offer to
|
|
20
|
+
resolve that scope rather than presenting a save or reset as safe. An unknown
|
|
21
|
+
global path does not prevent a known project or session action.
|
|
22
|
+
|
|
23
|
+
## Record ownership
|
|
24
|
+
|
|
25
|
+
After an authorized Global or Project save, keep a small JSON ownership record in
|
|
26
|
+
an HTML comment in each changed guidance file:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
<!-- engineering:ownership
|
|
30
|
+
{"version":1,"scope":"project","createdFile":false,"additions":[]}
|
|
31
|
+
-->
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Populate `additions` from the actual before/after diff, never from the presence of
|
|
35
|
+
a familiar heading. Each entry has `namespace` (`conventions` or `engineering`),
|
|
36
|
+
`id`, and `sha256` fields. These identify the `<!-- <namespace>:<id>:start -->`
|
|
37
|
+
and matching `end` marker, and the SHA-256 of the bytes between them. Store marker
|
|
38
|
+
identifiers, not literal comment strings, so the initializer does not count the
|
|
39
|
+
receipt as duplicate markers. Include any new wrapper heading inside its recorded
|
|
40
|
+
block. Record only newly inserted text. Use the
|
|
41
|
+
existing `conventions:<id>:start/end` markers for new project sections. Wrap any
|
|
42
|
+
new global defaults or new loading pointer in unique `engineering:<id>:start/end`
|
|
43
|
+
comments before recording their hashes. Do not rewrap existing text or claim it as
|
|
44
|
+
owned. Keep existing valid records and add only new entries; deduplicate entries.
|
|
45
|
+
|
|
46
|
+
Set `createdFile` only when this save created that file. Preserve unrelated bytes
|
|
47
|
+
and existing links. Do not create a sidecar, global settings entry, or project file
|
|
48
|
+
for a session choice. A repeated save with no additions leaves files unchanged.
|
|
49
|
+
If a record is malformed or ownership is uncertain, preserve the affected text and
|
|
50
|
+
report the problem instead of inventing a receipt or claiming complete setup.
|
|
51
|
+
|
|
52
|
+
## Reset and clean up
|
|
53
|
+
|
|
54
|
+
A selected reset or an explicit scoped reset request authorizes removal of that
|
|
55
|
+
scope's saved defaults, not a reinstall, refresh, or reset of every scope.
|
|
56
|
+
|
|
57
|
+
1. Re-read and validate every target in the selected scope before editing. Explain
|
|
58
|
+
the planned removals and any preserved user rules. A read-only reset preview
|
|
59
|
+
stays read-only. Cancellation performs no cleanup.
|
|
60
|
+
2. **Session:** Clear only the explicit temporary engineering choice. Do not edit
|
|
61
|
+
files or agent settings. Continue to honor inherited global and project rules
|
|
62
|
+
and binding requirements; session reset does not switch those off.
|
|
63
|
+
3. **Global or Project:** Remove recorded additions only when their markers are
|
|
64
|
+
unique and balanced and their current content matches the recorded hash. Remove
|
|
65
|
+
their ownership entries as well. Retain edited blocks and their records, explain
|
|
66
|
+
the difference, and ask before removing user changes. Never delete an entire
|
|
67
|
+
section just because its heading matches a template.
|
|
68
|
+
4. For older or unrecorded guidance, including legacy tracker blocks, ownership
|
|
69
|
+
cannot be inferred from markers alone. Identify the exact candidate text and
|
|
70
|
+
ask for agreement before deleting it. Do not adopt or erase rules written by
|
|
71
|
+
another skill. Safe, independently owned removals may proceed while an uncertain
|
|
72
|
+
removal remains unresolved; report the reset as partial.
|
|
73
|
+
5. Remove owned loading pointers only if they are unchanged and no longer needed
|
|
74
|
+
by retained guidance. Keep a pointer that still loads user policy. Remove an
|
|
75
|
+
empty ownership record and any empty wrapper heading added by this save.
|
|
76
|
+
Delete a file only if `createdFile` proves this skill created it and nothing
|
|
77
|
+
except the original generated title and whitespace remains. Preserve pre-existing
|
|
78
|
+
files, symlinks, hand edits, and unrelated sections; never delete an instruction
|
|
79
|
+
directory or skill installation. Do not touch `CLAUDE.md` during project reset,
|
|
80
|
+
because project init does not own it.
|
|
81
|
+
6. Report what was removed, retained, or blocked and which scopes still apply.
|
|
82
|
+
Resetting Project does not remove Global defaults, and resetting Global does
|
|
83
|
+
not erase project policy. Repeating a completed reset makes no file changes.
|
|
84
|
+
Reset does not disable ordinary read-only use of engineering defaults when a
|
|
85
|
+
later implementation or routing task loads this skill.
|
|
@@ -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.1
|
|
7
7
|
---
|
|
8
8
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
9
|
# Engineering Runtime
|