makefile-discipline
Skill2 starsChanged 6 months agoMITView on GitHub
Edit Make-driven Symfony projects without breaking their boilerplate contract. Covers the `Makefile` (framework, regenerated by the boilerplate — read-only) vs `Makefile-solution` (project-owned, where you add targets) split used by Smile-style and many agency boilerplates, the `$(MAKEFILE_LIST)` aggregation pattern that powers `make help` across multiple files, target naming conventions (`##@ Group` for sections, `## helptext` per target), passing extra args via `MAKECMDGOALS` / `wordlist`, idiomatic Docker wrappers (`$(call run_in_php_project,...)`), and the anti-patterns that get a target wiped at the next boilerplate bump. Trigger when adding/editing make targets, when `make help` shows targets you didn't expect, when a custom target disappears after a boilerplate update, or when the project uses `make console`/`make tests` as its canonical commands.
- Reads credentials
In this repository52 other files it gives its agents.
- api-platform-dto-resourcesSkill
- api-platform-errorsSkill
- api-platform-file-uploadSkill
- api-platform-filtersSkill
- api-platform-identifiersSkill
- api-platform-mcpSkill
- api-platform-mutatorsSkill
- api-platform-openapiSkill
- api-platform-paginationSkill
- api-platform-performanceSkill
- api-platform-resilienceSkill
- api-platform-resourcesSkill
- api-platform-securitySkill
- api-platform-serializationSkill
- api-platform-state-processorsSkill
- api-platform-state-providersSkill
- api-platform-testsSkill
- api-platform-upgradeSkill
- api-platform-userSkill
- api-platform-versioningSkill
- bootstrap-checkSkill
- brainstormingSkill
- config-env-parametersSkill
- controller-cleanupSkill
- cqrs-and-handlersSkill
- daily-workflowSkill
- doctrine-batch-processingSkill
- doctrine-fetch-modesSkill
- doctrine-fixtures-foundrySkill
- doctrine-migrationsSkill
- doctrine-relationsSkill
- doctrine-transactionsSkill
- effective-contextSkill
- executing-plansSkill
- functional-testsSkill
- interfaces-and-autowiringSkill
- messenger-retry-failuresSkill
- ports-and-adaptersSkill
- quality-checksSkill
- rate-limitingSkill
- runner-selectionSkill
- strategy-patternSkill
- symfony-cacheSkill
- symfony-messengerSkill
- symfony-schedulerSkill
- symfony-votersSkill
- tdd-with-pestSkill
- tdd-with-phpunitSkill
- test-doubles-mockingSkill
- using-symfony-superpowersSkill
- value-objects-and-dtosSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
If boilerplate_recipe.yml exists at the root → it's a boilerplate.
- Very specific: line 24
If Makefile includes Makefile-solution → same split.
- Very specific: line 25
If only Makefile exists → it's both.
- Very specific: line 27
Add new targets to Makefile-solution (when present) or to a thematic section of Makefile.
- Very specific: line 28
Run make help after the change — your target must appear with the right group + helptext.
- Very specific: line 29
Run make -n <target> to dry-run before committing.
- Very specific: line 32
Never edit the framework
Makefile: when Makefile-solution exists — the boilerplate regenerates it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Makefile Discipline (Symfony)
Use when
- The project's CLAUDE.md says "all commands via Make" (and the session hook confirmed
runner_type = make). - Adding a new target (test scenario, deploy step, scaffold helper, etc.).
- Renaming or removing an existing target.
make helpshows weird/duplicate targets and you need to know which file owns them.- A custom target was lost after a boilerplate update.
Default workflow
- Inspect the orchestration root for
MakefileandMakefile-solution. - Determine which file is the framework (read-only) and which is solution (editable). Heuristic:
- If
boilerplate_recipe.ymlexists at the root → it's a boilerplate;Makefileis framework,Makefile-solutionis solution. - If
MakefileincludesMakefile-solution→ same split. - If only
Makefileexists → it's both. Edit freely but follow conventions.
- If
- Walk
$(MAKEFILE_LIST)(read the includes — typicallydocker/<service>/Makefile) to see all aggregated sources. - Add new targets to
Makefile-solution(when present) or to a thematic section ofMakefile. Always with##@ Groupheaders and## helptextper target. - Run
make helpafter the change — your target must appear with the right group + helptext. - Run
make -n <target>to dry-run before committing.
Guardrails
- Never edit the framework
MakefilewhenMakefile-solutionexists — the boilerplate regenerates it. - Never use
cd <dir> && cmdas a target body — use the project's idiomatic Docker wrapper ($(call run_in_php_project,...)or$(php) <cmd>ormake console <cmd>recursively). - Never hardcode service names (
docker compose exec php ...) — read them fromconf/.env.*variables that the Makefile already exports. - Targets that mutate state (migrations, fixtures, prod ops) must be idempotent and never assume a fresh container.
Progressive disclosure
- This file = editing posture + checklist.
reference.md= full pattern catalog (help-target awk script,MAKECMDGOALSparsing,wildcard $(ENV_DIR).env*env injection,COMPOSE_FILEaggregation, worktree-awareCOMPOSE_PROJECT_NAME,$(call run_in_php_project,$1)idiom, anti-patterns).
Output contract
- New/modified target in the right file (solution if split, otherwise the main Makefile).
make helpreflects the change with the right group + helptext.make -n <target>shows a sensible plan;make <target>runs green.- The change does not edit the framework Makefile when a solution file exists.
References
reference.mdgerard:runner-selection— sister skill (which file/runner to call)hooks/session-start.sh— surfacesmakefile.primary,makefile.solution_file,makefile.targets,makefile.is_boilerplate_smile
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

