# Repository Defaults Scan

Scans existing repositories and worktrees and manages their default interview settings.

- Repository: https://github.com/Q00/ouroboros (6302 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Q00/ouroboros --skill brownfield -g -a claude-code -y`
Codex: `npx skills add Q00/ouroboros --skill brownfield -g -a codex -y`
Cursor: `npx skills add Q00/ouroboros --skill brownfield -g -a cursor -y`
Gemini CLI: `npx skills add Q00/ouroboros --skill brownfield -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Q00/ouroboros`

## Description

Scan and manage brownfield repository/worktree defaults for interviews

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /ouroboros:brownfield

Manage the registry of existing git repositories and linked worktrees, and the default repos used as interview context. The registry lives in the Ouroboros DB: listing, defaults, and search read it and never walk the filesystem. Only `scan` walks the disk.

```
ooo brownfield                # List registered repos and set defaults (scans only if none are registered)
ooo brownfield scan           # Rescan the scan root and refresh the search index
ooo brownfield defaults       # Show current defaults
ooo brownfield find <topic>   # Rank registered repos by relevance to a topic
ooo brownfield set 6,18,19    # Set defaults by repo numbers
ooo brownfield detect [path]  # Author mechanical.toml via one AI call
```

## Loading MCP tools (deferred-schema guard)

Ouroboros tools may be deferred, and a schema loaded on one turn can unload by the next. Immediately before each `ouroboros_*` call, load it with the active runtime's tool-discovery capability: `"+ouroboros brownfield"` for `ouroboros_brownfield`. A call whose schema is not loaded fails with "Invalid tool parameters". If the tool is already callable, discovery is a no-op and an empty result is expected. If it is genuinely absent, stop and say the Ouroboros MCP server is not available. Listing, scan, find, defaults, and set use only this MCP tool, never the CLI or Python scripts.

## Default flow (`ooo brownfield`)

### Step 1: List the registry

```
Tool: ouroboros_brownfield
Arguments: { "action": "query" }
```

If `meta.total` is 0, nothing is registered yet: run the scan below instead and use its response. Otherwise do not scan; the user runs `ooo brownfield scan` when repos were added or moved.

```
Tool: ouroboros_brownfield
Arguments: { "action": "scan" }
```

The rest: https://github.com/Q00/ouroboros/blob/HEAD/skills/brownfield/SKILL.md
