Repo Bootstrapper
researched 2026-05-25· 0 sources · 9 concepts · skill repo-bootstrapper
Generates and maintains the full mdb-tam file standard for any repository.
Repo Bootstrapper & Standards Maintainer
- Generates and maintains the full mdb-tam file standard for any repository. [source]
When to use this skill
- Create an ideal repository from scratch using the full mdb-tam standard (includes code quality optimization and LLM doc generation) [source]
- Upgrade an existing repository toward that same ideal state (runs cdo and crawl-repo-to-llms automatically) [source]
- Initialize a brand-new repository to the mdb-tam documentation and workflow standard [source]
- Audit an existing repo against the standard and fill any gaps [source]
- Update stale documentation sections (architecture, commands, known-issues, etc.) [source]
- Create or update the docs/ suite, memory.md, prompts.md, CLAUDE.md, .github/copilot-instructions.md [source]
- Keep docs/high_signal_file_index.json and docs/codebase-overview.md current after large changes (regenerated by crawl-repo-to-llms) [source]
- Optimize code quality and generate LLM-friendly documentation as part of standard repo modernization [source]
When NOT to use this skill
- Pure code review or bug hunting - use the /code-review command [source]
- Pure security audit - use security-reviewer [source]
- Code-pattern extraction without meta-doc work - use repo-pattern-scanner [source]
- Production-log / runtime-error triage - review prod logs, root-cause a live error, verify a fix, open a remediation PR → the error-monitor-remediator agent (rule book: docs/error-monitoring-guide.md). This skill is a static meta-doc/standards maintainer with no telemetry access; it audits whether logging and test docs meet the standard, it does not read production logs or open PRs from runtime errors. [source]
- Repo not following mdb-tam conventions - surface what the standard would require and ask before writing [source]
- Read-only or locked repo - report findings only; do not write any files [source]
- No clean working tree - verify git status is clean or operator has acknowledged the risk before writing [source]
Entry point
- Input: expects a local git repository path (absolute or CWD). If not a git repo, stop and report. [source]
- Bootstrap prompt fallback: if 10gen/mdb-tam/docs/repo-bootstrap-prompt.md cannot be loaded, stop and ask for the path to the local mdb-tam checkout. Do not proceed with run_bootstrap or create_ideal_repo without it. [source]
- Top-level output after any write phase: [source]
Skill guidance
- This skill's canonical bootstrap prompt lives in 10gen/mdb-tam at docs/repo-bootstrap-prompt.md. [source]
- When auditing, check each file in the Standard File Manifest below. [source]
- Read the audit ledger first. Before any new audit, read existing docs/repo-bootstrap-audit-*.md files. Never re-raise a finding marked RETRACTED there without new evidence - fresh LLM passes reliably re-discover plausible-but-wrong findings (e.g. demanding DATASTORE_VERIFY_FAILED on kind: check/report ops when the gate only applies to kind: sync). [source]
- Verify subagent findings against the artifact before acting. Parallel audit agents over-report: "row has missing-coverage marks" gets reported as "call is undocumented", and per-block entry counts get reported as totals. Grep/read the target yourself before writing a remediation. [source]
- Always infer from the actual codebase - never invent commands or paths. [source]
- Full rewrites are appropriate when they materially improve clarity and maintainability. [source]
- Use parallel agents for independent work phases: file-manifest audit, external-call inventory, extended checks, and skill-coverage gap analysis can all run concurrently. [source]
- Never write real credentials, tokens, API keys, or env var values into any generated file. [source]
- .env / .env.example may be read+write denied by Claude Code permission settings. Fall back to grep -rE "process\.env\.[A-Z_]+" for the var inventory and emit the missing-var list as a copy-paste TODO block instead of editing the file. [source]
Standard File Manifest
- Every repo that meets this standard must have ALL of the following files. [source]
Operations Infrastructure
- Auto-remediation contract: a repo passes the audit only when every external call in docs/external-calls.md satisfies all five standards (CLI trigger, centralized error log, auto-remediation map, dashboard card, datastore verification). See references/coding-standards.md for full requirements. [source]
Audit
- The detailed per-file audit checklist lives in references/audit-checklist.md. Run it against every file in the manifest. Severity rubric: blocking, major, medium, minor. [source]
Auto-remediation workflow
- When the audit finds gaps, update_to_ideal_repo runs these passes in order: [source]
- Drift pass - compare every manifest file against current state; update commands, paths, versions, agent inventories; drop sections that no longer apply. [source]
- External-call inventory pass - grep for every external call, populate docs/external-calls.md, emit a per-call task for each missing standard. [source]
- Code quality pass - run code-deep-optimizer (cdo) to audit source code for bugs, efficiency, and maintainability; apply all Medium+ findings automatically. [source]
- LLM documentation pass - run crawl-repo-to-llms to generate machine-readable LLM-friendly documentation indexes (docs/high_signal_file_index.json, llms.txt metadata, semantic embeddings). [source]
- Convergence loop - re-run the drift pass after each change set. Stop when the audit returns zero medium-or-higher findings. Hard cap: 3 iterations. After 3, surface remaining findings as a TODO list and stop. [source]
- Repo hygiene pass - commit all changes, stage untracked files, clean up dangling work, and leave repo in a clean state with no shadow branches or uncommitted changes. [source]
- Hub registration pass - register or update the project in ~/.global-ai-hub project registry; sync metadata (paths, tags, languages, description) if already registered. [source]
- No-invention rule - never fabricate a command, path, env var, or external service. Surface unknowns as TODO with where-to-find. [source]
`audit_repo(path)` → gap report
- Run the audit checklist from references/audit-checklist.md against all files in path. Produce: [source]
`update_file(file, repo_context)` → updated file content
`create_ideal_repo(path)` → ideal repo baseline
- Read the repo and identify canonical version file, runtime model, commands, docs, integration boundaries [source]
- Create the full standard file manifest [source]
- Rewrite weak top-level docs so the repo has a clear entry point, workflow rules, and maintenance baseline [source]
- Run code-deep-optimizer (cdo) to audit and optimize source code from the start [source]
- Run crawl-repo-to-llms to generate LLM-friendly documentation and semantic indexes for the new repo [source]
- Repo hygiene & commit - stage all new files, commit bootstrap changes, ensure clean working tree [source]
- Hub registration - register project in ~/.global-ai-hub registry with metadata (path, languages, tags, description) [source]
`update_to_ideal_repo(path)` → modernization plan + execution
- Check git status - stop and ask if working tree is dirty and operator has not acknowledged the risk [source]
- Audit every standard file for correctness, completeness, and clarity [source]
- Upgrade stale docs, indexes, workflow files, and skills [source]
- Run code-deep-optimizer (cdo) to audit and fix source code - auto-applies all Medium+ findings [source]
- Run crawl-repo-to-llms to generate LLM-friendly documentation indexes and semantic metadata [source]
- Re-run audit after code and doc passes to validate no regressions [source]
- Repo hygiene & commit - stage all untracked files, commit all changes (with descriptive message), clean up any shadow branches or dangling work, ensure clean git status [source]
- Hub registration - register or update project in ~/.global-ai-hub registry; sync repo metadata (paths, tags, languages, description) [source]
- Prefer clean rewrites over incremental patching when a file has duplication, drift, or low-signal structure [source]
`create_operations_registry(path)` → operations-registry.js + MCP tools + tests + CI check
- Grep for every external call (fetch, http.request, execFile, exec, spawn, child_process, fs.watch, SDK client calls) [source]
- Extract: file:line, target, transport type, error handling, retry logic [source]
- Generate server/src/lib/operations-registry.js with one OperationEntry per call [source]
- Generate buildToolInventory() and writeToolInventory() functions [source]
- Generate scripts/generate-ops-registry-doc.mjs as the sole writer of docs/operations-registry.json; add ops:doc and ops:doc:check npm scripts to package.json [source]
- Register MCP tools: tam_ops_list, tam_ops_get, tam_ops_run, tam_ops_history, tam_ops_status, tam_ops_audit, tam_ops_remediation, tam_ops_write_doc, tam_tool_inventory, tam_write_tool_inventory [source]
- Add tests and CI drift check (ops:doc:check step in .github/workflows/ci.yml) [source]
- Update docs/external-calls.md and docs/tool-inventory.json [source]
`create_skill_for_context(context_file_path)` → SKILL.md + .skillfish.json
`sync_memory(version, completed_items, next_steps)` → memory.md entry
- Produce a new versioned entry for memory.md in the correct format. [source]
`cleanup_and_commit(path)` → clean repo state
- Get the repo current - pull latest from remote if applicable [source]
- Stage all untracked files in the repo [source]
- Commit all uncommitted changes with a descriptive message (format: "repo: modernization & cleanup" or similar) [source]
- Identify and clean up any shadow branches or dangling work (stashed changes, detached HEAD, leftover branches) [source]
- Verify git status returns clean - no uncommitted changes, no untracked files [source]
- Report final state: commit shas, branches cleaned, files committed [source]
`register_with_hub(path)` → hub registry entry
- Check if project exists in ~/.global-ai-hub/registry.json (or equivalent project manager) [source]
- If NOT registered: create new entry with metadata (absolute path, project name, languages, primary tags from package.json/docs, description from README) [source]
- If already registered: update metadata (sync paths, update tags, refresh description, update last-modified timestamp) [source]
- Validate entry against hub schema [source]
- Write/update registry and report final state: entry ID, metadata synced, timestamp [source]
`run_bootstrap(repo_path)` → full task prompt
Bundled Context
- The full bootstrap prompt lives at docs/repo-bootstrap-prompt.md in 10gen/mdb-tam. Load it when the user asks to initialize, modernize, or turn a repository into an ideal repo. Do not hard-code local filesystem paths - resolve the file at runtime from the 10gen/mdb-tam checkout on the current machine. [source]
References
Children
- CLAUDE.md and AGENTS.md Management (frontier)
- CI Workflow Setup (frontier)
- Docs Suite Generation (frontier)
- Repo Meta-Doc Maintenance (frontier)
Frontier under this node: CI Workflow Setup, CLAUDE.md and AGENTS.md Management, Docs Suite Generation, Repo Meta-Doc Maintenance