Skip to content

Commit fa8e208

Browse files
feat(warp): add Warp as a new built-in target
1 parent bfc0a57 commit fa8e208

153 files changed

Lines changed: 28151 additions & 50 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agentsmesh/.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Auto-generated. DO NOT EDIT MANUALLY.
22
# Tracks the state of all config files for team conflict resolution.
33

4-
generated_at: 2026-05-04T15:49:22.108Z
4+
generated_at: 2026-05-04T17:34:45.131Z
55
generated_by: serhii
66
lib_version: 0.10.0
77
checksums:

.amp/settings.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"amp.mcpServers": {
3+
"context7": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"-y",
8+
"@upstash/context7-mcp"
9+
],
10+
"env": {}
11+
},
12+
"github": {
13+
"description": "GitHub MCP server for repo operations",
14+
"type": "stdio",
15+
"command": "npx",
16+
"args": [
17+
"-y",
18+
"@modelcontextprotocol/server-github"
19+
],
20+
"env": {
21+
"GITHUB_TOKEN": "$GITHUB_TOKEN"
22+
}
23+
}
24+
}
25+
}

.changeset/add-warp-target.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"agentsmesh": minor
3+
---
4+
5+
feat(warp): add Warp as a new built-in target
6+
7+
Warp is an agentic development environment by Warp.dev. This adds project and global mode support:
8+
9+
- **Rules**: `AGENTS.md` (root + embedded additional rules); legacy `WARP.md` supported on import
10+
- **Skills**: `.warp/skills/` with YAML frontmatter skill bundles
11+
- **MCP**: `.mcp.json` at project root (standard format, shared with Claude Code)
12+
- **Commands/Agents**: projected as skills via `supportsConversion`
13+
- **Global mode**: `~/.warp/skills/` (skills only — global rules are UI-managed via Warp Drive)
14+
- Lint warnings for unsupported features (hooks, ignore, permissions)

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm lint-staged
1+
pnpm build && pnpm test && pnpm lint-staged

