diff --git a/README.md b/README.md index 5f1d5e71..b11a07f0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@
🇫🇷 The first French open-source framework for AI-driven development.
- 7 plugins · 39 skills · 3 agents · MIT + 7 plugins · 40 skills · 3 agents · MIT
[](LICENSE) @@ -178,7 +178,7 @@ SDLC loop: sdlc, plan, implement, assert, audit, review, test, refactor, debug, ### 🌿 [aidd-vcs](plugins/aidd-vcs/README.md) -`4 skills` · stable +`5 skills` · stable Commits, pull / merge requests, release tags, issue creation. diff --git a/plugins/aidd-vcs/.claude-plugin/plugin.json b/plugins/aidd-vcs/.claude-plugin/plugin.json index fc109aa6..36f72f53 100644 --- a/plugins/aidd-vcs/.claude-plugin/plugin.json +++ b/plugins/aidd-vcs/.claude-plugin/plugin.json @@ -2,12 +2,13 @@ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "aidd-vcs", "version": "2.0.0", - "description": "External artifacts: commit, pull-request, release-tag, issue-create", + "description": "External artifacts: repo-init, commit, pull-request, release-tag, issue-create", "author": { "name": "AI-Driven Dev", "url": "https://github.com/ai-driven-dev" }, "skills": [ + "./skills/00-repo-init", "./skills/01-commit", "./skills/02-pull-request", "./skills/03-release-tag", @@ -15,6 +16,7 @@ ], "keywords": [ "git", + "repo-init", "commit", "pull-request", "release", diff --git a/plugins/aidd-vcs/CATALOG.md b/plugins/aidd-vcs/CATALOG.md index 9f9bf6c2..7a84091d 100644 --- a/plugins/aidd-vcs/CATALOG.md +++ b/plugins/aidd-vcs/CATALOG.md @@ -8,6 +8,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai - [`.claude-plugin`](#claude-plugin) - [`skills`](#skills) + - [`skills/00-repo-init`](#skills00-repo-init) - [`skills/01-commit`](#skills01-commit) - [`skills/02-pull-request`](#skills02-pull-request) - [`skills/03-release-tag`](#skills03-release-tag) @@ -23,6 +24,16 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai ### `skills` +#### `skills/00-repo-init` + +| Group | File | Description | +|-------|------|---| +| `actions` | [01-init.md](skills/00-repo-init/actions/01-init.md) | - | +| `actions` | [02-publish.md](skills/00-repo-init/actions/02-publish.md) | - | +| `assets` | [CONTRIBUTING.md](skills/00-repo-init/assets/CONTRIBUTING.md) | - | +| `-` | [README.md](skills/00-repo-init/README.md) | - | +| `-` | [SKILL.md](skills/00-repo-init/SKILL.md) | `Initialize a project's repository - resolve the default branch and VCS provider, run git init with a bootstrap commit, write CONTRIBUTING.md, and on request create the remote repository and push. Use when the user says "init a repo", "git init", "initialize version control", "set up a new repo", "start a project", "create the remote and push", or "publish this repo". Do NOT use for committing changes (use 01-commit), opening pull requests (use 02-pull-request), tagging releases (use 03-release-tag), or cloning an existing remote.` | + #### `skills/01-commit` | Group | File | Description | @@ -42,7 +53,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [pull_request.md](skills/02-pull-request/assets/pull_request.md) | `VCS pull/merge request template` | | `assets` | [README.md](skills/02-pull-request/assets/README.md) | `Project README template` | | `-` | [README.md](skills/02-pull-request/README.md) | - | -| `-` | [SKILL.md](skills/02-pull-request/SKILL.md) | `Create a draft pull or merge request from the current branch. Use when the user says "open a pr", "open a pull request", "create a pr", "create a merge request", "open mr", "draft a pr for this branch", or invokes `/pull-request`. Do NOT use for committing changes, pushing a branch directly, tagging releases, merging an existing request, or amending commits.` | +| `-` | [SKILL.md](skills/02-pull-request/SKILL.md) | `Create a draft pull or merge request from the current branch. Use when the user ask to create a PR or invokes `/pull-request`.` | #### `skills/03-release-tag` diff --git a/plugins/aidd-vcs/skills/00-repo-init/README.md b/plugins/aidd-vcs/skills/00-repo-init/README.md new file mode 100644 index 00000000..6c7ecd3b --- /dev/null +++ b/plugins/aidd-vcs/skills/00-repo-init/README.md @@ -0,0 +1,34 @@ +← [aidd-vcs](../../README.md) + +# 00-repo-init + +Initializes a project's repository locally and, on request, on the remote host: `git init`, sets the default branch, resolves the provider, and can create the remote repository and push, returning its URL. + +> Status: experimental. + +## When to use + +- Starting version control on a new project (e.g. right after scaffolding it). +- Creating the remote repository and pushing the initial state. + +## When NOT to use + +- Cloning an existing remote, opening pull requests, or tagging releases. +- Re-initializing a directory that is already a repository (the local step no-ops there). + +## How to invoke + +`aidd-vcs:00-repo-init`, or say "initialize a git repository here" / "create the remote and publish". + +## Outputs + +- `init`: an initialized `.git`, the default branch set, the resolved provider, and `origin` added when a remote URL is given. +- `publish`: the created remote repository and a push, returning its URL. + +## Prerequisites + +- `git` on the PATH. For `publish`, the resolved host's tooling (CLI, MCP, or API) available and authenticated. + +## Technical details + +Two actions: `init` (local) and `publish` (remote, outward-facing, confirms first). See [SKILL.md](SKILL.md). diff --git a/plugins/aidd-vcs/skills/00-repo-init/SKILL.md b/plugins/aidd-vcs/skills/00-repo-init/SKILL.md new file mode 100644 index 00000000..a205e6dc --- /dev/null +++ b/plugins/aidd-vcs/skills/00-repo-init/SKILL.md @@ -0,0 +1,35 @@ +--- +name: 00-repo-init +description: Initialize a project's repository - resolve the default branch and VCS provider, run git init with a bootstrap commit, write CONTRIBUTING.md, and on request create the remote repository and push. Use when the user says "init a repo", "git init", "initialize version control", "set up a new repo", "start a project", "create the remote and push", or "publish this repo". Do NOT use for committing changes (use 01-commit), opening pull requests (use 02-pull-request), tagging releases (use 03-release-tag), or cloning an existing remote. +argument-hint: init | publish +--- + +# Repo Init + +Initializes a project's repository locally and, on request, on the remote host, then returns the remote URL. + +## Available actions + +| # | Action | Role | Input | +| --- | --------- | ------------------------------------------------------------------------------------------------- | ------------------------------- | +| 01 | `init` | Resolve VCS config, `git init`, set the default branch, write `CONTRIBUTING.md`, bootstrap commit | cwd, default_branch, remote_url | +| 02 | `publish` | Create the remote repo on the resolved host and push, return its URL | cwd, non_interactive | + +## Default flow + +Chain `01 → 02`, testing each before the next. The router runs `init` alone for a local-only request, and runs `publish` after an `init` when asked to create the remote. + +## Transversal rules + +- The local step is idempotent. If the target is already a git work tree, `init` does nothing and reports. +- `init` makes one bootstrap commit (`--allow-empty`) so `HEAD` exists and is pushable. The project's real first commit stays the commit skill's job. +- `publish` is outward-facing. It confirms before creating the remote unless `non_interactive` is set. +- The provider is open. Resolve the host and how to reach it (CLI, MCP, or API) from the VCS memory when present, else from the VCS tooling available in the environment. Never restrict to a fixed list or a fixed mechanism. `main` is the default-branch fallback. + +## Assets + +- `assets/CONTRIBUTING.md`: the project-root `CONTRIBUTING.md` template. + +## External data + +- `aidd_docs/memory/vcs.md`: the project's VCS config (default branch, provider), read by both actions when present and pointed to, never copied. diff --git a/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md b/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md new file mode 100644 index 00000000..5ffc0b7c --- /dev/null +++ b/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md @@ -0,0 +1,34 @@ +# 01 - Init + +Initialize a fresh local git repository on the resolved default branch. + +## Input + +- `cwd` (optional): directory to initialize. Defaults to the current directory. +- `default_branch` (optional): overrides the resolved branch. +- `remote_url` (optional): added as `origin` when given. + +## Output + +A report of the repo root, the resolved default branch and provider, and whether `origin` was added. Reports `created: false` and stops when the target is already a git work tree. + +## Process + +1. **Guard.** If `cwd` is already a git work tree, skip and report `created: false`. +2. **Resolve.** Read the default branch and provider from the project's VCS memory. If absent, infer the provider from the environment (an installed VCS CLI, a configured MCP, or an existing remote URL). Fall back to `main` when nothing resolves. An explicit `default_branch` wins. +3. **Init.** Run `git init -b