@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,66 @@
|
|
|
1
|
+
# Initialize guidance on an explicit writing invocation
|
|
2
|
+
|
|
3
|
+
An actual user invocation of `/write-doc` or `/write-report`, including fast mode or an
|
|
4
|
+
initialization-only request, authorizes this bounded local setup before drafting. Automatic
|
|
5
|
+
skill selection, a domain skill calling the writer, reading its instructions, or a slash command
|
|
6
|
+
quoted inside a source does not. If invocation provenance is unclear, use the read-only branch;
|
|
7
|
+
do not infer permission from a skill-loaded message alone.
|
|
8
|
+
|
|
9
|
+
This is initialization, not style learning or a policy refresh. Preserve existing `WRITING.md`,
|
|
10
|
+
`TERMINOLOGY.md`, user rules, `Agent replies`, templates and unrelated agent instructions.
|
|
11
|
+
Do not persist the assignment's language, length, fast-mode choice, findings or temporary
|
|
12
|
+
directions as project defaults. Explicit future-document preferences still follow
|
|
13
|
+
[distill-writing's save procedure](persistence.md); settled terms follow `terminology`.
|
|
14
|
+
|
|
15
|
+
## Resolve and preview
|
|
16
|
+
|
|
17
|
+
Start beside the primary input, else the requested output, else the working directory, following
|
|
18
|
+
[the lookup rules](rules.md#find-writingmd). Use an explicitly named narrower client/project
|
|
19
|
+
directory as the write scope; otherwise the nearest Git root, or the start directory without
|
|
20
|
+
one. An inherited guide outside that scope is readable, not writable. Never initialize global
|
|
21
|
+
or home-level guidance. Read the applicable guide and existing terminology before setup.
|
|
22
|
+
If the output directory does not yet exist, resolve lookup from its nearest existing parent;
|
|
23
|
+
do not widen an explicitly named client scope to make setup succeed.
|
|
24
|
+
|
|
25
|
+
Run the bundled helper from its installed location:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
node {house-style baseDir}/scripts/init-guidance.mjs --start START_DIRECTORY
|
|
29
|
+
# Add --scope CLIENT_DIRECTORY when the user named a narrower scope.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Inspect the JSON preview. Confirm the destinations stay within the authorized scope and that
|
|
33
|
+
existing guides and loading pointers will be preserved. Broken or unreadable linked guidance,
|
|
34
|
+
out-of-scope write-target links and conflicting write targets block setup; do not replace them,
|
|
35
|
+
install another skill, or silently select a different guide. Continue unaffected document work when possible and
|
|
36
|
+
report the setup gap. Do not claim persistence is configured after a partial write.
|
|
37
|
+
Existing linked templates outside the write scope may be read but are never changed by setup.
|
|
38
|
+
If an explicitly narrower scope would create a new guide that shadows an inherited guide,
|
|
39
|
+
surface that policy change and obtain the scope decision before applying it; do not silently
|
|
40
|
+
discard the inherited rules merely to create two local files.
|
|
41
|
+
|
|
42
|
+
## Apply once, then write
|
|
43
|
+
|
|
44
|
+
For an authorized preview with no blocker, run the same command with `--write`. No extra
|
|
45
|
+
approval is needed for the setup the explicit invocation already requested. The helper:
|
|
46
|
+
|
|
47
|
+
- Creates missing `WRITING.md` and `TERMINOLOGY.md` together, even when no project-specific
|
|
48
|
+
terms are known. A small terminology skeleton is valid here; it is not permission to invent
|
|
49
|
+
rows. Existing guide bytes remain unchanged.
|
|
50
|
+
- Adds only the loading pointers needed in local `AGENTS.md` and supported `CLAUDE.md`
|
|
51
|
+
entrypoints. It preserves valid in-scope links and edits a shared target once; missing
|
|
52
|
+
`CLAUDE.md` becomes a relative link to `AGENTS.md`.
|
|
53
|
+
- Reports files created, updated or already configured, the scope, inherited guidance and
|
|
54
|
+
any failure. Repeating setup with the same inputs makes no changes.
|
|
55
|
+
|
|
56
|
+
Read the resulting local guidance and continue the requested task. With no writing assignment,
|
|
57
|
+
finish by reporting setup rather than inventing a document. Do not initialize templates or learn
|
|
58
|
+
a style from unapproved documents. The minimal guide contains no inferred house style; bundled
|
|
59
|
+
defaults fill gaps until the user saves preferences or supplies approved samples.
|
|
60
|
+
When an assignment continues after setup, include the created or updated guidance and loader
|
|
61
|
+
paths in its delivery note, plus any unresolved setup issue. Mentioning which guide was used
|
|
62
|
+
does not tell the user that setup also changed agent entrypoints.
|
|
63
|
+
|
|
64
|
+
Fast mode does not skip explicit initialization. Conversely, automatic writing uses existing
|
|
65
|
+
guidance or defaults without running this helper. Its existing, narrowly authorized terminology
|
|
66
|
+
seeding and explicit-preference-save rules remain separate from initialization.
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
# Save an explicit writing preference
|
|
2
2
|
|
|
3
|
-
This is the explicit-save branch of `distill-writing`, also reached from `write-doc` and
|
|
3
|
+
This is the explicit-save branch of `distill-writing`, also reached from `write-doc`, `write-report` and
|
|
4
4
|
`plain-language`. It saves a stated preference, not a style inferred from examples. No sample
|
|
5
5
|
documents, confidence inference or transfer draft are needed for this branch.
|
|
6
|
+
Explicit writer initialization is a separate [bounded setup branch](initialization.md): it
|
|
7
|
+
creates missing guidance and loading pointers, not new project preferences.
|
|
6
8
|
|
|
7
9
|
## Recognize intent and route
|
|
8
10
|
|
|
9
11
|
Save when the user explicitly asks for reuse beyond the current task or session: "remember this
|
|
10
12
|
for future PRDs", "make this our project's report default", or "save this writing rule". A skill
|
|
11
13
|
invocation, an ordinary correction, repeated edits, a compliment, and "for this document" do not
|
|
12
|
-
authorize
|
|
14
|
+
authorize saving a new preference. Apply those to the current task only. The writer's explicit
|
|
15
|
+
slash invocation authorizes initialization, not persistence of its assignment settings.
|
|
16
|
+
"For this session" stays in session
|
|
13
17
|
context even if the user calls it a default. Ask once if a requested save's audience, duration or
|
|
14
18
|
project scope cannot be determined; never assume a global preference.
|
|
15
19
|
|
|
@@ -61,7 +65,7 @@ do not save a rule that would weaken them. Explain the conflict instead.
|
|
|
61
65
|
is unclear; do not save the rule to a different type or create an assessment template by guessing.
|
|
62
66
|
- If a template is missing, start from the complete matching bundled template, not a fragment
|
|
63
67
|
that would hide the bundled strategy under the replacement rule. For adaptable reports, use
|
|
64
|
-
the corresponding layout plus `write-
|
|
68
|
+
the corresponding layout plus `write-report`'s report contract to build the seven-section
|
|
65
69
|
[project-template shape](rules.md#template-shape), retaining all assessment checks. Apply only
|
|
66
70
|
the stated preference and record the bundled source and release-version. Do not create a
|
|
67
71
|
customizable VARS template. For a type without a bundled match, use the complete general
|
|
@@ -73,7 +77,8 @@ At the guide's in-scope directory, ensure `AGENTS.md` and every existing `CLAUDE
|
|
|
73
77
|
can reach this instruction, adapted to the correct relative guide path:
|
|
74
78
|
|
|
75
79
|
```markdown
|
|
76
|
-
For document drafting and editing, use `write-doc
|
|
80
|
+
For document drafting and editing, use `write-doc`; for analytical reports, use `write-report`.
|
|
81
|
+
Follow their shared nearest-WRITING.md lookup.
|
|
77
82
|
Read the applicable guide and its selected project template before writing. Save a preference
|
|
78
83
|
only when explicitly asked; keep reply preferences separate from document rules.
|
|
79
84
|
```
|
|
@@ -17,6 +17,7 @@ reply-only `Agent replies` section. They link here; none restates it.
|
|
|
17
17
|
- [Template shape](#template-shape)
|
|
18
18
|
- [Who edits what](#who-edits-what)
|
|
19
19
|
- [Explicit preference saves](persistence.md)
|
|
20
|
+
- [Explicit writer initialization](initialization.md)
|
|
20
21
|
|
|
21
22
|
## Local files
|
|
22
23
|
|
|
@@ -30,6 +31,8 @@ project/
|
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
Create files lazily: no empty `writing/` folder, no template without evidence for it.
|
|
34
|
+
The explicit `/write-doc` or `/write-report` initialization branch creates both guidance files
|
|
35
|
+
even without known local terms; it does not create invented terminology rows or a learned style.
|
|
33
36
|
|
|
34
37
|
**WRITING.md's document sections hold what every document shares; a template holds what one type needs.**
|
|
35
38
|
Example: "Write amounts as `USD 1,250,000`" goes in WRITING.md. "Put the price table before the
|
|
@@ -47,7 +50,8 @@ terms" goes in `writing/templates/commercial-proposal.md`.
|
|
|
47
50
|
keep walking up, but never use a `WRITING.md` in the user's home directory or any directory
|
|
48
51
|
above it.
|
|
49
52
|
4. No `WRITING.md` found: write from the brief and the bundled
|
|
50
|
-
[defaults](defaults.md). Say so in the delivery note.
|
|
53
|
+
[defaults](defaults.md). Say so in the delivery note. Automatic selection does not create one.
|
|
54
|
+
An actual user slash invocation instead follows [initialization](initialization.md) first.
|
|
51
55
|
|
|
52
56
|
A present but unreadable, invalid or uninspectable guide is not absent. Report its path
|
|
53
57
|
and the problem; do not silently climb to a different guide or claim to apply defaults.
|
|
@@ -87,7 +91,7 @@ Example: the project has `writing/templates/prd.md`; the user asks for a PRD →
|
|
|
87
91
|
file, not the bundled `prd.md`. The user says "use the bundled PRD template" → use the bundled one.
|
|
88
92
|
|
|
89
93
|
Language is not a template choice. English, Chinese and bilingual output work with every template
|
|
90
|
-
(
|
|
94
|
+
([bilingual mode](bilingual.md)).
|
|
91
95
|
|
|
92
96
|
## Resolve conflicting instructions
|
|
93
97
|
|
|
@@ -264,9 +268,12 @@ to regulatory action" is house text; for an internal-standard review, adapt it.
|
|
|
264
268
|
|
|
265
269
|
## Who edits what
|
|
266
270
|
|
|
267
|
-
- `write-doc` automatically
|
|
271
|
+
- `write-doc` and `write-report` automatically route an explicit future-document save to `distill-writing`'s
|
|
268
272
|
[explicit-save branch](persistence.md). A correction without that intent affects the current
|
|
269
273
|
document only; reading or using a guide does not authorize updating it.
|
|
274
|
+
- Explicit user `/write-doc` or `/write-report` initializes missing local guidance and loading
|
|
275
|
+
pointers through [initialization](initialization.md). This bounded exception does not authorize
|
|
276
|
+
refreshing existing rules, learning a style, saving task-level settings or changing reply rules.
|
|
270
277
|
- `distill-writing` updates them deliberately: it keeps `(user)` rules and manual edits, and lists
|
|
271
278
|
every material change and conflict before or as it writes. It owns document guidance, not
|
|
272
279
|
`Agent replies`. Both reader skills may recognize save intent; ownership follows the rule's
|
|
@@ -275,7 +282,7 @@ to regulatory action" is house text; for an internal-standard review, adapt it.
|
|
|
275
282
|
loading pointers. It routes document preferences to `distill-writing`; ordinary mode toggles
|
|
276
283
|
and session choices do not save policy. Mixed requests keep both scopes separate.
|
|
277
284
|
- Any writing skill adds a row to TERMINOLOGY.md the moment the user settles a term, and creates
|
|
278
|
-
the file for the first one (`terminology` format). `write-doc` also
|
|
285
|
+
the file for the first one (`terminology` format). `write-doc` and `write-report` also seed the file with
|
|
279
286
|
`proposed` rows when it writes a new document in a project without one. It never writes a term the user did not state
|
|
280
287
|
or approve, except as `proposed`.
|
|
281
288
|
- A user may edit any of these files by hand at any time; hand edits win over distilled rules.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
|
|
6
|
+
const WRITING = '<!-- writing-md: 1 -->\n# Writing guide\n\nProject document preferences are not yet saved; bundled defaults apply.\n\n## Terms\n\nTerms: see [TERMINOLOGY.md](TERMINOLOGY.md).\n';
|
|
7
|
+
const TERMS = '# Terminology\n\n## Terms\n\n| Concept | English | 简体 | 繁體 | Avoid | Meaning | Status | Source |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n';
|
|
8
|
+
const LOADER = '## Document guidance\n\nFor document drafting and editing, use `write-doc`; for analytical reports, use `write-report`. Read the applicable `WRITING.md` and `TERMINOLOGY.md`. Save future preferences only when explicitly requested; automatic skill selection does not initialize guidance.\n';
|
|
9
|
+
const inside = (root, p) => p === root || (!path.relative(root, p).startsWith('..' + path.sep) && path.relative(root, p) !== '..' && !path.isAbsolute(path.relative(root, p)));
|
|
10
|
+
const home = fs.realpathSync(os.homedir());
|
|
11
|
+
const result = { scope: null, start: null, projectBoundary: null, inherited: null, missingInputs: [], files: [], errors: [] };
|
|
12
|
+
let scope;
|
|
13
|
+
let globalRoots = [];
|
|
14
|
+
const completed = new Set();
|
|
15
|
+
function fail(message, file) { const e = new Error(message); e.file = file; throw e; }
|
|
16
|
+
function checkGlobal(real, file) {
|
|
17
|
+
if (globalRoots.some(root => inside(root, real))) fail('Global agent configuration is not an authorized write target', file);
|
|
18
|
+
}
|
|
19
|
+
function inspect(p, bounded = false) {
|
|
20
|
+
let lst;
|
|
21
|
+
try { lst = fs.lstatSync(p); } catch (e) { if (e.code === 'ENOENT') return null; throw e; }
|
|
22
|
+
let real;
|
|
23
|
+
try { real = fs.realpathSync(p); } catch { fail('Broken or inaccessible link', p); }
|
|
24
|
+
if (bounded && !inside(scope, real)) fail('Target escapes authorized scope', p);
|
|
25
|
+
if (bounded) checkGlobal(real, p);
|
|
26
|
+
const stat = fs.statSync(real);
|
|
27
|
+
if (!stat.isFile() || !(stat.mode & 0o444)) fail('Expected a readable regular file', p);
|
|
28
|
+
let bytes;
|
|
29
|
+
try { bytes = fs.readFileSync(real); } catch { fail('File is unreadable', p); }
|
|
30
|
+
if (bytes.includes(0)) fail('Invalid text guidance', p);
|
|
31
|
+
try { new TextDecoder('utf-8', { fatal: true }).decode(bytes); }
|
|
32
|
+
catch { fail('Invalid UTF-8 guidance', p); }
|
|
33
|
+
return { real, bytes, link: lst.isSymbolicLink(), dev: stat.dev, ino: stat.ino, nlink: stat.nlink };
|
|
34
|
+
}
|
|
35
|
+
const sameFile = (a, b) => a && b && a.dev === b.dev && a.ino === b.ino;
|
|
36
|
+
function hasLoader(text) {
|
|
37
|
+
return text.includes(LOADER.trim()) || /for document drafting and editing, use `?write-doc`?; for analytical reports, use `?write-report`?\.\s*read the applicable `?WRITING\.md`? and `?TERMINOLOGY\.md`?\.\s*save future preferences only when explicitly requested; automatic skill selection does not initialize guidance\./i.test(text);
|
|
38
|
+
}
|
|
39
|
+
function checkConflict(text, file) {
|
|
40
|
+
// Deliberately bounded: catch direct negations, not arbitrary natural-language policy.
|
|
41
|
+
if (/(?:\b(?:do not|don't|never|must not|cannot|can't)\s+(?:(?:ever|automatically)\s+)?(?:use|invoke|run|read|load|follow|consult|import|initialize|create)\b[^.\n]*(?:write-doc|write-report|WRITING\.md|TERMINOLOGY\.md|AGENTS\.md|CLAUDE\.md)|(?:explicit|automatic)[^.\n]*(?:invocations?|selection)[^.\n]*(?:disabled|prohibited))/i.test(text)) fail('Conflicting document guidance', file);
|
|
42
|
+
}
|
|
43
|
+
// Bounded inline Markdown destinations: angle destinations may contain spaces; bare
|
|
44
|
+
// destinations may have a quoted title. This is not a full CommonMark parser.
|
|
45
|
+
function destination(raw, file) {
|
|
46
|
+
const m = raw.trim().match(/^(?:<([^<>]*)>|([^\s]+))(?:\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/);
|
|
47
|
+
if (!m) return null;
|
|
48
|
+
let ref = (m[1] ?? m[2]).split('#')[0].split('?')[0];
|
|
49
|
+
if (!ref || /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(ref)) return null;
|
|
50
|
+
try { ref = decodeURIComponent(ref); } catch { fail('Invalid link encoding', file); }
|
|
51
|
+
return ref;
|
|
52
|
+
}
|
|
53
|
+
function loadsAgents(text, file, expected, agent) {
|
|
54
|
+
function validate(ref) {
|
|
55
|
+
const target = ref && path.resolve(path.dirname(file), ref);
|
|
56
|
+
const linked = target && inspect(target);
|
|
57
|
+
const reaches = agent ? sameFile(linked, agent) : !linked && target === expected;
|
|
58
|
+
if (!reaches) fail('Misdirected AGENTS.md loader', file);
|
|
59
|
+
}
|
|
60
|
+
const inline = /(?:read|load|follow|see|consult|import)\s+(?:the\s+)?\[([^\]]*AGENTS\.md[^\]]*)\]\((<[^>]*>|[^)]+)\)/gi;
|
|
61
|
+
let found = false;
|
|
62
|
+
for (const m of text.matchAll(inline)) {
|
|
63
|
+
const ref = destination(m[2], file);
|
|
64
|
+
validate(ref);
|
|
65
|
+
found = true;
|
|
66
|
+
}
|
|
67
|
+
// Do not let a Markdown label masquerade as a plain-text reference.
|
|
68
|
+
const plain = /(?:read|load|follow|see|consult|import|@)\s*(?:the\s+)?`?((?:[^\s`<>()[\]]+\/)?AGENTS\.md)`?(?=$|[\s.,;:])/gi;
|
|
69
|
+
for (const m of text.replace(inline, '').matchAll(plain)) {
|
|
70
|
+
validate(m[1]);
|
|
71
|
+
found = true;
|
|
72
|
+
}
|
|
73
|
+
return found;
|
|
74
|
+
}
|
|
75
|
+
function validateLinks(file, info, allowedMissing, seen = new Set(), entrypoint = false) {
|
|
76
|
+
if (seen.has(info.real)) return;
|
|
77
|
+
seen.add(info.real);
|
|
78
|
+
const text = info.bytes.toString('utf8');
|
|
79
|
+
// Inspect local Markdown guidance links and inline project template paths.
|
|
80
|
+
const links = [...text.matchAll(/\]\(([^)]+)\)|`([^`]*(?:writing\/templates\/|TERMINOLOGY\.md)[^`]*)`/g)];
|
|
81
|
+
for (const m of links) {
|
|
82
|
+
// Entrypoint loaders name the applicable glossary, not a sibling-file link.
|
|
83
|
+
if (entrypoint && m[2] && !m[2].includes('writing/templates/')) continue;
|
|
84
|
+
const ref = destination(m[1] || m[2], file);
|
|
85
|
+
if (!ref) continue;
|
|
86
|
+
const target = path.resolve(path.dirname(info.real), ref);
|
|
87
|
+
if (!/\.md$/i.test(target)) continue;
|
|
88
|
+
if (entrypoint && !/(?:^|\/)(?:AGENTS|WRITING|TERMINOLOGY)\.md$/i.test(ref) && !/(?:^|\/)writing\/templates\//i.test(ref)) continue;
|
|
89
|
+
const linked = inspect(target);
|
|
90
|
+
const planned = allowedMissing instanceof Set ? allowedMissing.has(target) : target === allowedMissing;
|
|
91
|
+
if (!linked && !planned) { result.missingInputs.push(target); fail('Linked guidance is missing', target); }
|
|
92
|
+
if (linked) validateLinks(target, linked, allowedMissing, seen,
|
|
93
|
+
entrypoint && /(?:^|\/)(?:AGENTS|CLAUDE)\.md$/i.test(target));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function parse() {
|
|
97
|
+
const args = process.argv.slice(2); let start, explicit, write = false;
|
|
98
|
+
for (let i = 0; i < args.length; i++) {
|
|
99
|
+
if (args[i] === '--write') { if (write) fail('Duplicate --write'); write = true; }
|
|
100
|
+
else if (args[i] === '--start' || args[i] === '--scope') {
|
|
101
|
+
const flag = args[i]; if (!args[i + 1] || args[i + 1].startsWith('--')) fail(`Missing value for ${flag}`);
|
|
102
|
+
if (flag === '--start') { if (start) fail('Duplicate --start'); start = args[++i]; }
|
|
103
|
+
else { if (explicit) fail('Duplicate --scope'); explicit = args[++i]; }
|
|
104
|
+
} else fail(`Unknown argument: ${args[i]}`);
|
|
105
|
+
}
|
|
106
|
+
if (!start) fail('Missing --start');
|
|
107
|
+
start = fs.realpathSync(path.resolve(start));
|
|
108
|
+
if (!fs.statSync(start).isDirectory()) fail('Start must be a directory', start);
|
|
109
|
+
let boundary = null;
|
|
110
|
+
for (let d = start;; d = path.dirname(d)) {
|
|
111
|
+
if (fs.existsSync(path.join(d, '.git'))) { boundary = d; break; }
|
|
112
|
+
if (d === home || d === path.dirname(d)) break;
|
|
113
|
+
}
|
|
114
|
+
scope = explicit ? fs.realpathSync(path.resolve(explicit)) : boundary || start;
|
|
115
|
+
if (!fs.statSync(scope).isDirectory() || !inside(scope, start)) fail('Scope must contain start', scope);
|
|
116
|
+
if (boundary && !inside(boundary, scope)) fail('Scope must be within the project boundary', scope);
|
|
117
|
+
if (inside(scope, home)) fail('Home and its ancestors are not authorized scopes', scope);
|
|
118
|
+
// Global configuration roots may themselves be links into this checkout.
|
|
119
|
+
const globalNames = ['.pi', '.agents', '.claude', '.codex', '.config/pi', '.config/claude', '.config/codex', '.config/agents', '.config/opencode', '.config/amp', '.config/cursor', '.config/github-copilot'];
|
|
120
|
+
for (const name of globalNames) {
|
|
121
|
+
const p = path.join(home, name);
|
|
122
|
+
let real;
|
|
123
|
+
try { real = fs.realpathSync(p); } catch (e) { if (e.code !== 'ENOENT') throw e; continue; }
|
|
124
|
+
globalRoots.push(real);
|
|
125
|
+
}
|
|
126
|
+
checkGlobal(scope, scope);
|
|
127
|
+
checkGlobal(start, start);
|
|
128
|
+
result.scope = scope; result.start = start; result.projectBoundary = boundary; result.write = write;
|
|
129
|
+
return { start, boundary, write };
|
|
130
|
+
}
|
|
131
|
+
function main() {
|
|
132
|
+
const { start, boundary, write } = parse();
|
|
133
|
+
let guide = null;
|
|
134
|
+
for (let d = start;; d = path.dirname(d)) {
|
|
135
|
+
if (d === home || d === path.dirname(d)) break;
|
|
136
|
+
const p = path.join(d, 'WRITING.md'); const item = inspect(p);
|
|
137
|
+
if (item) { guide = { path: p, ...item }; break; }
|
|
138
|
+
if (d === boundary) break;
|
|
139
|
+
}
|
|
140
|
+
const localGuide = guide && inside(scope, guide.path) && inside(scope, guide.real);
|
|
141
|
+
if (guide && inside(scope, guide.path) && !inside(scope, guide.real)) fail('Guide escapes authorized scope', guide.path);
|
|
142
|
+
const dir = localGuide ? path.dirname(guide.path) : scope;
|
|
143
|
+
if (guide && !localGuide) result.inherited = guide.path;
|
|
144
|
+
const wp = path.join(dir, 'WRITING.md'); const tp = path.join(dir, 'TERMINOLOGY.md');
|
|
145
|
+
const ap = path.join(dir, 'AGENTS.md'); const cp = path.join(dir, 'CLAUDE.md');
|
|
146
|
+
const entries = new Map();
|
|
147
|
+
for (const p of [wp, tp, ap, cp]) entries.set(p, inspect(p, true));
|
|
148
|
+
if (guide) validateLinks(guide.path, guide, localGuide ? tp : null);
|
|
149
|
+
const existingTerm = entries.get(tp);
|
|
150
|
+
if (existingTerm) validateLinks(tp, existingTerm, null);
|
|
151
|
+
for (const [i, policy] of [wp, tp].entries()) for (const other of [wp, tp, ap, cp].slice(i + 1)) {
|
|
152
|
+
if (sameFile(entries.get(policy), entries.get(other))) fail('Guidance files or agent entrypoints share a target', other);
|
|
153
|
+
}
|
|
154
|
+
for (const p of [wp, tp, ap, cp]) {
|
|
155
|
+
const item = entries.get(p);
|
|
156
|
+
if (item) {
|
|
157
|
+
// A hard link not represented by a target may name an external file.
|
|
158
|
+
const names = new Set([...entries.values()].filter(other => sameFile(item, other)).map(other => other.real));
|
|
159
|
+
if (item.nlink > names.size) fail('Target has unaccounted hard links', p);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const plan = [];
|
|
163
|
+
function record(p, action, content, item = entries.get(p)) {
|
|
164
|
+
result.files.push({ path: p, status: action === 'none' ? 'already configured' : action === 'append' ? 'updated' : 'created' });
|
|
165
|
+
if (action !== 'none') plan.push({ p, action, content, item });
|
|
166
|
+
}
|
|
167
|
+
record(wp, entries.get(wp) ? 'none' : 'create', WRITING);
|
|
168
|
+
record(tp, existingTerm ? 'none' : 'create', TERMS);
|
|
169
|
+
const agent = entries.get(ap), claude = entries.get(cp);
|
|
170
|
+
const agentText = agent?.bytes.toString('utf8') || '';
|
|
171
|
+
checkConflict(agentText, ap);
|
|
172
|
+
const agentConfigured = hasLoader(agentText);
|
|
173
|
+
function appendText(text) { const nl = text.includes('\r\n') ? '\r\n' : '\n'; return (text && !text.endsWith('\n') ? nl : '') + (text ? nl : '') + LOADER.replaceAll('\n', nl); }
|
|
174
|
+
record(ap, agentConfigured ? 'none' : agent ? 'append' : 'create', agent ? appendText(agentText) : LOADER);
|
|
175
|
+
const same = sameFile(agent, claude);
|
|
176
|
+
const claudeText = claude?.bytes.toString('utf8') || '';
|
|
177
|
+
checkConflict(claudeText, cp);
|
|
178
|
+
const referencesAgents = loadsAgents(claudeText, claude?.real || cp, ap, agent);
|
|
179
|
+
const claudeConfigured = same || hasLoader(claudeText) || referencesAgents;
|
|
180
|
+
const plannedGuidance = new Set([wp, tp, ap]);
|
|
181
|
+
if (agent) validateLinks(ap, agent, plannedGuidance, new Set(), true);
|
|
182
|
+
if (claude && !same) validateLinks(cp, claude, plannedGuidance, new Set(), true);
|
|
183
|
+
record(cp, !claude ? 'symlink' : claudeConfigured ? 'none' : 'append', !claude ? 'AGENTS.md' : appendText(claudeText));
|
|
184
|
+
// Reinspect every target and inherited input before starting writes.
|
|
185
|
+
for (const [p, old] of entries) {
|
|
186
|
+
const now = inspect(p, true);
|
|
187
|
+
if (!!old !== !!now || (old && (old.real !== now.real || !sameFile(old, now) || !old.bytes.equals(now.bytes) || old.link !== now.link))) fail('Target changed during preflight', p);
|
|
188
|
+
}
|
|
189
|
+
if (guide && !localGuide) {
|
|
190
|
+
const now = inspect(guide.path); if (!now || now.real !== guide.real || !sameFile(now, guide) || !now.bytes.equals(guide.bytes)) fail('Inherited guide changed during preflight', guide.path);
|
|
191
|
+
}
|
|
192
|
+
if (write) for (const step of plan) {
|
|
193
|
+
try { fs.accessSync(step.action === 'append' ? step.item.real : path.dirname(step.p), fs.constants.W_OK); }
|
|
194
|
+
catch { fail('Write target is not writable', step.p); }
|
|
195
|
+
}
|
|
196
|
+
if (write) for (const step of plan) {
|
|
197
|
+
if (step.action === 'create') fs.writeFileSync(step.p, step.content, { flag: 'wx' });
|
|
198
|
+
else if (step.action === 'symlink') fs.symlinkSync(step.content, step.p);
|
|
199
|
+
else {
|
|
200
|
+
const now = inspect(step.p, true);
|
|
201
|
+
if (!now || now.real !== step.item.real || !sameFile(now, step.item) || !now.bytes.equals(step.item.bytes)) fail('Target changed before update', step.p);
|
|
202
|
+
fs.appendFileSync(now.real, step.content);
|
|
203
|
+
}
|
|
204
|
+
completed.add(step.p);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
try { main(); } catch (e) {
|
|
208
|
+
result.errors.push({ path: e.file || null, message: e.message });
|
|
209
|
+
if (e.file && !result.files.some(f => f.path === e.file)) result.files.push({ path: e.file, status: 'blocked' });
|
|
210
|
+
for (const f of result.files) if (f.status !== 'already configured' && !completed.has(f.path)) f.status = 'blocked';
|
|
211
|
+
process.exitCode = 1;
|
|
212
|
+
}
|
|
213
|
+
console.log(JSON.stringify(result, null, 2));
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Analytical report
|
|
2
|
+
|
|
3
|
+
## Use when
|
|
4
|
+
A decision-maker needs the results of data analysis, research or an investigation and their
|
|
5
|
+
implications. Adapt depth to the question, not the amount of source material.
|
|
6
|
+
- Pick a domain-specific report template when the producing skill names one.
|
|
7
|
+
- Pick a compliance report layout when reporting a compliance assessment.
|
|
8
|
+
- Pick a document template instead when defining requirements, policy or a proposed solution.
|
|
9
|
+
|
|
10
|
+
## Tone
|
|
11
|
+
Direct and evidence-led; explain technical detail only as far as the reader needs it.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
- Reader, question and intended decision. Material: ask once, else narrow the scope.
|
|
15
|
+
- Source analysis, data or research with provenance. Material: ask once, else narrow the scope.
|
|
16
|
+
- Scope, period, population, units, methods and limitations. Material: mark [TBD] or narrow the scope.
|
|
17
|
+
- Comparison baseline, if supplied. Without one, omit trend and improvement claims.
|
|
18
|
+
- Proposed actions or constraints, if supplied. Do not invent commitments.
|
|
19
|
+
|
|
20
|
+
## Reasoning
|
|
21
|
+
1. Read [analytical reporting](../references/analytical-reporting.md) and its required writing-pattern
|
|
22
|
+
and definition references. Privately identify each section's reader question, supported point,
|
|
23
|
+
necessary evidence and material limit. Establish what the sources can answer and where their coverage ends.
|
|
24
|
+
2. Reconcile measurements and distinguish observations from interpretations and hypotheses.
|
|
25
|
+
3. Connect each finding to the reader's question and explain material uncertainty.
|
|
26
|
+
4. Derive proportionate recommendations without presenting forecasts as measured results.
|
|
27
|
+
|
|
28
|
+
## Sections
|
|
29
|
+
1. **Summary** (Required): answer the question, state the main findings and material limits.
|
|
30
|
+
2. **Scope and method** (Required): sources, period, population, definitions and exclusions.
|
|
31
|
+
Keep the orienting scope near the findings; detailed procedures may be linked or collapsed.
|
|
32
|
+
3. **Findings** (Required): organize by the questions that matter; each analytical section makes
|
|
33
|
+
a supported point with the evidence needed to establish it. A topic heading alone is not enough.
|
|
34
|
+
4. **Implications and limitations** (Required): explain what follows and what remains unproven.
|
|
35
|
+
Put limits beside the findings they qualify or in one shared note when appropriate. A separate
|
|
36
|
+
chapter is not required; do not repeat the same qualifications merely to fill this outline.
|
|
37
|
+
5. **Recommendations and decisions** (Required when action is requested or supported): tie each
|
|
38
|
+
action to a finding; distinguish proposals from agreed commitments.
|
|
39
|
+
6. **Sources and supporting detail** (Required): provide traceable references; keep bulky tables
|
|
40
|
+
and methods here or in linked appendices. Inline citations may replace a separate source list.
|
|
41
|
+
|
|
42
|
+
## Done when
|
|
43
|
+
- Does the summary answer the reader's question without overstating certainty?
|
|
44
|
+
- Can a reader identify the supported point, evidence and material limit of each analytical section?
|
|
45
|
+
- Are definitions direct, with essential metric conditions separate from processing and coverage notes?
|
|
46
|
+
- Have repeated defensive claims and execution narration been removed without losing material information?
|
|
47
|
+
- Can every material claim and calculation be traced to its inputs?
|
|
48
|
+
- Do totals, rates, charts and tables agree on population, units, period and exclusions?
|
|
49
|
+
- Are comparisons valid and causal claims supported rather than inferred from correlation?
|
|
50
|
+
- Are missing data, scope limits and conflicting sources visible where they affect conclusions?
|
|
51
|
+
- Are recommendations supported, with proposed commitments clearly distinguished?
|
|
52
|
+
|
|
53
|
+
## Sources
|
|
54
|
+
First-party analytical reporting contract; domain-specific methods remain with their owning skills.
|
|
@@ -18,7 +18,7 @@ The baseline can be a regulation or scheme rule (compliance), a risk appetite or
|
|
|
18
18
|
- Pick the `compliance-audit` skill to run the audit itself against a checklist (tracker and
|
|
19
19
|
evidence); use this template to write up its result.
|
|
20
20
|
- An audit report built from completed audit findings for a regulator or board belongs to the
|
|
21
|
-
`write-
|
|
21
|
+
`write-report` compliance-report workflow, not this template.
|
|
22
22
|
|
|
23
23
|
## Tone
|
|
24
24
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plain-language
|
|
3
|
-
description: "Session mode: every reply and status line in plain language — lead with the point, everyday words, full sentences, no filler — in English or Chinese, until turned off. Enable by default when the project has an applicable WRITING.md, even without a slash command. Use for /plain-language, 'talk plainly', '说人话', and explicit requests to remember project reply preferences; /plain-language init persists the default and loading instructions. Save reply rules only under Agent replies; route document preferences to distill-writing. Ordinary mode toggles remain session-only. Turn off with '/plain-language off' or 'normal mode'. NOT for writing a document (write-doc) or reviewing one (editorial-review)."
|
|
4
|
-
release-version: 0.
|
|
3
|
+
description: "Session mode: every reply and status line in plain language — lead with the point, everyday words, full sentences, no filler — in English or Chinese, until turned off. Enable by default when the project has an applicable WRITING.md, even without a slash command. Use for /plain-language, 'talk plainly', '说人话', and explicit requests to remember project reply preferences; /plain-language init persists the default and loading instructions. Save reply rules only under Agent replies; route document preferences to distill-writing. Ordinary mode toggles remain session-only. Turn off with '/plain-language off' or 'normal mode'. NOT for writing a document (write-doc) or analytical report (write-report) or reviewing one (editorial-review)."
|
|
4
|
+
release-version: 0.45.1
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Plain language
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: polish-cn
|
|
3
|
-
description: "Polish the Chinese wording of a finished document or report, with a script proving every number, date, identifier, link and protected term is unchanged; prefers a Chinese model and records which ran. Use for '中文润色' or as a report skill's last step. NOT for cutting or restructuring content (editorial-review) or translating (write-doc)."
|
|
4
|
-
release-version: 0.
|
|
3
|
+
description: "Polish the Chinese wording of a finished document or report, with a script proving every number, date, identifier, link and protected term is unchanged; prefers a Chinese model and records which ran. Use for '中文润色' or as a report skill's last step. NOT for cutting or restructuring content (editorial-review) or translating (write-doc or write-report)."
|
|
4
|
+
release-version: 0.45.1
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Polish Chinese
|
|
@@ -21,6 +21,13 @@ result; then the script applies it.
|
|
|
21
21
|
**Wording only.** Never add, cut or move content. A cut or a restructure is an `editorial-review`
|
|
22
22
|
finding. Example: "0 笔销售未能匹配" reads as obvious → leave it, and report it for editorial review.
|
|
23
23
|
|
|
24
|
+
A point-free section, repeated defensive claims or a definition overloaded with methods is a
|
|
25
|
+
content problem, not a reason to expand or polish the passage. Return it to the editorial owner;
|
|
26
|
+
for review-only or wording-only scope, report the issue without broadening the authorized edit.
|
|
27
|
+
If `house-style` is installed, read its [definitions and metrics](../house-style/references/definitions-and-metrics.md)
|
|
28
|
+
and use the distinction when reporting issues. Do not claim those structural issues were fixed
|
|
29
|
+
by passing token checks. Content changes require renewed polishing of the changed blocks.
|
|
30
|
+
|
|
24
31
|
**Actually edit.** Ask the model to review every block and rewrite each one the brief's patterns
|
|
25
32
|
match. A pass that keeps most blocks of a rough draft is weak, not clean: check the kept blocks
|
|
26
33
|
against the patterns yourself. Example: "进行进一步的核查工作" kept as natural → send it back
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reg-parser
|
|
3
3
|
version: 1.1.0
|
|
4
|
-
description: "Parse regulatory/scheme documents into structured outputs: convert a regulation (AML, VARS, PCI-DSS, KYC, GDPR) into an audit-ready compliance checklist, or trace contract clauses to a mandate source. Suggest proactively when a regulation PDF accompanies a contract review or compliance task. NOT general summarization (doc-to-md),
|
|
5
|
-
release-version: 0.
|
|
4
|
+
description: "Parse regulatory/scheme documents into structured outputs: convert a regulation (AML, VARS, PCI-DSS, KYC, GDPR) into an audit-ready compliance checklist, or trace contract clauses to a mandate source. Suggest proactively when a regulation PDF accompanies a contract review or compliance task. NOT general summarization (doc-to-md), writing a gap-analysis report (write-report), or writing a policy from the checklist (write-doc)."
|
|
5
|
+
release-version: 0.45.1
|
|
6
6
|
---
|
|
7
7
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
8
8
|
# reg-parser
|
|
@@ -166,7 +166,7 @@ The optional `--source` flag enables three semantic warnings (advisory, never bl
|
|
|
166
166
|
|
|
167
167
|
### JSON dump for downstream consumers
|
|
168
168
|
|
|
169
|
-
Markdown is the authored source of truth — humans read and review it, GitHub renders it, and authors edit it directly. Downstream tools (compliance-audit, write-doc) want structure, not regex parsers. Generate a JSON view of any checklist with:
|
|
169
|
+
Markdown is the authored source of truth — humans read and review it, GitHub renders it, and authors edit it directly. Downstream tools (compliance-audit, write-report, write-doc) want structure, not regex parsers. Generate a JSON view of any checklist with:
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
172
|
python3 {baseDir}/scripts/dump_checklist.py <checklist.md> --out <out.json>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: terminology
|
|
3
|
-
description: "Build and keep a project's TERMINOLOGY.md: the preferred term per concept in English, 简体 and 繁體, and the terms to avoid. Use to set it up from the project's documents, when the user settles or corrects a term, or when another writing skill needs the format. NOT for writing documents (write-doc) or the code domain model (domain-modeling)."
|
|
4
|
-
release-version: 0.
|
|
3
|
+
description: "Build and keep a project's TERMINOLOGY.md: the preferred term per concept in English, 简体 and 繁體, and the terms to avoid. Use to set it up from the project's documents, when the user settles or corrects a term, or when another writing skill needs the format. NOT for writing documents (write-doc) or analytical reports (write-report) or the code domain model (domain-modeling)."
|
|
4
|
+
release-version: 0.45.1
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Terminology
|
|
@@ -19,7 +19,11 @@ which words to avoid. Every writing skill reads it; `polish-cn` checks rewrites
|
|
|
19
19
|
|
|
20
20
|
**One file, beside WRITING.md.** Put `TERMINOLOGY.md` in the folder of the WRITING.md that applies
|
|
21
21
|
([lookup](../house-style/references/rules.md#find-writingmd)), else the repository root. Create it
|
|
22
|
-
when the first term is settled, or when `write-doc` seeds it before a first document.
|
|
22
|
+
when the first term is settled, or when `write-doc` or `write-report` seeds it before a first document.
|
|
23
|
+
An explicit user invocation of either writer also initializes a minimal file through the
|
|
24
|
+
[writer setup branch](../house-style/references/initialization.md), even when no term rows are
|
|
25
|
+
known. Automatic writer selection does not invoke that setup; no placeholder concept or
|
|
26
|
+
unapproved `user` row is added to fill the file. Never write CONTEXT.md; that file belongs to
|
|
23
27
|
`domain-modeling`.
|
|
24
28
|
|
|
25
29
|
**Only this project's terms.** A row is a concept the project's readers meet and that is
|
|
@@ -52,7 +56,7 @@ variants, ask once about the conflicts, write the file, and move any term rows o
|
|
|
52
56
|
## During other work
|
|
53
57
|
|
|
54
58
|
Any writing skill that meets a term decision records it here in the [format](references/format.md),
|
|
55
|
-
with status `user, <date>`: `write-doc`, `editorial-review`, `polish-cn`, `distill-writing`, and the
|
|
59
|
+
with status `user, <date>`: `write-doc`, `write-report`, `editorial-review`, `polish-cn`, `distill-writing`, and the
|
|
56
60
|
report skills. Each reads `TERMINOLOGY.md` before writing, and prefers its rows over the bundled
|
|
57
61
|
common list.
|
|
58
62
|
|