This guide is for people changing this repository.
npm ciRun all repository checks:
npm run test:contracts
npm run check:interfaces
npm run lint:workflows
npm run lint:docs
npm run doctor:repo
npm run doctor -- --fail-on high fixtures/wp-plugin
npm audit --audit-level=moderate| Path | Purpose |
|---|---|
.github/workflows |
Callable workflows and repository checks. |
docs |
User-facing documentation. |
examples |
Copyable caller workflow examples. |
fixtures |
Minimal projects used by contract tests and policy examples. |
scripts/doctor.mjs |
Consumer repository diagnostics and workflow recommendations. |
scripts/validate-contracts.mjs |
Structural workflow and documentation checks. |
scripts/validate-consumers.mjs |
Checks downstream calls against generated interfaces. |
workflow-catalog.json |
Workflow category, trust, and permission catalog. |
workflow-interfaces.json |
Generated workflow_call inputs, secrets, and outputs. |
- Keep callable workflows directly under
.github/workflows. - Every shared workflow must use
workflow_call. - Default to
permissions: contents: read. - Gate free-form shell inputs with an explicit
allow_*input. - Do not interpolate workflow inputs directly into
runscripts. - Keep lockfile-less Node installs behind
allow_unpinned_node_install. - Keep artifact uploads hidden-file-safe by default.
- Keep artifact manifest and secret-content scanning enabled by default.
- Keep artifact attestation opt-in and isolated to jobs with attestation permissions.
- Do not reintroduce removed static-analysis or generic PHP lint workflows.
- Update docs and examples with every workflow input or behavior change.
- Update
workflow-catalog.jsonwhen workflows are added, renamed, or removed, then runnpm run generate:interfaces. - Add contract-test coverage for new security or DX assumptions.
- Add
.github/workflows/<name>.yml. - Define
on.workflow_callinputs, secrets, and outputs. - Set minimal permissions.
- Add a documentation page under
docs. - Add a caller example when the workflow is user-facing.
- Add an entry to
workflow-catalog.json. - Extend
scripts/validate-contracts.mjsfor new invariants. - Run all checks.
Pinned workflow tooling includes semantic-release packages, QIT, and zizmor. When updating a pin:
- Change the ref or package version.
- Record why the update is safe in the pull request.
- Run repository checks.
- Test at least one consumer repository on a branch before tagging.
- Merge changes into
main. - Confirm repository checks are green.
- Create or let semantic-release create the release tag.
- Publish migration notes for behavior changes.
- Upgrade one low-risk consumer repository first.
Docs should answer:
- What problem does this workflow solve?
- When should it be used?
- What inputs and secrets matter most?
- What permissions does the caller need?
- What are the safe defaults?
- What is the minimal copyable example?