feat(bridges): import 11 tool-bridge templates from PROJECT-D
- Copy 11 .tmpl files from PROJECT-D (agents-md, cursorrules,
cursor-mdc, copilot, windsurf, junie, continue, gemini,
aider-conventions, aider-conf, replit) into _bridges/
- Add _bridges/README.md with template→output-path table
- Placeholders are {{PROJECT_NAME}} + {{PROJECT_DESCRIPTION}};
templates unchanged — content verified per RULE 0.4 upstream
This commit is contained in:
parent
0398c9ca05
commit
ea68954919
12 changed files with 292 additions and 0 deletions
21
_bridges/README.md
Normal file
21
_bridges/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# `_bridges/` — Cross-tool bridge templates
|
||||
|
||||
Tool-agnostic coding-rules templates, rendered into any project via `_bridges/emit.sh`. Placeholders: `{{PROJECT_NAME}}`, `{{PROJECT_DESCRIPTION}}`, `{{YEAR}}`, `{{MONTH}}`, `{{DATE}}`.
|
||||
|
||||
| Template | Output path |
|
||||
|---|---|
|
||||
| `cursorrules.tmpl` | `.cursorrules` |
|
||||
| `agents-md.tmpl` | `AGENTS.md` |
|
||||
| `copilot.tmpl` | `.github/copilot-instructions.md` |
|
||||
| `cursor-mdc.tmpl` | `.cursor/rules/main.mdc` |
|
||||
| `windsurf.tmpl` | `.windsurf/rules/main.md` |
|
||||
| `junie.tmpl` | `.junie/guidelines.md` |
|
||||
| `continue.tmpl` | `.continue/rules/main.md` |
|
||||
| `gemini.tmpl` | `GEMINI.md` |
|
||||
| `aider-conventions.tmpl` | `CONVENTIONS.md` |
|
||||
| `aider-conf.tmpl` | `.aider.conf.yml` |
|
||||
| `replit.tmpl` | `replit.md` |
|
||||
|
||||
Render: `_bridges/emit.sh <target-dir> [project-name] [project-description]`. Idempotent — existing files are skipped.
|
||||
|
||||
Cross-ref: KeiAgent is the personal-CLI predecessor that also ships these templates (verified against vendor docs 2026-04).
|
||||
24
_bridges/agents-md.tmpl
Normal file
24
_bridges/agents-md.tmpl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# AGENTS.md
|
||||
|
||||
> Read by Codex CLI (OpenAI spec), Copilot, Aider (when referenced), Windsurf, Warp, Zed, Antigravity (since v1.20.3, 2026-03-05), JetBrains Junie. See also: CLAUDE.md / .cursor/rules/ / GEMINI.md / .junie/guidelines.md / replit.md.
|
||||
|
||||
## {{PROJECT_NAME}}
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Before You Start
|
||||
1. Read `DECISIONS.md` — architectural choices already made
|
||||
2. Read `TODO.md` (if exists) — current priorities
|
||||
3. Read `CLAUDE.md` (if exists) — project-specific rules
|
||||
|
||||
## Rules
|
||||
- **Constructor Pattern**: 1 file = 1 class. File <200 lines. Function <30 lines.
|
||||
- **Root cause**: fix causes, not symptoms
|
||||
- **SSOT**: types, routes, enums defined in ONE place
|
||||
- **Tests**: write WITH code, never defer
|
||||
|
||||
## Do NOT
|
||||
- Rewrite working code without reason
|
||||
- Add abstractions for one-time operations
|
||||
- Skip reading DECISIONS.md before architectural changes
|
||||
- Commit .env, credentials, API keys
|
||||
5
_bridges/aider-conf.tmpl
Normal file
5
_bridges/aider-conf.tmpl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Aider config — auto-reads project rules on every session
|
||||
# See: https://aider.chat/docs/config/aider_conf.html
|
||||
read:
|
||||
- CONVENTIONS.md
|
||||
- AGENTS.md
|
||||
27
_bridges/aider-conventions.tmpl
Normal file
27
_bridges/aider-conventions.tmpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# {{PROJECT_NAME}} — Aider Conventions
|
||||
|
||||
> Auto-loaded by Aider via `.aider.conf.yml` (`read: CONVENTIONS.md`).
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Before You Start
|
||||
1. Read `DECISIONS.md` — architectural choices already made
|
||||
2. Read `TODO.md` (if exists) — current priorities
|
||||
3. Read `CLAUDE.md` (if exists) — project-specific rules
|
||||
|
||||
## Constructor Pattern
|
||||
- 1 file = 1 class = 1 responsibility
|
||||
- File <200 lines, function <30 lines
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
29
_bridges/continue.tmpl
Normal file
29
_bridges/continue.tmpl
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
name: {{PROJECT_NAME}}
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# {{PROJECT_NAME}} — Continue.dev Rules
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Constructor Pattern
|
||||
1 file = 1 class = 1 responsibility. Function >30 lines = split. File >200 lines = decompose.
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Project Context
|
||||
- Architecture decisions: see `DECISIONS.md`
|
||||
- Project rules: see `CLAUDE.md`
|
||||
- Current priorities: see `TODO.md`
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
16
_bridges/copilot.tmpl
Normal file
16
_bridges/copilot.tmpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# {{PROJECT_NAME}} — Copilot Instructions
|
||||
|
||||
## Architecture
|
||||
Read DECISIONS.md before making architectural choices. Document new decisions there.
|
||||
|
||||
## Code Style
|
||||
- Constructor Pattern: 1 file = 1 class = 1 responsibility
|
||||
- File <200 lines, function <30 lines
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
34
_bridges/cursor-mdc.tmpl
Normal file
34
_bridges/cursor-mdc.tmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
description: {{PROJECT_NAME}} constructor-pattern coding rules
|
||||
globs: **/*
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# {{PROJECT_NAME}} — Cursor Rules (MDC)
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Constructor Pattern
|
||||
1 file = 1 class = 1 responsibility. Function >30 lines = split. File >200 lines = decompose.
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Project Context
|
||||
- Architecture decisions: see `DECISIONS.md`
|
||||
- Project rules: see `CLAUDE.md`
|
||||
- Current priorities: see `TODO.md`
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
|
||||
## Session Protocol
|
||||
- Read `DECISIONS.md` before making architectural choices
|
||||
- Document new decisions in `DECISIONS.md`
|
||||
23
_bridges/cursorrules.tmpl
Normal file
23
_bridges/cursorrules.tmpl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# {{PROJECT_NAME}} — Cursor Rules
|
||||
|
||||
## Constructor Pattern
|
||||
1 file = 1 class = 1 responsibility. Function >30 lines = split. File >200 lines = decompose.
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
- Root cause first — never fix symptoms
|
||||
|
||||
## Project Context
|
||||
- Architecture decisions: see DECISIONS.md
|
||||
- Known issues: see TODO.md (if exists)
|
||||
|
||||
## Code Style
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
- No mixins, no abstract factories, no DI containers
|
||||
|
||||
## Session Protocol
|
||||
- Read DECISIONS.md before making architectural choices
|
||||
- Document new decisions in DECISIONS.md
|
||||
27
_bridges/gemini.tmpl
Normal file
27
_bridges/gemini.tmpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# {{PROJECT_NAME}} — Gemini / Antigravity Instructions
|
||||
|
||||
> Primary memory file for Google Antigravity (also reads `AGENTS.md` since v1.20.3, 2026-03-05).
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Before You Start
|
||||
1. Read `DECISIONS.md` — architectural choices already made
|
||||
2. Read `TODO.md` (if exists) — current priorities
|
||||
3. Read `CLAUDE.md` (if exists) — project-specific rules
|
||||
|
||||
## Constructor Pattern
|
||||
- 1 file = 1 class = 1 responsibility
|
||||
- File <200 lines, function <30 lines
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
27
_bridges/junie.tmpl
Normal file
27
_bridges/junie.tmpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# {{PROJECT_NAME}} — Junie Guidelines
|
||||
|
||||
> Read by JetBrains Junie. Supplementary to `AGENTS.md` (Junie precedence: `.junie/AGENTS.md` > `AGENTS.md` > `.junie/guidelines.md`).
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Before You Start
|
||||
1. Read `DECISIONS.md` — architectural choices already made
|
||||
2. Read `TODO.md` (if exists) — current priorities
|
||||
3. Read `CLAUDE.md` (if exists) — project-specific rules
|
||||
|
||||
## Constructor Pattern
|
||||
- 1 file = 1 class = 1 responsibility
|
||||
- File <200 lines, function <30 lines
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
27
_bridges/replit.tmpl
Normal file
27
_bridges/replit.tmpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# {{PROJECT_NAME}} — Replit Agent Instructions
|
||||
|
||||
> Read by Replit Agent (does NOT read `AGENTS.md`).
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Before You Start
|
||||
1. Read `DECISIONS.md` — architectural choices already made
|
||||
2. Read `TODO.md` (if exists) — current priorities
|
||||
3. Read `CLAUDE.md` (if exists) — project-specific rules
|
||||
|
||||
## Constructor Pattern
|
||||
- 1 file = 1 class = 1 responsibility
|
||||
- File <200 lines, function <30 lines
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
32
_bridges/windsurf.tmpl
Normal file
32
_bridges/windsurf.tmpl
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# {{PROJECT_NAME}} — Windsurf Rules
|
||||
|
||||
{{PROJECT_DESCRIPTION}}
|
||||
|
||||
## Constructor Pattern
|
||||
1 file = 1 class = 1 responsibility. Function >30 lines = split. File >200 lines = decompose.
|
||||
|
||||
## Core Rules
|
||||
- No patching — fix root cause, not symptoms
|
||||
- Don't rewrite working code without reason
|
||||
- Single Source of Truth — types, routes, enums in ONE place
|
||||
- Types/interfaces BEFORE implementation
|
||||
- Tests WITH code, never "later"
|
||||
|
||||
## Project Context
|
||||
- Architecture decisions: see `DECISIONS.md`
|
||||
- Project rules: see `CLAUDE.md`
|
||||
- Current priorities: see `TODO.md`
|
||||
|
||||
## Forbidden
|
||||
- Mixins, abstract factories, DI containers
|
||||
- Rewriting working code without reason
|
||||
- Committing .env, credentials, API keys
|
||||
- Adding abstractions for one-time operations
|
||||
|
||||
## Session Protocol
|
||||
- Read `DECISIONS.md` before making architectural choices
|
||||
- Document new decisions in `DECISIONS.md`
|
||||
Loading…
Reference in a new issue