This protocol governs AI behavior through the entire process of preparing a repository for GitHub publication. It covers every step from initial project classification through to the final post-publication checklist, ensuring that each decision is grounded in real workspace evidence before any file is generated or any git action is taken. It does not assume a standard open-source software model, does not assume every repository needs the same files or GitHub features, and explicitly prevents skipping directly to file generation, git initialization, or push.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xxyoudeadpunkxx/ai-protocol-kit/llms.txt
Use this file to discover all available pages before exploring further.
Core Rule
Build the smallest publication package that correctly represents the project, its risks, and its intended public surface.
7 Phases
Classify the project
Determine the project name, type, primary purpose, target audience, current status, maintenance model, intended visibility, and primary published unit. Possible project types include application, library, tool, documentation, content repository, template or kit, research repository, mixed repository, and internal operational repository. Possible primary published units include source repository, package, deployable application, static site, documentation, template kit, and release artifact. Use real evidence from the workspace. Do not assume a standard open-source software model unless the project clearly justifies it. Stop and ask if classification remains materially ambiguous.
Analyze the workspace
Inspect the workspace enough to make sound publication decisions. Determine and report: high-level structure, stack or tooling, entry points, generated outputs already present, environment-variable usage, whether
.env.example exists, GitHub-relevant files already present, licensing signals, deployment signals, whether the workspace is already a git repository, whether remotes already exist, and whether any Pages, docs, or site surfaces already exist. Do not generate files in this phase. Read only enough to close the publication decision perimeter.Run the publication risk audit
Check and report: sensitive data in current files and git history, secrets or credentials, local-only or generated material that should not be published, tracked artifacts (build output, caches, installed dependencies, editor folders, temp files, backups), large binary or media files, third-party assets with potential license obligations, commit hygiene, compatibility between the intended license and dependencies or bundled assets, naming risks, deployment risks, and any anomaly that should block publication. If the workspace is not yet a git repository, state explicitly that history audit cannot be performed. If publication-blocking issues are found, stop and provide remediation steps before continuing.
Design the publication model
Before generating any file, decide and report: recommended repository visibility, recommended license, whether GitHub Pages is appropriate (and if so, when and where its source should live), which GitHub features should be enabled or disabled (Issues, Discussions, Wiki, Projects, Actions, Releases), whether CI is justified, whether community-health files are justified, whether documentation beyond the README is justified, whether language statistics need protection through
.gitattributes, and whether .nojekyll, LFS, deployment workflows, or similar mechanisms are justified. Do not generate GitHub Pages, CI, community files, or docs by default — only add them when the real project and publication model justify them. Prefer the smallest correct publication package.Generate the publication package
Generate only the files justified by the publication model. Possible files include
.gitignore, .gitattributes, .env.example, LICENSE, README.md, CONTRIBUTING.md, CHANGELOG.md, CODE_OF_CONDUCT.md, SECURITY.md, CODEOWNERS, .github/ISSUE_TEMPLATE/, .github/PULL_REQUEST_TEMPLATE.md, .github/workflows/, docs/, and static site files for GitHub Pages. Infer from the actual workspace and project intent. Extend existing files when appropriate instead of replacing them. Do not generate placeholder bureaucracy or files only because they are common on GitHub. If a file is skipped, state why. If a file requires unresolved policy input, stop and ask before generating it.Review before any git or GitHub action
Before initializing git, creating commits, creating a remote repository, or pushing, produce a concise review that states: what will be published, what will not be published, which files were added or modified for publication, which repository features are expected to be enabled or disabled, which decisions are now frozen, which decisions still require confirmation, and which risks remain. Do not initialize git, commit, create a remote, or push until this review is complete and the publication package is confirmed.
Execute publication
After confirmation, perform the minimum clean publication sequence required by the environment. Possible actions include: initialize git if absent, set the default branch name, stage files intentionally, create the first commit, create the remote repository, connect the remote, push the default branch, configure Pages, set description and homepage, and configure repository features if automation is available. Do not assume publication means only pushing files — it also includes repository identity, licensing clarity, feature surface, and deployment behavior.
Operating Rules
The following six rules govern every session using this protocol:- Follow the phases in order. Do not jump ahead.
- Do not skip directly to file generation, git initialization, commit creation, remote creation, or push. Each phase must be completed before proceeding.
- Before acting, identify the environment. Understand what the operation requires, anticipate likely failure points for that environment, choose the method that avoids them, and then act.
- If a meaningful ambiguity remains and could change licensing, visibility, deployment, or repository structure, stop and ask before modifying anything.
- Do not generate files, workflows, community templates, or Pages unless they are justified by the actual project and publication intent.
- Do not optimize for completeness by default. Optimize for correctness, minimality, and publication readiness.