@bonesofspring/ai-rules 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +3 -1
- package/bin/cli.js +2 -0
- package/package.json +1 -1
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +15 -2
- package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +15 -2
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +15 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +15 -2
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/mcp-ts/CLAUDE.md +13 -0
- package/presets/claude/mcp-ts/MCP.md +37 -0
- package/presets/claude/mcp-ts/README.md +11 -0
- package/presets/claude/mcp-ts/REPO_AGENTS.md +49 -0
- package/presets/claude/mcp-ts/agents/README.md +21 -0
- package/presets/claude/mcp-ts/agents/build-verifier.md +39 -0
- package/presets/claude/mcp-ts/agents/feature-developer.md +47 -0
- package/presets/claude/mcp-ts/agents/security-reviewer.md +21 -0
- package/presets/claude/mcp-ts/agents/solution-architect.md +23 -0
- package/presets/claude/mcp-ts/agents/task-analyst.md +25 -0
- package/presets/claude/mcp-ts/agents/task-router.md +73 -0
- package/presets/claude/mcp-ts/commands/README.md +11 -0
- package/presets/claude/mcp-ts/commands/feature-continue.md +19 -0
- package/presets/claude/mcp-ts/commands/feature-start.md +33 -0
- package/presets/claude/mcp-ts/commands/task-continue.md +49 -0
- package/presets/claude/mcp-ts/commands/task.md +49 -0
- package/presets/claude/mcp-ts/commands/technical-retro.md +81 -0
- package/presets/claude/mcp-ts/hooks/README.md +12 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +346 -0
- package/presets/claude/mcp-ts/hooks/examples/README.md +11 -0
- package/presets/claude/mcp-ts/hooks/examples/format-edited.example.sh +16 -0
- package/presets/claude/mcp-ts/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/mcp-ts/hooks/examples/test-on-save.example.sh +25 -0
- package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +79 -0
- package/presets/claude/mcp-ts/mcp.json +11 -0
- package/presets/claude/mcp-ts/rules/README.md +52 -0
- package/presets/claude/mcp-ts/rules/api-and-data/README.md +3 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-auth-secrets.md +44 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-contract-testing.md +42 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-tool-design.md +37 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-transport-packaging.md +43 -0
- package/presets/claude/mcp-ts/rules/architecture/README.md +3 -0
- package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +45 -0
- package/presets/claude/mcp-ts/rules/architecture/mcp-server-boundaries.md +28 -0
- package/presets/claude/mcp-ts/rules/architecture/reference-features.md +33 -0
- package/presets/claude/mcp-ts/rules/stack/README.md +3 -0
- package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +27 -0
- package/presets/claude/mcp-ts/rules/stack/mcp-ts-conventions.md +29 -0
- package/presets/claude/mcp-ts/rules/testing/README.md +3 -0
- package/presets/claude/mcp-ts/rules/testing/unit.md +30 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/README.md +3 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +23 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +161 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +34 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +52 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +51 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/design-guidance.md +109 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-ts-tooling.md +31 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/post-change-test.md +30 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +46 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/security-mcp.md +52 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +20 -0
- package/presets/claude/mcp-ts/rules/ui-and-accessibility/README.md +3 -0
- package/presets/claude/mcp-ts/skills/README.md +12 -0
- package/presets/claude/mcp-ts/skills/code-review/SKILL.md +10 -0
- package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +11 -0
- package/presets/claude/mcp-ts/skills/feature-delivery/SKILL.md +29 -0
- package/presets/claude/mcp-ts/skills/unit-testing/SKILL.md +16 -0
- package/presets/claude/mcp-ts/team/README.md +17 -0
- package/presets/claude/mcp-ts/team/conventions.md +14 -0
- package/presets/claude/mcp-ts/team/fixtures/bugfix-standard.json +32 -0
- package/presets/claude/mcp-ts/team/fixtures/feature-full.json +33 -0
- package/presets/claude/mcp-ts/team/fixtures/feature-light.json +34 -0
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +15 -2
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +15 -2
- package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +15 -2
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +15 -2
- package/presets/cursor/java/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/mcp-ts/AGENTS.md +25 -0
- package/presets/cursor/mcp-ts/BUGBOT.md +9 -0
- package/presets/cursor/mcp-ts/MCP.md +37 -0
- package/presets/cursor/mcp-ts/README.md +19 -0
- package/presets/cursor/mcp-ts/REPO_AGENTS.md +49 -0
- package/presets/cursor/mcp-ts/agents/README.md +21 -0
- package/presets/cursor/mcp-ts/agents/build-verifier.md +39 -0
- package/presets/cursor/mcp-ts/agents/feature-developer.md +47 -0
- package/presets/cursor/mcp-ts/agents/security-reviewer.md +21 -0
- package/presets/cursor/mcp-ts/agents/solution-architect.md +23 -0
- package/presets/cursor/mcp-ts/agents/task-analyst.md +25 -0
- package/presets/cursor/mcp-ts/agents/task-router.md +73 -0
- package/presets/cursor/mcp-ts/commands/README.md +11 -0
- package/presets/cursor/mcp-ts/commands/feature-continue.md +19 -0
- package/presets/cursor/mcp-ts/commands/feature-start.md +33 -0
- package/presets/cursor/mcp-ts/commands/task-continue.md +49 -0
- package/presets/cursor/mcp-ts/commands/task.md +49 -0
- package/presets/cursor/mcp-ts/commands/technical-retro.md +81 -0
- package/presets/cursor/mcp-ts/hooks/README.md +12 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +346 -0
- package/presets/cursor/mcp-ts/hooks/examples/README.md +11 -0
- package/presets/cursor/mcp-ts/hooks/examples/format-edited.example.sh +16 -0
- package/presets/cursor/mcp-ts/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/mcp-ts/hooks/examples/test-on-save.example.sh +25 -0
- package/presets/cursor/mcp-ts/hooks/guard-shell-command.sh +79 -0
- package/presets/cursor/mcp-ts/hooks.json +17 -0
- package/presets/cursor/mcp-ts/mcp.json +11 -0
- package/presets/cursor/mcp-ts/rules/README.md +52 -0
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +21 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +159 -0
- package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +35 -0
- package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +53 -0
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +50 -0
- package/presets/cursor/mcp-ts/rules/design-guidance.mdc +108 -0
- package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +43 -0
- package/presets/cursor/mcp-ts/rules/mcp-auth-secrets.mdc +45 -0
- package/presets/cursor/mcp-ts/rules/mcp-contract-testing.mdc +43 -0
- package/presets/cursor/mcp-ts/rules/mcp-server-boundaries.mdc +29 -0
- package/presets/cursor/mcp-ts/rules/mcp-tool-design.mdc +38 -0
- package/presets/cursor/mcp-ts/rules/mcp-transport-packaging.mdc +44 -0
- package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +28 -0
- package/presets/cursor/mcp-ts/rules/mcp-ts-conventions.mdc +30 -0
- package/presets/cursor/mcp-ts/rules/mcp-ts-tooling.mdc +32 -0
- package/presets/cursor/mcp-ts/rules/post-change-test.mdc +26 -0
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +36 -0
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +69 -0
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +46 -0
- package/presets/cursor/mcp-ts/rules/reference-features.mdc +34 -0
- package/presets/cursor/mcp-ts/rules/security-mcp.mdc +53 -0
- package/presets/cursor/mcp-ts/rules/technical-retro.mdc +18 -0
- package/presets/cursor/mcp-ts/rules/tests-unit.mdc +31 -0
- package/presets/cursor/mcp-ts/skills/README.md +12 -0
- package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +10 -0
- package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +11 -0
- package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +29 -0
- package/presets/cursor/mcp-ts/skills/unit-testing/SKILL.md +16 -0
- package/presets/cursor/mcp-ts/team/README.md +17 -0
- package/presets/cursor/mcp-ts/team/conventions.md +14 -0
- package/presets/cursor/mcp-ts/team/fixtures/bugfix-standard.json +32 -0
- package/presets/cursor/mcp-ts/team/fixtures/feature-full.json +33 -0
- package/presets/cursor/mcp-ts/team/fixtures/feature-light.json +34 -0
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +15 -2
- package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### MCP TypeScript preset (`mcp-ts`)
|
|
6
|
+
|
|
7
|
+
- New installable preset **`mcp-ts`** (Cursor + Claude twins): TypeScript MCP server authoring with `@modelcontextprotocol/sdk`, stdio-first transport, Context7-only MCP, package-manager–discovered typecheck/test via `mcp-ts-tooling` / `post-change-test`.
|
|
8
|
+
- Full mapped rule catalog (~25 stems); always-on trio `mcp-ts-app-core`, `mcp-server-boundaries`, `code-quality-and-refactoring` (session-start body budget ≤140).
|
|
9
|
+
- Agent-team surface (Phase 1): 6 agents (`task-router`, `task-analyst`, `solution-architect`, `feature-developer`, `build-verifier`, `security-reviewer`), 4 skills, 5 commands, hooks + team fixtures; no Playwright/XCUITest/a11y/`integration-test-*`.
|
|
10
|
+
- Structure scripts (`twin-map`, `token-budget`, `leakage`) include `mcp-ts`; leakage `MCP_TS_FORBIDDEN_*` + pairwise chain forks vs other stacks.
|
|
11
|
+
- Install: `npx @bonesofspring/ai-rules init cursor|claude --preset mcp-ts`.
|
|
12
|
+
- Dogfood: `dogfood/mcp-ts-sample` (scenarios M1–M3 in `reference-features`).
|
|
13
|
+
- Platform asymmetry: `BUGBOT.md` + `hooks.json` Cursor-only; `CLAUDE.md` Claude-only.
|
|
14
|
+
|
|
5
15
|
### Go/Java stub thicken + session-start budget raise (`go-java-rules-thicken-dogfood`)
|
|
6
16
|
|
|
7
17
|
- **Session-start body cap:** **120 → 140** (stretch **≤120**); `alwaysApply` / Claude session-start count stays **exactly 3**. Checker `BODY_CAP=140`; policy core + embed adapters + build-verifier copy updated.
|
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ Where things go on `init`:
|
|
|
53
53
|
|
|
54
54
|
Skills of note: `write-adr` (all stacks); `react-performance` (**next only**). Living gotchas: `team/conventions.md`. Opt-in rule samples eval: `yarn check:rule-eval` (workflow `rule-eval.yml`; not part of `check:preset-structure`).
|
|
55
55
|
|
|
56
|
-
The package ships presets including **`next`** (Next.js stack), **`ios-swift`** (iOS apps on Swift / SwiftUI), **`go`** (Go backends with hexagonal architecture),
|
|
56
|
+
The package ships presets including **`next`** (Next.js stack), **`ios-swift`** (iOS apps on Swift / SwiftUI), **`go`** (Go backends with hexagonal architecture), **`java`** (Java / Spring Boot hexagonal backends), and **`mcp-ts`** (TypeScript MCP servers with `@modelcontextprotocol/sdk`). Other preset names: see `presets/` in the [repo](https://github.com/bonesofspring/ai-rules). Name is a single path segment, no `/` or `..`.
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
npx @bonesofspring/ai-rules init cursor --preset ios-swift
|
|
@@ -62,6 +62,8 @@ npx @bonesofspring/ai-rules init cursor --preset go
|
|
|
62
62
|
npx @bonesofspring/ai-rules init claude --preset go
|
|
63
63
|
npx @bonesofspring/ai-rules init cursor --preset java
|
|
64
64
|
npx @bonesofspring/ai-rules init claude --preset java
|
|
65
|
+
npx @bonesofspring/ai-rules init cursor --preset mcp-ts
|
|
66
|
+
npx @bonesofspring/ai-rules init claude --preset mcp-ts
|
|
65
67
|
```
|
|
66
68
|
|
|
67
69
|
Help: `ai-rules --help`.
|
package/bin/cli.js
CHANGED
|
@@ -73,10 +73,12 @@ Examples:
|
|
|
73
73
|
npx @bonesofspring/ai-rules init cursor --preset ios-swift
|
|
74
74
|
npx @bonesofspring/ai-rules init cursor --preset go
|
|
75
75
|
npx @bonesofspring/ai-rules init cursor --preset java
|
|
76
|
+
npx @bonesofspring/ai-rules init cursor --preset mcp-ts
|
|
76
77
|
npx @bonesofspring/ai-rules init claude
|
|
77
78
|
npx @bonesofspring/ai-rules init claude --preset ios-swift
|
|
78
79
|
npx @bonesofspring/ai-rules init claude --preset go
|
|
79
80
|
npx @bonesofspring/ai-rules init claude --preset java
|
|
81
|
+
npx @bonesofspring/ai-rules init claude --preset mcp-ts
|
|
80
82
|
npx @bonesofspring/ai-rules clean cursor
|
|
81
83
|
`);
|
|
82
84
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
- `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
|
|
8
8
|
- `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
|
|
9
|
-
- `go` / `java` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
9
|
+
- `go` / `java` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
10
|
+
- `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
|
|
10
11
|
- Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
|
|
11
12
|
|
|
12
13
|
## Forbidden in ios-swift hooks/agents (FAIL)
|
|
@@ -35,6 +36,18 @@ Shared backend-stack bans (both `go` and `java`):
|
|
|
35
36
|
|
|
36
37
|
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`) or `java-tooling` (`mvn test` / `./gradlew test`).
|
|
37
38
|
|
|
39
|
+
## Forbidden in mcp-ts hooks/agents (FAIL)
|
|
40
|
+
|
|
41
|
+
Same UI/mobile bans as backend stacks, plus:
|
|
42
|
+
|
|
43
|
+
- `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
44
|
+
- Positive yarn recipes `lint:js` / `lint:css` as required gates
|
|
45
|
+
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
46
|
+
- Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
|
|
47
|
+
- Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
|
|
48
|
+
|
|
49
|
+
Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
|
|
50
|
+
|
|
38
51
|
## Soft / document
|
|
39
52
|
|
|
40
53
|
- Mentioning the other stack in **docs** comparing presets is OK.
|
|
@@ -42,4 +55,4 @@ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus
|
|
|
42
55
|
|
|
43
56
|
## Chain fork
|
|
44
57
|
|
|
45
|
-
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, and `
|
|
58
|
+
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, and `mcp-ts` (per platform).
|
|
@@ -10,6 +10,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
10
10
|
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
11
11
|
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
12
12
|
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
|
|
13
|
+
| `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
|
|
13
14
|
|
|
14
15
|
## Same-PR checklist
|
|
15
16
|
|
|
@@ -29,5 +30,6 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
29
30
|
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
30
31
|
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
31
32
|
- **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
|
|
33
|
+
- **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
|
|
32
34
|
|
|
33
35
|
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -17,7 +17,8 @@ paths:
|
|
|
17
17
|
|
|
18
18
|
- `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
|
|
19
19
|
- `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
|
|
20
|
-
- `go` / `java` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
20
|
+
- `go` / `java` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
21
|
+
- `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
|
|
21
22
|
- Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
|
|
22
23
|
|
|
23
24
|
## Forbidden in ios-swift hooks/agents (FAIL)
|
|
@@ -46,6 +47,18 @@ Shared backend-stack bans (both `go` and `java`):
|
|
|
46
47
|
|
|
47
48
|
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`) or `java-tooling` (`mvn test` / `./gradlew test`).
|
|
48
49
|
|
|
50
|
+
## Forbidden in mcp-ts hooks/agents (FAIL)
|
|
51
|
+
|
|
52
|
+
Same UI/mobile bans as backend stacks, plus:
|
|
53
|
+
|
|
54
|
+
- `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
55
|
+
- Positive yarn recipes `lint:js` / `lint:css` as required gates
|
|
56
|
+
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
57
|
+
- Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
|
|
58
|
+
- Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
|
|
59
|
+
|
|
60
|
+
Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
|
|
61
|
+
|
|
49
62
|
## Soft / document
|
|
50
63
|
|
|
51
64
|
- Mentioning the other stack in **docs** comparing presets is OK.
|
|
@@ -53,4 +66,4 @@ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus
|
|
|
53
66
|
|
|
54
67
|
## Chain fork
|
|
55
68
|
|
|
56
|
-
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, and `
|
|
69
|
+
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, and `mcp-ts` (per platform).
|
|
@@ -21,6 +21,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
21
21
|
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
22
22
|
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
23
23
|
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
|
|
24
|
+
| `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
|
|
24
25
|
|
|
25
26
|
## Same-PR checklist
|
|
26
27
|
|
|
@@ -40,5 +41,6 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
40
41
|
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
41
42
|
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
42
43
|
- **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
|
|
44
|
+
- **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
|
|
43
45
|
|
|
44
46
|
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -17,7 +17,8 @@ paths:
|
|
|
17
17
|
|
|
18
18
|
- `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
|
|
19
19
|
- `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
|
|
20
|
-
- `go` / `java` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
20
|
+
- `go` / `java` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
21
|
+
- `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
|
|
21
22
|
- Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
|
|
22
23
|
|
|
23
24
|
## Forbidden in ios-swift hooks/agents (FAIL)
|
|
@@ -46,6 +47,18 @@ Shared backend-stack bans (both `go` and `java`):
|
|
|
46
47
|
|
|
47
48
|
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`) or `java-tooling` (`mvn test` / `./gradlew test`).
|
|
48
49
|
|
|
50
|
+
## Forbidden in mcp-ts hooks/agents (FAIL)
|
|
51
|
+
|
|
52
|
+
Same UI/mobile bans as backend stacks, plus:
|
|
53
|
+
|
|
54
|
+
- `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
55
|
+
- Positive yarn recipes `lint:js` / `lint:css` as required gates
|
|
56
|
+
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
57
|
+
- Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
|
|
58
|
+
- Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
|
|
59
|
+
|
|
60
|
+
Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
|
|
61
|
+
|
|
49
62
|
## Soft / document
|
|
50
63
|
|
|
51
64
|
- Mentioning the other stack in **docs** comparing presets is OK.
|
|
@@ -53,4 +66,4 @@ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus
|
|
|
53
66
|
|
|
54
67
|
## Chain fork
|
|
55
68
|
|
|
56
|
-
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, and `
|
|
69
|
+
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, and `mcp-ts` (per platform).
|
|
@@ -21,6 +21,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
21
21
|
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
22
22
|
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
23
23
|
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
|
|
24
|
+
| `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
|
|
24
25
|
|
|
25
26
|
## Same-PR checklist
|
|
26
27
|
|
|
@@ -40,5 +41,6 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
40
41
|
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
41
42
|
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
42
43
|
- **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
|
|
44
|
+
- **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
|
|
43
45
|
|
|
44
46
|
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -17,7 +17,8 @@ paths:
|
|
|
17
17
|
|
|
18
18
|
- `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
|
|
19
19
|
- `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
|
|
20
|
-
- `go` / `java` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
20
|
+
- `go` / `java` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
21
|
+
- `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
|
|
21
22
|
- Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
|
|
22
23
|
|
|
23
24
|
## Forbidden in ios-swift hooks/agents (FAIL)
|
|
@@ -46,6 +47,18 @@ Shared backend-stack bans (both `go` and `java`):
|
|
|
46
47
|
|
|
47
48
|
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`) or `java-tooling` (`mvn test` / `./gradlew test`).
|
|
48
49
|
|
|
50
|
+
## Forbidden in mcp-ts hooks/agents (FAIL)
|
|
51
|
+
|
|
52
|
+
Same UI/mobile bans as backend stacks, plus:
|
|
53
|
+
|
|
54
|
+
- `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
55
|
+
- Positive yarn recipes `lint:js` / `lint:css` as required gates
|
|
56
|
+
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
57
|
+
- Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
|
|
58
|
+
- Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
|
|
59
|
+
|
|
60
|
+
Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
|
|
61
|
+
|
|
49
62
|
## Soft / document
|
|
50
63
|
|
|
51
64
|
- Mentioning the other stack in **docs** comparing presets is OK.
|
|
@@ -53,4 +66,4 @@ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus
|
|
|
53
66
|
|
|
54
67
|
## Chain fork
|
|
55
68
|
|
|
56
|
-
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, and `
|
|
69
|
+
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, and `mcp-ts` (per platform).
|
|
@@ -21,6 +21,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
21
21
|
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
22
22
|
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
23
23
|
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
|
|
24
|
+
| `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
|
|
24
25
|
|
|
25
26
|
## Same-PR checklist
|
|
26
27
|
|
|
@@ -40,5 +41,6 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
40
41
|
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
41
42
|
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
42
43
|
- **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
|
|
44
|
+
- **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
|
|
43
45
|
|
|
44
46
|
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# TypeScript MCP (Claude)
|
|
2
|
+
|
|
3
|
+
Preset for authoring TypeScript MCP servers with `@modelcontextprotocol/sdk`.
|
|
4
|
+
|
|
5
|
+
**Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root.
|
|
6
|
+
|
|
7
|
+
- Session-start: `mcp-ts-app-core`, `architecture/mcp-server-boundaries`, `code-quality` (exactly 3).
|
|
8
|
+
- Delivery: `architecture/feature-delivery.md` + skill `feature-delivery`.
|
|
9
|
+
- After TS edits: `tooling-and-review/post-change-test.md`.
|
|
10
|
+
- Contract checks: `mcp-contract-testing` rule (Phase 1: feature-developer owns verification).
|
|
11
|
+
- Never schedule Playwright / XCUITest / `accessibility-reviewer` / `integration-test-*`.
|
|
12
|
+
|
|
13
|
+
Init: `npx @bonesofspring/ai-rules init claude --preset mcp-ts` (also copies `REPO_AGENTS.md` → root `AGENTS.md`).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# MCP (preset `mcp-ts`, Claude)
|
|
2
|
+
|
|
3
|
+
Копируется в **корень проекта** как `.mcp.json` при `ai-rules init claude --preset mcp-ts`.
|
|
4
|
+
|
|
5
|
+
## Servers (active in shipped config)
|
|
6
|
+
|
|
7
|
+
| Name | Package | Зачем |
|
|
8
|
+
|------|---------|--------|
|
|
9
|
+
| `context7` | `@upstash/context7-mcp@3.2.5` (pinned in `mcp.json`) | Versioned docs for `@modelcontextprotocol/sdk` and related libraries |
|
|
10
|
+
|
|
11
|
+
**No** Figma, browser automation, or Playwright MCP in this preset.
|
|
12
|
+
|
|
13
|
+
### Upgrading Context7
|
|
14
|
+
|
|
15
|
+
Shipped `.mcp.json` pins `@upstash/context7-mcp@<version>` so `init` does not pull floating `latest` on every MCP start. To upgrade: bump the pin in both Cursor and Claude `mcp-ts/mcp.json`, note the version here, and smoke-check Context7 after dogfood sync.
|
|
16
|
+
|
|
17
|
+
## Inactive example — local server under development
|
|
18
|
+
|
|
19
|
+
> **INACTIVE — do not add to shipped `mcp.json` / `.mcp.json`.**
|
|
20
|
+
> A server-under-development cannot be valid at preset install time. Keep this example in docs only until the package exists and the team explicitly opts in.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"my-mcp-server": {
|
|
26
|
+
"command": "node",
|
|
27
|
+
"args": ["dist/index.js"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Adjust `command`/`args` to the project's `bin` / `npx` entry after packaging. Prefer stdio for local Cursor/Claude use.
|
|
34
|
+
|
|
35
|
+
Секреты в файл не кладём. Опционально: `CONTEXT7_API_KEY` в окружении.
|
|
36
|
+
|
|
37
|
+
После init: Settings → MCP → включить серверы. `init` перезаписывает одноимённый MCP config.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Preset `mcp-ts` (Claude)
|
|
2
|
+
|
|
3
|
+
Installable guidance for **authoring TypeScript MCP servers** with `@modelcontextprotocol/sdk`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @bonesofspring/ai-rules init claude --preset mcp-ts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Claude topic rules are derived from Cursor SoT. Mapping: `rules/README.md`.
|
|
10
|
+
|
|
11
|
+
Session-start (exactly 3, no `paths:`): `mcp-ts-app-core`, `mcp-server-boundaries`, `code-quality`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# TypeScript MCP — agent instructions
|
|
2
|
+
|
|
3
|
+
Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md` and `.claude/CLAUDE.md`.
|
|
4
|
+
|
|
5
|
+
## Cross-tool setup
|
|
6
|
+
|
|
7
|
+
- Treat this file as the **shared** entry for any agent (Cursor, Claude Code, or other).
|
|
8
|
+
- Tool maps live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` when that tool is installed.
|
|
9
|
+
- Install:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @bonesofspring/ai-rules init cursor --preset mcp-ts
|
|
13
|
+
npx @bonesofspring/ai-rules init claude --preset mcp-ts
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). Living gotchas belong in `team/conventions.md`, not here.
|
|
17
|
+
|
|
18
|
+
## Commands (test / typecheck / build)
|
|
19
|
+
|
|
20
|
+
Discover the package manager from lockfile / `packageManager` (`mcp-ts-tooling`). Typical gates:
|
|
21
|
+
|
|
22
|
+
| Gate | Typical command |
|
|
23
|
+
|------|-----------------|
|
|
24
|
+
| Typecheck | `tsc --noEmit` or project `typecheck` script |
|
|
25
|
+
| Test | project `test` / `vitest` / `jest` script |
|
|
26
|
+
| Build | project `build` / `tsc` as configured |
|
|
27
|
+
| Package | validate `bin` / package entry for stdio server |
|
|
28
|
+
|
|
29
|
+
After code edits: invoke **`post-change-test`** (requestable). Full gate: agent `build-verifier`.
|
|
30
|
+
|
|
31
|
+
## Security basics
|
|
32
|
+
|
|
33
|
+
- Do not commit secrets (tokens, `.env`, private keys).
|
|
34
|
+
- Review destructive git before running; respect shell hooks.
|
|
35
|
+
- Do not weaken CI or skip hooks unless the user explicitly asks.
|
|
36
|
+
- Tool handlers must not log secrets or widen filesystem/network capability without AC.
|
|
37
|
+
|
|
38
|
+
## Tool entry points
|
|
39
|
+
|
|
40
|
+
| Tool | Map |
|
|
41
|
+
|------|-----|
|
|
42
|
+
| Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
|
|
43
|
+
| Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
|
|
44
|
+
|
|
45
|
+
Rules: `.cursor/rules/` or `.claude/rules/`. Skills: `.cursor/skills/` or `.claude/skills/`.
|
|
46
|
+
|
|
47
|
+
## Living conventions
|
|
48
|
+
|
|
49
|
+
Gotchas, local patterns, and team decisions: **`.cursor/team/conventions.md`** and/or **`.claude/team/conventions.md`** (fill after init).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Agents (mcp-ts Phase 1)
|
|
2
|
+
|
|
3
|
+
| Agent | Role |
|
|
4
|
+
|-------|------|
|
|
5
|
+
| `task-router` | Intent → `pipeline.json` |
|
|
6
|
+
| `task-analyst` | brief + decomposition |
|
|
7
|
+
| `solution-architect` | architecture.md |
|
|
8
|
+
| `feature-developer` | contract→schema→handler→register→test→package |
|
|
9
|
+
| `build-verifier` | typecheck/tests (+ preset-structure) |
|
|
10
|
+
| `security-reviewer` | threat model / capabilities |
|
|
11
|
+
|
|
12
|
+
Phase 2 adds parity agents (`contract-test-*`, `code-reviewer`, `codebase-analyzer`, `debugger`, …) — **do not** schedule them as required handoffs in Phase 1.
|
|
13
|
+
|
|
14
|
+
## Review-only (Phase 1)
|
|
15
|
+
|
|
16
|
+
| Diff kind | Pipeline |
|
|
17
|
+
|-----------|----------|
|
|
18
|
+
| Tools / auth / secrets / capabilities | `security-reviewer` → parent skill `code-review` → `review.md` |
|
|
19
|
+
| Schema / style only | Parent skill `code-review` only (`security-reviewer` in `skipped`) |
|
|
20
|
+
|
|
21
|
+
There is **no** `code-reviewer` agent until Phase 2.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-verifier
|
|
3
|
+
description: Validation gate specialist. Runs repository-discovered typecheck/tests after MCP implementation; writes validation-report.md. Never fixes app source. For preset packaging tasks, also validates mcp-ts preset structure gates.
|
|
4
|
+
readonly: false
|
|
5
|
+
model: fast
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the build verifier for **TypeScript MCP servers** (and for **ai-rules preset packaging** when scope says so).
|
|
9
|
+
|
|
10
|
+
## Consumer MCP repos
|
|
11
|
+
|
|
12
|
+
1. Discover package manager (`mcp-ts-tooling`).
|
|
13
|
+
2. Run typecheck (`tsc --noEmit` or project script).
|
|
14
|
+
3. Run tests (project `test` / Vitest / Jest / scoped).
|
|
15
|
+
4. Optional Inspector smoke — not required.
|
|
16
|
+
5. Write `.cursor/team/tasks/<slug>/validation-report.md` with commands + results.
|
|
17
|
+
6. On failure: set status `validation_failed` — do **not** patch production code.
|
|
18
|
+
|
|
19
|
+
**Never** require Playwright, XCUITest, `lint:js`/`lint:css`, `xcodebuild`/`SwiftLint`, or Go tools (`go test` / `go vet` / `golangci-lint`) as the MCP gate.
|
|
20
|
+
|
|
21
|
+
## Preset-structure validation (when editing `packages/ai-rules/presets/**`)
|
|
22
|
+
|
|
23
|
+
From `packages/ai-rules/`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn check:preset-structure
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Hard gates: twin-map (stacks include **mcp-ts**), token-budget (alwaysApply/session-start = 3), leakage (`MCP_TS_FORBIDDEN_IN_CHAIN`, `MCP_TS_FORBIDDEN_AGENT_STEMS`, chain forks mcp-ts≠next≠ios-swift≠go≠java), shared-core drift (`AI_RULES_DRIFT_FAIL=1` via `check:preset-structure`).
|
|
30
|
+
|
|
31
|
+
Document PASS/FAIL in `validation-report.md`. Soft leakage output:
|
|
32
|
+
|
|
33
|
+
- **Negation** of forbidden stems in agents → suppressed (INFO count). **Not** a merge blocker.
|
|
34
|
+
- **WARN** only for non-negation packaging mentions in this verifier (and rare chain-skip WARNs). Do not treat INFO/WARN counts as FAIL.
|
|
35
|
+
|
|
36
|
+
1. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java|mcp-ts`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
|
|
37
|
+
2. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
38
|
+
3. **Forbidden agent filenames** (Playwright / XCUITest / integration-test / accessibility-reviewer / contract-test): must be absent → **FAIL** via `check:preset-leakage`.
|
|
39
|
+
4. **Rule eval (WARN):** optional maintainer smoke — not part of default `check:preset-structure`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature-developer
|
|
3
|
+
description: Feature implementation specialist for TypeScript MCP servers. Implements tasks from decomposition.md following feature-delivery workflow. Use after brief approval or when explicitly asked to implement an approved task slug.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Implement MCP server features following **mcp-ts** boundaries.
|
|
8
|
+
|
|
9
|
+
## Mandatory flow
|
|
10
|
+
|
|
11
|
+
1. **Contract** — finalize name/description/input/output (`mcp-tool-design`).
|
|
12
|
+
2. **Schema** — Zod authoring + JSON Schema-compatible registration (`mcp-ts-conventions`).
|
|
13
|
+
3. **Handler** — validated inputs → scoped capability → safe errors.
|
|
14
|
+
4. **Registration** — wire modules; keep `src/index.ts` lifecycle-only.
|
|
15
|
+
5. **Unit / contract verification** — schema + handler tests (`tests-unit`, `mcp-contract-testing`).
|
|
16
|
+
6. **Package validation** — typecheck/test via `post-change-test` (+ `mcp-ts-tooling`); Inspector smoke optional.
|
|
17
|
+
|
|
18
|
+
## Order
|
|
19
|
+
|
|
20
|
+
1. Read `feature-delivery-workflow.mdc`, `mcp-server-boundaries.mdc`, `reference-features.mdc`.
|
|
21
|
+
2. After `*.ts` edits: invoke `post-change-test.mdc` (+ `mcp-ts-tooling.mdc`).
|
|
22
|
+
|
|
23
|
+
## Do / Don't
|
|
24
|
+
|
|
25
|
+
- **Do** keep registration, validation, and handlers separable.
|
|
26
|
+
- **Do** use `// VERIFY: @modelcontextprotocol/sdk @ <version>` when inventing SDK calls would be risky.
|
|
27
|
+
- **Don't** require Playwright, XCUITest, Next lint, or Go tools as gates.
|
|
28
|
+
- **Don't** register a server-under-dev into shipped consumer `mcp.json`.
|
|
29
|
+
|
|
30
|
+
## Zero improvisation
|
|
31
|
+
|
|
32
|
+
- Implement **only** what the brief / AC / current decomposition task require.
|
|
33
|
+
- If requirements are ambiguous — **ask** before coding.
|
|
34
|
+
- Forbidden without explicit AC: unrelated security hardening, extra validation, drive-by refactors, new config/env.
|
|
35
|
+
- Boy scout / `design-guidance` improvements stay **within** touched files.
|
|
36
|
+
|
|
37
|
+
## Will / Will not
|
|
38
|
+
|
|
39
|
+
**Will:** follow contract→schema→handler→register→test→package; add required unit tests; run `post-change-test`; update task artifacts.
|
|
40
|
+
|
|
41
|
+
**Will not:** formal code review; invent AC; pull Next/iOS/Go gates; auto-continue past human gates.
|
|
42
|
+
|
|
43
|
+
## Design guidance / anti-sycophancy
|
|
44
|
+
|
|
45
|
+
- Load `design-guidance` and `anti-sycophancy-discipline` when writing or changing code.
|
|
46
|
+
|
|
47
|
+
Update `.cursor/team/tasks/<slug>/status.json` when done.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-reviewer
|
|
3
|
+
description: Security review specialist for TypeScript MCP servers. Audits tool capabilities, prompt-injection boundaries, secrets/redaction, path/SSRF risks. Readonly — writes security-review.md only.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Review MCP diffs against `security-mcp.mdc` and `mcp-auth-secrets.mdc`.
|
|
8
|
+
|
|
9
|
+
## Focus
|
|
10
|
+
|
|
11
|
+
- Capability minimization (FS/network/shell)
|
|
12
|
+
- Schema validation before side effects
|
|
13
|
+
- Secrets in repo/logs/tool results
|
|
14
|
+
- Path traversal / SSRF allowlists
|
|
15
|
+
- Fail-closed auth for remote transports
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
`.cursor/team/tasks/<slug>/security-review.md`. Do not edit production code.
|
|
20
|
+
|
|
21
|
+
Never require Keychain/ATS/iOS-only or browser CSP checklists as the primary MCP review.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: solution-architect
|
|
3
|
+
description: Solution architect for TypeScript MCP servers. Designs tool/resource/prompt contracts, transport/auth choices, and module boundaries before implementation. Readonly design docs — not production code.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Design MCP server changes for **mcp-ts**.
|
|
8
|
+
|
|
9
|
+
## Deliverable
|
|
10
|
+
|
|
11
|
+
Write `architecture.md` covering:
|
|
12
|
+
|
|
13
|
+
- Contract surface (names, schemas, versioning)
|
|
14
|
+
- Module boundaries (entry / registration / handler / capability)
|
|
15
|
+
- Transport default (stdio) and any remote/auth decisions
|
|
16
|
+
- Test strategy (unit + contract fixtures; Inspector optional)
|
|
17
|
+
- Explicit non-goals (no UI, no browser automation)
|
|
18
|
+
|
|
19
|
+
## Constraints
|
|
20
|
+
|
|
21
|
+
- Follow `mcp-server-boundaries` and `mcp-tool-design`.
|
|
22
|
+
- Do not invent SDK APIs — mark VERIFY or research via Context7.
|
|
23
|
+
- Do not introduce Go/Java hexagonal prescriptions unless the repo already uses them.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-analyst
|
|
3
|
+
description: Task analysis specialist. Clarifies requirements, validates acceptance criteria, and decomposes work into concrete tasks. Use for /feature-start, task intake, or when the user asks to analyze or decompose a feature before coding. Writes only team artifacts; never writes production code.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Analyze MCP server work requests for the **mcp-ts** preset.
|
|
8
|
+
|
|
9
|
+
## Deliverables
|
|
10
|
+
|
|
11
|
+
1. `brief.md` — goal, AC, out of scope, assumptions, risks.
|
|
12
|
+
2. `decomposition.md` — ordered tasks (contract → schema → handler → register → test → package).
|
|
13
|
+
3. Update `status.json` (`awaiting_approval` when human gate applies).
|
|
14
|
+
|
|
15
|
+
## Focus
|
|
16
|
+
|
|
17
|
+
- Tool/resource/prompt contracts and capability scope.
|
|
18
|
+
- Zod/JSON Schema obligations; stdio vs remote transport needs.
|
|
19
|
+
- Security/capability questions early for FS/network tools.
|
|
20
|
+
|
|
21
|
+
## Will not
|
|
22
|
+
|
|
23
|
+
- Implement production code.
|
|
24
|
+
- Schedule Phase 2-only agents.
|
|
25
|
+
- Prescribe Go hexagonal or Next app layers.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-router
|
|
3
|
+
description: Task routing specialist. Analyzes user prompt, detects intent, and writes pipeline.json with ordered agent steps. Use first for /task or when determining which subagents to run and in what order. No production code — writes team artifacts only.
|
|
4
|
+
readonly: false
|
|
5
|
+
model: fast
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a task router for a **TypeScript MCP server** agent team. You **do not** implement tasks — you classify intent and plan the agent pipeline.
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
- User task description (from `/task` or orchestrator).
|
|
13
|
+
- Optional: existing files under `.cursor/team/tasks/<slug>/`.
|
|
14
|
+
- Pipeline JSON schema — **`agents/README.md`**.
|
|
15
|
+
|
|
16
|
+
## Intent detection (Phase 1 roster)
|
|
17
|
+
|
|
18
|
+
| intent | Signals | Default steps |
|
|
19
|
+
|--------|---------|---------------|
|
|
20
|
+
| `feature` | «добавь tool», «новая», «реализуй», schema/handler | task-analyst → feature-developer → build-verifier → **security-reviewer** when [sensitive](#security-reviewer-routing); else document skip |
|
|
21
|
+
| `bugfix` | «баг», «fix», «не работает», «падает» | task-analyst → feature-developer → build-verifier → **security-reviewer** when [sensitive](#security-reviewer-routing); else document skip |
|
|
22
|
+
| `review-only` | «ревью», «review MR», «проверь diff» | `security-reviewer` for threat/capability/auth/secrets diffs; **plus** parent applies skill `code-review` (write `review.md`) — no `code-reviewer` agent in Phase 1. Pure schema/style-only diffs: skip security step, parent skill only (document in `skipped`) |
|
|
23
|
+
| `spike` | «исследуй», «spike», proof of concept | task-analyst → solution-architect |
|
|
24
|
+
| `refactor` | «рефакторинг», «без изменения поведения» | task-analyst → feature-developer → build-verifier → **security-reviewer** when [sensitive](#security-reviewer-routing); else document skip |
|
|
25
|
+
| `retro` | «ретро», «postmortem» | (orchestrator → `/technical-retro`) |
|
|
26
|
+
|
|
27
|
+
### Security-reviewer routing
|
|
28
|
+
|
|
29
|
+
Append **`security-reviewer` after `build-verifier`** for `feature` / `bugfix` / `refactor` when **any** of:
|
|
30
|
+
|
|
31
|
+
- Diff touches `auth/**`, secrets/config (`.env*`, `**/secrets/**`), or stems `security-mcp` / `mcp-auth-secrets`
|
|
32
|
+
- Tool FS/network capability changes (new or widened allowlists, adapters, SSRF surface)
|
|
33
|
+
- User signals auth, secrets, bearer/OAuth, or capability expansion
|
|
34
|
+
|
|
35
|
+
**Documented skip only** for proven schema/style-only changes (no auth/secrets/capability). Put `security-reviewer` in `skipped` with that reason — never silent omit.
|
|
36
|
+
|
|
37
|
+
**`profile: light` is invalid** when FS/net/auth expands — use `standard`/`full` and include `security-reviewer`.
|
|
38
|
+
|
|
39
|
+
**Phase 1 available agents only:** `task-router`, `task-analyst`, `solution-architect`, `feature-developer`, `build-verifier`, `security-reviewer`.
|
|
40
|
+
|
|
41
|
+
**Never schedule** Playwright (`playwright-test-*`), XCUITest (`xcuitest-test-*`), `accessibility-reviewer`, `integration-test-*`, or Phase 2 `contract-test-*`. Put them in `skipped` with reason «mcp-ts Phase 1 roster».
|
|
42
|
+
|
|
43
|
+
## Pipeline profiles
|
|
44
|
+
|
|
45
|
+
`"profile": "full" | "standard" | "light"`. Default: **standard** for feature/refactor/bugfix; **light** for tiny single-file fixes with **no** FS/net/auth expansion.
|
|
46
|
+
|
|
47
|
+
**Never skip `build-verifier`** after developer when TypeScript sources changed.
|
|
48
|
+
|
|
49
|
+
## Model tiers (`steps[].model`)
|
|
50
|
+
|
|
51
|
+
Optional: `"model": "cheap" | "standard" | "strong"`.
|
|
52
|
+
|
|
53
|
+
- `light` → `cheap` on all steps
|
|
54
|
+
- security-sensitive / spike architect → `strong` on those steps
|
|
55
|
+
- never `strong` on build-verifier / task-router
|
|
56
|
+
|
|
57
|
+
Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard).
|
|
58
|
+
|
|
59
|
+
## humanGates (defaults)
|
|
60
|
+
|
|
61
|
+
| Intent | Default humanGates |
|
|
62
|
+
|--------|-------------------|
|
|
63
|
+
| feature, refactor | `["after:task-analyst"]` |
|
|
64
|
+
| spike | `["after:solution-architect"]` |
|
|
65
|
+
| bugfix, review-only | `[]` |
|
|
66
|
+
|
|
67
|
+
## Output
|
|
68
|
+
|
|
69
|
+
Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json` via the **Write** tool; set `.cursor/team/active-task.json`.
|
|
70
|
+
|
|
71
|
+
## Handoff
|
|
72
|
+
|
|
73
|
+
Intent + steps table + skipped + gates → invoke `steps[0].agent` (unless retro).
|