@leing2021/super-pi 0.22.1 → 0.23.0
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/README.md +253 -211
- package/extensions/ce-core/index.ts +190 -7
- package/extensions/ce-core/tools/parallel-subagent.ts +3 -3
- package/extensions/ce-core/tools/subagent.ts +2 -2
- package/package.json +4 -20
- package/rules/common/naming.md +154 -0
- package/skills/02-plan/SKILL.md +3 -2
- package/skills/03-work/SKILL.md +9 -6
- package/skills/04-review/SKILL.md +3 -2
- package/skills/06-next/SKILL.md +38 -10
- package/skills/06-next/references/recommendation-logic.md +2 -2
- package/skills/07-worktree/SKILL.md +9 -8
- package/skills/{09-help → 08-help}/SKILL.md +3 -3
- package/skills/{09-help → 08-help}/references/workflow-sequence.md +2 -1
- package/skills/references/language-detection.md +44 -0
- package/LICENSE +0 -21
- package/THIRD-PARTY-NOTICES.md +0 -35
- package/extensions/subagent/__tests__/async-job-tracker.test.ts +0 -21
- package/extensions/subagent/__tests__/execution-activity.test.ts +0 -15
- package/extensions/subagent/__tests__/parallel-render-stress.test.ts +0 -82
- package/extensions/subagent/__tests__/render-dedup.test.ts +0 -98
- package/extensions/subagent/__tests__/render-widget.test.ts +0 -28
- package/extensions/subagent/__tests__/throttle.test.ts +0 -90
- package/extensions/subagent/agent-management.ts +0 -596
- package/extensions/subagent/agent-manager-chain-detail.ts +0 -163
- package/extensions/subagent/agent-manager-detail.ts +0 -232
- package/extensions/subagent/agent-manager-edit.ts +0 -391
- package/extensions/subagent/agent-manager-list.ts +0 -279
- package/extensions/subagent/agent-manager-parallel.ts +0 -305
- package/extensions/subagent/agent-manager.ts +0 -706
- package/extensions/subagent/agent-scope.ts +0 -9
- package/extensions/subagent/agent-selection.ts +0 -26
- package/extensions/subagent/agent-serializer.ts +0 -124
- package/extensions/subagent/agent-templates.ts +0 -63
- package/extensions/subagent/agents/context-builder.md +0 -37
- package/extensions/subagent/agents/delegate.md +0 -9
- package/extensions/subagent/agents/oracle.md +0 -73
- package/extensions/subagent/agents/planner.md +0 -52
- package/extensions/subagent/agents/researcher.md +0 -50
- package/extensions/subagent/agents/reviewer.md +0 -38
- package/extensions/subagent/agents/scout.md +0 -48
- package/extensions/subagent/agents/worker.md +0 -52
- package/extensions/subagent/agents.ts +0 -762
- package/extensions/subagent/artifacts.ts +0 -101
- package/extensions/subagent/async-execution.ts +0 -521
- package/extensions/subagent/async-job-tracker.ts +0 -240
- package/extensions/subagent/async-status.ts +0 -242
- package/extensions/subagent/chain-clarify.ts +0 -1365
- package/extensions/subagent/chain-execution.ts +0 -854
- package/extensions/subagent/chain-serializer.ts +0 -127
- package/extensions/subagent/completion-dedupe.ts +0 -66
- package/extensions/subagent/doctor.ts +0 -201
- package/extensions/subagent/execution.ts +0 -748
- package/extensions/subagent/file-coalescer.ts +0 -43
- package/extensions/subagent/fork-context.ts +0 -64
- package/extensions/subagent/formatters.ts +0 -123
- package/extensions/subagent/frontmatter.ts +0 -32
- package/extensions/subagent/index.ts +0 -586
- package/extensions/subagent/intercom-bridge.ts +0 -241
- package/extensions/subagent/jsonl-writer.ts +0 -84
- package/extensions/subagent/model-fallback.ts +0 -109
- package/extensions/subagent/notify.ts +0 -111
- package/extensions/subagent/parallel-utils.ts +0 -109
- package/extensions/subagent/pi-args.ts +0 -139
- package/extensions/subagent/pi-spawn.ts +0 -101
- package/extensions/subagent/post-exit-stdio-guard.ts +0 -88
- package/extensions/subagent/prompt-template-bridge.ts +0 -400
- package/extensions/subagent/prompts/gather-context-and-clarify.md +0 -13
- package/extensions/subagent/prompts/parallel-cleanup.md +0 -42
- package/extensions/subagent/prompts/parallel-research.md +0 -50
- package/extensions/subagent/prompts/parallel-review.md +0 -40
- package/extensions/subagent/render-helpers.ts +0 -83
- package/extensions/subagent/render.ts +0 -908
- package/extensions/subagent/result-intercom.ts +0 -238
- package/extensions/subagent/result-watcher.ts +0 -172
- package/extensions/subagent/run-history.ts +0 -58
- package/extensions/subagent/run-status.ts +0 -137
- package/extensions/subagent/schemas.ts +0 -165
- package/extensions/subagent/session-tokens.ts +0 -51
- package/extensions/subagent/settings.ts +0 -368
- package/extensions/subagent/single-output.ts +0 -98
- package/extensions/subagent/skills.ts +0 -627
- package/extensions/subagent/slash-bridge.ts +0 -177
- package/extensions/subagent/slash-commands.ts +0 -304
- package/extensions/subagent/slash-live-state.ts +0 -295
- package/extensions/subagent/subagent-control.ts +0 -151
- package/extensions/subagent/subagent-executor.ts +0 -1915
- package/extensions/subagent/subagent-prompt-runtime.ts +0 -76
- package/extensions/subagent/subagent-runner.ts +0 -1471
- package/extensions/subagent/subagents-status.ts +0 -473
- package/extensions/subagent/text-editor.ts +0 -273
- package/extensions/subagent/throttle.ts +0 -77
- package/extensions/subagent/top-level-async.ts +0 -16
- package/extensions/subagent/types.ts +0 -624
- package/extensions/subagent/utils.ts +0 -457
- package/extensions/subagent/worktree.ts +0 -580
- package/extensions/super-pi-extension/agents/ce-oracle.md +0 -109
- package/extensions/super-pi-extension/agents/ce-planner.md +0 -116
- package/extensions/super-pi-extension/agents/ce-reviewer.md +0 -99
- package/extensions/super-pi-extension/agents/ce-scout.md +0 -80
- package/extensions/super-pi-extension/agents/ce-worker.md +0 -78
- package/extensions/super-pi-extension/chains/ce-parallel-review.chain.md +0 -34
- package/extensions/super-pi-extension/chains/ce-review-only.chain.md +0 -12
- package/extensions/super-pi-extension/chains/ce-standard.chain.md +0 -28
- package/extensions/super-pi-extension/index.ts +0 -129
- package/extensions/super-pi-extension/model-sync.ts +0 -204
- package/skills/08-status/SKILL.md +0 -41
- package/skills/08-status/references/artifact-locations.md +0 -10
- package/skills/10-rules/SKILL.md +0 -76
- package/skills/pi-subagents/SKILL.md +0 -566
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CE Model & Thinking Strategy Bridge
|
|
3
|
-
*
|
|
4
|
-
* 同步 super-pi 的 modelStrategy 和 thinkingStrategy 到 pi-subagents 的 agentOverrides
|
|
5
|
-
* 确保阶段模型和 thinking 等级自动应用到对应的 CE Agent
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as fs from "node:fs";
|
|
9
|
-
import * as path from "node:path";
|
|
10
|
-
import * as os from "node:os";
|
|
11
|
-
|
|
12
|
-
// CE Stage to Agent mapping
|
|
13
|
-
const STAGE_AGENT_MAP: Record<string, string[]> = {
|
|
14
|
-
"01-brainstorm": ["ce-scout", "ce-researcher"],
|
|
15
|
-
"02-plan": ["ce-planner"],
|
|
16
|
-
"03-work": ["ce-worker"],
|
|
17
|
-
"04-review": ["ce-reviewer"],
|
|
18
|
-
"05-learn": ["ce-oracle"],
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Default fallback
|
|
22
|
-
const DEFAULT_MODEL = "claude-sonnet-4-20250514";
|
|
23
|
-
const DEFAULT_THINKING = "medium";
|
|
24
|
-
|
|
25
|
-
export interface ModelStrategyConfig {
|
|
26
|
-
[stage: string]: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface ThinkingStrategyConfig {
|
|
30
|
-
[stage: string]: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface SubagentAgentOverride {
|
|
34
|
-
model?: string;
|
|
35
|
-
thinking?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface SubagentConfig {
|
|
39
|
-
agentOverrides?: Record<string, SubagentAgentOverride>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface Settings {
|
|
43
|
-
modelStrategy?: ModelStrategyConfig;
|
|
44
|
-
thinkingStrategy?: ThinkingStrategyConfig;
|
|
45
|
-
subagents?: SubagentConfig;
|
|
46
|
-
[key: string]: unknown;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Read settings from file
|
|
51
|
-
*/
|
|
52
|
-
export function readSettings(filePath: string): Settings {
|
|
53
|
-
if (!fs.existsSync(filePath)) return {};
|
|
54
|
-
try {
|
|
55
|
-
return JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
|
56
|
-
} catch {
|
|
57
|
-
return {};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Write settings to file
|
|
63
|
-
*/
|
|
64
|
-
export function writeSettings(filePath: string, settings: Settings): void {
|
|
65
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
66
|
-
fs.writeFileSync(filePath, JSON.stringify(settings, null, 2) + "\n", "utf-8");
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Sync modelStrategy and thinkingStrategy to subagents.agentOverrides
|
|
71
|
-
*
|
|
72
|
-
* This ensures that when pi-subagents runs a CE agent,
|
|
73
|
-
* it uses the model and thinking level configured for that stage.
|
|
74
|
-
*/
|
|
75
|
-
export function syncStrategiesToAgentOverrides(settings: Settings): Settings {
|
|
76
|
-
const modelStrategy = settings.modelStrategy;
|
|
77
|
-
const thinkingStrategy = settings.thinkingStrategy;
|
|
78
|
-
|
|
79
|
-
if (!modelStrategy && !thinkingStrategy) return settings;
|
|
80
|
-
|
|
81
|
-
// Initialize subagents if not present
|
|
82
|
-
const subagents = settings.subagents || { agentOverrides: {} };
|
|
83
|
-
const agentOverrides = subagents.agentOverrides || {};
|
|
84
|
-
|
|
85
|
-
// Build stage-based override for each agent
|
|
86
|
-
for (const [stage, agents] of Object.entries(STAGE_AGENT_MAP)) {
|
|
87
|
-
const model = modelStrategy?.[stage];
|
|
88
|
-
const thinking = thinkingStrategy?.[stage];
|
|
89
|
-
|
|
90
|
-
if (model || thinking) {
|
|
91
|
-
for (const agent of agents) {
|
|
92
|
-
agentOverrides[agent] = {
|
|
93
|
-
...agentOverrides[agent],
|
|
94
|
-
...(model ? { model } : {}),
|
|
95
|
-
...(thinking ? { thinking } : {}),
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
...settings,
|
|
103
|
-
subagents: {
|
|
104
|
-
...subagents,
|
|
105
|
-
agentOverrides,
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Get the effective model for a stage
|
|
112
|
-
*/
|
|
113
|
-
export function getStageModel(stage: string, settings: Settings): string {
|
|
114
|
-
if (settings.modelStrategy?.[stage]) {
|
|
115
|
-
return settings.modelStrategy[stage];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const agents = STAGE_AGENT_MAP[stage];
|
|
119
|
-
if (agents && settings.subagents?.agentOverrides) {
|
|
120
|
-
for (const agent of agents) {
|
|
121
|
-
const override = settings.subagents.agentOverrides[agent];
|
|
122
|
-
if (override?.model) {
|
|
123
|
-
return override.model;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return settings.modelStrategy?.default || DEFAULT_MODEL;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Get the effective thinking level for a stage
|
|
133
|
-
*/
|
|
134
|
-
export function getStageThinking(stage: string, settings: Settings): string {
|
|
135
|
-
if (settings.thinkingStrategy?.[stage]) {
|
|
136
|
-
return settings.thinkingStrategy[stage];
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const agents = STAGE_AGENT_MAP[stage];
|
|
140
|
-
if (agents && settings.subagents?.agentOverrides) {
|
|
141
|
-
for (const agent of agents) {
|
|
142
|
-
const override = settings.subagents.agentOverrides[agent];
|
|
143
|
-
if (override?.thinking) {
|
|
144
|
-
return override.thinking;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return DEFAULT_THINKING;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Auto-sync settings on startup
|
|
154
|
-
*/
|
|
155
|
-
export function autoSyncSettings(projectRoot?: string): { home: boolean; project: boolean } {
|
|
156
|
-
const homeSettingsPath = path.join(os.homedir(), ".pi", "agent", "settings.json");
|
|
157
|
-
const projectSettingsPath = projectRoot
|
|
158
|
-
? path.join(projectRoot, ".pi", "settings.json")
|
|
159
|
-
: null;
|
|
160
|
-
|
|
161
|
-
let homeSynced = false;
|
|
162
|
-
let projectSynced = false;
|
|
163
|
-
|
|
164
|
-
// Sync home settings
|
|
165
|
-
const homeSettings = readSettings(homeSettingsPath);
|
|
166
|
-
const syncedHome = syncStrategiesToAgentOverrides(homeSettings);
|
|
167
|
-
if (JSON.stringify(homeSettings) !== JSON.stringify(syncedHome)) {
|
|
168
|
-
writeSettings(homeSettingsPath, syncedHome);
|
|
169
|
-
homeSynced = true;
|
|
170
|
-
console.log("[super-pi-extension] Synced modelStrategy + thinkingStrategy to agentOverrides");
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// Sync project settings
|
|
174
|
-
if (projectSettingsPath && fs.existsSync(projectSettingsPath)) {
|
|
175
|
-
const projectSettings = readSettings(projectSettingsPath);
|
|
176
|
-
const syncedProject = syncStrategiesToAgentOverrides(projectSettings);
|
|
177
|
-
if (JSON.stringify(projectSettings) !== JSON.stringify(syncedProject)) {
|
|
178
|
-
writeSettings(projectSettingsPath, syncedProject);
|
|
179
|
-
projectSynced = true;
|
|
180
|
-
console.log("[super-pi-extension] Synced modelStrategy + thinkingStrategy (project)");
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return { home: homeSynced, project: projectSynced };
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* CLI helper to sync settings
|
|
189
|
-
*/
|
|
190
|
-
export function syncSettingsCli(): void {
|
|
191
|
-
const cwd = process.cwd();
|
|
192
|
-
const result = autoSyncSettings(cwd);
|
|
193
|
-
if (result.home || result.project) {
|
|
194
|
-
console.log("[super-pi-extension] Settings synced successfully");
|
|
195
|
-
} else {
|
|
196
|
-
console.log("[super-pi-extension] No settings needed syncing");
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// Run if called directly
|
|
201
|
-
const isMain = process.argv[1] && process.argv[1].endsWith("model-sync.ts");
|
|
202
|
-
if (isMain) {
|
|
203
|
-
syncSettingsCli();
|
|
204
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 08-status
|
|
3
|
-
description: Inspect repo-local workflow artifacts and recommend the next Compound Engineering step.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Status
|
|
7
|
-
|
|
8
|
-
Use this skill when the user wants to know the current state of the Compound Engineering workflow in this repository.
|
|
9
|
-
|
|
10
|
-
## What to scan
|
|
11
|
-
|
|
12
|
-
Use the `workflow_state` tool to get structured artifact state. It scans these repo-local locations:
|
|
13
|
-
|
|
14
|
-
- `docs/brainstorms/`
|
|
15
|
-
- `docs/plans/`
|
|
16
|
-
- `docs/solutions/`
|
|
17
|
-
- `.context/compound-engineering/`
|
|
18
|
-
|
|
19
|
-
Use the `session_history` tool to check recent CE skill executions and their outcomes.
|
|
20
|
-
|
|
21
|
-
If `workflow_state` is not available, fall back to `bash` with `ls` and `find` to check which directories and recent files exist, then use `read` on the most relevant recent artifact.
|
|
22
|
-
|
|
23
|
-
## Recommendation logic
|
|
24
|
-
|
|
25
|
-
- If there is no recent `docs/brainstorms/` artifact and the request is still ambiguous, recommend `01-brainstorm` next.
|
|
26
|
-
- If a recent brainstorm exists but there is no matching plan in `docs/plans/`, recommend `02-plan` next.
|
|
27
|
-
- If a recent plan exists and implementation appears incomplete, recommend `03-work` next.
|
|
28
|
-
- If code has changed after planning, recommend `04-review` next.
|
|
29
|
-
- If a problem was just solved and there is no matching learning in `docs/solutions/`, recommend `05-learn` next.
|
|
30
|
-
- If multiple artifacts exist, summarize them briefly and name the single best next step.
|
|
31
|
-
|
|
32
|
-
## Output format
|
|
33
|
-
|
|
34
|
-
Return:
|
|
35
|
-
|
|
36
|
-
- latest relevant brainstorm
|
|
37
|
-
- latest relevant plan
|
|
38
|
-
- latest relevant solution
|
|
39
|
-
- latest relevant runtime artifact under `.context/compound-engineering/`
|
|
40
|
-
- recommended next step
|
|
41
|
-
- why this is the next step
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Artifact Locations
|
|
2
|
-
|
|
3
|
-
| Artifact | Path |
|
|
4
|
-
|---|---|
|
|
5
|
-
| Brainstorm | `docs/brainstorms/` |
|
|
6
|
-
| Plan | `docs/plans/` |
|
|
7
|
-
| Solution | `docs/solutions/` |
|
|
8
|
-
| Runtime | `.context/compound-engineering/` |
|
|
9
|
-
|
|
10
|
-
Use `bash` with `ls` and `find` to scan these paths.
|
package/skills/10-rules/SKILL.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 10-rules
|
|
3
|
-
description: "Progressively load project coding rules on demand. Auto-triggered by plan, work, and review skills, or run manually with /skill:10-rules."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Rules
|
|
7
|
-
|
|
8
|
-
Rules are loaded from two locations with clear priority:
|
|
9
|
-
|
|
10
|
-
1. **Project-level** `{repo-root}/rules/` — if it exists, takes priority. Users maintain this themselves; survives `pi update`.
|
|
11
|
-
2. **Package-level** `rules/` in the super-pi package — built-in defaults, used when no project-level override exists.
|
|
12
|
-
|
|
13
|
-
Detection: check `{repo-root}/rules/` first. If a file exists at the project level for the topic being loaded, use it. Otherwise fall back to the package-level copy.
|
|
14
|
-
|
|
15
|
-
## Core rule
|
|
16
|
-
|
|
17
|
-
Do not load the entire rules tree by default. Read only the files needed for the current task.
|
|
18
|
-
|
|
19
|
-
## Pre-flight: what to load by phase
|
|
20
|
-
|
|
21
|
-
### Before planning (02-plan)
|
|
22
|
-
|
|
23
|
-
Read at minimum:
|
|
24
|
-
- `rules/common/development-workflow.md`
|
|
25
|
-
- `rules/common/testing.md`
|
|
26
|
-
- **Detect the active language** from the project: check for `tsconfig.json` → typescript, `package.json` (without tsconfig) → javascript, `Cargo.toml` → rust, `go.mod` → golang, `pubspec.yaml` → dart, `pom.xml`/`build.gradle` → java, `*.sln`/`*.csproj` → csharp, `Package.swift` → swift, `requirements.txt`/`pyproject.toml`/`setup.py` → python, `composer.json` → php, `Makefile.PL`/`cpanfile` → perl, `build.gradle.kts` → kotlin. Load all files in the matching language directory (e.g. `rules/typescript/`).
|
|
27
|
-
- `rules/web/` files if the task involves frontend/browser concerns
|
|
28
|
-
|
|
29
|
-
### Before implementation (03-work)
|
|
30
|
-
|
|
31
|
-
Read the common minimum above, plus:
|
|
32
|
-
- **Detect the active language** from the project: check for `tsconfig.json` → typescript, `package.json` (without tsconfig) → javascript, `Cargo.toml` → rust, `go.mod` → golang, `pubspec.yaml` → dart, `pom.xml`/`build.gradle` → java, `*.sln`/`*.csproj` → csharp, `Package.swift` → swift, `requirements.txt`/`pyproject.toml`/`setup.py` → python, `composer.json` → php, `Makefile.PL`/`cpanfile` → perl, `build.gradle.kts` → kotlin. Load all files in the matching language directory.
|
|
33
|
-
- `rules/web/` files if the task involves frontend/browser concerns
|
|
34
|
-
|
|
35
|
-
### Before review (04-review)
|
|
36
|
-
|
|
37
|
-
Read at minimum:
|
|
38
|
-
- `rules/common/code-review.md`
|
|
39
|
-
- **Detect the active language** from the changed files: use the same language detection as above. Load all files in the matching language directory.
|
|
40
|
-
- `rules/web/` files if the review involves frontend/browser changes
|
|
41
|
-
|
|
42
|
-
## Progressive loading order
|
|
43
|
-
|
|
44
|
-
1. **Workflow** — `common/development-workflow.md`
|
|
45
|
-
2. **Testing/TDD** — `common/testing.md`
|
|
46
|
-
3. **Scenario** — `web/*` only if frontend is relevant
|
|
47
|
-
4. **Language** — matching language directory only
|
|
48
|
-
5. **Additional** — security, performance, patterns, hooks, coding-style — only when the task calls for it
|
|
49
|
-
|
|
50
|
-
## Rule precedence
|
|
51
|
-
|
|
52
|
-
When the same topic exists at multiple layers, higher priority wins:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
language-specific > web > common
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Override mapping by topic:
|
|
59
|
-
- `common/testing.md` ← `web/testing.md` ← `<lang>/testing.md`
|
|
60
|
-
- `common/coding-style.md` ← `web/coding-style.md` ← `<lang>/coding-style.md`
|
|
61
|
-
- `common/patterns.md` ← `web/patterns.md` ← `<lang>/patterns.md`
|
|
62
|
-
- `common/security.md` ← `web/security.md` ← `<lang>/security.md`
|
|
63
|
-
- `common/hooks.md` ← `web/hooks.md` ← `<lang>/hooks.md`
|
|
64
|
-
|
|
65
|
-
## Available layers
|
|
66
|
-
|
|
67
|
-
- `common/` — always relevant baseline (10 files)
|
|
68
|
-
- `typescript/`, `python/`, `cpp/`, `csharp/`, `dart/`, `golang/`, `java/`, `kotlin/`, `perl/`, `php/`, `rust/`, `swift/` — language-specific overrides (5 files each)
|
|
69
|
-
- `web/` — frontend/web scenario (7 files, includes additive-only `design-quality.md` and `performance.md`)
|
|
70
|
-
|
|
71
|
-
## Output expectation
|
|
72
|
-
|
|
73
|
-
When rules are loaded, state briefly:
|
|
74
|
-
- which rule files were loaded
|
|
75
|
-
- which are acting as overrides
|
|
76
|
-
- what constraints they impose on the current task
|