brownfield
Scan and manage brownfield repository/worktree defaults for interviews
- License 许可
- MIT
- 所属仓库
- agisota/old-one
- 最近更新
- 2026-07-04
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- brownfield
- description
- Scan and manage brownfield repository/worktree defaults for interviews
03 SKILL.md 正文
/ouroboros:brownfield
Scan a root directory for existing git repositories and linked worktrees, then manage default repos used as context in interviews.
Usage
ooo brownfield # Scan repos and set defaults
ooo brownfield scan # Scan only (no default selection)
ooo brownfield defaults # Show current defaults
ooo brownfield set 6,18,19 # Set defaults by repo numbers
ooo brownfield detect [path] # Author mechanical.toml via one AI call
Trigger keywords: "brownfield", "scan repos", "default repos", "brownfield scan", "mechanical detect"
How It Works
Default flow (ooo brownfield with no args)
Step 1: Scan
Show scanning indicator:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanning for Existing Projects...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Looking for git repositories and worktrees under the scan root directory.
Linked worktrees reported by discovered normal repo roots may also be registered, even outside the scan root directory.
Local repos and repos with any remote name are eligible.
This may take a moment...
Implementation — use MCP tools only, do NOT use CLI or Python scripts:
- Load the brownfield MCP tool:
ToolSearch query: "+ouroboros brownfield" - Call scan+register:
This walksTool: ouroboros_brownfield Arguments: { "action": "scan" }scan_rootfor valid seed repos/worktrees and registers them in DB. For each discovered normal repo root with a.gitdirectory, Git-reported linked worktrees are also considered, even when they live outsidescan_root. A linked worktree found underscan_rootwith a.gitfile is registered itself, but it is not used to register its main worktree or sibling worktrees outsidescan_root. Existing defaults are preserved.
The scan response text already contains a pre-formatted numbered list with [default] markers. Do NOT make any additional MCP calls to list or query repos.
Display the repos in a plain-text 2-column grid (NOT a markdown table). Use a code block so columns align. Example:
Scan complete. 8 repositories registered.
1. repo-alpha 5. repo-epsilon
2. repo-bravo * 6. repo-foxtrot
3. repo-charlie 7. repo-golf *
4. repo-delta 8. repo-hotel
Include * markers for defaults exactly as they appear in the scan response.
If no repos found, show:
No git repositories or worktrees found.
Then stop.
Scan boundaries
- The filesystem walk starts at
scan_root; when omitted,scan_rootdefaults to the current user's home directory. - Repositories are only discovered directly by walking directories inside
scan_root. - Dot-prefixed directories and known noisy directories such as
node_modulesare not walked as seed locations. - Git worktrees are different: once a normal repo root with a
.gitdirectory is discovered, Ouroboros runsgit worktree list --porcelainand may register those linked worktrees even if their paths are outsidescan_root. - A linked worktree found inside
scan_rootwith a.gitfile is registered itself, but it is not used to register its main worktree or sibling worktrees outsidescan_root. - Local repos, repos without remotes, and repos whose remotes are not named
originare all eligible.
Step 2: Default Selection
IMMEDIATELY after showing the list, use AskUserQuestion with the current default numbers from the scan response.
If defaults exist, show them as the recommended option:
{
"questions": [{
"question": "Which repos to set as default for interviews? Enter numbers like '6, 18, 19'.",
"header": "Default Repos",
"options": [
{"label": "<current default numbers> (Recommended)", "description": "<current default names>"},
{"label": "None", "description": "No default repos — interviews will run in greenfield mode"}
],
"multiSelect": false
}]
}
If no defaults exist, do NOT show a "(Recommended)" option — offer "None" and "Select repos" instead:
{
"questions": [{
"question": "Which repos to set as default for interviews? Enter numbers like '6, 18, 19'.",
"header": "Default Repos",
"options": [
{"label": "None", "description": "No default repos — interviews will run in greenfield mode"},
{"label": "Select repos", "description": "Type repo numbers to set as default"}
],
"multiSelect": false
}]
}
The user can select the recommended defaults (if any), choose "None", or type custom numbers.
After the user responds, use ONE MCP call to update all defaults at once:
Tool: ouroboros_brownfield
Arguments: { "action": "set_defaults", "indices": "<comma-separated IDs>" }
Example: if the user picks IDs 6, 18, 19 → { "action": "set_defaults", "indices": "6,18,19" }
This clears all existing defaults and sets the selected repos as default in one call.
If "None" → { "action": "set_defaults", "indices": "" } to clear all defaults.
Step 3: Confirmation
Brownfield defaults updated!
Defaults: grape, podo-app, podo-backend
These repos will be used as context in interviews.
Or if "None" selected:
No default repos set. Interviews will run in greenfield mode.
You can set defaults anytime with: ooo brownfield
Subcommand: scan
Scan only, no default selection prompt. Show the numbered list and stop.
Subcommand: defaults
Load the brownfield MCP tool and call:
Tool: ouroboros_brownfield
Arguments: { "action": "scan" }
Display only the repos marked with * (defaults). If none, show:
No default repos set. Run 'ooo brownfield' to configure.
Subcommand: set <indices>
Directly set defaults without scanning. Parse the comma-separated indices from the user's input and call:
Tool: ouroboros_brownfield
Arguments: { "action": "set_defaults", "indices": "<indices>" }
Show confirmation with updated defaults.
Subcommand: detect [path]
Runs one AI call against the target directory (defaults to the user's cwd)
and writes .ouroboros/mechanical.toml with validated lint / build / test /
static / coverage commands. Stage 1 of evaluation reads this file verbatim,
so the toml is the authoritative Stage 1 contract — no hardcoded language
presets exist anymore.
Ouroboros auto-runs this detect the first time ouroboros_evaluate is
invoked without a toml present, so most users never need to call it
directly. Run it explicitly when:
- you want to pre-author the toml before the first evaluate,
- you moved to a new build tool and want to refresh (
--force), - you want to review/edit the commands before Stage 1 trusts them.
Implementation: invoke the CLI via Bash.
uvx --from ouroboros-ai ouroboros detect [path]
# or, if already installed:
ouroboros detect [path] [--force]
Then print the resulting .ouroboros/mechanical.toml contents so the user
can confirm the proposed commands or hand-edit them.
If detect reports "could not propose any verifiable commands", surface the
reason (no manifests found, LLM unavailable, every proposal dropped) and
suggest the user write a minimal toml by hand — any single entry like
test = "pytest -q" is enough to opt back in to Stage 1 for that check.
04 同仓库更多 Skills
zoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
zeroize-audit
Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.
yeet
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
yara-rule-authoring
Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
x-api
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.