Contributions - xsyetopz/claudetto GitHub Wiki
This page covers how dotclaude checks a contribution to a project that you do not own. It is for a user who lets Claude write a commit, a push, a pull request, an issue, a discussion, a review, or a comment.
A commit, push, pull request, issue, discussion, review, or comment in a project that you do not own speaks for you.
Maintainers read it as your words.
The guard slice asks before Claude reaches the project of another owner.
The guard slice asks when Claude reaches a GitHub repository of another owner that has a policy file.
It asks at each call that reaches the repository.
A repository whose policy files are all missing is not read again in the session.
A failed read is not kept, so the next call reads the repository again.
The policy files are the ones in POLICY_FILES in src/plugins/dotclaude/slices/guard/domain/owners.ts: CLAUDE.md, AGENTS.md, and AI_POLICY.md.
The ask covers these calls, which reachedRepos finds:
- Bash:
git clone,git fetch,git pull,git remote add, orgit submodule addon the repository, with any global option before the verb, such asgit -C dir fetch URL. - Bash:
pip,pip3,python -m pip, oruv pip installof agit+URLon the repository. - Bash:
gh,curl, orwgeton the repository. -
WebFetchof a page of the repository.
The steps are:
- The
guardreads your logins withgh config get user -h github.com(LOGIN_ARGV). - It reads the organizations where you are an admin with
gh api user/memberships/orgs(ORGS_ARGV). A repository of you or of such an organization is yours, and the ask skips it. - For another owner, it reads each policy file with
gh api. -
policyReasonwraps each file in<policy_file name=...>, and it XML-escapes the text. A file that is longer thanPOLICY_FILE_MAX_CHARS(2_000characters) is cut, and[cut]marks the cut. - The ask shows the policy text in the prompt.
Each gh call stops after POLICY_TIMEOUT_MS (5_000 milliseconds).
src/kernel/budget.ts sets this value.
The ask fails open.
The output is null when gh is missing.
It is also null when you are logged out.
It is also null when the call is slower than the timeout, or when it exits with a code other than 0.
A repository with no policy file continues without the ask.
The owner list is kept only when both gh calls answer.
So a failed call runs again at the next check.
The ask keeps a list of the repositories that it checked, for each session.
A project with no policy file is unknown, not permitted.
Read its CONTRIBUTING.md yourself before you write to it.
- Read the policy text in the prompt.
- If the policy forbids AI work, reject the call.
- If the policy allows AI work, allow the call. Follow what the policy asks, such as a disclosure line.
- Review each draft before you send it.
Note: Maintainers spend time on each report. A report that nobody checked, or that is long and vague, costs them that time. It also costs you their trust.
The prompt slice adds permissions.ask rules to the settings snippet.
The rules cover these public writes:
-
gh pr create,gh pr merge,gh pr comment, andgh pr review. -
gh issue createandgh issue comment. -
gh release.
Claude asks before each of these calls runs.
A contribution is public, and it stays after a removal.
The decision is yours.
See Guards for the other checks of the guard slice.
The repository rules are in CLAUDE.md at the repository root.
Run just check before you call a change done.
Edit the source in src/, and run just generate.
A test fails when a generated file differs from its source.
Do not edit plugins/ by hand.