Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .agentkit/engines/node/src/synchronize.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,8 @@ export async function runSync({ agentkitRoot, projectRoot, flags }) {
overlaySettings.repoName ||
repoName,
defaultBranch: overlaySettings.defaultBranch || 'main',
integrationBranch:
overlaySettings.integrationBranch || overlaySettings.defaultBranch || 'main',
primaryStack: overlaySettings.primaryStack || 'auto',
commandPrefix: overlaySettings.commandPrefix || null,
syncDate: new Date().toISOString().slice(0, 10),
Expand Down
3 changes: 2 additions & 1 deletion .agentkit/overlays/__TEMPLATE__/settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Repo-specific overlay settings
# This file is copied by `agentkit init` and customized per repo.
repoName: __TEMPLATE__
defaultBranch: main
defaultBranch: main # Repository default branch (usually main or master)
integrationBranch: main # Branch PRs should target (often dev or main; defaults to defaultBranch)
primaryStack: auto
windowsFirst: true

Expand Down
24 changes: 24 additions & 0 deletions .agentkit/overlays/retort/settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Retort repo overlay settings
# This is retort's own overlay — configures how the framework generates output for itself.
repoName: retort
defaultBranch: main # Production branch — never commit directly
integrationBranch: dev # PRs must target dev, not main
primaryStack: auto
windowsFirst: true

aiSynthesisLayer: false

renderTargets:
- claude
- cursor
- windsurf
- copilot
- gemini
- codex
- warp
- cline
- roo
- ai
- mcp

featurePreset: standard
11 changes: 11 additions & 0 deletions .agentkit/templates/claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This repository uses **Retort** to manage AI agent team workflows across multipl

- **Repository**: {{repoName}}
- **Default Branch**: {{defaultBranch}}
- **Integration Branch** (PR target): {{integrationBranch}}
- **Framework Version**: {{version}}
{{#if projectPhase}}

Expand Down Expand Up @@ -356,6 +357,16 @@ Then commit the regenerated output. The CI drift check **will fail** if generate

Feature branches: `type/short-description` (e.g., `feat/add-user-auth`, `fix/token-refresh`)

### PR Target Branch

All PRs **must** target `{{integrationBranch}}` — not `{{defaultBranch}}` or any other branch unless explicitly instructed:

```bash
gh pr create --base {{integrationBranch}} --title "type(scope): description"
```

The integration branch (`{{integrationBranch}}`) is the configured PR target for this repo. Creating PRs against `{{defaultBranch}}` directly causes reverse-merge noise and bypasses the integration pipeline. A hookify rule in `.claude/rules/pr-base-branch.md` enforces this at runtime.

## Safety Rules

1. **Never** commit secrets, API keys, or credentials
Expand Down
2 changes: 1 addition & 1 deletion .agentkit/templates/claude/hooks/protect-templates.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $protectedPatterns = @(

foreach ($pattern in $protectedPatterns) {
if ($filePath -match $pattern) {
$reason = "Blocked: '$filePath' is an Retort source file. These files are the upstream source-of-truth and must not be modified directly by AI agents. To propose changes, create a PR to the agentkit-forge repository targeting the relevant spec or template. If you need to change project configuration, edit the YAML specs in .agentkit/spec/ and run 'pnpm -C .agentkit retort:sync'."
$reason = "Blocked: '$filePath' is a Retort source file. These files are the upstream source-of-truth and must not be modified directly by AI agents. To propose changes, create a PR to the agentkit-forge repository targeting the relevant spec or template. If you need to change project configuration, edit the YAML specs in .agentkit/spec/ and run 'pnpm -C .agentkit retort:sync'."
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as the Bash template: the message mixes Retort with agentkit-forge repository. Align the wording (or make the upstream repo name configurable) so PowerShell users get the same accurate guidance as Bash users.

Suggested change
$reason = "Blocked: '$filePath' is a Retort source file. These files are the upstream source-of-truth and must not be modified directly by AI agents. To propose changes, create a PR to the agentkit-forge repository targeting the relevant spec or template. If you need to change project configuration, edit the YAML specs in .agentkit/spec/ and run 'pnpm -C .agentkit retort:sync'."
$reason = "Blocked: '$filePath' is an AgentKit Forge source file. These files are the upstream source-of-truth and must not be modified directly by AI agents. To propose changes, create a PR to the agentkit-forge repository targeting the relevant spec or template. If you need to change project configuration, edit the YAML specs in .agentkit/spec/ and run 'pnpm -C .agentkit retort:sync'."

Copilot uses AI. Check for mistakes.
@{
hookSpecificOutput = @{
hookEventName = 'PreToolUse'
Expand Down
2 changes: 1 addition & 1 deletion .agentkit/templates/claude/hooks/protect-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PROTECTED_PATTERNS=(
for pattern in "${PROTECTED_PATTERNS[@]}"; do
if echo "$FILE_PATH" | grep -qE "$pattern"; then
jq -n \
--arg reason "Blocked: '${FILE_PATH}' is an Retort source file. These files are the upstream source-of-truth and must not be modified directly by AI agents. To propose changes, create a PR to the agentkit-forge repository targeting the relevant spec or template. If you need to change project configuration, edit the YAML specs in .agentkit/spec/ and run '{{packageManager}} -C .agentkit retort:sync'." \
--arg reason "Blocked: '${FILE_PATH}' is a Retort source file. These files are the upstream source-of-truth and must not be modified directly by AI agents. To propose changes, create a PR to the agentkit-forge repository targeting the relevant spec or template. If you need to change project configuration, edit the YAML specs in .agentkit/spec/ and run '{{packageManager}} -C .agentkit retort:sync'." \
'{
hookSpecificOutput: {
hookEventName: "PreToolUse",
Expand Down
50 changes: 50 additions & 0 deletions .agentkit/templates/claude/rules/pr-base-branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!-- GENERATED by Retort v{{version}} — DO NOT EDIT -->
<!-- Source: .agentkit/overlays/{{repoName}}/settings.yaml (integrationBranch) -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->
<!-- generated_by: {{lastAgent}} | last_model: {{lastModel}} | last_updated: {{syncDate}} -->
<!-- Format: Hookify guard rule. -->

# PR Base Branch Guard

Always use `--base {{integrationBranch}}` when creating pull requests in **{{repoName}}**.

## Rule

**Event**: bash
**Action**: warn
**Pattern**: `gh pr create` without `--base {{integrationBranch}}`

## Why This Matters

This repository uses a two-branch model:

- `{{defaultBranch}}` — production branch, never targeted directly by feature PRs
- `{{integrationBranch}}` — integration branch, the correct PR target for all feature work

Creating PRs against `{{defaultBranch}}` instead of `{{integrationBranch}}` triggers an automatic reverse-merge PR (merging `{{defaultBranch}}` back into `{{integrationBranch}}`), which creates noise and bypasses the integration pipeline.

## Correct Usage

```bash
# Always specify --base explicitly
gh pr create --base {{integrationBranch}} --title "type(scope): description"
```

## Incorrect Usage

```bash
# These will target the wrong branch
gh pr create --title "type(scope): description"
gh pr create --base {{defaultBranch}} --title "type(scope): description"
```

## Configuration

The integration branch is configured in `.agentkit/overlays/{{repoName}}/settings.yaml`:

```yaml
defaultBranch: {{defaultBranch}}
integrationBranch: {{integrationBranch}}
```

To change the integration branch, update `settings.yaml` and run `pnpm -C .agentkit retort:sync`.
10 changes: 5 additions & 5 deletions .agents/skills/analyze-agents/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'analyze-agents'
description: 'Generates a comprehensive agent/team relationship matrix. Analyzes dependencies, notifications, handoffs, coverage gaps, bottlenecks, and consolidation opportunities across all teams and agents.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# analyze-agents

Expand All @@ -36,7 +36,7 @@ Invoke this skill when you need to perform the `analyze-agents` operation.

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/backlog/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'backlog'
description: 'Displays a consolidated backlog view from all sources (external tracker, discovery, healthcheck, code TODOs, review findings, manual entries). Supports filtering and multiple output formats for CLI and future UI consumption.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# backlog

Expand All @@ -36,7 +36,7 @@ Invoke this skill when you need to perform the `backlog` operation.

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/brand/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'brand'
description: 'Manage the project brand spec (brand.yaml) and editor theme. Supports validation, palette preview, theme mapping, contrast auditing, scaffolding, and regeneration of editor theme files.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# brand

Expand All @@ -36,7 +36,7 @@ Invoke this skill when you need to perform the `brand` operation.

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'build'
description: 'Builds the project using the detected tech stack's build command. Supports targeting specific packages in a monorepo or building the entire workspace.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# build

Expand Down Expand Up @@ -59,7 +59,7 @@ Report: detected stack, scope, exact command, status (PASS/FAIL), duration, arti

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/check/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'check'
description: 'Runs all quality checks for the repository: type checking, linting, formatting validation, and test suites. Returns a unified pass/fail status with detailed breakdowns per check category.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# check

Expand Down Expand Up @@ -51,7 +51,7 @@ Produce: Quality Gate Results table (Step | Status | Duration | Details), Overal

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/cost-centres/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'cost-centres'
description: 'Cost centre management for cloud infrastructure. Manages budget allocations, resource group mappings, tag compliance, and spend tracking. Requires a FinOps-enabled overlay (finops rule domain). For AI session cost tracking, use /cost instead.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# cost-centres

Expand All @@ -36,7 +36,7 @@ Invoke this skill when you need to perform the `cost-centres` operation.

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/cost/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'cost'
description: 'Session cost and usage tracking. Shows session summaries, lists recent sessions, and generates aggregate usage reports. Tracks session duration, commands run, and files modified via lifecycle hooks.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# cost

Expand Down Expand Up @@ -44,7 +44,7 @@ Invoke this skill when you need to perform the `cost` operation.

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'deploy'
description: 'Triggers a deployment pipeline or generates deployment artifacts. Validates pre-deployment checks (build, test, lint) before proceeding. Supports dry-run mode for safety.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# deploy

Expand Down Expand Up @@ -65,7 +65,7 @@ Report: service, environment, platform, status, timeline, command output, post-d

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/discover/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'discover'
description: 'Scans the repository to build a comprehensive understanding of the project structure, tech stacks in use, team boundaries, and architectural patterns. Outputs a structured discovery report used by other commands.'
generated_by: 'agentkit-forge'
last_model: 'sync-engine'
last_updated: '2026-03-17'
last_updated: '2026-03-21'
# Format: YAML frontmatter + Markdown body. Codex agent skill definition.
# Docs: https://developers.openai.com/codex/guides/agents-md
---

<!-- GENERATED by AgentKit Forge v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/agentkit-forge -->
<!-- Regenerate: pnpm -C .agentkit agentkit:sync -->
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm -C .agentkit retort:sync -->

# discover

Expand Down Expand Up @@ -47,7 +47,7 @@ Create or update `AGENT_TEAMS.md` with: Repository Profile (primary stack, build

## Project Context

- Repository: agentkit-forge
- Repository: retort
- Default branch: main
- Tech stack: javascript, yaml, markdown

Expand Down
Loading
Loading