.rules

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Operational Guidelines
2+
3+
## Session Start
4+
5+
- Read `tasks/lessons.md` before doing any work. Apply relevant lessons.
6+
7+
## Workflow
8+
9+
### Planning
10+
11+
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions). Write plan to `tasks/todo.md`.
12+
- If something goes sideways, STOP and re-plan — don't keep pushing.
13+
- Check in before starting implementation. Mark items complete as you go.
14+
15+
### Subagents
16+
17+
- Use subagents liberally for research, exploration, and parallel analysis. One tack per subagent.
18+
19+
### Lessons
20+
21+
- **When**: user correction, test failure, CI failure, code review feedback, or any other mistake signal.
22+
- **How**: add a bullet to `tasks/lessons.md` with (1) what went wrong, (2) root cause, (3) a rule that prevents recurrence.
23+
- This is the primary cross-session memory — ruthlessly iterate until mistake rate drops.
24+
25+
### Verification
26+
27+
- Never mark a task complete without proving it works — run tests, check logs, demonstrate correctness.
28+
- After every feature/story: use `post-feature-qa` skill (`skills/post-feature-qa/`).
29+
- Ask yourself: "Would a staff engineer approve this?"
30+
31+
### Elegance
32+
33+
- For non-trivial changes: pause and ask "is there a more elegant way?"
34+
- Skip this for simple, obvious fixes — don't over-engineer.
35+
36+
### Bug Fixing
37+
38+
- When given a bug report: just fix it. Find root cause, point at logs/errors, resolve. Zero hand-holding.
39+
40+
## Skills
41+
42+
- **post-feature-qa** — Apply after every feature/story. Senior QA: verify edge-case coverage and story alignment.
43+
- **add-agent-target** — Use when adding a new AI agent target. Covers research, implementation, fixtures, full test coverage, docs.
44+
- **add-global-mode-target** — Use when adding or extending **global mode** (`--global`, `.agentsmesh`) for an existing target. Covers descriptor.global wiring, import/generate paths, reference rewriting, tests, and matrix docs.
45+
46+
47+
## Core Principles
48+
49+
- **Simplicity**: Make every change as simple as possible. Only touch what's necessary.
50+
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
51+
52+
## Project Rules
53+
54+
- **Architecture baseline**: Read `docs/architecture/review.md` before architectural or multi-file changes.
55+
- **Core flow to preserve**: canonical `.agentsmesh` content -> descriptor-driven generation/import (`src/targets/<id>/index.ts`) -> shared reference rewrite/lock checks -> strict artifact verification.
56+
- **Scale limitations to account for**: avoid target-name hardcoding in shared/core code, avoid duplicated per-target helper logic, and keep capability variance expressed in descriptors (not ad-hoc generator branches).
57+
- **Global mode discipline**: treat global support as one cohesive contract (layout + capabilities + detection + scope extras), not scattered one-off hooks.
58+
- **TDD mandatory**: Write failing tests FIRST, then implement.
59+
- **Max file size**: 200 lines. Split by responsibility if larger.
60+
- **No classes unless stateful**: Prefer pure functions + types.
61+
- **No `any`**: Use `unknown` + narrowing.
62+
- **Config source of truth**: `.agentsmesh` directory. Generated files are artifacts.
63+
- **Test naming**: `{module}.test.ts` colocated with source. Integration tests in `tests/integration/`.
64+
- **Generated artifact tests must be strict**: Assert exact file paths, exact file counts, and exact referenced wrapper/script sets. No loose checks (`some(...)`, prefix-only, "at least one").
65+
- **Commit format**: conventional commits — `feat|fix|test|refactor(scope): message`
66+
- **Docs must stay current**: Any change to CLI commands, flags, config schema, supported targets, or canonical file formats **must** be reflected in both `README.md` and the website (`website/src/content/docs/`) before the task is marked complete.
67+
- **Target data single source of truth** — do **not** hardcode target lists or support levels outside this chain:
68+
1. `src/targets/catalog/target-ids.ts` (`TARGET_IDS`) = canonical target ID list. Each target's `capabilities` in `src/targets/<name>/index.ts` = feature support levels.
69+
2. `src/core/matrix/data.ts` (`SUPPORT_MATRIX`) = built dynamically from descriptors. Never hardcode.
70+
3. `website/src/content/docs/reference/supported-tools.mdx` = **single docs page** for per-target support. All other pages link here — no duplicate tables.
71+
4. `README.md` matrix must stay in sync with code capabilities.
72+
5. No hardcoded target counts or enumerations on homepage, CLI overview, or other pages. Use generic language and link to the matrix.
73+
6. Adding/changing a target: update `target-ids.ts` + descriptor → `supported-tools.mdx` → `README.md` matrix. No other docs pages should need changes.
74+
- **CLI display paths must use forward slashes**: Any CLI output displaying file paths to users must normalize with `.replaceAll('\\', '/')` before printing. Tests assert forward-slash paths unconditionally; native `node:path` separators leak platform differences into output.
75+
- **Refer to PRD**: `docs/prd-v2-complete.md` for architecture decisions
76+
- **Refer to tasks**: `docs/agentsmesh-ai-first-tasks.md` for current task specs
77+
78+
<!-- agentsmesh:embedded-rules:start -->
79+
<!-- agentsmesh:embedded-rule:start {"source":"rules/typescript.md","description":"TypeScript-specific coding standards","globs":["src/**/*.ts","tests/**/*.ts"],"targets":[]} -->
80+
## TypeScript-specific coding standards
81+
# TypeScript Standards
82+
83+
- Use strict mode
84+
- Prefer `unknown` over `any`
85+
- Use explicit return types for public functions
86+
- Prefer `interface` over `type` for object shapes
87+
<!-- agentsmesh:embedded-rule:end -->
88+
<!-- agentsmesh:embedded-rules:end -->
89+
90+
<!-- agentsmesh:root-generation-contract:start -->
91+
## AgentsMesh Generation Contract
92+
93+
`agentsmesh.yaml` selects targets/features (`agentsmesh.local.yaml` overrides locally), and `.agentsmesh` is the only place to add or edit canonical items: `rules/_root.md`, `rules/*.md`, `commands/*.md`, `agents/*.md`, `skills/*/SKILL.md` plus supporting files, `mcp.json`, `hooks.yaml`, `permissions.yaml`, and `ignore`; if missing run `agentsmesh init`, use `agentsmesh import --from <tool>` for native configs, `agentsmesh install <source>` or `install --sync` for reusable packs, then run `agentsmesh generate`. Use `diff`, `lint`, `check`, `watch`, `matrix`, and `merge` as needed; never edit generated tool files.
94+
<!-- agentsmesh:root-generation-contract:end -->
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
name: add-agent-target
3+
description: Use when adding support for a new AI agent target to agentsmesh. Covers official format research, canonical mapping, importer/generator/linter work, realistic fixtures, unit/integration/e2e coverage, matrix/docs updates, and final verification. Includes both project and global mode from day one.
4+
---
5+
6+
# Add Agent Target
7+
8+
Use this skill when the task is to add a brand-new supported agent target to this repository (built-in) or as an external plugin package.
9+
10+
**Primary reference**: `docs/add-new-target-playbook.md` is the step-by-step workflow (phases 1–9, file templates, verification gates). Open it first and follow it. This skill file is the contract — the non-negotiable rules, touchpoints, and completion bar. The playbook is how; this file is what and why.
11+
12+
**Companion skill**: `add-global-mode-target` — use only when extending global-mode support into an existing target that was built before global was a first-class contract. For new targets, global mode is part of this skill (scaffold wires it automatically).
13+
14+
## When To Use
15+
16+
- The task is to add a tool not currently in `src/targets/catalog/target-ids.ts`
17+
- Scope covers both `project` and `global` modes unless the target has no meaningful global surface
18+
- Delivery is either built-in (in this repo) or external plugin (standalone npm package)
19+
20+
## Do Not Use This Skill For
21+
22+
- Extending global-mode coverage on an existing target — use `add-global-mode-target`
23+
- Changing capability levels for an existing target — update the target's descriptor directly
24+
- Plugin feature work that doesn't add a new target id
25+
26+
## Non-Negotiable Rules
27+
28+
### MUST
29+
30+
- Search the internet for the target's current official file structure, config files, and example content before changing code.
31+
- Prefer official docs and other primary sources. Use vendor examples or source code only when official docs are incomplete, and call that out explicitly.
32+
- Separate the target product from the current assistant runtime before making format decisions. Do not confuse a generated target like `codex-cli` with Codex desktop/chat, or local CLI MCP config with app-managed connectors.
33+
- Capture the target's real capability map for every canonical feature: rules, additionalRules, commands, agents, skills, mcp, hooks, ignore, permissions.
34+
- When a feature is `none` but `skills` is `native` or `embedded`, evaluate whether `supportsConversion` should project that feature as skills. If the target reads skill bundles, commands and agents with no native surface should be projected as skills via `supportsConversion: { commands: true, agents: true }` and registered in `src/config/core/conversions.ts` with `DEFAULT_*_TO_SKILLS`. Do not add lint warnings for features that are projected as skills — only warn for features that are truly dropped.
35+
- Start from `agentsmesh target scaffold <id>` when building a built-in target. Do not hand-write the 10 skeleton files the scaffold produces.
36+
- Write failing tests first for every new behavior. Do not implement first and backfill later.
37+
- Add unit, integration, and e2e coverage for the complete import and generate flow, including global scope when applicable.
38+
- Add rich and realistic fixtures for the new target. Fixtures must resemble real projects, not toy placeholders.
39+
- Cover all edge cases for the new target, including legacy paths, fallbacks, malformed files, partial support, and unsupported features.
40+
- Wire descriptor capabilities for both project and global scope. New targets must include global mode unless the target has no global config surface at all, and that absence must be documented.
41+
- Update every affected command surface and user-facing document so the new target is discoverable and accurately described.
42+
- Update the compatibility matrix to reflect native, embedded, partial, or unsupported features. The matrix auto-builds from descriptor capabilities; `pnpm matrix:verify` must pass.
43+
- Update init detection and import empty-state messaging for the new target when native files exist.
44+
- Reuse existing capability-focused tests where possible; extend them instead of duplicating assertions across multiple files.
45+
- Preserve the canonical `.agentsmesh/` contract. If the target cannot represent a feature natively, model that explicitly instead of inventing fake native output.
46+
- Ensure every internal file link or reference inside generated or imported Markdown artifacts is convertible through the shared reference-rewrite pipeline, just like the existing targets. Do not ship a new target unless canonical `.agentsmesh/` references round-trip cleanly across that target's Markdown surfaces.
47+
- Run the full verification stack, including the packaging gates (`pnpm attw`, `pnpm publint`, `pnpm consumer-smoke`), before claiming completion.
48+
- Run the `post-feature-qa` skill before marking the task done.
49+
50+
### MUST NOT
51+
52+
- Do not infer the target format from old fixtures, README text, or memory alone.
53+
- Do not add placeholder fixtures with `SYNTHETIC` markers or obviously fake content.
54+
- Do not add shallow smoke tests as a substitute for feature coverage.
55+
- Do not silently skip unsupported features; document and test the chosen behavior.
56+
- Do not leave commands, schema enums, init detection, matrix output, or docs partially updated.
57+
- Do not hardcode target-specific branches in shared code when a descriptor field can carry the behavior.
58+
59+
## Workflow (detailed in `docs/add-new-target-playbook.md`)
60+
61+
1. **Research** — §1 of the playbook. Answer every research-checklist item from primary sources before writing code.
62+
2. **Scaffold** — §2 of the playbook. Run `pnpm exec agentsmesh target scaffold <id>`, then register the id in the three catalog files listed there.
63+
3. **Constants and capabilities** — §3. Fill in paths and capability levels for both project and global scope.
64+
4. **Conversion eligibility** — For each feature marked `none` in capabilities, check if the target supports skills (`native` or `embedded`). If so, add `supportsConversion` to the descriptor for those features, register defaults in `src/config/core/conversions.ts`, and omit lint warnings for those features (they become `embedded` via skill projection). Only emit lint warnings for features that are truly dropped with no fallback.
65+
5. **Tests first** — §4. Add realistic fixtures under `tests/e2e/fixtures/<id>-project/` and write failing unit/integration/e2e tests.
66+
5. **Implement generators, importers, and reference maps** — §5. Feature-by-feature, using existing targets as reference implementations.
67+
6. **Global mode** — §6. Fill in `descriptor.global`, `rewriteGeneratedPath`, and any `skillMirror` or `sharedArtifacts` needs.
68+
7. **Plugin packaging** — §7. Only if shipping as an external plugin rather than a built-in.
69+
8. **Matrix and docs** — §8. Run `pnpm schemas:generate && pnpm matrix:generate` and update `website/src/content/docs/reference/supported-tools.mdx`.
70+
9. **Verification** — §9. Run the full stack (see below). All must pass.
71+
72+
Refer to `./references/target-addition-checklist.md` for the concrete audit list of touchpoints, tests, fixtures, and edge cases.
73+
74+
## Required Verification
75+
76+
Before claiming completion, every command must pass:
77+
78+
- `pnpm typecheck`
79+
- `pnpm lint`
80+
- `pnpm test`
81+
- `pnpm test:e2e`
82+
- `pnpm matrix:verify`
83+
- `pnpm publint`
84+
- `pnpm attw`
85+
- `pnpm consumer-smoke`
86+
87+
If a narrower command is useful during iteration, run it first, but do not skip the full stack at the end.
88+
89+
## Completion Standard
90+
91+
The task is not done until all of the following are true:
92+
93+
- The target appears in `agentsmesh matrix` CLI output and passes `pnpm matrix:verify`.
94+
- Import and generate behavior are both covered for every supported feature, in both project and global scope where applicable.
95+
- Unsupported or lossy features are documented in `website/src/content/docs/reference/supported-tools.mdx` and tested.
96+
- Fixtures under `tests/e2e/fixtures/<id>-project/` are rich enough to exercise real parsing branches (rules, skills, MCP, hooks, ignore as applicable).
97+
- Round-trip import → generate preserves content byte-for-byte where the format permits.
98+
- README matrix and website supported-tools page are in sync.
99+
- All verification commands listed above pass.
100+
- `post-feature-qa` skill has been applied and any gaps closed.

0 commit comments

Comments
 (0)