Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: setup-repo description: This skill should be used when configuring a repository for groundwork - detects single-project or monorepo structure and creates .groundwork.yml
Setup Repository Skill
Configures the repository structure for Groundwork. Detects or asks whether this is a single-project repo or a monorepo, and creates .groundwork.yml for monorepos.
Workflow
Step 1: Detect Repository Structure
Look for common monorepo patterns:
- Multiple directories with their own
package.json,go.mod,Cargo.toml, etc. - Common monorepo directories:
apps/,packages/,services/,projects/ - Existing
specs/directory (suggests single-project) - Workspace configuration files (
pnpm-workspace.yaml,lerna.json,turbo.json)
Step 2: Ask User
Use AskUserQuestion to confirm:
"I've analyzed your repo structure. Is this:"- Single project — One project, specs at the repo root- Monorepo — Multiple projects, each with their own specs
If monorepo indicators were found, mention them:
"I noticed [apps/, packages/, workspace config], which suggests a monorepo structure."
Step 3: Configure
If single project:
- No config file needed
- Ensure
.groundwork-plans/is in.gitignore(add it if missing) — work-on writes per-task plan files there. - Confirm: "Single-project mode. Specs will be stored in
specs/at the repo root." - Proceed — no
.groundwork.ymlcreated.
If monorepo:
- Ask which directories are projects. Suggest based on detected structure.
- Use
AskUserQuestionwith multi-select to confirm project list. - Create
.groundwork.yml:
version: 1projects:<project-name>:path: <relative/path><project-name>:path: <relative/path>
- Ensure
.groundwork.localand.groundwork-plans/are in.gitignore(add any missing entries)..groundwork-plans/is where work-on writes per-task plan files. - Ask which project to start with using
AskUserQuestion. - Set project context:
GROUNDWORK_PROJECT=<name>andGROUNDWORK_PROJECT_ROOT=<path>
Step 4: Persist Selection
For monorepo mode, persist the selection to .groundwork.local at the repo root (gitignored) so it survives session restarts.
Confirm: "Project <name> selected. Specs will be stored in <path>/specs/."
Adding Projects Later
This skill can also be invoked to add or remove projects from an existing .groundwork.yml:
- Read existing config
- Present current projects
- Ask what to add/remove
- Update the config file
Edge Cases
| Situation | Response | |
|---|---|---|
.groundwork.yml already exists | Show current config, ask if user wants to modify | |
| No obvious project directories | Ask user to specify paths manually | |
| User says single-project but monorepo indicators exist | Accept user's choice, note the indicators |