react-discipline-skills is a set of Codex skills for disciplined React
architecture and implementation workflows. It is not a rigid cookbook that
forces one exact implementation style. Instead, it steers agent decisions
toward industry standards and community best practices while respecting the
patterns already established in your repository.
The goal is to reduce agents to suggest implementation drift: rather than introducing ad hoc
structures, the react-* skills pull changes back toward your codebase's
existing architecture, boundaries, and naming conventions.
Work in progress / experimental.
Interfaces, folder contents, and skill behavior may change as specs are refined. Use for evaluation and active development, not as a stable long-term contract.
- Spec Kit clarify bridge compatibility is unverified: currently tested on one setup/system only; behavior across other setups is unknown.
- Refactor helper script usage pattern is unverified: scripts are intended as fallback when the agent cannot confidently find candidates on its own, but whether agents will consistently use them that way is currently unknown.
- Validation has been refactoring-focused so far: the skills were exercised in a week-long refactoring session, and many updates were made during that run to improve reasoning and rule understanding for refactor workflows. Since those changes, the updated skills have not yet been re-tested on new feature implementation workflows.
This project is intentionally scoped to 5 maintained skills for agents such as Codex:
react-architecture-detection(core production)react-placement-and-layering(core production)react-reuse-update-new(core production)react-implementation-discipline(core production)react-refactoring-progression(optional extension)
shared is a shared policy baseline source in shared/ that is materialized
per skill into .shared-rules/ during the build. It is not counted as a skill
itself.
| Skill | Primary role | Typical output |
|---|---|---|
react-architecture-detection |
Detect current repository architecture and concern homes from real signals | detection_result |
react-placement-and-layering |
Decide where new/changed artifacts should live based on detected architecture | placement_plan |
react-reuse-update-new |
Decide per artifact: reuse, safely update, or create new | decision_plan |
react-implementation-discipline |
Execute implementation with boundary, scope, and quality gates | implementation_package |
react-refactoring-progression |
Produce behavior-preserving refactor progression plans after implementation | refactor_progression_plan |
Standard implementation flow:
- Run
react-architecture-detectionto ground decisions in existing repository signals. - Run
react-placement-and-layeringto select canonical homes/layers for planned artifacts. - Run
react-reuse-update-newto choose reuse vs update vs new for each artifact. - Run
react-implementation-disciplineto produce implementation output with governance checks. - Optionally run
react-refactoring-progressionto plan safe follow-up refactors after delivery.
This sequence minimizes architectural drift and keeps planning/implementation decisions auditable.
Try: use $react-refactoring-progression to create a step-by-step plan that suggests high-impact improvements for the project. to review reasoning and skill based output. However, all skills will perform their responsibilities without being excplicitly invoked as long as you prompts on a codebase that contains a react/frontend home.
- OpenAI Codex Skills: https://developers.openai.com/codex/skills/
- Agent Skills Specification: https://agentskills.io/specification
This repo follows the Agent Skills ecosystem patterns used by:
- OpenAI skills catalog: https://github.com/openai/skills
- Anthropics Skill examples: https://github.com/anthropics/skills/tree/main
- OpenAI curated/experimental install model: https://github.com/openai/skills/tree/main/skills/.curated
- Vercel skill collection and packaging conventions: https://github.com/vercel-labs/agent-skills/tree/main/skills
Each skill should follow the same high-level shape used in those ecosystems:
SKILL.mdas the user-facing contract and trigger guidancerules/as source-of-truth policy/rule modulesexamples/for runnable or inspectable outputsAGENTS.mdas generated agent-facing material (not manually authored)
skills/: Skill definitions, rules, examples, and generatedAGENTS.mdshared/: Shared baseline policy source, resolved per target skill at build time into each skill's generated.shared-rules/directory (shared/rulesuses__TARGET_SKILL__forApplies to)templates/: Authoring scaffolds for initializingSKILL.md, rule modules, and generated-agent-document structurescripts/generators/: Build-flow generators (for exampleAGENTS.md)scripts/validators/: Validation entrypoints (frontmatter, examples, handoffs)scripts/lib/: Shared script utilities and schema-validation helpersscripts/fixtures/: Fixture sets for cross-skill handoff validationeslint/: Recommended ESLint rule sets for supported versions.github/workflows/: CI configuration
templates/ is for development-time scaffolding only. These files provide
starting formats for:
SKILL.mdcontracts (including baseline-compliance andresult_type/validation_statusoutput envelopes)rules/*.mdmodules (shared/rulesusesApplies to: __TARGET_SKILL__,Inherited from: shared-rules, plusCoversandIndex mode)- generated
AGENTS.mdstructure 00_overviewscope rules (including baseline inheritance and conflict guards)
They are not installed as runtime skills and are not loaded by Codex directly.
Prerequisites:
- Node.js 20 LTS
- npm
Initial setup from repository root:
npm ci
npm run build:agents
npm run checkStrongly recommended local git hook setup (commit message standard enforcement):
npm run prepareThis installs Husky hooks, including Commitlint on commit-msg.
This repository is the source for developing skills. Runtime use happens by
installing the maintained skill folders into a Codex-recognized skills
directory. Shared policy is generated into each installed skill under
.shared-rules/, and AGENTS.md remains a compact lookup index.
- Project-local install target:
<target-repo>/.agents/skills/ - User-level install target:
$HOME/.agents/skills/
Example (copy into another project):
mkdir -p /path/to/target-repo/.agents/skills
cp -R skills/react-architecture-detection /path/to/target-repo/.agents/skills/
cp -R skills/react-placement-and-layering /path/to/target-repo/.agents/skills/
cp -R skills/react-reuse-update-new /path/to/target-repo/.agents/skills/
cp -R skills/react-implementation-discipline /path/to/target-repo/.agents/skills/
cp -R skills/react-refactoring-progression /path/to/target-repo/.agents/skills/Example (symlink for live development):
mkdir -p /path/to/target-repo/.agents/skills
ln -s /path/to/react-discipline-skills/skills/react-architecture-detection /path/to/target-repo/.agents/skills/react-architecture-detection
ln -s /path/to/react-discipline-skills/skills/react-placement-and-layering /path/to/target-repo/.agents/skills/react-placement-and-layering
ln -s /path/to/react-discipline-skills/skills/react-reuse-update-new /path/to/target-repo/.agents/skills/react-reuse-update-new
ln -s /path/to/react-discipline-skills/skills/react-implementation-discipline /path/to/target-repo/.agents/skills/react-implementation-discipline
ln -s /path/to/react-discipline-skills/skills/react-refactoring-progression /path/to/target-repo/.agents/skills/react-refactoring-progressionUse this when you want rule-aware clarification injected before planning in a Spec Kit project.
Install the local extension into a target Spec Kit repo:
./bridge/install-speckit-clarify-bridge.sh --target-repo /path/to/target-repoUninstall from a target repo:
./bridge/uninstall-speckit-clarify-bridge.sh --target-repo /path/to/target-repoOptional full cleanup of known local extension cache path:
./bridge/uninstall-speckit-clarify-bridge.sh --target-repo /path/to/target-repo --purge-localThen run in the target repo:
/speckit.rules-bridge.clarifyNotes:
- This is an explicit wrapper command, not a patch to core
/speckit.clarify. - It is designed to consult installed react-discipline rules and inject high-impact clarification questions into the clarify flow.
See CONTRIBUTING.md for contributor workflow, commit and PR expectations, and validation steps.
See CODE_OF_CONDUCT.md for community behavior standards.
- Generate agent summaries:
npm run build:agents - Run all checks:
npm run check - Validate shared baseline rules and quick-reference parity:
npm run check:shared - Validate cross-skill handoffs:
npm run check:handoffs - Strict single-set handoff checks:
node scripts/validators/validate_handoffs.mjs --set success - Expected-failure checks:
node scripts/validators/validate_handoffs.mjs --set validation_error(non-zero exit expected)node scripts/validators/validate_handoffs.mjs --set dependency_error(non-zero exit expected)
Update CHANGELOG.md when merged milestone-level changes are introduced.
- Use
majorentries for the four core production skills:react-architecture-detectionreact-placement-and-layeringreact-reuse-update-newreact-implementation-discipline
- Use
contextentries for supporting/extension milestones (includingreact-refactoring-progressionunless promoted to core production scope). - Keep each entry readable with:
- what changed
- why it matters
See eslint/README.md for copy-ready rule sets you can merge into your ESLint
config to enforce skill constraints and catch violations early.
Licensed under the Apache License 2.0.