fork-discipline

Audit and enforce the core/client boundary in multi-client codebases.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill fork-discipline-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fork-discipline
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/fork-discipline
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill fork-discipline-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Multi-client projects often blur the line between shared platform code and per-client customizations, leading to hardcoded client checks, config files that replace instead of merge, and scattered client code that makes adding new clients painful and risky. ## Core Features & Use Cases - Boundary Audit: Scans the codebase to map core vs client code, detects hardcoded client identifiers, config replacement anti-patterns, scattered client files, migration number conflicts, and missing extension points, then produces a violation report with severity ratings and a health score. - FORK.md Documentation: Generates a FORK.md file documenting the architecture, migration numbering ranges, config merge pattern, and steps for adding a new client. - Refactoring Plan: Produces concrete refactoring steps and scripts to move client code out of core, replace client checks with feature flags, and implement config merging. - Use Case: Before onboarding a second or third client to a SaaS project, run the audit to find every if (client === 'acme') check in shared code and get a prioritized plan to convert them into config-driven feature flags. ## Quick Start Ask the agent to run a fork discipline audit on this project and report where the core/client boundary is violated.

Frequently Asked Questions about fork-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a multi-client codebase for boundary violations?

Run the audit mode, which scans for hardcoded client names in shared code, client-specific conditionals, oversized client configs, and files with client names inside src/. It outputs a boundary map and a violation report ranked by severity.

How to replace hardcoded client checks with feature flags?

Move the branching condition from client identity to configuration: replace `if (clientName === 'acme')` with `if (config.features.someFeature)` and enable that flag in the client's config file. The refactor mode generates these transformations for each violation found.

When should I run a fork discipline audit?

Run it before adding a second or third client, after organic growth has blurred boundaries, before major refactors, or as a periodic health check. With one client, only document the boundary; with three or more, run the full refactor mode.

What is the difference between config merge and config replacement?

Config replacement means a client config is a complete standalone file that loses default values, while config merge treats the client config as a delta shallow-merged over shared defaults. Merging ensures clients automatically inherit new defaults and features.

How should migration numbers be organized in multi-client projects?

Reserve number ranges per owner: 0001-0099 for core platform migrations, 0100-0199 for client domain schema, and 0200+ for client custom features. The audit checks whether client migrations stay within their reserved ranges to prevent conflicts.