docs(doctrine): foreign code keeps its own style, limits stay strict in ours
This commit is contained in:
1 parent
70e0f9ac41
commit
71d28f8616
5 files changed
+31
-10
No files matched your search
@@ -16,6 +16,10 @@ model). The scope you name is the only reflection; the agent applies norms.
|
||||
and dispatch on the new branch; on a working branch dispatch in place. Never
|
||||
`gitflow finish` — integration is human-gated.
|
||||
|
||||
Origin: `bash ~/.claude/lib/code-origin.sh` on the target repo. `foreign` →
|
||||
the refactorer aligns on the existing style, not on the limits, unless the
|
||||
user asked for the limits explicitly; add that to the prompt below.
|
||||
|
||||
```
|
||||
Agent(subagent_type="refactorer")
|
||||
prompt: "Refactor to strict project norms, preserving external behavior
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[
|
||||
{"id": 1, "prompt": "Refactor src/services/payment.ts — it's gotten messy", "expected": "Read file, apply project norms (≤25 logic lines/function, ≤80 chars/line, ≤5 params), preserve external behavior, run tests after"},
|
||||
{"id": 2, "prompt": "Refactor the calculateOrderTotal function — too long, too many vars", "expected": "Extract sub-functions, name explicit, no behavior change, verify tests still pass"},
|
||||
{"id": 3, "prompt": "Clean up the auth module without changing behavior", "expected": "Module-level refactor, dead code removal, consistency, all original public API preserved"}
|
||||
{"id": 3, "prompt": "Clean up the auth module without changing behavior", "expected": "Module-level refactor, dead code removal, consistency, all original public API preserved"},
|
||||
{"id": 4, "prompt": "Refactor src/net.c in this third-party repo (code-origin says foreign)", "expected": "Align on the file's own style (inline branches, existing variables and macros), no extraction toward the 25-line limit unless the user asks for the limits"}
|
||||
]
|
||||
Reference in new issue
Block a user