refactor(context): rules as a single tool-agnostic surface in aidd_docs/rules#257
Draft
alexsoyes wants to merge 2 commits into
Draft
refactor(context): rules as a single tool-agnostic surface in aidd_docs/rules#257alexsoyes wants to merge 2 commits into
alexsoyes wants to merge 2 commits into
Conversation
…docs/rules
Codex CLI has no native rules surface, so generating rules for it from
03-context-generate never worked (rules were skipped at install). Instead
of per-tool surfaces (.claude/rules, .cursor/rules, .github/instructions,
.opencode/rules), rules now live once in the canonical, tool-agnostic
aidd_docs/rules/<NN-category>/<slug>.md - read by every tool, Codex included.
- ai-mapping (03 + 06): Rules column -> aidd_docs/rules/ for all tools;
add canonical rules section; retire per-tool rule frontmatter/extensions.
- rule.md: single .md extension, canonical path, portable code refs.
- 01-generate-rules: write one canonical file, drop D2 rule-blocking,
wire each installed tool's context file to reference aidd_docs/rules/.
- assets/rules: collapse 3 per-tool templates into one rule-template.md.
- list-rules.mjs: scan aidd_docs/rules/ only; output { path, name, description, paths }.
- 06-find-rule: drop the Tool column, single source.
- 01-plan: inventory + select rules from aidd_docs/rules/; applicable_rules
drops the tool field; plan templates rename section to "Rules to apply"
(no Tool column) - the plan chooses which rules apply per task.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…es.mjs 01-plan inventoried rules in prose. Now, once the architecture projection (the settled modify/create/delete file set) is known, it runs list-rules.mjs and matches each rule's `paths` globs against the projected modify/create files - so rule selection is grounded in the actual files, not guessed. - Add plugins/aidd-dev/scripts/list-rules.mjs (source; synced copy stays in 06-discovery). Build the entry via conditional spread to drop a stray TS property-inference warning. - 01-plan: move rule inventory out of the sub-agent step into the gate; run the script after the projection is settled; a rule applies when it has no `paths` (general) or any glob matches a modify/create file. Update the test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@blafourcade je sais pas ce que t'en penses ? plus de |
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.
Problem
Codex CLI has no native rules surface, so generating rules for it from
aidd-context:03-context-generatenever worked — rules were skipped at install. Per-tool surfaces (.claude/rules,.cursor/rules,.github/instructions,.opencode/rules) also fragmented the same conventions across tools.Decision
Rules become a single, tool-agnostic surface:
aidd_docs/rules/<NN-category>/<slug>.md— one shape, one location, one extension (.md), read by every tool (Codex included).aidd-dev:01-planselects which rules apply per task;05-reviewverifies against that selection.aidd_docs/rules/via their context file (CLAUDE.md/AGENTS.md/copilot-instructions.md).pathssurvives but its consumer shifted: from IDE auto-attach trigger → selection hint for the plan.Changes (14 files)
aidd-context
ai-mapping.md(03 + 06): Rules column →aidd_docs/rules/for all tools; new canonical rules section; retired per-tool rule frontmatter/extensions.rule.md: single.md, canonical path, portable code refs.01-generate-rules.md: write one canonical file, drop D2 rule-blocking, wire each installed tool's context file to reference the surface.assets/rules/: 3 per-tool templates collapsed into onerule-template.md(with corrected authoring guidance:pathsarray optional, description = one selection-useful sentence, groups/examples optional).list-rules.mjs: scanaidd_docs/rules/only; output{ path, name, description, paths }. Tested (empty →[], fixture → OK).06-find-rule.md: drop the Tool column, single source.aidd-dev
01-plan.md: inventory + select rules fromaidd_docs/rules/;applicable_rulesdrops thetoolfield.plan-template.md+09-for-sure/plan-template.md: section renamed "Rules to apply" (no Tool column) — the plan chooses which rules apply.Out of scope
.claude/rules/in a project →aidd_docs/rules/. This PR changes the generators/skills, not rules already laid down in a consumer project.Notes
commit-msghook (commitlint) skipped — binary absent in the worktree (toolchain not installed), not a message-format rejection.🤖 Generated with Claude Code