Contributing to frappe-stack¶
Thanks for considering a contribution. This is a Claude Code plugin, so contributions span markdown (skills / agents / commands / docs), JSON (hooks / config schemas), and small Python (the hook scripts under .claude-plugin/hook_scripts/).
Quick orientation¶
Read these in order:
README.md— what this is and what's in the boxdocs/architecture.md— how the pieces fitPRD.md— what we're building and whySECURITY.md— non-negotiable guardrailsCLAUDE.md— order of precedence + working notes for Claude Code sessions
Ground rules¶
- Conventional commits:
feat,fix,refactor,docs,test,chore,perf,ci. Body explains why, not what. - One logical change per commit / PR. Don't bundle phases, don't mix unrelated fixes.
- No skipping hooks (
--no-verify) and no force-pushing protected branches. - Tests come first for any non-trivial Python in the plugin (hook scripts especially) — RED → GREEN → REFACTOR.
- Security review is mandatory for anything touching
hooks/,.claude-plugin/hook_scripts/, agents that issue REST calls, or skills that generate code. Use thesecurity-revieweragent or tag@security-rotation. - Don't bypass
SECURITY.mdnon-negotiables. Noignore_permissions=True, noallow_guest=Truewithout review, no f-string SQL, no hardcoded role checks, no hardcoded credentials.
Setting up to contribute¶
Prerequisites¶
- Claude Code (for testing the plugin)
- A Frappe v15+ site (any stock install — for end-to-end smoke tests of slash commands)
- Python 3.10+
- Node 18+ (only for Playwright E2E)
ghCLI (forpr_opener.pysmoke tests)
Clone + install¶
For the plugin (in Claude Code):
What kind of contribution?¶
Adding a skill¶
- Decide the category:
building/,process/,platform/, orbuilder-protocol/. - Create
skills/<category>/<kebab-name>/SKILL.mdwith frontmatter: - Body: when to load, conversation flow if applicable, worked example, anti-patterns to refuse.
- Add a row to
docs/skills.mdunder the right section. - Open a PR with the
skilllabel.
Skill ergonomics test: does the description trigger on PM-natural phrases ("I need a form for…") rather than jargon ("create a DocType")?
Adding an agent¶
- Create
agents/<name>.mdwith frontmatter: - Body: workflow steps, refuses, pairs-with.
- Add a row to
docs/agents.md. - Open a PR with the
agentlabel.
Adding a slash command¶
- Create
commands/<name>.mdwith frontmatter: - Body: what it does, arguments, refuses-if, examples.
- Add a row to
docs/commands.md. - Mirror any refusals into
docs/hooks.mdso the hook layer enforces them.
Adding a hook¶
Hooks are security-sensitive. Triple-check before opening the PR.
- Pick the lifecycle event (
UserPromptSubmit/PreToolUse/PostToolUse/Stop). - Write
.claude-plugin/hook_scripts/<name>.py. Read stdin, write stdout JSON. See existing scripts for the contract. - Add the entry to
hooks/hooks.jsonunder the right top-level key. - Add a regression test under
tests/hooks/test_<name>.py. Prove the hook fires on the bad input and approves the good input. - Add a row to
docs/hooks.md. - Open a PR with the
hookandsecuritylabels — security review mandatory.
Adding a hook script¶
- Open an issue first to discuss the design — hook changes are security-sensitive.
- Write tests first under
tests/hooks/test_<name>.py. Prove the hook fires on the bad input and approves the good input. - Add the entry to
hooks/hooks.json. - Update
docs/hooks.mdwith the new row. - Open a PR with the
hookandsecuritylabels.
Fixing a bug¶
- Open an issue with reproduction steps.
- Write a regression test that fails on
main. - Implement the fix.
- Test passes.
- Open a PR linked to the issue.
Improving documentation¶
- PRs welcome on any file under
docs/, the four protocol files, orREADME.md. - Use the
docsconventional-commit prefix. - No code changes in a docs PR — keep them separate.
PR review¶
Every PR runs through the reviewer and tester agents (when CI is wired in infra/). Until then, the maintainer runs them manually.
Pass criteria: - ✓ 0 CRITICAL / 0 HIGH from reviewer - ✓ All tests pass; coverage ≥ 80% on changed lines - ✓ Conventional-commit messages - ✓ Docs updated to match the change - ✓ One logical change
Security disclosure¶
If you find a security issue, do not open a public issue. Email noreply@dhwaniris.com (replace with the project's security contact when established) with:
- Description of the vulnerability
- Reproduction steps
- Affected versions / files
- Suggested fix if known
You'll get acknowledgement within 48 hours and a fix timeline within a week.
Code of conduct¶
Be respectful. Be helpful. Assume good intent. If a contributor's behavior makes the community worse, raise it with the maintainer.
Questions?¶
- Open a discussion (when GitHub Discussions is enabled).
- Or open an issue with the
questionlabel.