claude-dev-env 8.14.0 → 8.15.1
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/.agents/agents/test_agent_frontmatter.py +0 -72
- package/.agents/agents-archived/code-quality-agent.md +16 -16
- package/.agents/skills/_shared/end-of-run-gotcha-recommendations.md +5 -21
- package/.agents/skills/e-code-review/SKILL.md +1 -3
- package/.agents/skills/e-simplify/SKILL.md +6 -6
- package/.agents/skills/eli5/SKILL.md +4 -14
- package/.agents/skills/eli5/reference/task-seeds.md +3 -4
- package/.agents/skills/everything-search/SKILL.md +3 -3
- package/.agents/skills/fresh-branch/SKILL.md +2 -3
- package/.agents/skills/grok-spawn/SKILL.md +3 -8
- package/.agents/skills/issue-tracker/SKILL.md +4 -6
- package/.agents/skills/orchestrator-refresh/SKILL.md +7 -7
- package/.agents/skills/plugin-eval-standalone-skill/SKILL.md +3 -3
- package/.agents/skills/privacy-hygiene/SKILL.md +6 -10
- package/.agents/skills/privacy-hygiene/reference/sweep-procedure.md +1 -1
- package/.agents/skills/pull-request/SKILL.md +11 -14
- package/.agents/skills/pull-request/reference/publication-tasks.md +2 -4
- package/.agents/skills/recovering-codex-startup/SKILL.md +3 -6
- package/.agents/skills/recovering-codex-startup/reference/task-seeds.md +1 -1
- package/.agents/skills/repairing-hook-boundaries/SKILL.md +4 -7
- package/.agents/skills/repairing-hook-boundaries/reference/task-seeds.md +1 -2
- package/.agents/skills/second-account-workers/.claude/CLAUDE.md +1 -0
- package/.agents/skills/second-account-workers/AGENTS.md +1 -0
- package/.agents/skills/second-account-workers/SKILL.md +65 -0
- package/.agents/skills/syncing-submodules/SKILL.md +7 -17
- package/.agents/skills/syncing-submodules/reference/run-tasks.md +1 -1
- package/.agents/skills/task-build/SKILL.md +1 -1
- package/.agents/skills/task-build/reference/tool-routing.md +1 -1
- package/.agents/skills/team-advisor/SKILL.md +2 -4
- package/.agents/skills/usage-pause/SKILL.md +1 -1
- package/.agents/skills/windows-scheduled-task/SKILL.md +1 -1
- package/AGENTS.md +1 -1
- package/_shared/advisor/advisor-protocol.md +4 -4
- package/_shared/advisor/reference/consult-format.md +1 -1
- package/_shared/advisor/reference/identity.md +2 -2
- package/_shared/advisor/reference/warm-up.md +1 -1
- package/audit-rubrics/category_rubrics/category-o-docstring-vs-impl-drift.md +1 -1
- package/audit-rubrics/prompts/category-o-docstring-vs-impl-drift.md +2 -16
- package/bin/ever-shipped-skills.mjs +1 -0
- package/bin/install.mjs +1 -0
- package/bin/install.prompt-context.test.mjs +46 -0
- package/bin/install.test.mjs +3 -2
- package/commands/sr-loop.md +2 -2
- package/docs/CODE_RULES.md +2 -2
- package/docs/DJANGO_PATTERNS.md +5 -5
- package/docs/REACT_PATTERNS.md +6 -6
- package/docs/TEST_QUALITY.md +10 -28
- package/docs/agent-spawn-protocol.md +4 -4
- package/docs/codex-compatibility.md +4 -33
- package/docs/references/team-advisor-skill.md +0 -1
- package/docs/second-claude-account.md +4 -0
- package/docs/worker-completion-gate.md +0 -1
- package/hooks/advisory/migration_safety_advisor.py +3 -2
- package/hooks/advisory/refactor_guard.py +3 -3
- package/hooks/hooks.json +0 -5
- package/hooks/hooks_constants/issue_tracker_session_starter_constants.py +1 -2
- package/hooks/hooks_constants/orchestrator_auto_starter_constants.py +1 -2
- package/package.json +1 -1
- package/rules/explore-thoroughly.md +0 -1
- package/rules/filesystem-search.md +1 -1
- package/rules/git-workflow.md +5 -5
- package/rules/long-horizon-autonomy.md +1 -5
- package/rules/re-stage-before-commit.md +0 -2
- package/rules/research-mode.md +1 -1
- package/rules/shell-invocation.md +1 -1
- package/scripts/claude_account_worker.py +347 -0
- package/scripts/claude_account_worker_process.py +169 -0
- package/scripts/claude_account_worker_report.py +170 -0
- package/scripts/dev_env_scripts_constants/claude_account_worker_constants.py +139 -0
- package/scripts/dev_env_scripts_constants/grok_worker_constants.py +8 -2
- package/scripts/grok_headless_runner.py +2 -5
- package/scripts/policy_lint/config/constants.py +1 -0
- package/scripts/policy_lint/engine.py +5 -2
- package/scripts/repository_checks/config/constants.py +1 -1
- package/scripts/spawn_grok_batch.py +12 -1
- package/scripts/subprocess_stream_text.py +28 -0
- package/scripts/task_usage_events.py +387 -0
- package/scripts/task_usage_report.py +391 -0
- package/scripts/test_claude_account_worker.py +331 -0
- package/scripts/test_spawn_grok_batch.py +22 -0
- package/scripts/test_task_usage_events.py +47 -0
- package/scripts/test_task_usage_report.py +603 -0
- package/scripts/tests/test_banned_prose_words.py +1 -1
- package/scripts/tests/test_policy_lint_rules_archive.py +16 -0
- package/scripts/tests/test_policy_lint_rules_engine.py +2 -2
- package/scripts/tests/test_rules.py +9 -9
- package/system-prompts/software-engineer.xml +15 -30
- package/audit-rubrics/audit-categories.json +0 -700
- package/audit-rubrics/category_rubrics/category-a-api-contracts.md +0 -90
- package/audit-rubrics/category_rubrics/category-b-selector-engine-compat.md +0 -36
- package/audit-rubrics/category_rubrics/category-c-resource-cleanup.md +0 -35
- package/audit-rubrics/category_rubrics/category-d-scoping-and-ordering.md +0 -35
- package/audit-rubrics/category_rubrics/category-e-dead-code.md +0 -40
- package/audit-rubrics/category_rubrics/category-f-silent-failures.md +0 -41
- package/audit-rubrics/category_rubrics/category-g-bounds-and-overflow.md +0 -38
- package/audit-rubrics/category_rubrics/category-h-security-boundaries.md +0 -40
- package/audit-rubrics/category_rubrics/category-i-concurrency.md +0 -38
- package/audit-rubrics/category_rubrics/category-j-code-rules-compliance.md +0 -59
- package/audit-rubrics/category_rubrics/category-k-codebase-conflicts.md +0 -66
- package/audit-rubrics/category_rubrics/category-l-behavior-equivalence.md +0 -48
- package/audit-rubrics/category_rubrics/category-m-producer-consumer-cardinality.md +0 -44
- package/audit-rubrics/category_rubrics/category-n-test-name-scenario-verifier.md +0 -54
- package/audit-rubrics/category_rubrics/category-p-name-vs-behavior-contract.md +0 -59
- package/audit-rubrics/category_rubrics/category-q-cross-surface-claims.md +0 -46
- package/audit-rubrics/prompts/category-a-api-contracts.md +0 -407
- package/audit-rubrics/prompts/category-b-selector-engine-compat.md +0 -401
- package/audit-rubrics/prompts/category-c-resource-cleanup.md +0 -420
- package/audit-rubrics/prompts/category-d-scoping-and-ordering.md +0 -414
- package/audit-rubrics/prompts/category-e-dead-code.md +0 -434
- package/audit-rubrics/prompts/category-f-silent-failures.md +0 -432
- package/audit-rubrics/prompts/category-g-bounds-and-overflow.md +0 -383
- package/audit-rubrics/prompts/category-h-security-boundaries.md +0 -423
- package/audit-rubrics/prompts/category-i-concurrency.md +0 -429
- package/audit-rubrics/prompts/category-j-code-rules-compliance.md +0 -458
- package/audit-rubrics/prompts/category-k-codebase-conflicts.md +0 -338
- package/audit-rubrics/prompts/category-l-behavior-equivalence.md +0 -131
- package/audit-rubrics/prompts/category-m-producer-consumer-cardinality.md +0 -129
- package/audit-rubrics/prompts/category-n-test-name-scenario-verifier.md +0 -139
- package/audit-rubrics/prompts/category-p-name-vs-behavior-contract.md +0 -89
- package/audit-rubrics/prompts/category-q-cross-surface-claims.md +0 -51
- package/hooks/hooks_constants/style_reminder_prompt_constants.py +0 -9
- package/hooks/session/style_reminder_prompt.py +0 -41
- package/hooks/session/test_style_reminder_prompt.py +0 -32
package/docs/TEST_QUALITY.md
CHANGED
|
@@ -4,49 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
## Test Infrastructure Anti-Patterns
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
**ALWAYS:**
|
|
10
|
-
- Single file
|
|
11
|
-
- Simple functions
|
|
12
|
-
- Minimal abstractions
|
|
13
|
-
- Pragmatic approach
|
|
14
|
-
|
|
15
|
-
**NEVER:**
|
|
16
|
-
- Multi-file packages
|
|
17
|
-
- Cache classes
|
|
18
|
-
- Abstractions "for future"
|
|
19
|
-
- Rigid constraints
|
|
20
|
-
|
|
21
|
-
**Pre-check (MANDATORY):**
|
|
22
|
-
- [ ] ONE file?
|
|
23
|
-
- [ ] Functions not classes?
|
|
24
|
-
- [ ] Solving problem not building infrastructure?
|
|
25
|
-
- [ ] Junior-dev-understandable?
|
|
7
|
+
Test helpers drift toward over-engineering faster than production code, because nothing reviews them for size. Keep a helper to one file of plain functions with the fewest abstractions the current tests need. Add a package, a cache class, or an abstraction only when a second test needs it today. A junior developer reads the helper on the first pass.
|
|
26
8
|
|
|
27
9
|
## Delete Useless Tests
|
|
28
10
|
|
|
29
11
|
**Tests must add value.** Delete these types of tests:
|
|
30
12
|
|
|
31
|
-
###
|
|
13
|
+
### Tests to delete
|
|
32
14
|
|
|
33
15
|
**Function existence** - "Testing that the function exists doesn't add value. If the function doesn't exist, the code will not run."
|
|
34
16
|
- Bad: `test_public_api_exports_download_function()` only verified `callable(func)`
|
|
35
|
-
- Action:
|
|
17
|
+
- Action: delete
|
|
36
18
|
|
|
37
19
|
**Constant values** - "It's silly to test that constant values have not changed."
|
|
38
20
|
- Bad: `assert CACHE_DIR == "cache"`
|
|
39
|
-
- Action:
|
|
21
|
+
- Action: delete
|
|
40
22
|
|
|
41
23
|
**Duplicate coverage** - "Isn't this test case the same as test_X?"
|
|
42
|
-
- Action:
|
|
24
|
+
- Action: delete the redundant test
|
|
43
25
|
|
|
44
|
-
##
|
|
26
|
+
## Missing dependencies fail the test
|
|
45
27
|
|
|
46
28
|
"The tests should fail if they can't run. Missing system dependencies should make the test fail."
|
|
47
29
|
|
|
48
|
-
-
|
|
49
|
-
-
|
|
30
|
+
- Leave `@skip_if_missing_dependency` and other skip decorators out of test files. The code-rules lint flags each one.
|
|
31
|
+
- A missing dependency fails the test with a clear error, which prompts the install.
|
|
50
32
|
|
|
51
33
|
## Core Testing Principles
|
|
52
34
|
|
|
@@ -58,7 +40,7 @@
|
|
|
58
40
|
|
|
59
41
|
## React Testing Patterns
|
|
60
42
|
|
|
61
|
-
###
|
|
43
|
+
### Patterns
|
|
62
44
|
|
|
63
45
|
**Test behavior, not implementation** - What user sees/does, not internal state
|
|
64
46
|
- Bad: `expect(component.state.isOpen).toBe(true)`
|
|
@@ -77,7 +59,7 @@
|
|
|
77
59
|
- Use `userEvent` over `fireEvent` (more realistic)
|
|
78
60
|
- `await userEvent.click(button)` then assert result
|
|
79
61
|
|
|
80
|
-
###
|
|
62
|
+
### Anti-patterns
|
|
81
63
|
|
|
82
64
|
**Snapshot test everything** - Only for stable, visual components
|
|
83
65
|
- Snapshots break on any change, creating noise
|
|
@@ -13,9 +13,9 @@ Before writing any agent prompt, confirm you can answer all of these:
|
|
|
13
13
|
|
|
14
14
|
When any answer is "I don't know", investigate first (read files, search code) or ask the user. Do not spawn with incomplete context.
|
|
15
15
|
|
|
16
|
-
## Step 2:
|
|
16
|
+
## Step 2: Write the prompt
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Write the brief yourself. Include:
|
|
19
19
|
|
|
20
20
|
- The task description and goal
|
|
21
21
|
- Target files and directories found in Step 1
|
|
@@ -23,7 +23,7 @@ Run the `/prompt-generator` skill to produce a structured prompt. Feed it:
|
|
|
23
23
|
- Expected output format
|
|
24
24
|
- Acceptance criteria
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Use the brief as the agent's `prompt` parameter.
|
|
27
27
|
|
|
28
28
|
## Step 3: Spawn the agent
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ Pass the structured prompt from Step 2 to the Agent or Task tool.
|
|
|
31
31
|
|
|
32
32
|
## Why
|
|
33
33
|
|
|
34
|
-
An agent that receives a vague prompt wastes tokens exploring in circles, produces code that misses constraints, and needs a second pass. A small investment in prompt quality
|
|
34
|
+
An agent that receives a vague prompt wastes tokens exploring in circles, produces code that misses constraints, and needs a second pass. A small investment in prompt quality saves a long agent failure. This holds for Explore agents, which waste context on unfocused searches, and for execution agents, which write wrong code.
|
|
35
35
|
|
|
36
36
|
## Relationship to other rules
|
|
37
37
|
|
|
@@ -36,39 +36,10 @@ The default `.claude` target uses `CODEX_HOME`. A named profile or another
|
|
|
36
36
|
target uses `<managed-root>/.codex`, so launch that profile with the same
|
|
37
37
|
`CODEX_HOME` value.
|
|
38
38
|
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
works for both, as is.
|
|
44
|
-
|
|
45
|
-
The install already points `$CODEX_HOME/hooks` at the shared hooks folder.
|
|
46
|
-
Once installed, the script sits at
|
|
47
|
-
`$CODEX_HOME/hooks/session/style_reminder_prompt.py`.
|
|
48
|
-
|
|
49
|
-
Add this by hand to `$CODEX_HOME/hooks.json` (merge it into an existing file):
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"hooks": {
|
|
54
|
-
"UserPromptSubmit": [
|
|
55
|
-
{
|
|
56
|
-
"command": "python3 $CODEX_HOME/hooks/session/style_reminder_prompt.py"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The package installer does not register this optional context hook. Add it by
|
|
64
|
-
hand when the host should receive that context.
|
|
65
|
-
|
|
66
|
-
## Luna fast-mode guard
|
|
67
|
-
|
|
68
|
-
Commit `0f21faf8` retired `luna_fast_mode_gate.py` with the other blocking
|
|
69
|
-
policy hooks. The package ships no replacement, so a Codex `hooks.json` needs
|
|
70
|
-
no entry for it, and the spawn tier a Luna spawn asks for is the caller's to
|
|
71
|
-
hold.
|
|
39
|
+
## Luna spawn tier
|
|
40
|
+
|
|
41
|
+
No hook gates the tier a Luna spawn asks for, so a Codex `hooks.json` needs no
|
|
42
|
+
entry for it, and the caller holds that tier.
|
|
72
43
|
|
|
73
44
|
## Roots and safety
|
|
74
45
|
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
| `.agents/skills/team-advisor/SKILL.md` | Sole-consumer bind wiring and constraints |
|
|
10
10
|
| `advisor-tool.md` | Consult timing, hard rule, how to treat advice |
|
|
11
11
|
| `~/.claude/_shared/advisor/advisor-protocol.md` | Session identity, host bind, floor, lifecycle |
|
|
12
|
-
| `agents/session-advisor.md` | ENDORSE / CORRECTION / PLAN / STOP |
|
|
13
12
|
|
|
14
13
|
## When to use
|
|
15
14
|
|
|
@@ -10,6 +10,10 @@ keeps its own sign-in and history.
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| `scripts/claude_account_profile.py` | Links each shared entry of `~/.claude` into the profile `~/.claude-profiles/ev`, moves stale copies into `.replaced/<time>/`, and writes the `claude-ev.cmd` launcher into `~/.local/bin` |
|
|
12
12
|
| `scripts/claude_account_choice.py` | Reads both accounts' 5-hour and weekly meters and prints which account a job runs on |
|
|
13
|
+
| `scripts/claude_account_worker.py` | Runs one headless Claude worker using the account chosen by the picker |
|
|
14
|
+
| `scripts/claude_account_worker_process.py` | Launches the worker process, feeds it the brief, and kills it on timeout |
|
|
15
|
+
| `scripts/claude_account_worker_report.py` | Builds and writes the JSON report a worker leaves behind |
|
|
16
|
+
| `scripts/dev_env_scripts_constants/claude_account_worker_constants.py` | The worker's flag names, defaults, exit codes, and report keys |
|
|
13
17
|
| `scripts/dev_env_scripts_constants/claude_account_constants.py` | The profile name, the entries that stay per account, and the picker thresholds |
|
|
14
18
|
|
|
15
19
|
The launcher sets `CLAUDE_CONFIG_DIR` to the profile and passes every argument to
|
|
@@ -30,4 +30,3 @@ Mark `completed` only when every row passes.
|
|
|
30
30
|
## Relationship to other rules
|
|
31
31
|
|
|
32
32
|
- `long-horizon-autonomy` covers acting on what you have and not ending a turn on a promise. This gate names the specific completion condition: workers finished and their results merged.
|
|
33
|
-
- `skills/pr-converge/reference/state-schema.md` defines the run-state records a worker's result lands in before the task closes.
|
|
@@ -52,8 +52,9 @@ def main() -> None:
|
|
|
52
52
|
operations = ", ".join(found_unsafe)
|
|
53
53
|
advisory_message = (
|
|
54
54
|
f"MIGRATION SAFETY: Contains {operations}. "
|
|
55
|
-
"
|
|
56
|
-
"
|
|
55
|
+
"After launch, model changes stay backwards-compatible, because running "
|
|
56
|
+
"instances keep reading the old schema until the deployment finishes. "
|
|
57
|
+
"Check that this migration keeps those instances working."
|
|
57
58
|
)
|
|
58
59
|
advisory_payload = {
|
|
59
60
|
"systemMessage": advisory_message,
|
|
@@ -264,9 +264,9 @@ def build_refactor_advisory_context(refactor_description: str, file_path: str) -
|
|
|
264
264
|
"""Build guidance that names the Edit stage and changed-surface rule."""
|
|
265
265
|
return (
|
|
266
266
|
f"[HOOK ADVISORY] Refactor guard — {refactor_description} in {file_path}. "
|
|
267
|
-
"Edit-stage guidance:
|
|
268
|
-
"
|
|
269
|
-
"
|
|
267
|
+
"Edit-stage guidance: This edit went through, and it changes lines outside the "
|
|
268
|
+
"current git diff. Keep further edits to lines the task already changes, and ask "
|
|
269
|
+
"the user before refactoring code outside them."
|
|
270
270
|
)
|
|
271
271
|
|
|
272
272
|
|
package/hooks/hooks.json
CHANGED
|
@@ -67,11 +67,6 @@
|
|
|
67
67
|
{
|
|
68
68
|
"matcher": "",
|
|
69
69
|
"hooks": [
|
|
70
|
-
{
|
|
71
|
-
"type": "command",
|
|
72
|
-
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/session/style_reminder_prompt.py",
|
|
73
|
-
"timeout": 10
|
|
74
|
-
},
|
|
75
70
|
{
|
|
76
71
|
"type": "command",
|
|
77
72
|
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/session/skill_loaded_reminder.py",
|
|
@@ -18,6 +18,5 @@ ISSUE_TRACKER_STARTER_TIMEOUT_MILLISECONDS: int = 50
|
|
|
18
18
|
ISSUE_TRACKER_SESSION_START_DIRECTIVE: str = (
|
|
19
19
|
"SessionStart issue-tracker opt-in is active for this registered repository. "
|
|
20
20
|
"Load the issue-tracker skill when the session needs one GitHub issue action "
|
|
21
|
-
"(open epic, file sub-issue, update status, refresh checklist, close sub-issue).
|
|
22
|
-
"Manual issue-tracker agent spawn remains available unchanged."
|
|
21
|
+
"(open epic, file sub-issue, update status, refresh checklist, close sub-issue)."
|
|
23
22
|
)
|
|
@@ -18,6 +18,5 @@ ORCHESTRATOR_STARTER_TIMEOUT_MILLISECONDS: int = 50
|
|
|
18
18
|
ORCHESTRATOR_SESSION_START_DIRECTIVE: str = (
|
|
19
19
|
"SessionStart orchestrator opt-in is active. Load the orchestrator skill "
|
|
20
20
|
"and run in executor-advisor mode for this session's multi-step work. "
|
|
21
|
-
"Do not invent a second orchestrator path; follow the skill.
|
|
22
|
-
"/orchestrator remains available unchanged."
|
|
21
|
+
"Do not invent a second orchestrator path; follow the skill."
|
|
23
22
|
)
|
package/package.json
CHANGED
|
@@ -9,7 +9,6 @@ Note: This deliberately chooses exploration depth over the "commit and execute q
|
|
|
9
9
|
- Read the relevant files. Understand what exists before proposing what to change.
|
|
10
10
|
- Map the existing patterns: naming conventions, file organization, architectural decisions.
|
|
11
11
|
- Identify constraints that could invalidate an approach before investing effort in it.
|
|
12
|
-
- For unfamiliar codebases or high-stakes changes, invest more time exploring than feels necessary.
|
|
13
12
|
|
|
14
13
|
## Exploration scales with risk
|
|
15
14
|
|
|
@@ -47,5 +47,5 @@ Issue one shell search at a time when the walk is large. Parallel full-tree sear
|
|
|
47
47
|
|
|
48
48
|
## Search controls
|
|
49
49
|
|
|
50
|
-
- No hook denies a walk from an unscoped root.
|
|
50
|
+
- No hook denies a walk from an unscoped root. The scope invariant above is guidance a reader follows.
|
|
51
51
|
- For Everything searches that use a project name, run `python "${CLAUDE_SKILL_DIR}/scripts/everything_search.py" <project-name> <search arguments>`. An exact project name becomes its path from `~/.claude/project-paths.json`. The command then starts `es.exe` without a shell. `scripts/setup_project_paths.py` writes the registry.
|
package/rules/git-workflow.md
CHANGED
|
@@ -15,7 +15,7 @@ User-level rule: applies to **every** git repo that uses GitHub with `gh`. Small
|
|
|
15
15
|
|
|
16
16
|
## Pull request submission rules
|
|
17
17
|
|
|
18
|
-
**
|
|
18
|
+
**Create every pull request as a draft.** Use `gh pr create --draft`.
|
|
19
19
|
|
|
20
20
|
**A release bot's PR body is machine input. Leave it alone.** Release automation reads
|
|
21
21
|
back the body of its own merged pull request to decide it owns that merge. Rewriting the
|
|
@@ -47,7 +47,7 @@ untouched.
|
|
|
47
47
|
|
|
48
48
|
## Git golden rules
|
|
49
49
|
|
|
50
|
-
1. **
|
|
50
|
+
1. **Draft before push.** Put a pull request in draft state before you push to it.
|
|
51
51
|
- Before push: `gh pr ready --undo`
|
|
52
52
|
- After review approved: `gh pr ready`
|
|
53
53
|
|
|
@@ -101,7 +101,7 @@ before you ask anyone to read or merge it.
|
|
|
101
101
|
|
|
102
102
|
## Never commit working documents or images
|
|
103
103
|
|
|
104
|
-
**
|
|
104
|
+
**Keep these files out of the repository:**
|
|
105
105
|
|
|
106
106
|
| Pattern | Reason |
|
|
107
107
|
|---------|--------|
|
|
@@ -117,10 +117,10 @@ An image a PR needs as visual evidence is not an exception to that row. Upload i
|
|
|
117
117
|
**When this applies:** GitHub PR review feedback on a branch you are fixing.
|
|
118
118
|
|
|
119
119
|
1. Fetch every reviewer comment before making any fix.
|
|
120
|
-
2. Create a
|
|
120
|
+
2. Create a checklist in the session's task tool with one item per comment.
|
|
121
121
|
3. Fix systematically, marking each todo complete.
|
|
122
122
|
4. Reply to each comment inline.
|
|
123
123
|
|
|
124
|
-
Repair only reported findings
|
|
124
|
+
Repair only the reported findings.
|
|
125
125
|
|
|
126
126
|
Every `gh` post in this workflow uses `--body-file` per `gh-cli-conventions.md` and keeps volatile scratch paths out per `durable-post-artifacts.md`. Stage session edits per `re-stage-before-commit.md` before each commit.
|
|
@@ -35,11 +35,7 @@ Authority the task already granted stays granted. A later preference about tone,
|
|
|
35
35
|
|
|
36
36
|
## Delegate and keep working
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Verify your work at intervals
|
|
41
|
-
|
|
42
|
-
On a long build, set a checkpoint cadence and hold to it. At each interval, check the work so far against the task's stated goals with a fresh-context verifier subagent. A separate verifier in a clean context catches what self-review misses.
|
|
38
|
+
Delegate a large, independent track to a subagent, and keep working while it runs in the background. Do work you can finish in a few tool calls yourself: a few reads, a handful of edits, or a simple check. Reuse a long-lived subagent across related subtasks so its context carries forward and saves repeated reads. Step in when a subagent drifts off track or is missing context.
|
|
43
39
|
|
|
44
40
|
## Ground every progress claim
|
|
45
41
|
|
|
@@ -12,5 +12,3 @@ Staging covers tracked files you edited. Do not commit untracked files unless th
|
|
|
12
12
|
- **A preceding `git add` or `git stage`.** `git add <paths> && git commit …` stages the files in its own segment before the commit runs.
|
|
13
13
|
|
|
14
14
|
A `--amend` carries the same risk. An amend records the staged snapshot too, so an unstaged session edit is dropped the same way a plain commit drops it.
|
|
15
|
-
|
|
16
|
-
`session_file_edit_tracker` (PostToolUse) still records each Write/Edit/MultiEdit path, and `session_edit_tracker_cleanup` (SessionStart, SessionEnd) still clears the session's tracker. No gate reads that record today, so it serves as history rather than a precondition.
|
package/rules/research-mode.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Research Mode (Global)
|
|
2
2
|
|
|
3
|
-
Three anti-hallucination constraints are
|
|
3
|
+
Three anti-hallucination constraints are always active.
|
|
4
4
|
|
|
5
5
|
Source: [Anthropic - Reduce Hallucinations](https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/reduce-hallucinations)
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ When a script file's literal body needs `$(...)`, author it with the Write tool,
|
|
|
18
18
|
|
|
19
19
|
## Enforcement
|
|
20
20
|
|
|
21
|
-
No PreToolUse hook denies a Bash command.
|
|
21
|
+
No PreToolUse hook denies a Bash command. The substitution constraint above is guidance a reader follows, and a permission prompt on a wrapped command is the signal that one slipped through.
|
|
22
22
|
|
|
23
23
|
One PreToolUse hook does run on a Bash command, and it only rewrites. `blocking/msys_rev_path_rewriter.py` (PreToolUse on Bash, hosted by `bash_pre_tool_use_dispatcher`) reads a git command before it runs and keeps Git Bash from converting a `<rev>:<path>` argument. That roster holds this one hook, and a test asserts its whole content, so a blocking hook added beside it fails the suite.
|
|
24
24
|
|