refactor(rules): move loading map to global instructions
This commit is contained in:
1 parent
a50575dbec
commit
aeec4d351c
14 files changed
+113
-192
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
Codex receives a generated global `AGENTS.md`, agent TOML files, skills, rule files, and a `config.toml` adapter. It keeps workspace sandboxing, automatic approval review, `agents.enabled = true`, `agents.max_concurrent_threads_per_session = 5`, and `agents.max_depth = 1`. Claude Code receives a generated global `CLAUDE.md`, agent Markdown files, skills, and `settings.json` with `auto` permissions, explicit `Agent` permission, and five-operation concurrency. Installation resolves user paths at runtime; the repository contains no machine-specific paths.
|
||||
|
||||
Both clients embed `shared/rules/general.md` in their global instructions. Codex loads applicable focused rules from `rules/`; Claude generates them as skills from the shared `adapters/rule-skills.tsv` manifest. Angular, WPF, and UI/UX rules have small entry points with references loaded by topic. `security.md` is the baseline for programming tasks; focused security rules cover authentication, web, API, data, files, network, cryptography, and supply-chain work.
|
||||
Both clients embed `shared/rules/general.md` and the rule-loading conditions from `shared/global-instructions.md`. Codex loads applicable focused rules from `rules/`; Claude generates a matching skill for each focused rule file or rule directory. Angular, WPF, and UI/UX rules have small entry points with references loaded by topic. `security.md` is the baseline for programming tasks; focused security rules cover authentication, web, API, data, files, network, cryptography, and supply-chain work.
|
||||
|
||||
The Codex adapter sets `agents.max_depth = 1` and does not enable `features.multi_agent_v2`. Shared instructions also prohibit subagents from creating further subagents. Agent roles are optional, not stages that every task must run.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Shared definitions are the source of truth. Rebuild after every semantic change.
|
||||
|
||||
## Add a rule
|
||||
|
||||
Create a focused Markdown file in `shared/rules/`. For a rule that applies only to a language, framework, tool, or change area, add one row to `adapters/rule-skills.tsv`. The build uses that manifest to generate both Claude's rule skill and Codex's rule-loading condition. Put always-applicable guidance in `general.md`, which the build embeds for both clients; a new rule file is not automatically embedded.
|
||||
Create a focused Markdown file in `shared/rules/` and add its loading condition to `shared/global-instructions.md`. Claude rule skills are generated from the rule filenames; Codex loads the referenced rule files directly. Put always-applicable guidance in `general.md`, which the build embeds for both clients; a new rule file is not automatically embedded.
|
||||
|
||||
## Add a skill
|
||||
|
||||
|
||||
+4
-4
@@ -14,10 +14,10 @@ The current structure is organized by purpose:
|
||||
|
||||
The files intentionally define only a small baseline. Detailed personal workflows and standards can be added later without changing the structure.
|
||||
|
||||
Claude's generated package additionally has `skills/rules/`: one skill per technology- or situation-specific rule in
|
||||
`shared/rules/` (driven by the shared `adapters/rule-skills.tsv` manifest), so the full rule text loads only when Claude invokes the
|
||||
matching skill instead of sitting permanently in context. This category does not exist for Codex, which keeps loading
|
||||
applicable focused rules as plain files instead. Both clients embed the general rules in their global instructions.
|
||||
Claude's generated package additionally has `skills/rules/`: one skill per focused rule file or directory in
|
||||
`shared/rules/`. The rule-to-skill loading conditions live in `shared/global-instructions.md`, so full rule text loads
|
||||
only when Claude invokes a matching skill instead of sitting permanently in context. Codex reads the matching rule
|
||||
files directly. Both clients embed the general rules in their global instructions.
|
||||
Split Angular, WPF, and UI/UX rules load supporting references only for the topic being worked on. See [Configuration](configuration.md).
|
||||
|
||||
Skills guide a task when needed; their availability does not require a full review, build, or test suite after every
|
||||
|
||||
Reference in new issue
Block a user