feat(engines): claude ships settings defaults — ultracode on, small workflows, 4 agents at once - #500
Merged
Merged
Conversation
…orkflows, 4 agents at once An engine's `settings` spec in engines.mjs names the file it reads and the keys moshcode wants in it. `moshcode install <engine>` applies them and `moshcode engines defaults [status|apply|remove] [<engine>|all]` does it by hand. Claude Code's are `ultracode: true` (every substantive prompt runs as a workflow), `workflowSizeGuideline: "small"` (Claude's own advisory tier, fewer than 5 agents) and `env.CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS: "4"` (the hard gate on how many run at once). Same three rules as the hooks installer, because it is the same file: merge and never clobber (a key the operator set stays, even to the opposite value — status reports it as "theirs", not a fault), remove only a value that is still ours, refuse a file that does not parse. Nested defaults merge one leaf at a time so sibling env vars are untouched. herd-hooks.mjs exports its read/write/mode helpers so both installers share one write-then-rename path. README carries the section and the regenerated command table. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014HMV1QDcVY1xiaWWrZQM4S
| ], | ||
| seeAlso: ["agents", "install"], | ||
| note: "`moshcode install <engine>` applies its defaults for you. the file is merged, never clobbered: " | ||
| + "a key you already set — to anything — stays yours, and remove takes out only a value that is still ours.", |
ThreatCrush Security Scan4 finding(s) in the 8 file(s) this pull request changes. MEDIUM: 4
89 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 8 | **MEDIUM**: 71 | **LOW**: 10Not introduced by this pull request. The full set is in the Security tab.
…and 69 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An engine can now say how it would like to be configured.
ENGINES.claude.settings.defaultscarries three Claude Code settings, and moshcode merges them into~/.claude/settings.json:ultracodetrueworkflowSizeGuideline"small"env.CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS"4"moshcode install claudeapplies them after a successful install (silent when nothing changes).moshcode engines defaults [status|apply|remove] [<engine>|all] [--dry-run] [--json]does it by hand, from the CLI and the pit.Rules
Same three as
herd hooks, because it is the same file:statusreports it as "theirs", not a fault. A floor under a fresh install, not a policy over an old one.envobject we created goes when it is empty; one with sibling vars stays.Also
herd-hooks.mjsexportsreadJsonFile/writeJsonFile/existingModeso both installers share one write-then-rename path.test/engine-settings.test.mjs: 20 tests covering the spec values, merge, status, remove, and the verb.Verified
node --test: 2929 tests, 0 failures (340 environment-gated skips).moshcode engines defaultsreads the real settings file and reports all three in place;apply --dry-runreports nothing would change.🤖 Generated with Claude Code
https://claude.ai/code/session_014HMV1QDcVY1xiaWWrZQM4S