Skip to content
This repository was archived by the owner on Nov 3, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .claude/skills/meta-exec/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ meta exec -- --version

## Parallel vs Sequential

Commands run in parallel by default (a `.meta` config can set `defaults.parallel: false`; it is only read when you run meta from the directory holding that `.meta`). Use `--sequential` for live output in order, or `--parallel` to force concurrency:
Commands run in parallel by default (a `.meta.yaml` can set `defaults.parallel: false`; it is only read when you run meta from the directory holding that `.meta.yaml`). Use `--sequential` for live output in order, or `--parallel` to force concurrency:

```bash
# Parallel (default) - faster, grouped output after completion
Expand All @@ -61,7 +61,7 @@ Parallel mode:
Control which repos run the command:

```bash
# Only these repos: each value is a repo's .meta name or its path from the workspace root
# Only these repos: each value is a repo's .meta.yaml name or its path from the workspace root
meta --include api,worker git status
meta --include libs/core,. git status # `.` is the root repo

Expand All @@ -80,7 +80,7 @@ meta --tag backend --include api git status
2. `--include` limits to the named repos
3. `--exclude` removes the named repos

A value names a whole repo, never part of a path: `api` does not match `api-tests`. A value that names no repo is an error, so a typo never runs a command in the repo you meant to skip. Inside a worktree set the same holds: a repo sits at its project's path, so it is named by its `.meta` name or that path, from the set's root. A value starting with `./` is a path only; use it when a name is ambiguous (a value that names several repos is an error too). The meta root repo stays included even when it doesn't match a tag.
A value names a whole repo, never part of a path: `api` does not match `api-tests`. A value that names no repo is an error, so a typo never runs a command in the repo you meant to skip. Inside a worktree set the same holds: a repo sits at its project's path, so it is named by its `.meta.yaml` name or that path, from the set's root. A value starting with `./` is a path only; use it when a name is ambiguous (a value that names several repos is an error too). The meta root repo stays included even when it doesn't match a tag.

## Dry Run

Expand Down Expand Up @@ -136,8 +136,8 @@ meta --silent exec -- npm install
|--------|-------------|
| `--parallel` | Run commands concurrently (the default) |
| `--sequential` | Run one repo at a time |
| `--include <repos>` | Only these repos (`.meta` name or path from the root) |
| `--exclude <repos>` | Skip these repos (`.meta` name or path from the root) |
| `--include <repos>` | Only these repos (`.meta.yaml` name or path from the root) |
| `--exclude <repos>` | Skip these repos (`.meta.yaml` name or path from the root) |
| `--tag <tags>` | Filter by project tag(s) |
| `--dry-run` | Preview without executing |
| `--json` | Structured JSON output |
Expand Down Expand Up @@ -187,7 +187,7 @@ meta exec -- rm -rf node_modules dist
| One-off scripts | Operations with meta-specific logic |
| npm/cargo/make | Clone, update, worktree |

`meta exec -- <cmd>` always runs the command as typed, never through a plugin: `meta exec -- git status` runs plain `git status` in each repo, while `meta git status` uses the git plugin. Prefer `meta git <cmd>` for git: any git subcommand passes through it, and it runs remote commands (`fetch`, `pull`, `push`) without credential prompts that would hang parallel runs. Plugins intercept only their own subcommands (`meta git ...`, `meta cargo ...`) and provide enhanced behavior. `meta git clone` doesn't run `git clone` in each repo—it reads `.meta` and clones the entire graph.
`meta exec -- <cmd>` always runs the command as typed, never through a plugin: `meta exec -- git status` runs plain `git status` in each repo, while `meta git status` uses the git plugin. Prefer `meta git <cmd>` for git: any git subcommand passes through it, and it runs remote commands (`fetch`, `pull`, `push`) without credential prompts that would hang parallel runs. Plugins intercept only their own subcommands (`meta git ...`, `meta cargo ...`) and provide enhanced behavior. `meta git clone` doesn't run `git clone` in each repo—it reads `.meta.yaml` and clones the entire graph.

