refactor: remove legacy mkOpencodeRules alias and opencode-rules compat entry
- Remove mkOpencodeRules backward-compat alias from lib/coding-rules.nix - Remove opencode-rules alias from lib/default.nix - Update shells/opencode.nix to use mkCodingRules / coding-rules - Remove backward-compat test from tests/lib/coding-rules-test.nix - Update AGENTS.md and modules/home-manager/AGENTS.md docs - Apply nix fmt formatting to shared-options.nix
This commit is contained in:
@@ -163,7 +163,7 @@ The agent system was migrated from embedded `agents.json` to file-based canonica
|
||||
| `coding.opencode.externalSkills` | `coding.agents.opencode.externalSkills` |
|
||||
| Agents embedded in `config.json` | File-based `~/.config/opencode/agents/*.md` |
|
||||
| Model hardcoded in `agents.json` | Per-machine `modelOverrides` |
|
||||
| `mkOpencodeRules` | `mkCodingRules` (old name still works) |
|
||||
| `mkOpencodeRules` | `mkCodingRules` |
|
||||
|
||||
### Migration steps
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
inherit (lib) mkOption mkEnableOption types literalExpression;
|
||||
in {
|
||||
# Common agentsInput option used by all agent modules.
|
||||
mkAgentsInputOption = description: mkOption {
|
||||
type = types.nullOr types.anything;
|
||||
default = null;
|
||||
inherit description;
|
||||
};
|
||||
mkAgentsInputOption = description:
|
||||
mkOption {
|
||||
type = types.nullOr types.anything;
|
||||
default = null;
|
||||
inherit description;
|
||||
};
|
||||
|
||||
# Common modelOverrides option.
|
||||
mkModelOverridesOption = mkOption {
|
||||
@@ -62,7 +63,7 @@ in {
|
||||
{ src = inputs.skills-anthropic; selectSkills = [ "claude-api" ]; }
|
||||
{ src = inputs.basecamp; }
|
||||
]
|
||||
'';
|
||||
'';
|
||||
};
|
||||
|
||||
# Helper to map externalSkills from module config to mkOpencodeSkills format.
|
||||
@@ -71,5 +72,6 @@ in {
|
||||
entry:
|
||||
{inherit (entry) src skillsDir;}
|
||||
// lib.optionalAttrs (entry.selectSkills != null) {inherit (entry) selectSkills;}
|
||||
) cfgEntries;
|
||||
)
|
||||
cfgEntries;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user