@event4u/agent-config 1.26.0 → 1.28.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.
Files changed (31) hide show
  1. package/.agent-src/commands/e2e-heal.md +2 -0
  2. package/.agent-src/commands/e2e-plan.md +2 -0
  3. package/.agent-src/commands/research.md +142 -0
  4. package/.agent-src/contexts/contracts/frugality-charter.md +4 -3
  5. package/.agent-src/contexts/contracts/research-schema.md +117 -0
  6. package/.agent-src/rules/domain-adoption-policy.md +158 -0
  7. package/.agent-src/rules/no-roadmap-references.md +1 -1
  8. package/.agent-src/rules/no-unsolicited-rebase.md +107 -0
  9. package/.agent-src/rules/scope-control.md +6 -8
  10. package/.agent-src/skills/deep-reading-analyst/SKILL.md +192 -0
  11. package/.agent-src/skills/mobile-e2e-strategy/SKILL.md +147 -0
  12. package/.agent-src/skills/playwright-testing/SKILL.md +1 -0
  13. package/.agent-src/skills/react-native-setup/SKILL.md +221 -0
  14. package/.agent-src/skills/roadmap-writing/SKILL.md +3 -3
  15. package/.agent-src/templates/agent-settings.md +1 -1
  16. package/.claude-plugin/marketplace.json +5 -1
  17. package/CHANGELOG.md +48 -0
  18. package/README.md +3 -3
  19. package/docs/architecture.md +4 -4
  20. package/docs/catalog.md +16 -6
  21. package/docs/contracts/command-clusters.md +1 -0
  22. package/docs/contracts/file-ownership-matrix.json +1261 -96
  23. package/docs/decisions/ADR-004-rule-governance-pruning.md +3 -3
  24. package/docs/getting-started.md +2 -2
  25. package/docs/guidelines/agent-infra/inversion-thinking.md +388 -0
  26. package/docs/guidelines/agent-infra/ios-simulator-guide.md +383 -0
  27. package/docs/guidelines/agent-infra/mcp-request-signing.md +11 -14
  28. package/docs/guidelines/agent-infra/mental-models.md +314 -0
  29. package/docs/guidelines/agent-infra/scqa-framework.md +526 -0
  30. package/package.json +1 -1
  31. package/scripts/schemas/skill.schema.json +15 -0
@@ -11,6 +11,8 @@ suggestion:
11
11
 
12
12
  # e2e-heal
13
13
 
14
+ > **Mobile scope:** this command targets Playwright (browser/web) tests only. For Detox / Maestro / Appium / XCUITest / Espresso failures, use the `mobile-e2e-strategy` skill plus the framework's own diagnostic tooling — the Playwright-specific steps below do not apply to native mobile.
15
+
14
16
  ## Instructions
15
17
 
16
18
  ### 1. Identify failing tests
@@ -11,6 +11,8 @@ suggestion:
11
11
 
12
12
  # e2e-plan
13
13
 
14
+ > **Mobile scope:** this command targets browser/web E2E only. For native iOS, native Android, or React Native E2E planning, switch to the `mobile-e2e-strategy` skill — Playwright is not the right tool for native UI flows.
15
+
14
16
  ## Instructions
15
17
 