## Worktree Context Detection

Expand Down
10 changes: 5 additions & 5 deletions .claude/skills/meta-git/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Any other git subcommand passes through to git in each repo. Meta passes the arg
## Cloning a Meta Repo

```bash
# Clone meta repo and all child repos defined in .meta
# Clone meta repo and all child repos defined in .meta.yaml
meta git clone <url>

# Clone recursively (if child repos are also meta repos)
Expand All @@ -37,13 +37,13 @@ meta git clone <url> --parallel 8
meta git clone <url> --depth 1
```

**How it works**: Meta clones the parent, reads `.meta`, then queues and clones all children in parallel. With `--recursive`, it repeats for any child that has its own `.meta`.
**How it works**: Meta clones the parent, reads `.meta.yaml`, then queues and clones all children in parallel. With `--recursive`, it repeats for any child that has its own `.meta.yaml`.

## Updating All Repos

```bash
meta git pull # Pull every existing repo
meta git update # Clone repos listed in .meta that are missing locally
meta git update # Clone repos listed in .meta.yaml that are missing locally
```

`meta git update` only clones missing repos (nested meta repos included); it does not pull existing ones. `meta git pull --recursive` also pulls nested meta repos.
Expand Down Expand Up @@ -85,13 +85,13 @@ meta git log --oneline -5

## Filtering

Target specific repos. With `--tag`, the meta root repo stays included even when it isn't tagged; `--include`/`--exclude` take whole repos (a `.meta` name or the path from the workspace root, `.` for the root), never part of a path, and can drop the root. A value that names no repo is an error.
Target specific repos. With `--tag`, the meta root repo stays included even when it isn't tagged; `--include`/`--exclude` take whole repos (a `.meta.yaml` name or the path from the workspace root, `.` for the root), never part of a path, and can drop the root. A value that names no repo is an error.

```bash
# By tag
meta --tag backend git status

# By repo: .meta name or path from the root (`api` does not match `api-tests`)
# By repo: .meta.yaml name or path from the root (`api` does not match `api-tests`)
meta --include api,web git push

# Exclude repos
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/meta-plugins/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ When you run `meta <command>`, meta checks if a plugin handles that command patt

Example:
- `meta git status` → git plugin runs `git status` in every repo at this meta level (`--recursive` for nested ones)
- `meta git clone <url>` → git plugin clones parent + all children from `.meta`
- `meta git clone <url>` → git plugin clones parent + all children from `.meta.yaml`
- `meta npm install` → unrecognized, shows help; use `meta exec npm install`

## Built-in Plugins
Expand All @@ -27,7 +27,7 @@ Handles all `meta git *` commands with special cases:

| Command | Behavior |
|---------|----------|
| `meta git clone <url>` | Clone parent, read `.meta`, clone all children |
| `meta git clone <url>` | Clone parent, read `.meta.yaml`, clone all children |
| `meta git update` | Clone missing repos (use `meta git pull` to pull existing ones) |
| `meta git worktree *` | Isolated multi-repo worktree sets (see the `meta-worktree` skill) |
| `meta git <other>` | Pass through to every repo at this meta level |
Expand All @@ -37,7 +37,7 @@ Handles all `meta git *` commands with special cases:
Workspace management:

```bash
meta project list # List projects from .meta
meta project list # List projects from .meta.yaml
meta project check # Verify all repos exist
meta project dependents <name> # Projects that depend on one
```
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/meta-safety/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Multi-repo workspaces are powerful but require awareness. Meta gives you precisi

## Precision Operations

Instead of cd-ing into repos one by one, use meta flags to target what you need. Include/exclude take whole repos (a `.meta` name or the path from the workspace root), never part of a path, and a value that names no repo is an error; `--tag` keeps the meta root even when it isn't tagged:
Instead of cd-ing into repos one by one, use meta flags to target what you need. Include/exclude take whole repos (a `.meta.yaml` name or the path from the workspace root), never part of a path, and a value that names no repo is an error; `--tag` keeps the meta root even when it isn't tagged:

```bash
# Target specific repos
Expand All @@ -42,7 +42,7 @@ When modifying a repo that other repos depend on:
## Efficient Commits

