/ddd-ts-kit:commit-disciplinefrom ddd-ts-kit
Enforces disciplined commits: one slice per commit, conventional messages scoped by context, and size limits. Use before committing or when asked to split a change.
Ships in ddd-ts-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A commit is one thing a reviewer can understand and a team can revert. In this architecture
that thing has a natural size: one slice. The checks before the commit are skill
ddd-ts-kit:quality-gate.
| Commit | Holds |
|---|---|
| a use case | its `application/commands |
| a concept alone, when the use case would grow too large | one aggregate, value object or policy with its spec and builder |
| a contract | one integration event or read contract of a published-language/, with its publisher |
| a strategic step | one artefact of docs/architecture/ and the updated plan |
| a decision | one docs/adr/ record and the config entry it justifies |
Always in the same commit as what caused them: the files the generator wrote and updated
(the created, updated and deleted lists of its output), the regenerated declarations
(<context>.declarations.ts and the <layer>.declarations.ts of each layer it touched),
the generated lists of CONTEXT.md, the glossary row a new
name needed, the contracts under openapi/, the event catalog, docs/context-map.md. A generated
file committed alone, or left for later, breaks docs --check on one side of the history.
Never in the same commit: two use cases, two contexts (except a contract and its first consumer, when agreed), a refactoring and a behaviour change, a rule relaxation and the code that needed it.
Target: at most commit.maxFiles files and commit.maxLines changed lines
(ddd-ts-kit.config.json; 20 and 600 when the key is absent), generated files and the
lockfile not counted. npx ddd-ts-kit check --commit-size measures what is about to be
committed against them (--staged reads the index only; advisory, --strict exits 1 when
over). A generated use case with its route is 10 to 15 files, most of them small. The guard
says so once, without blocking, when the working tree goes past the limits, and names the
slices it sees.
Conventional commits, checked by commitlint at commit-msg:
<type>(<context>): <what the business can now do, imperative, lower case>
type: feat (behaviour), fix, refactor (no behaviour change), test, docs,
chore, build, ci.platform for src/platform/; none for the whole project.feat(ordering): refuse an order without lines, not
feat: add validation to handler.! after the
scope, and BREAKING CHANGE: in the body for a contract).git status --short and read it by slice: one use-case folder, its route, its specs.npx ddd-ts-kit check --changed-since HEAD, npx ddd-ts-kit docs --check, and
npx ddd-ts-kit todo <context> --brief: no marker left in the slice.git add src/contexts/<context>/application/commands/<use-case> <its route> <its specs> <the declarations of their layers> <CONTEXT.md>.git diff --cached --stat and npx ddd-ts-kit check --commit-size --staged: one
story, within the limits?--no-verify (on commit, push, merge), not git commit -n,
not -c core.hooksPath=..., not LEFTHOOK=0 or HUSKY=0. The hooks are the local gate of the
pipeline and the guard refuses the command. If a hook fails, fix what it reports; if the hook is
itself broken, report it to the project owner.Propose the commit (files and message) and let the user confirm, unless you were asked to commit or you are a worker in your own worktree, where each finished slice is committed.
Split it along the order it could have been built in, each commit green on its own:
Stage path by path in that order. When two slices are tangled in one file, commit the first with the whole file and say so in the body rather than rewriting history. If the split is not obvious, the change did two things: say which, and ask.
TODO(domain) or it.todo left in the slice and call it done;What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ddd-ts-kit/ddd-ts-kit --plugin ddd-ts-kit26 skills in this plugin
/access-controlUse when adding a permission, a role or an ownership rule, when code needs the connected user or the tenant, when filtering a list by rights, or on an authz/* rule. Authentication, authorization, access scopes, policies, RBAC, ABAC, ReBAC./bootstrapChooses the stack and creates the project with the ddd-ts-kit CLI: config, platform, database, pipeline, contexts, in an empty directory or an existing backend. Run by the user with /ddd-ts-kit:bootstrap./bounded-contextsUse when cutting a system into bounded contexts, when a concept has no home, a context grows two vocabularies or too large, two contexts need each other, or on boundaries, subdomains, sub-contexts, modules, splitting or merging contexts. Core, supporting or generic.Other plugins' skills for the same job