16
18
  ### 1. Gather context
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: research
3
+ cluster: research
4
+ description: "Preliminary research scaffolder — pick objects, define fields, emit `outline.yaml` + `fields.yaml` for downstream deep research. Use for surveys, benchmarks, tech selection, competitive scans."
5
+ disable-model-invocation: true
6
+ skills: [project-analyzer, deep-reading-analyst]
7
+ suggestion:
8
+ eligible: true
9
+ trigger_description: "research a topic, scan competitors, benchmark X, do a tech-selection survey"
10
+ trigger_context: "user names a research topic and wants a structured scaffold (objects + fields), not an immediate answer"
11
+ ---
12
+
13
+ # /research
14
+
15
+ Entry point for **preliminary research**: pick the objects to study, name
16
+ the fields to fill, and emit a YAML scaffold that a downstream deep-research
17
+ run will populate. Use this when the user names a topic and wants a
18
+ structured plan, not an immediate answer.
19
+
20
+ Routes thinking-framework support to
21
+ [`deep-reading-analyst`](../skills/deep-reading-analyst/SKILL.md) (SCQA
22
+ for narrative structure, mental-models lens for object selection).
23
+
24
+ ## Trigger
25
+
26
+ `/research <topic>`
27
+
28
+ ## Workflow
29
+
30
+ ### Step 1 — Initial framework from model knowledge
31
+
32
+ Generate, from the model's existing knowledge, the candidate object list
33
+ and field framework for the topic:
34
+
35
+ - **Objects / items** — entities, products, methods, datasets to compare.
36
+ - **Field framework** — dimensions to fill per item (basic info, technical
37
+ features, evidence, etc.).
38
+
39
+ Output `{step1_output}` and confirm with the user via numbered options
40
+ (per [`user-interaction`](../rules/user-interaction.md) Iron Law):
41
+
42
+ 1. Add or remove items?
43
+ 2. Field framework adequate?
44
+
45
+ ### Step 2 — Web-search supplement
46
+
47
+ Ask one numbered question for the time range (e.g., last 6 months,
48
+ since 2024, unlimited). Use the agent's native web-search tool — do
49
+ **not** spawn a separate `web-search-agent` persona.
50
+
51
+ Search prompt template (variables in `{xxx}` only — do not modify
52
+ structure):
53
+
54
+ ```text
55
+ Research topic: {topic}
56
+ Current date: {YYYY-MM-DD}
57
+ Time range: {time_range}
58
+
59
+ Existing framework:
60
+ {step1_output}
61
+
62
+ Goals:
63
+ 1. Verify existing items are not missing important objects.
64
+ 2. Supplement items based on missing objects.
65
+ 3. Continue searching for {topic}-related items within {time_range}.
66
+ 4. Supplement new fields where helpful.
67
+
68
+ Output (return inline, do not write files):
69
+
70
+ ### Supplementary items
71
+ - item_name: brief explanation (why it should be added)
72
+
73
+ ### Recommended supplementary fields
74
+ - field_name: field description (why this dimension is needed)
75
+
76
+ ### Sources
77
+ - [Source 1](url)
78
+ - [Source 2](url)
79
+ ```
80
+
81
+ ### Step 3 — Existing fields merge
82
+
83
+ Ask via numbered options whether the user has an existing field-definition
84
+ file. If yes, read the file and merge into the framework before Step 4.
85
+
86
+ ### Step 4 — Generate outline (two files)
87
+
88
+ Merge `{step1_output}`, `{step2_output}`, and any user-provided fields,
89
+ then write two files into `$PROJECT_ROOT/agents/research/{topic_slug}/`:
90
+
91
+ **`outline.yaml`** (items + execution config):
92
+
93
+ - `topic`: research topic
94
+ - `items`: research-objects list
95
+ - `execution`: `batch_size`, `items_per_agent`, `output_dir`
96
+ (defaults: `./results`; confirm with the user via numbered options)
97
+
98
+ **`fields.yaml`** (field definitions):
99
+
100
+ - field categories + definitions
101
+ - per field: `name`, `description`, `detail_level`
102
+ (`brief` → `moderate` → `detailed`)
103
+ - `uncertain`: list reserved for the deep-research phase
104
+
105
+ YAML structure validation: see
106
+ [`research-schema`](../contexts/contracts/research-schema.md) for the
107
+ project-local JSON-Schema reference (no runtime Python validator; the
108
+ agent reads the schema and self-validates).
109
+
110
+ ### Step 5 — Output + confirm
111
+
112
+ Create `agents/research/{topic_slug}/` if absent, write both YAML files,
113
+ and present a summary block to the user:
114
+
115
+ - Topic + slug.
116
+ - Item count + field count.
117
+ - Path to the two files.
118
+ - Next-step pointer: deep-research orchestration is a follow-up port;
119
+ use the YAML scaffold as input when that lands.
120
+
121
+ ## Output paths
122
+
123
+ ```text
124
+ $PROJECT_ROOT/agents/research/{topic_slug}/
125
+ ├── outline.yaml # items list + execution config
126
+ └── fields.yaml # field definitions
127
+ ```
128
+
129
+ ## Out of scope (Phase 2)
130
+
131
+ `/research-deep`, `/research-add-items`, `/research-add-fields`, and the
132
+ Python `validate_json.py` validator are **not** ported in Phase 1 — they
133
+ are queued as follow-up cluster sub-commands.
134
+
135
+ ## ADOPT citation
136
+
137
+ Adopted from [`Weizhena/Deep-Research-skills`](https://github.com/Weizhena/Deep-Research-skills)
138
+ @ commit `dc18cf4` · upstream file research/SKILL.md inside skills/research-en/ · MIT License.
139
+ Refactored: dropped `web-search-agent` persona (portability), dropped
140
+ Pydantic validator (replaced with JSON-Schema reference), repathed
141
+ `./` → `$PROJECT_ROOT/agents/research/`, deferred `/research-deep` +
142
+ `/research-add-*` to Phase 2.
@@ -21,9 +21,10 @@ Cite the source rule in writer artifacts; do **not** restate it here.
21
21
 
22
22
  ## Confirmation taxonomy
23
23
 
24
- Iron-Law / Routine / Contextual classification with carve-outs
25
- lives in the roadmap [`§ Confirmation taxonomy`](../../../agents/roadmaps/road-to-token-frugality.md#confirmation-taxonomy).
26
- Charter does not duplicate the table.
24
+ Iron-Law / Routine / Contextual classification with carve-outs is
25
+ canonical in the active token-frugality plate under `agents/roadmaps/`
26
+ (or `agents/roadmaps/archive/` once closed). Charter does not duplicate
27
+ the table.
27
28
 
28
29
  ## Settings hooks
29
30
 
@@ -0,0 +1,117 @@
1
+ # research-schema
2
+
3
+ Project-local JSON-Schema reference for the
4
+ [`/research`](../../commands/research.md) command's two output files —
5
+ `outline.yaml` and `fields.yaml`. The agent reads the schemas below and
6
+ self-validates the YAML before writing; **no runtime Python validator
7
+ ships in this package** — the Pydantic validator from upstream was
8
+ dropped at adoption time and replaced with this reference contract.
9
+
10
+ ## `outline.yaml` schema
11
+
12
+ ```yaml
13
+ # JSON-Schema (YAML form) — outline.yaml
14
+ type: object
15
+ required: [topic, items, execution]
16
+ properties:
17
+ topic:
18
+ type: string
19
+ description: Research topic, free-form.
20
+ topic_slug:
21
+ type: string
22
+ pattern: "^[a-z0-9][a-z0-9-]*$"
23
+ description: Lower-kebab slug used as the directory name.
24
+ items:
25
+ type: array
26
+ minItems: 1
27
+ items:
28
+ type: object
29
+ required: [name]
30
+ properties:
31
+ name: { type: string }
32
+ explanation: { type: string }
33
+ source: { type: string, format: uri }
34
+ execution:
35
+ type: object
36
+ required: [batch_size, items_per_agent, output_dir]
37
+ properties:
38
+ batch_size:
39
+ type: integer
40
+ minimum: 1
41
+ description: Number of parallel agents in the deep-research phase.
42
+ items_per_agent:
43
+ type: integer
44
+ minimum: 1
45
+ description: Items each agent processes per batch.
46
+ output_dir:
47
+ type: string
48
+ default: "./results"
49
+ description: Path (relative to the topic dir) for deep-research output.
50
+ ```
51
+
52
+ ## `fields.yaml` schema
53
+
54
+ ```yaml
55
+ # JSON-Schema (YAML form) — fields.yaml
56
+ type: object
57
+ required: [categories]
58
+ properties:
59
+ categories:
60
+ type: array
61
+ minItems: 1
62
+ items:
63
+ type: object
64
+ required: [name, fields]
65
+ properties:
66
+ name:
67
+ type: string
68
+ description: Category label (e.g., "Basic info", "Technical features").
69
+ fields:
70
+ type: array
71
+ minItems: 1
72
+ items:
73
+ type: object
74
+ required: [name, description, detail_level]
75
+ properties:
76
+ name: { type: string }
77
+ description: { type: string }
78
+ detail_level:
79
+ type: string
80
+ enum: [brief, moderate, detailed]
81
+ uncertain:
82
+ type: array
83
+ description: Reserved field, populated during deep-research phase.
84
+ items:
85
+ type: object
86
+ properties:
87
+ item: { type: string }
88
+ field: { type: string }
89
+ reason: { type: string }
90
+ ```
91
+
92
+ ## Self-validation procedure
93
+
94
+ 1. Generate the YAML in memory.
95
+ 2. Walk the schema above against the candidate object.
96
+ 3. On mismatch, fix the YAML before writing — do not write invalid
97
+ files and rely on a downstream check.
98
+ 4. Validation diagnostics surface to the user inline (file path,
99
+ field path, expected vs actual). No external dependencies.
100
+
101
+ ## Why no Pydantic / runtime validator
102
+
103
+ Upstream (`Weizhena/Deep-Research-skills`) shipped a `validate_json.py`
104
+ Pydantic-based validator that assumed `~/.claude/` paths and a Python
105
+ runtime in the consumer environment. Both are
106
+ `augment-portability` violations for this package (zero-runtime-Python
107
+ goal, host-agnostic distribution). The schema reference above lets the
108
+ agent validate by reading; consumers needing programmatic validation
109
+ can pipe the YAML through any JSON-Schema validator they prefer
110
+ (`ajv`, `python-jsonschema`, `check-jsonschema`, etc.).
111
+
112
+ ## Cross-references
113
+
114
+ - [`/research`](../../commands/research.md) — the command this schema
115
+ validates.
116
+ - Future `/research:deep` and `/research:report` sub-commands will
117
+ reference this same schema once ported.
@@ -0,0 +1,158 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2b"
4
+ alwaysApply: false
5
+ description: "Adopting a new domain track (mobile, ML, blockchain, IoT, gaming) — gates import on demand, ownership, CI fit, Sunset compatibility BEFORE harvest"
6
+ source: package
7
+ triggers:
8
+ - intent: "adopt new domain"
9
+ - intent: "harvest new domain track"
10
+ - intent: "open a domain plate"
11
+ - keyword: "mobile track"
12
+ - keyword: "ml track"
13
+ - keyword: "blockchain track"
14
+ - path_prefix: ".agent-src.uncompressed/skills/"
15
+ validator_ignore:
16
+ - type: "substring"
17
+ pattern: ".agent-src.uncompressed/"
18
+ reason: "Rule names the authoring tree as the gated-entry location for new domain plates."
19
+ ---
20
+
21
+ # Domain Adoption Policy
22
+
23
+ A "domain" is a coherent vertical the suite has not yet entered — mobile, ML,
24
+ blockchain, scientific computing, IoT, gaming, embedded, robotics. Adopting
25
+ one is a structural decision: every new domain plate doubles the surface a
26
+ single maintainer keeps current, and most upstream skill-suites in adjacent
27
+ domains rot within 6-12 months as their underlying SDK churns.
28
+
29
+ This rule gates that decision. It does **not** gate per-skill adoptions inside
30
+ a domain that is already opened — those run under the regular harvest plate
31
+ process. It gates **opening** the domain in the first place.
32
+
33
+ ## The Iron Law
34
+
35
+ ```
36
+ NEVER OPEN A NEW DOMAIN TRACK WITHOUT THE THREE GATES.
37
+ DEMAND-SIGNAL · NAMED MAINTENANCE OWNER · CI-TOOLING DECISION.
38
+ ALL THREE PASS, OR THE ROADMAP MARKS THE DOMAIN GATED.
39
+ ```
40
+
41
+ The three gates fire before any skill, guideline, command, or rule from the
42
+ domain enters `.agent-src.uncompressed/`. A council session may inform the
43
+ decision but cannot replace the gate evidence.
44
+
45
+ ## Gate 1 — Demand signal
46
+
47
+ At least one of the following must be **true and citeable** in the roadmap:
48
+
49
+ - **≥ 2 consumer projects** in the domain. Cite repository names or
50
+ `agents/contexts/` notes — not "I think there might be".
51
+ - **Named user direction with target.** A specific user ask plus a target
52
+ project / use case — e.g. "harvest the mobile skills for project X, due
53
+ next quarter". Vague *"this might be useful"* does not count.
54
+ - **Public-incident pull.** A reproducible incident on a consumer project
55
+ the domain would have prevented, captured in `agents/contexts/` with
56
+ the missing surface area named.
57
+
58
+ If none of the three is citeable, **defer**. Open a watch-only context note
59
+ under `agents/contexts/domain-watch/<domain>.md` listing the missing signal
60
+ so the next harvest can re-evaluate without re-relitigating the case.
61
+
62
+ ## Gate 2 — Named maintenance owner
63
+
64
+ Domain plates rot. Pick the owner before the import, not after.
65
+
66
+ - The roadmap names a **single maintainer** (not "the team", not "TBD")
67
+ responsible for the domain quarterly review.
68
+ - The owner commits to the **refresh cadence** — quarterly review at
69
+ minimum, faster if the domain is volatile (mobile RN/Expo SDK,
70
+ ML model APIs).
71
+ - Each adopted artefact carries an **inline upstream-source line** with
72
+ SHA + last-checked timestamp so refresh is mechanical, not archaeological.
73
+
74
+ If no owner is named or no cadence is set, **defer**. An unowned domain
75
+ plate becomes broken authoritative-links and stale skills inside two cycles.
76
+
77
+ ## Gate 3 — CI-tooling decision
78
+
79
+ Either the domain's verification tooling is validated in CI, or the suite
80
+ explicitly accepts platform-bound reference-only status.
81
+
82
+ - **Validated.** The CI pipeline runs the relevant linters/tests/integration
83
+ checks for the domain (e.g. `mobile-e2e` runners, ML model validation,
84
+ contract conformance) on every PR. Cost noted in the roadmap risk
85
+ register.
86
+ - **Out-of-scope (reference-only).** The domain is a platform fact the
87
+ suite cannot validate (iOS Simulator on non-macOS runners, GPU-bound
88
+ ML, hardware-bound IoT). The roadmap states this explicitly; affected
89
+ artefacts carry a "reference-only on \<unsupported platforms\>" header
90
+ so consumers do not file false-positive bugs.
91
+
92
+ If neither line is drawn, **defer**. Half-validated CI silently rots the
93
+ domain — green builds while the underlying tooling drifts.
94
+
95
+ ## Sunset Policy stacks on top
96
+
97
+ Every domain track inherits the authoritative-link Sunset path documented
98
+ in any plate that imports volatile upstream content:
99
+
100
+ - Volatile content (SDK-pinned, API-pinned, tool-version-pinned) lives as
101
+ guideline body + SHA-pinned upstream link, not as forked scripts.
102
+ - Refresh trigger: quarterly cadence or earlier if a SHA-pinned link
103
+ 404s in CI.
104
+ - The `check-refs` and `check-portability` linters apply unchanged.
105
+
106
+ Adopting a domain does not exempt it from any other suite-wide rule —
107
+ `augment-portability`, `skill-quality`, `size-enforcement`, `docs-sync`,
108
+ `rule-type-governance`. Every domain artefact passes the same gates as a
109
+ core artefact.
110
+
111
+ ## Failure modes
112
+
113
+ - *"It's just one skill, not a domain."* — Audit the skill's prerequisites.
114
+ If it pulls in a new toolchain, simulator, language runtime, or
115
+ platform-specific build system, it **is** a domain entry. Run the gates.
116
+ - *"The upstream is well-maintained, we can just track it."* — Tracking
117
+ upstream means owning the diff, the breaking changes, and the migrations.
118
+ Tracking is maintenance work; budget for it under Gate 2 or skip the
119
+ adoption.
120
+ - *"We'll add CI later."* — Later does not arrive. Either CI is wired in
121
+ the same plate, or the artefacts ship with explicit reference-only
122
+ headers so users do not assume validated coverage.
123
+ - *"Council convergence is enough."* — Council informs the gates; it does
124
+ not replace them. A council session may surface that all three gates
125
+ pass; the roadmap still cites the evidence.
126
+ - *"Demand-signal is the user asking once."* — Single-shot interest is a
127
+ watch trigger, not an open trigger. Either name the target use case
128
+ with project + timeline, or open a watch note and wait.
129
+
130
+ ## What to do when the gates fail
131
+
132
+ 1. Mark the domain plate `[-] gated — <gate name> not met` in the relevant
133
+ roadmap. Do **not** silently shrink scope to dodge the gate.
134
+ 2. Open a watch-only context note under `agents/contexts/domain-watch/`
135
+ capturing what's missing — citations, owner candidates, CI feasibility.
136
+ 3. Re-evaluate at the next harvest cycle. The note is the evidence trail
137
+ so the same questions are not relitigated.
138
+
139
+ ## Allowed without gates
140
+
141
+ - Adding **a single skill** to an **already-opened** domain follows the
142
+ regular harvest plate; the gates do not re-fire per skill.
143
+ - Authoring a **guideline** that documents a domain the suite already
144
+ ships in — the domain is open, the guideline is a within-domain artefact.
145
+ - A **rule** that constrains an already-opened domain — within-domain.
146
+
147
+ ## See also
148
+
149
+ - [`augment-portability`](augment-portability.md) — `.agent-src/`
150
+ must stay project-agnostic; domain plates inherit the floor
151
+ - [`size-enforcement`](size-enforcement.md) — size budgets apply per
152
+ artefact regardless of domain
153
+ - [`docs-sync`](docs-sync.md) — keep cross-references in sync when
154
+ opening a domain plate
155
+ - [`rule-type-governance`](rule-type-governance.md) — within-domain rules
156
+ still pick `always` vs `auto` per the governance table
157
+ - [`skill-quality`](skill-quality.md) — every domain skill passes the
158
+ same linter floor as a core skill
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: "auto"
3
3
  tier: "mechanical-already"
4
- description: "Linking transient files (agents/roadmaps/, agents/council-{questions,responses,sessions}/) from a stable artifact — both layers expire; promote findings"
4
+ description: "Linking transient files (agents/roadmaps/, agents/council-*/) from a stable artifact — both layers expire; promote findings"
5
5
  alwaysApply: false
6
6
  source: package
7
7
  triggers:
@@ -0,0 +1,107 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ alwaysApply: false
5
+ description: "Working with git history — never rewrite, rebase, squash, fixup, or amend without explicit user request; shape is the user's call, not tidiness"
6
+ source: package
7
+ triggers:
8
+ - intent: "rebase the branch"
9
+ - intent: "squash commits"
10
+ - intent: "clean up commit history"
11
+ - intent: "fold this into the previous commit"
12
+ - keyword: "git rebase"
13
+ - keyword: "fixup"
14
+ - keyword: "--amend"
15
+ - keyword: "force-push"
16
+ - keyword: "squash-merge"
17
+ ---
18
+
19
+ # No Unsolicited Rebase
20
+
21
+ ## Iron Law
22
+
23
+ ```
24
+ NEVER REBASE, SQUASH, FIXUP, OR AMEND PUBLISHED OR LOCAL HISTORY
25
+ WITHOUT THE USER ASKING FOR IT THIS TURN.
26
+ LINEAR HISTORY IS A PREFERENCE, NOT A DEFAULT.
27
+ COMMIT-CHUNK ORDER IS NOT A CORRECTNESS GOAL.
28
+ ```
29
+
30
+ Add the next commit on top. Never reorder, fold, drop, or rewrite earlier
31
+ commits to make the log "look right".
32
+
33
+ ## Why this rule exists
34
+
35
+ Interactive rebase + fixup loops generate disproportionate token cost on
36
+ every iteration: re-running CI per replayed commit, resolving the same
37
+ content conflict in three derived files (`.compression-hashes.json`,
38
+ `router.json`, `.windsurfrules`), losing the working tree to a stash that
39
+ silently re-introduces older state. A single conflict can burn the budget
40
+ of an entire feature. The user pays for it. The "clean history" payoff is
41
+ cosmetic; reviewers read the diff, not the log.
42
+
43
+ ## When rebase / amend / fixup IS allowed
44
+
45
+ Exactly three:
46
+
47
+ 1. **User says so this turn** — "rebase onto main", "squash these two",
48
+ "amend that". This operation only, not a standing rule.
49
+ 2. **Standing instruction not yet revoked** — the user said earlier in
50
+ the conversation "always squash before pushing"; honor it.
51
+ 3. **Conflict resolution forced by `git pull --rebase`** — the user
52
+ already invoked the rebase via pull; finish it.
53
+
54
+ Anything else — chunk-tidiness, "logical order", folding a follow-up fix
55
+ into its parent — **forbidden**. The follow-up ships as its own commit
56
+ (`fix: …`, `chore: …`).
57
+
58
+ ## Equivalents that are also forbidden by default
59
+
60
+ - `git rebase -i` (interactive)
61
+ - `git rebase --autosquash`
62
+ - `git commit --fixup` / `--squash` (the helper that feeds the autosquash)
63
+ - `git commit --amend` on already-pushed commits
64
+ - `git push --force` / `--force-with-lease`
65
+ - `git reset --hard` past unpushed work the user might want
66
+ - Squash-merge of a PR via API or CLI when the user has not picked the
67
+ merge strategy
68
+ - Cherry-pick rewriting that drops or reorders commits
69
+
70
+ `--amend` on the *current local* commit before the first push is the
71
+ narrow exception (treated as continuing to compose the commit, not
72
+ rewriting history).
73
+
74
+ ## When you'd be tempted
75
+
76
+ - "I want commit 3 to come before commit 2 because the topic flows better."
77
+ → don't. Reviewers read the PR diff.
78
+ - "There are two `chore: regenerate` commits, ugly." → don't. They are
79
+ honest checkpoints.
80
+ - "A linter caught an issue in commit 2 — let me fold the fix in."
81
+ → don't. Add `fix(scope): …` on top.
82
+ - "I want to drop the WIP commit before pushing." → ask the user first.
83
+ - "Squash-merge when I open the PR will clean it anyway." → also true,
84
+ also irrelevant — let the merge strategy do that work, not you.
85
+
86
+ ## Failure mode catalog
87
+
88
+ - **Rebase-conflict cascade.** Interactive rebase replays N commits. Any
89
+ derived file (`.compression-hashes.json`, generated tool projections,
90
+ index/catalog) carries a hash per commit and conflicts on every replay.
91
+ Resolution time scales with N, not with the actual change.
92
+ - **Stash-pop reverts work.** A `git stash` issued during rebase recovery
93
+ can re-introduce older edits that overwrite committed work after the
94
+ rebase finishes. Hard to spot in `git status` because the file shapes
95
+ match.
96
+ - **Force-push during review.** Rewriting history on a branch with an
97
+ open PR invalidates review comments anchored to commits and forces a
98
+ re-review.
99
+
100
+ ## See also
101
+
102
+ - [`scope-control`](scope-control.md) — git-ops permission gate ("rebase"
103
+ already named in the canonical list).
104
+ - [`commit-policy`](commit-policy.md) — commits are the user's call;
105
+ rewriting them is a stronger version of the same restriction.
106
+ - [`token-efficiency`](token-efficiency.md) — Iron Law on burning the
107
+ user's tokens for cosmetic gain.
@@ -28,15 +28,15 @@ The user decides the git shape. Never improvise. Commit specifics: canonical [`c
28
28
  - NEVER create / switch / delete a branch without explicit permission — includes spike, scratch, throwaway, worktree branches.
29
29
  - NEVER create, close, reopen, or change the target of a pull request without permission.
30
30
  - NEVER push a tag or create a release without permission.
31
- - NEVER include version numbers, target releases, deprecation dates, release-tied milestones, or git tags in roadmaps, plans, tickets, or any planning artifact. Roadmaps plan **work**; releases / tags are a separate decision outside the roadmap. Never surface "which release should this ship in?" as a numbered choice. User pins by saying so explicitly.
31
+ - NEVER include version numbers, target releases, deprecation dates, release-tied milestones, or git tags in roadmaps, plans, tickets, or any planning artifact. Roadmaps plan **work**; releases / tags are a separate decision. User pins by saying so explicitly.
32
32
  - Task seems to need a separate branch / PR → STOP and **brief before asking** ([`scope-mechanics § Brief-before-asking`](../contexts/authority/scope-mechanics.md)).
33
- - BEFORE the first commit on related work, **inventory** existing branches and open PRs (`git branch --show-current`, `gh pr list --state open`). If a plausible base beyond the current branch exists, STOP and ask with numbered options — never improvise the base. Inventory + 4-option template + diverging-stack failure mode: [`scope-mechanics § Branch-base inventory`](../contexts/authority/scope-mechanics.md).
33
+ - BEFORE the first commit on related work, **inventory** existing branches and open PRs. Plausible base beyond the current branch STOP and ask with numbered options — never improvise. Commands + 4-option template + diverging-stack failure mode: [`scope-mechanics § Branch-base inventory`](../contexts/authority/scope-mechanics.md).
34
34
 
35
35
  "Explicit permission" = user said so **this turn or in a standing instruction not yet revoked**. Earlier permission for a different operation does not carry over.
36
36
 
37
37
  ## Production, infrastructure, bulk-destructive — Hard Floor
38
38
 
39
- A subset is **never** autonomous and never auto-permitted by a standing autonomy directive. Canonical: [`non-destructive-by-default`](non-destructive-by-default.md). Trigger list (prod-branch merges, deploys / releases, prod data / infra, bulk-destructive ops) and the "authorization is this turn, not earlier" clarification: [`scope-mechanics § Production, infrastructure, bulk-destructive`](../contexts/authority/scope-mechanics.md).
39
+ A subset is **never** autonomous, regardless of standing autonomy. Canonical: [`non-destructive-by-default`](non-destructive-by-default.md). Triggers (prod-branch merges, deploys, prod data / infra, bulk-destructive) + this-turn-only clarification: [`scope-mechanics § Production, infrastructure, bulk-destructive`](../contexts/authority/scope-mechanics.md).
40
40
 
41
41
  ## Kernel-rule edits — slow-rollout guarantee
42
42
 
@@ -44,11 +44,11 @@ Each kernel-rule edit ships in **its own PR**, ≥ 24 h between merges. Autonomo
44
44
 
45
45
  ## Decline = silence — no re-asking on the same task
46
46
 
47
- After the user **declines** a proposal (branch switch, PR creation, tag/release entry, separate worktree, version pinning), do **not** raise it again on the same task. Decline stands until the user reopens the topic. Timing / "is this worth asking?": [`scope-mechanics § Decline = silence`](../contexts/authority/scope-mechanics.md).
47
+ After the user **declines** a proposal (branch switch, PR creation, tag/release, separate worktree, version pinning), do **not** raise it again on the same task. Decline stands until reopened. Timing: [`scope-mechanics § Decline = silence`](../contexts/authority/scope-mechanics.md).
48
48
 
49
49
  ## Fenced step — user-set review gates
50
50
 
51
- User explicitly fences off the next step *"don't implement yet"*, *"plan only"*, *"just write the roadmap, I'll review"*, *"review first"*, *"erst Roadmap, ich schau drüber"*, *"nichts implementieren"*, *"nur planen"*, *"erstmal nur X, dann ich"* — reply is **the deliverable plus a handoff**, never deliverable plus *"shall we start?"*.
51
+ User explicitly fences off the next step (*"plan only"*, *"review first"*, *"don't implement yet"*, German equivalents) — reply is **deliverable + handoff**, never deliverable + *"shall we start?"*.
52
52
 
53
53
  ```
54
54
  USER FENCED OFF EXECUTION → DELIVER + HAND BACK.
@@ -57,6 +57,4 @@ NO "READY TO IMPLEMENT?" RE-ASK.
57
57
  NO "STARTEN WIR MIT PHASE 1?" PIVOT.
58
58
  ```
59
59
 
60
- Fence stands until the user reopens, exactly like `Decline = silence`. Permitted follow-up questions cover **the deliverable** (adjust scope, fix wording, add a section), never **its execution**.
61
-
62
- Failure-mode catalog (Option 1 = "start now", re-asking after delivery, hand-off-to-execution drift, inferring acceptance from a thumbs-up) and explicit bypass phrases: [`scope-mechanics § Fenced step`](../contexts/authority/scope-mechanics.md).
60
+ Fence stands until reopened (like `Decline = silence`). Follow-ups cover **the deliverable** (scope, wording, sections), never its execution. Failure modes + bypass phrases: [`scope-mechanics § Fenced step`](../contexts/authority/scope-mechanics.md).