```bash
# Commit only in repos repo1 and repo2 (.meta name or path from the root)
# Commit only in repos repo1 and repo2 (.meta.yaml name or path from the root)
meta --include repo1,repo2 git commit -m "feat: update shared API"

# Push tagged repos (and the root)
Expand Down
13 changes: 4 additions & 9 deletions .claude/skills/meta-workspace/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: meta-workspace
description: Understanding and operating in meta repository workspaces with .meta/.meta.yaml configuration.
description: Understanding and operating in meta repository workspaces with .meta.yaml configuration.
---

# Meta Workspace Skill
Expand Down Expand Up @@ -31,8 +31,8 @@ In a meta repo, changes often span multiple repositories. Using `meta` commands

## The Meta Config

One config file in the workspace root defines the child repositories:
`.meta.yaml` (or `.meta.yml`), or `.meta.json`.
One config file in the workspace root, `.meta.yaml`, defines the child
repositories.

```yaml
projects:
Expand All @@ -46,11 +46,6 @@ projects:
**Simple format**: `name: git-url` - clones to `./name`
**Extended format**: Object with `repo`, optional `path`, optional `tags`

An older repo may use the legacy `.meta` file (JSON, no extension). It still
works, but it takes the name of meta's `.meta/` folder (skills and
project-local plugins): rename it with `git mv .meta .meta.json` (same content).
Two config files in one directory are an error that names both; keep one.

## Discovering What's Here

