@cad0p/pi-steering 0.1.0
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/CHANGELOG.md +36 -0
- package/LICENSE +29 -0
- package/README.md +920 -0
- package/dist/__test-helpers__.d.ts +95 -0
- package/dist/__test-helpers__.d.ts.map +1 -0
- package/dist/__test-helpers__.js +174 -0
- package/dist/__test-helpers__.js.map +1 -0
- package/dist/bin/pi-steering.d.ts +9 -0
- package/dist/bin/pi-steering.d.ts.map +1 -0
- package/dist/bin/pi-steering.js +506 -0
- package/dist/bin/pi-steering.js.map +1 -0
- package/dist/compat.d.ts +50 -0
- package/dist/compat.d.ts.map +1 -0
- package/dist/compat.js +180 -0
- package/dist/compat.js.map +1 -0
- package/dist/defaults.d.ts +61 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/defaults.js +106 -0
- package/dist/defaults.js.map +1 -0
- package/dist/define-config.d.ts +235 -0
- package/dist/define-config.d.ts.map +1 -0
- package/dist/define-config.js +118 -0
- package/dist/define-config.js.map +1 -0
- package/dist/define-predicate.d.ts +49 -0
- package/dist/define-predicate.d.ts.map +1 -0
- package/dist/define-predicate.js +35 -0
- package/dist/define-predicate.js.map +1 -0
- package/dist/evaluator-internals/context.d.ts +186 -0
- package/dist/evaluator-internals/context.d.ts.map +1 -0
- package/dist/evaluator-internals/context.js +219 -0
- package/dist/evaluator-internals/context.js.map +1 -0
- package/dist/evaluator-internals/override.d.ts +19 -0
- package/dist/evaluator-internals/override.d.ts.map +1 -0
- package/dist/evaluator-internals/override.js +79 -0
- package/dist/evaluator-internals/override.js.map +1 -0
- package/dist/evaluator-internals/predicates.d.ts +152 -0
- package/dist/evaluator-internals/predicates.d.ts.map +1 -0
- package/dist/evaluator-internals/predicates.js +849 -0
- package/dist/evaluator-internals/predicates.js.map +1 -0
- package/dist/evaluator-internals/speculative-synthesis.d.ts +102 -0
- package/dist/evaluator-internals/speculative-synthesis.d.ts.map +1 -0
- package/dist/evaluator-internals/speculative-synthesis.js +101 -0
- package/dist/evaluator-internals/speculative-synthesis.js.map +1 -0
- package/dist/evaluator.d.ts +101 -0
- package/dist/evaluator.d.ts.map +1 -0
- package/dist/evaluator.js +714 -0
- package/dist/evaluator.js.map +1 -0
- package/dist/helpers/walker-unknown-cwd-reason.d.ts +68 -0
- package/dist/helpers/walker-unknown-cwd-reason.d.ts.map +1 -0
- package/dist/helpers/walker-unknown-cwd-reason.js +73 -0
- package/dist/helpers/walker-unknown-cwd-reason.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/drop-unused-observers.d.ts +43 -0
- package/dist/internal/drop-unused-observers.d.ts.map +1 -0
- package/dist/internal/drop-unused-observers.js +50 -0
- package/dist/internal/drop-unused-observers.js.map +1 -0
- package/dist/internal/finalize-plugin-state.d.ts +22 -0
- package/dist/internal/finalize-plugin-state.d.ts.map +1 -0
- package/dist/internal/finalize-plugin-state.js +14 -0
- package/dist/internal/finalize-plugin-state.js.map +1 -0
- package/dist/internal/merge-observers.d.ts +30 -0
- package/dist/internal/merge-observers.d.ts.map +1 -0
- package/dist/internal/merge-observers.js +27 -0
- package/dist/internal/merge-observers.js.map +1 -0
- package/dist/internal/pattern-utils.d.ts +33 -0
- package/dist/internal/pattern-utils.d.ts.map +1 -0
- package/dist/internal/pattern-utils.js +20 -0
- package/dist/internal/pattern-utils.js.map +1 -0
- package/dist/internal/ref-text.d.ts +11 -0
- package/dist/internal/ref-text.d.ts.map +1 -0
- package/dist/internal/ref-text.js +15 -0
- package/dist/internal/ref-text.js.map +1 -0
- package/dist/internal/session-runtime.d.ts +44 -0
- package/dist/internal/session-runtime.d.ts.map +1 -0
- package/dist/internal/session-runtime.js +143 -0
- package/dist/internal/session-runtime.js.map +1 -0
- package/dist/internal/watch-matcher.d.ts +56 -0
- package/dist/internal/watch-matcher.d.ts.map +1 -0
- package/dist/internal/watch-matcher.js +179 -0
- package/dist/internal/watch-matcher.js.map +1 -0
- package/dist/loader.d.ts +97 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +527 -0
- package/dist/loader.js.map +1 -0
- package/dist/observer-dispatcher.d.ts +69 -0
- package/dist/observer-dispatcher.d.ts.map +1 -0
- package/dist/observer-dispatcher.js +184 -0
- package/dist/observer-dispatcher.js.map +1 -0
- package/dist/plugin-merger.d.ts +175 -0
- package/dist/plugin-merger.d.ts.map +1 -0
- package/dist/plugin-merger.js +450 -0
- package/dist/plugin-merger.js.map +1 -0
- package/dist/plugins/git/branch-tracker.d.ts +85 -0
- package/dist/plugins/git/branch-tracker.d.ts.map +1 -0
- package/dist/plugins/git/branch-tracker.js +181 -0
- package/dist/plugins/git/branch-tracker.js.map +1 -0
- package/dist/plugins/git/cwd-extensions.d.ts +10 -0
- package/dist/plugins/git/cwd-extensions.d.ts.map +1 -0
- package/dist/plugins/git/cwd-extensions.js +155 -0
- package/dist/plugins/git/cwd-extensions.js.map +1 -0
- package/dist/plugins/git/git-ops.d.ts +89 -0
- package/dist/plugins/git/git-ops.d.ts.map +1 -0
- package/dist/plugins/git/git-ops.js +107 -0
- package/dist/plugins/git/git-ops.js.map +1 -0
- package/dist/plugins/git/index.d.ts +225 -0
- package/dist/plugins/git/index.d.ts.map +1 -0
- package/dist/plugins/git/index.js +52 -0
- package/dist/plugins/git/index.js.map +1 -0
- package/dist/plugins/git/predicates.d.ts +312 -0
- package/dist/plugins/git/predicates.d.ts.map +1 -0
- package/dist/plugins/git/predicates.js +580 -0
- package/dist/plugins/git/predicates.js.map +1 -0
- package/dist/plugins/git/rules.d.ts +209 -0
- package/dist/plugins/git/rules.d.ts.map +1 -0
- package/dist/plugins/git/rules.js +267 -0
- package/dist/plugins/git/rules.js.map +1 -0
- package/dist/schema.d.ts +1799 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +4 -0
- package/dist/schema.js.map +1 -0
- package/dist/testing/index.d.ts +621 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +747 -0
- package/dist/testing/index.js.map +1 -0
- package/examples/README.md +83 -0
- package/examples/combined-git-discipline/README.md +52 -0
- package/examples/combined-git-discipline/node_modules/.bin/pi-steering +43 -0
- package/examples/combined-git-discipline/package.json +18 -0
- package/examples/combined-git-discipline/steering.json +27 -0
- package/examples/combined-git-discipline/steering.test.ts +42 -0
- package/examples/combined-git-discipline/steering.ts +64 -0
- package/examples/combined-git-discipline/tsconfig.json +7 -0
- package/examples/draft-prs-only/README.md +42 -0
- package/examples/draft-prs-only/node_modules/.bin/pi-steering +43 -0
- package/examples/draft-prs-only/package.json +18 -0
- package/examples/draft-prs-only/steering.json +12 -0
- package/examples/draft-prs-only/steering.test.ts +48 -0
- package/examples/draft-prs-only/steering.ts +36 -0
- package/examples/draft-prs-only/tsconfig.json +7 -0
- package/examples/dynamic-reason-runtime-cwd/README.md +148 -0
- package/examples/dynamic-reason-runtime-cwd/node_modules/.bin/pi-steering +43 -0
- package/examples/dynamic-reason-runtime-cwd/package.json +18 -0
- package/examples/dynamic-reason-runtime-cwd/steering.test.ts +130 -0
- package/examples/dynamic-reason-runtime-cwd/steering.ts +82 -0
- package/examples/dynamic-reason-runtime-cwd/tsconfig.json +7 -0
- package/examples/force-push-strict/README.md +75 -0
- package/examples/force-push-strict/node_modules/.bin/pi-steering +43 -0
- package/examples/force-push-strict/package.json +18 -0
- package/examples/force-push-strict/steering.json +12 -0
- package/examples/force-push-strict/steering.test.ts +51 -0
- package/examples/force-push-strict/steering.ts +54 -0
- package/examples/force-push-strict/tsconfig.json +7 -0
- package/examples/no-amend/README.md +52 -0
- package/examples/no-amend/node_modules/.bin/pi-steering +43 -0
- package/examples/no-amend/package.json +18 -0
- package/examples/no-amend/steering.cwd-scoped.json +12 -0
- package/examples/no-amend/steering.json +11 -0
- package/examples/no-amend/steering.test.ts +49 -0
- package/examples/no-amend/steering.ts +38 -0
- package/examples/no-amend/tsconfig.json +7 -0
- package/examples/work-item-plugin/README.md +103 -0
- package/examples/work-item-plugin/node_modules/.bin/pi-steering +43 -0
- package/examples/work-item-plugin/package.json +19 -0
- package/examples/work-item-plugin/src/index.test.ts +168 -0
- package/examples/work-item-plugin/src/index.ts +122 -0
- package/examples/work-item-plugin/src/observers/npm-test-tracker.test.ts +95 -0
- package/examples/work-item-plugin/src/observers/npm-test-tracker.ts +88 -0
- package/examples/work-item-plugin/src/observers/retest-required-tracker.test.ts +81 -0
- package/examples/work-item-plugin/src/observers/retest-required-tracker.ts +81 -0
- package/examples/work-item-plugin/src/predicates/work-item-format.test.ts +157 -0
- package/examples/work-item-plugin/src/predicates/work-item-format.ts +99 -0
- package/examples/work-item-plugin/src/rules/commit-description-check.test.ts +107 -0
- package/examples/work-item-plugin/src/rules/commit-description-check.ts +83 -0
- package/examples/work-item-plugin/src/rules/commit-requires-work-item.test.ts +79 -0
- package/examples/work-item-plugin/src/rules/commit-requires-work-item.ts +56 -0
- package/examples/work-item-plugin/src/rules/push-requires-tests.test.ts +245 -0
- package/examples/work-item-plugin/src/rules/push-requires-tests.ts +62 -0
- package/examples/work-item-plugin/tsconfig.json +8 -0
- package/package.json +88 -0
- package/skills/steering-authoring/SKILL.md +102 -0
- package/src/INVARIANTS.md +116 -0
- package/src/__test-helpers__.ts +243 -0
- package/src/bin/pi-steering.test.ts +920 -0
- package/src/bin/pi-steering.ts +584 -0
- package/src/compat.test.ts +431 -0
- package/src/compat.ts +282 -0
- package/src/defaults.test.ts +585 -0
- package/src/defaults.ts +148 -0
- package/src/define-config.test.ts +888 -0
- package/src/define-config.ts +375 -0
- package/src/define-predicate.test.ts +70 -0
- package/src/define-predicate.ts +57 -0
- package/src/evaluator-internals/context.ts +290 -0
- package/src/evaluator-internals/override.test.ts +99 -0
- package/src/evaluator-internals/override.ts +83 -0
- package/src/evaluator-internals/predicates.ts +1037 -0
- package/src/evaluator-internals/speculative-synthesis.test.ts +411 -0
- package/src/evaluator-internals/speculative-synthesis.ts +199 -0
- package/src/evaluator.test.ts +6296 -0
- package/src/evaluator.ts +1106 -0
- package/src/factory-time-load.test.ts +630 -0
- package/src/helpers/walker-unknown-cwd-reason.test.ts +73 -0
- package/src/helpers/walker-unknown-cwd-reason.ts +83 -0
- package/src/index.test.ts +836 -0
- package/src/index.ts +229 -0
- package/src/internal/drop-unused-observers.test.ts +141 -0
- package/src/internal/drop-unused-observers.ts +81 -0
- package/src/internal/finalize-plugin-state.ts +43 -0
- package/src/internal/merge-observers.ts +51 -0
- package/src/internal/pattern-utils.test.ts +52 -0
- package/src/internal/pattern-utils.ts +38 -0
- package/src/internal/ref-text.test.ts +54 -0
- package/src/internal/ref-text.ts +17 -0
- package/src/internal/session-runtime.test.ts +629 -0
- package/src/internal/session-runtime.ts +201 -0
- package/src/internal/watch-matcher.test.ts +326 -0
- package/src/internal/watch-matcher.ts +200 -0
- package/src/jsdoc-propagation.test.ts +277 -0
- package/src/loader.test.ts +1098 -0
- package/src/loader.ts +581 -0
- package/src/not-block-onunknown.test.ts +554 -0
- package/src/observer-dispatcher.test.ts +939 -0
- package/src/observer-dispatcher.ts +290 -0
- package/src/per-predicate-typing.test.ts +361 -0
- package/src/plugin-merger.test.ts +790 -0
- package/src/plugin-merger.ts +598 -0
- package/src/plugins/git/README.md +485 -0
- package/src/plugins/git/branch-tracker.test.ts +281 -0
- package/src/plugins/git/branch-tracker.ts +187 -0
- package/src/plugins/git/cwd-extensions.test.ts +230 -0
- package/src/plugins/git/cwd-extensions.ts +160 -0
- package/src/plugins/git/git-ops.test.ts +397 -0
- package/src/plugins/git/git-ops.ts +173 -0
- package/src/plugins/git/index.ts +253 -0
- package/src/plugins/git/integration.test.ts +705 -0
- package/src/plugins/git/predicates.test.ts +1401 -0
- package/src/plugins/git/predicates.ts +693 -0
- package/src/plugins/git/rules.test.ts +1001 -0
- package/src/plugins/git/rules.ts +307 -0
- package/src/schema.test.ts +259 -0
- package/src/schema.ts +1963 -0
- package/src/testing/index.test.ts +1696 -0
- package/src/testing/index.ts +1472 -0
package/src/defaults.ts
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Part of pi-steering.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Built-in default rules + default plugins for the v2 engine.
|
|
6
|
+
*
|
|
7
|
+
* Ported from v1's `../defaults.ts` with patterns kept IDENTICAL so the
|
|
8
|
+
* safety contract existing users rely on doesn't drift. Each pattern
|
|
9
|
+
* here matches v1 byte-for-byte (string form, not RegExp); the v2
|
|
10
|
+
* evaluator compiles strings at load time via
|
|
11
|
+
* `./evaluator-internals/predicates.ts`.
|
|
12
|
+
*
|
|
13
|
+
* Design notes (preserved from v1):
|
|
14
|
+
* - `reason` messages are written for the agent, not the human: they
|
|
15
|
+
* tell the agent what it did wrong and what a safer alternative
|
|
16
|
+
* looks like, so a well-behaved model can recover without asking
|
|
17
|
+
* the user.
|
|
18
|
+
* - `pattern` strings run against the AST-extracted command string
|
|
19
|
+
* (`basename + " " + args.join(" ")`) per extracted ref. That means
|
|
20
|
+
* `sh -c 'git push --force'` is still caught via wrapper expansion.
|
|
21
|
+
* Patterns are anchored with `^` so they match the command name,
|
|
22
|
+
* not a substring inside an argument — e.g. `echo 'git push
|
|
23
|
+
* --force'` is correctly NOT flagged because the extracted
|
|
24
|
+
* command's basename is `echo`, not `git`.
|
|
25
|
+
* - `conventional-commits` from samfoy's defaults is intentionally
|
|
26
|
+
* omitted: it's opinionated project policy, not general safety.
|
|
27
|
+
* Users who want it can add it via their own `.pi/steering.ts` or
|
|
28
|
+
* install a plugin.
|
|
29
|
+
*
|
|
30
|
+
* Users disable specific defaults via `config.disabledRules: ["<rule-name>"]`
|
|
31
|
+
* or opt out of all defaults + default plugins via
|
|
32
|
+
* `config.disableDefaults: true`.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import type { Plugin, Rule } from "./schema.ts";
|
|
36
|
+
|
|
37
|
+
export const DEFAULT_RULES = [
|
|
38
|
+
// `as const satisfies readonly Rule[]` (vs. `: Rule[]`) preserves
|
|
39
|
+
// each rule's `name` literal through to `defaults` consumers. The
|
|
40
|
+
// type unions in `define-config.ts` (`DefaultRuleName`,
|
|
41
|
+
// `AllRuleNames`) project off `(typeof DEFAULT_RULES)[number]["name"]`
|
|
42
|
+
// — a bare `Rule[]` annotation widens those literals to `string`
|
|
43
|
+
// and silently disables typo-detection on `disabledRules`.
|
|
44
|
+
{
|
|
45
|
+
name: "no-force-push",
|
|
46
|
+
tool: "bash",
|
|
47
|
+
field: "command",
|
|
48
|
+
// Block `git push --force` / `-f`, allow `--force-with-lease`.
|
|
49
|
+
// Anchored so `echo 'git push --force'` (basename=echo) is NOT
|
|
50
|
+
// flagged. The pre-subcommand flag slot
|
|
51
|
+
// `(?:\s+-{1,2}[A-Za-z]\S*(?:\s+\S+)?)*` allows short and long
|
|
52
|
+
// git-flags before the subcommand:
|
|
53
|
+
// - `git -C /path push --force`
|
|
54
|
+
// - `git -c key=val push --force`
|
|
55
|
+
// - `git --git-dir=/x push --force`
|
|
56
|
+
// All three are silent bypasses with a plain `^git\s+push` anchor.
|
|
57
|
+
//
|
|
58
|
+
// Known limit: this pattern over-matches on
|
|
59
|
+
// `git log --grep="push --force"` because `--grep=push` is a
|
|
60
|
+
// single token that still satisfies `\bpush\b`. Real agents don't
|
|
61
|
+
// emit that; if it becomes a problem we'll move to args-array
|
|
62
|
+
// matching.
|
|
63
|
+
pattern:
|
|
64
|
+
"^git\\b(?:\\s+-{1,2}[A-Za-z]\\S*(?:\\s+\\S+)?)*\\s+push\\b.*(?:--force(?!-with-lease)|\\s-f(?:\\s|$))",
|
|
65
|
+
reason:
|
|
66
|
+
"Force push rewrites remote history and can destroy teammates' work. Use `git push --force-with-lease` if you must, or create a new commit instead.",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "no-hard-reset",
|
|
70
|
+
tool: "bash",
|
|
71
|
+
field: "command",
|
|
72
|
+
// Same pre-subcommand flag broadening as `no-force-push` so
|
|
73
|
+
// `git -C /other reset --hard` and `git -c key=val reset --hard`
|
|
74
|
+
// are also caught.
|
|
75
|
+
pattern:
|
|
76
|
+
"^git\\b(?:\\s+-{1,2}[A-Za-z]\\S*(?:\\s+\\S+)?)*\\s+reset\\s+--hard\\b",
|
|
77
|
+
reason:
|
|
78
|
+
"Hard reset discards uncommitted changes permanently. Use `git stash` to save work first, or `git reset --soft` to keep changes staged.",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "no-rm-rf-slash",
|
|
82
|
+
tool: "bash",
|
|
83
|
+
field: "command",
|
|
84
|
+
// rm with recursive AND force flags in any form, operating on `/`.
|
|
85
|
+
// Uses two independent lookaheads so separated flags (`-r -f`),
|
|
86
|
+
// long-form flags (`--recursive --force`), mixed case (`-Rf`),
|
|
87
|
+
// and reversed order (`-fr`) are all caught. Anchored to the
|
|
88
|
+
// basename so `echo 'rm -rf /'` (basename=echo) is NOT flagged.
|
|
89
|
+
pattern:
|
|
90
|
+
"^rm\\b(?=.*(?:-[A-Za-z]*[rR][A-Za-z]*|--recursive))(?=.*(?:-[A-Za-z]*f[A-Za-z]*|--force)).*\\s/(?:\\s|$)",
|
|
91
|
+
reason:
|
|
92
|
+
"Recursive force-delete from root is catastrophic and irreversible. Specify a safe path (e.g. a subdirectory of the project or a temp dir).",
|
|
93
|
+
// HARD block — inherent destructiveness, no override possible.
|
|
94
|
+
// Explicit `noOverride: true` guarantees this even when a layer
|
|
95
|
+
// sets `defaultNoOverride: false`.
|
|
96
|
+
noOverride: true,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "no-long-running-commands",
|
|
100
|
+
tool: "bash",
|
|
101
|
+
field: "command",
|
|
102
|
+
// Covers npm / yarn / pnpm dev + start, npx --watch, webpack dev
|
|
103
|
+
// modes, jest / tsc --watch, nodemon, and the modern
|
|
104
|
+
// bundler/runtime ecosystem (vite, astro, next dev, deno task
|
|
105
|
+
// dev/start/serve, bun dev). Representative, not exhaustive —
|
|
106
|
+
// consumers with other watchers should add them via their own
|
|
107
|
+
// `.pi/steering.ts`.
|
|
108
|
+
pattern:
|
|
109
|
+
"^(?:npm\\s+(?:run\\s+dev|start)|yarn\\s+(?:dev|start)|pnpm\\s+(?:run\\s+)?(?:dev|start)|npx\\s+.*--watch|webpack\\s+(?:--watch|serve)|jest\\s+--watch|nodemon\\b|tsc\\s+--watch|vite(?:\\s+(?:dev|serve|preview))?(?!\\s+[A-Za-z])|astro\\s+(?:dev|preview)|next\\s+dev|deno\\s+task\\s+(?:dev|start|serve)|bun\\s+(?:dev|run\\s+dev))\\b",
|
|
110
|
+
reason:
|
|
111
|
+
"Long-running dev servers and watchers block the agent loop. Ask the user to run it manually in another terminal, or use a background-process tool. Representative — add your own via `.pi/steering.ts` if a framework isn't listed here.",
|
|
112
|
+
},
|
|
113
|
+
] as const satisfies readonly Rule[];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Default plugins shipped by the package.
|
|
117
|
+
*
|
|
118
|
+
* Deliberately empty since the v0.1.x monorepo split: the git plugin
|
|
119
|
+
* (`pi-steering/plugins/git`) is OPT-IN, not default-on. Users who
|
|
120
|
+
* want the `branch` / `upstream` / `commitsAhead` / `hasStagedChanges`
|
|
121
|
+
* / `isClean` / `remote` predicates, the `no-main-commit` /
|
|
122
|
+
* `no-main-commit-github` rules, the branch tracker, or the `cwd.git`
|
|
123
|
+
* tracker extension must declare it explicitly:
|
|
124
|
+
*
|
|
125
|
+
* ```ts
|
|
126
|
+
* import gitPlugin from "@cad0p/pi-steering/plugins/git";
|
|
127
|
+
* export default defineConfig({ plugins: [gitPlugin] });
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* Declaring the plugin explicitly is what gives `defineConfig`'s
|
|
131
|
+
* generics the rule / plugin name unions for typo-checking on
|
|
132
|
+
* `disabledRules` / `disabledPlugins` — an undeclared plugin's rule
|
|
133
|
+
* names are NOT in the inferred union, so typos surface as compile
|
|
134
|
+
* errors instead of silent no-ops. Runtime defaults and type-level
|
|
135
|
+
* visibility must not diverge; an empty default list is the only way
|
|
136
|
+
* to guarantee they can't.
|
|
137
|
+
*
|
|
138
|
+
* Rationale for opt-in (reverses the v0.1.0 D1 default-on decision):
|
|
139
|
+
* git discipline rules are opinionated project policy, not universal
|
|
140
|
+
* safety rails — `DEFAULT_RULES` (domain-agnostic rails like
|
|
141
|
+
* `no-force-push`, `no-rm-rf-slash`) remains default-on; domain
|
|
142
|
+
* plugins opt in.
|
|
143
|
+
*
|
|
144
|
+
* The count lock in `defaults.test.ts` guards this list: any addition
|
|
145
|
+
* to the default plugin list is a deliberate ship-surface change and
|
|
146
|
+
* must update the assertion explicitly.
|
|
147
|
+
*/
|
|
148
|
+
export const DEFAULT_PLUGINS = [] as const satisfies readonly Plugin[];
|