@sangyaahub/pi-marg 1.0.5 → 1.0.7
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/.omp-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +11 -0
- package/MODEL-SETUP.md +4 -4
- package/README.md +9 -3
- package/adapters/omp/extensions/model-router.ts +243 -59
- package/adapters/omp/extensions/provider-setup.ts +177 -0
- package/adapters/pi/extensions/model-router.ts +13 -4
- package/adapters/pi/prompts/auto-models.md +2 -2
- package/agents/auto-intake.md +2 -2
- package/commands/auto-models.md +2 -2
- package/core/model-routing.ts +133 -1
- package/core/provider-config.ts +142 -0
- package/core/user-route.ts +100 -0
- package/package.json +1 -1
- package/rules/auto-mode.md +1 -0
- package/scripts/install.sh +1 -1
- package/scripts/validate.sh +1 -1
- package/skills/auto-mode-router/SKILL.md +1 -1
- package/skills/auto-mode-router/references/intake-and-state.md +30 -17
package/package.json
CHANGED
package/rules/auto-mode.md
CHANGED
|
@@ -10,6 +10,7 @@ For every new substantive user task, load and follow the `auto-mode-router` skil
|
|
|
10
10
|
- Do not restart intake for acknowledgements, clarifications, approval replies, or follow-ups that belong to the active task.
|
|
11
11
|
- If the conversation already contains an active Auto Mode session record, reuse it. Start a new intake only when the user starts a materially different task or invokes `/auto-reset`.
|
|
12
12
|
- The first intake question is always whether the work is for a job/client or personal.
|
|
13
|
+
- Ask work context, work type, and skill mode through the host selection tool (`ask` on OMP). One stage at a time. Do not ask the user to type a number.
|
|
13
14
|
- Confirm one of work types 1–7, then confirm skill mode 1–4 before execution.
|
|
14
15
|
- After skill mode, use the live `auto_model_route` catalog and record required A/B/C/D choices. A and C must use different underlying models; B and D must use different underlying models.
|
|
15
16
|
- Activate the saved model before each A/B/C/D stage. Never guess or pin a version absent from the active Pi or OMP registry.
|
package/scripts/install.sh
CHANGED
|
@@ -71,4 +71,4 @@ if [[ "${runtime}" == "omp" || "${runtime}" == "both" ]]; then
|
|
|
71
71
|
omp plugin install --scope user pi-marg@pi-marg-marketplace
|
|
72
72
|
fi
|
|
73
73
|
|
|
74
|
-
echo "PiMarg v1.0.
|
|
74
|
+
echo "PiMarg v1.0.6 installed for ${runtime}. Start a fresh runtime session, then run /pi-marg."
|
package/scripts/validate.sh
CHANGED
|
@@ -45,7 +45,7 @@ bun -e '
|
|
|
45
45
|
const packageJson = await Bun.file("package.json").json();
|
|
46
46
|
const marketplace = await Bun.file(".omp-plugin/marketplace.json").json();
|
|
47
47
|
if (packageJson.name !== "@sangyaahub/pi-marg") throw new Error("Unexpected package name");
|
|
48
|
-
if (packageJson.version !== "1.0.
|
|
48
|
+
if (packageJson.version !== "1.0.7") throw new Error("package.json must be v1.0.7");
|
|
49
49
|
if (packageJson.license !== "MIT") throw new Error("package.json must declare MIT");
|
|
50
50
|
if (packageJson.author !== "Sangyaa") throw new Error("Unexpected package author");
|
|
51
51
|
if (!packageJson.keywords?.includes("pi-package")) throw new Error("Pi catalog keyword is missing");
|
|
@@ -7,7 +7,7 @@ description: Classify a new work request, select one development-method skill sp
|
|
|
7
7
|
|
|
8
8
|
Turn a user request into one controlled workflow.
|
|
9
9
|
|
|
10
|
-
1. Read [intake-and-state.md](references/intake-and-state.md) and complete the intake stages in order.
|
|
10
|
+
1. Read [intake-and-state.md](references/intake-and-state.md) and complete the intake stages in order. Ask work context, work type, and skill mode with the host selection tool, one stage at a time.
|
|
11
11
|
2. After the user selects mode 1–4, read [routing-matrix.md](references/routing-matrix.md) and select exactly one primary skill spine.
|
|
12
12
|
3. Read [session-ledger.md](references/session-ledger.md), create the neutral Markdown ledger, and identify the selected spine's authoritative planning artifact.
|
|
13
13
|
4. Read [models-and-tools.md](references/models-and-tools.md). Call `auto_model_route` with `action: catalog` and the confirmed work type, present the live choices, and save each required A/B/C/D selection. The runtime rejects A=C and B=D. Then save two distinct runtime-only recovery models with `action: select_fallback`: high first, low second.
|
|
@@ -16,16 +16,24 @@ CONTEXT ─► TYPE ─► SKILL MODE ─► MODELS ─► RUNTIME ─► ADD-ON
|
|
|
16
16
|
|
|
17
17
|
Ask one intake stage at a time. A clear user prompt can support a proposed classification, but it does not remove the required confirmation.
|
|
18
18
|
|
|
19
|
+
## How to ask
|
|
20
|
+
|
|
21
|
+
Stages 1–3 are selection questions. Call the host's blocking question tool when that tool is already in the current tool list. On OMP the tool is `ask`. Elsewhere, use the listed equivalent (`AskUserQuestion`, `ask_user_question`, or `vscode_askquestions`). Do not probe for a tool that is not listed.
|
|
22
|
+
|
|
23
|
+
Put each choice in `options` as a short label with no leading number. Set `recommended` to the inferred option when the tool accepts it. Then stop and wait. Do not print the choices as a numbered chat list, and do not ask for a typed number or a combined reply such as `2 / 7 / 4`.
|
|
24
|
+
|
|
25
|
+
Work type has seven options. Pass all seven in that one question. The ask tool's usual "2–5 options" note is for ordinary clarifications; it does not apply to this fixed list, and it is not a reason to drop a type or switch to typed numbers.
|
|
26
|
+
|
|
27
|
+
If no question tool is listed, or a real call returns an error, render one numbered list in chat and accept the number. The live model catalog in stage 4 always uses that numbered path, because a full provider or model list does not fit the selection UI.
|
|
28
|
+
|
|
19
29
|
## Stage 1 — work context
|
|
20
30
|
|
|
21
|
-
Ask
|
|
31
|
+
Ask with the question tool:
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
> 1. Job/client
|
|
26
|
-
> 2. Personal
|
|
33
|
+
- Question: Is this for your job/client, or is it personal work?
|
|
34
|
+
- Options: `Job/client`, `Personal`
|
|
27
35
|
|
|
28
|
-
Record exactly one canonical value (`job-client` or `personal`)
|
|
36
|
+
Record exactly one canonical value (`job-client` or `personal`):
|
|
29
37
|
|
|
30
38
|
- `job-client`: Do not add Sangyaa branding, name, logo, metadata, footer, or promotional language. Use the employer/client/project brand already in scope.
|
|
31
39
|
- `personal`: Existing project branding wins. Sangyaa branding is opt-in, never automatic.
|
|
@@ -34,23 +42,26 @@ Do not start code, research, or planning before this answer unless the user is a
|
|
|
34
42
|
|
|
35
43
|
## Stage 2 — work type
|
|
36
44
|
|
|
37
|
-
Infer the most likely type,
|
|
45
|
+
Infer the most likely type, name it in the question, mark that option recommended, and ask with the question tool. If ambiguous, show only the relevant choices. These labels are the options; the number is the recorded type id, not a chat prefix.
|
|
38
46
|
|
|
39
|
-
1. New idea or development from scratch
|
|
40
|
-
2. New feature for an existing repository
|
|
41
|
-
3. Improve an existing feature in an existing repository
|
|
42
|
-
4. Proactive bug discovery or bug fix in an existing repository
|
|
43
|
-
5. Security review or security fixes
|
|
44
|
-
6. Thoughts, explanation, or another question about an existing repository or feature
|
|
45
|
-
7. Business, sales, or other non-technical analysis
|
|
47
|
+
1. `New idea or development from scratch` — brainstorming and analysis.
|
|
48
|
+
2. `New feature for an existing repository`
|
|
49
|
+
3. `Improve an existing feature in an existing repository`
|
|
50
|
+
4. `Proactive bug discovery or bug fix in an existing repository`
|
|
51
|
+
5. `Security review or security fixes`
|
|
52
|
+
6. `Thoughts, explanation, or another question about an existing repository or feature`
|
|
53
|
+
7. `Business, sales, or other non-technical analysis`
|
|
46
54
|
|
|
47
55
|
If one request contains multiple types, pick the type that owns the immediate outcome and record later types as follow-on phases. Do not open multiple workflow spines.
|
|
48
56
|
|
|
49
57
|
## Stage 3 — skill mode
|
|
50
58
|
|
|
51
|
-
Ask:
|
|
59
|
+
Ask with the question tool. Question: Which method should own this task? Options:
|
|
52
60
|
|
|
53
|
-
|
|
61
|
+
1. `Compound Engineering`
|
|
62
|
+
2. `Superpowers`
|
|
63
|
+
3. `GSD Core`
|
|
64
|
+
4. `Choose the best one for me`
|
|
54
65
|
|
|
55
66
|
- Mode 1: use the Compound Engineering mapping for the confirmed work type.
|
|
56
67
|
- Mode 2: use the Superpowers mapping.
|
|
@@ -65,7 +76,7 @@ Catalog presentation is provider-first:
|
|
|
65
76
|
|
|
66
77
|
1. Show **every** authenticated provider as numbered options `1.`, `2.`, … (including Devin when present). Never omit a logged-in provider and never curate down to Claude/Codex/Cursor only.
|
|
67
78
|
2. After the user picks a provider, call `auto_model_route` again with the same work type and `provider=<name>` so the tool lists **every** model for that provider as numbered `1.`, `2.`, …
|
|
68
|
-
3. Ask
|
|
79
|
+
3. Ask in chat with those numbered labels, and accept the number or the exact selector. Do not put a full provider or model list into the selection tool; it truncates and hides logged-in providers.
|
|
69
80
|
|
|
70
81
|
Interactive `/pi-marg` uses the same provider → model two-step with numbered labels.
|
|
71
82
|
|
|
@@ -125,6 +136,8 @@ ledger: <path>
|
|
|
125
136
|
|
|
126
137
|
Reuse this state for normal follow-ups. Start over only when the user explicitly resets it or introduces a materially different outcome.
|
|
127
138
|
|
|
139
|
+
The v2 model route persists `boundary` (`Job/client` or `Personal`) and `skillMode` with the A/B/C/D selectors and backups. Reopening `/pi-marg` highlights those saved values. The conversational `context:` and `mode:` lines above are the same facts in the ledger's shorthand; they are not a second configuration store.
|
|
140
|
+
|
|
128
141
|
## Availability check
|
|
129
142
|
|
|
130
143
|
Before declaring the task ready:
|