```bash
Expand Down Expand Up @@ -115,7 +110,7 @@ When the meta MCP server is available, these tools provide structured JSON for p
## Efficiency Tips

- **One command, all repos**: `meta git status` replaces N individual `cd && git status` calls
- **Targeted operations**: `meta --include repo1,repo2 exec -- cmd` operates on only the named repos (`.meta` name or path from the workspace root)
- **Targeted operations**: `meta --include repo1,repo2 exec -- cmd` operates on only the named repos (`.meta.yaml` name or path from the workspace root)
- **Tag-based filtering**: `meta --tag backend exec -- cargo test` scopes to tagged repos
- **Dependency awareness**: `meta_analyze_impact <repo>` shows who depends on a repo before you modify it — prevents cascading fix-up commits
- **Session start**: Always run `meta project list --recursive --json` first to get the workspace map
9 changes: 6 additions & 3 deletions .claude/skills/meta-worktree/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ meta git worktree exec --ephemeral lint-check --all -- make lint
`prune` removes sets whose TTL has expired; for a set whose directory is gone
it only forgets meta's record. Once its repos are taken out of the meta config,
or the checkout it was made from is moved or deleted, a set is no longer the
workspace's: remove it with `git worktree remove`. `--ephemeral` alone only records metadata. A TTL is a backstop for a session that
workspace's: remove each member with `git worktree remove`, run in the repo it
was made from. A member whose repo was deleted with that checkout has no git
record left, so git can't remove it: copy out any files you want to keep,
then delete its folder by hand. `--ephemeral` alone only records metadata. A TTL is a backstop for a session that
dies before removing its sets.

## Inspecting Worktrees
Expand Down Expand Up @@ -149,7 +152,7 @@ Detection relies on the `.worktrees/<name>` path. It, and
created with `--recursive` inside another repo of the set (e.g.
`open-source/sdk/core` inside `open-source`) are skipped. `list --recursive`
shows them; run the tool itself (`cargo`, `git`) in their directory, not `meta exec`, which still scopes to the set's top-level repos there. The root repo is part of a set
by default, so the set has its own `.meta` config; otherwise meta walks up to
by default, so the set has its own `.meta.yaml` config; otherwise meta walks up to
the primary checkout's config. `meta --primary <command>` bypasses detection;
run it from the primary checkout to be sure it uses the primary repos.

Expand All @@ -174,7 +177,7 @@ from inside a set, they act on the workspace the set was made from.

## Lifecycle Hooks

Configure hooks in the meta config (`.meta.yaml`, `.meta.yml`, `.meta.json` or the legacy `.meta`):
Configure hooks in the meta config (`.meta.yaml`):

```yaml
worktree:
Expand Down
6 changes: 3 additions & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ fn is_cache_valid(cached: &CachedContext, current_root: &PathBuf) -> bool {
pub fn handle_context(json: bool, no_status: bool, no_cache: bool, verbose: bool) -> Result<()> {
let cwd = std::env::current_dir().context("Failed to get current directory")?;

let (config_path, _format) = config::find_meta_config(&cwd, None)?
.ok_or_else(|| anyhow::anyhow!("Not a meta workspace (no .meta config found)"))?;
let config_path = config::find_meta_config(&cwd, None)?
.ok_or_else(|| anyhow::anyhow!("Not a meta workspace (no .meta.yaml found)"))?;

let meta_dir = config_path
.parent()
Expand Down Expand Up @@ -309,7 +309,7 @@ fn build_dependency_map(projects: &[ProjectInfo]) -> Option<HashMap<String, Vec<

// ── Markdown Formatting ─────────────────────────────────

/// Text from `.meta`, git or the filesystem, made safe for this markdown,
/// Text from `.meta.yaml`, git or the filesystem, made safe for this markdown,
/// which agents read: control characters escaped, then `\` and `|` escaped
/// so the value stays in its table cell.
fn md(s: &str) -> String {
Expand Down
2 changes: 1 addition & 1 deletion src/dependency_graph.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Dependency tracking and impact analysis for meta projects
//!
//! Supports extended .meta schema with provides/depends_on fields:
//! Supports extended .meta.yaml schema with provides/depends_on fields:
//!
//! ```yaml
//! projects:
Expand Down
26 changes: 1 addition & 25 deletions src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,6 @@ fn install_claude_integration_to(
update: bool,
verbose: bool,
) -> Result<()> {
// `.meta/` is meta's own folder, so it can't sit next to a legacy `.meta` config file
if target_dir.join(".meta").is_file() {
anyhow::bail!(
"This repo's meta config is the legacy `.meta` file, so meta can't create its \
`.meta/` folder for skills.\n\
Rename the config and rerun: `git mv .meta .meta.json` (same content), \
or convert it to `.meta.yaml`."
);
}

let claude_dir = target_dir.join(".claude");
let skills_dir = claude_dir.join("skills");
let rules_dir = claude_dir.join("rules");
Expand All @@ -183,7 +173,7 @@ fn install_claude_integration_to(
if config::find_meta_config_in(target_dir)?.is_none() {
println!(
"{}",
"Warning: No .meta config found in current directory.".yellow()
"Warning: No .meta.yaml found in current directory.".yellow()
);
println!("This integration is designed for meta repositories.");
println!();
Expand Down Expand Up @@ -1193,20 +1183,6 @@ mod tests {
assert!(!dir.path().join(".opencode").exists());
}

#[test]
fn test_install_refuses_legacy_meta_config_file() {
let dir = tempdir().unwrap();
fs::write(dir.path().join(".meta"), r#"{"projects": {}}"#).unwrap();

for (force, update) in [(false, false), (false, true), (true, false)] {
let err = install_claude_integration_to(dir.path(), force, update, false).unwrap_err();
assert!(err.to_string().contains("git mv .meta .meta.json"), "{err}");
}
assert!(dir.path().join(".meta").is_file());
assert!(!dir.path().join(".claude").exists());
assert!(!dir.path().join(".agents").exists());
}

#[test]
fn test_update_turns_skill_folders_into_links() {
let dir = tempdir().unwrap();
Expand Down
Loading
Loading