@sangyaahub/pi-marg 1.0.8 → 1.0.9

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.
@@ -7,14 +7,14 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "PiMarg — a governed development path for Pi Agent and Oh My Pi.",
10
- "version": "1.0.8"
10
+ "version": "1.0.9"
11
11
  },
12
12
  "plugins": [
13
13
  {
14
14
  "name": "pi-marg",
15
15
  "description": "Intent-led development workflow with live A/B/C/D routing, capability detection, verification, and approval gates.",
16
16
  "source": "./",
17
- "version": "1.0.8",
17
+ "version": "1.0.9",
18
18
  "author": {
19
19
  "name": "Sangyaa",
20
20
  "email": "contact@sangyaa.co"
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Changelog
2
+ ## 1.0.9 — 2026-11-13
3
+
4
+ - Added Elephant-Goldfish Model (EGM) as workflow skill 4 in `/pi-marg` intake; "PiMarg chooses the best available skill" is now 5, so a saved route that held the old option 4 loses its highlight once and is otherwise unaffected. EGM routes work types 1, 2, 3, 6, and 7 through `egm-brainstorm`, `egm-draft`, `egm-review`/`egm-review-loop`, and `egm-drift-report`, and requires the `egm` plugin plus the `task` tool for fresh-context Goldfish review. It has no debugging or security route, so types 4 and 5 fall back to another spine.
5
+
2
6
  ## 1.0.8 — 2026-10-26
3
7
 
4
8
  - A provider reporting 95% usage pauses while its stage context is kept. The saved high then low backup resumes the stage only when it is a different provider, fits the same stage, and is itself under 95%. Hard quota errors keep the existing failover.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/sangyaahub/pi-marg/releases"><img alt="Version 1.0.8" src="https://img.shields.io/badge/version-1.0.8-0451F7"></a>
6
+ <a href="https://github.com/sangyaahub/pi-marg/releases"><img alt="Version 1.0.9" src="https://img.shields.io/badge/version-1.0.9-0451F7"></a>
7
7
  <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-C27B1A"></a>
8
8
  <a href="https://pi.dev/packages?name=pi-marg"><img alt="Pi package" src="https://img.shields.io/badge/Pi-package-0338A8"></a>
9
9
  <a href="https://omp.sh"><img alt="Oh My Pi plugin" src="https://img.shields.io/badge/OMP-plugin-021E5C"></a>
@@ -11,7 +11,7 @@
11
11
 
12
12
  # PiMarg
13
13
 
14
- **Version 1.0.8 · MIT licensed · Pi Agent + Oh My Pi · by [Sangyaa](https://sangyaa.co)**
14
+ **Version 1.0.9 · MIT licensed · Pi Agent + Oh My Pi · by [Sangyaa](https://sangyaa.co)**
15
15
 
16
16
  PiMarg turns an ordinary prompt into a governed development path. It identifies the work boundary, selects one engineering method, discovers the models and tools the active runtime really provides, separates thinking from execution, records evidence, and stops before protected actions.
17
17
 
@@ -41,7 +41,7 @@ The same model-selection and approval logic lives in `core/`. Runtime-specific c
41
41
 
42
42
  - Confirms job/client versus personal work; job/client mode suppresses Sangyaa branding by default.
43
43
  - Routes seven work types: idea, new feature, improvement, proactive bug fix, security, repository analysis, and business/sales analysis.
44
- - Uses one primary Compound Engineering, Superpowers, GSD Core, or automatically selected workflow spine.
44
+ - Uses one primary Compound Engineering, Superpowers, GSD Core, Elephant-Goldfish Model (EGM), or automatically selected workflow spine.
45
45
  - Shows every current authenticated and enabled model, ranking the best fit for each stage first instead of pinning dated model names.
46
46
  - Enforces that A and C use different underlying models, and B and D use different underlying models.
47
47
  - Uses CodeGraph for repository architecture and impact when available, with LSP/AST or repository-native tools for exact code questions.
@@ -54,7 +54,8 @@ const SKILL_MODES = [
54
54
  "1. Compound Engineering",
55
55
  "2. Superpowers",
56
56
  "3. GSD Core",
57
- "4. PiMarg chooses the best available skill",
57
+ "4. Elephant-Goldfish Model (EGM)",
58
+ "5. PiMarg chooses the best available skill",
58
59
  ] as const;
59
60
 
60
61
  const STAGE_PURPOSE: Record<AutoStage, string> = {
@@ -94,6 +95,7 @@ const SKILL_MODE_ITEMS = [
94
95
  "Compound Engineering",
95
96
  "Superpowers",
96
97
  "GSD Core",
98
+ "Elephant-Goldfish Model (EGM)",
97
99
  "PiMarg chooses the best available skill",
98
100
  ] as const;
99
101
 
@@ -1,3 +1,3 @@
1
1
  export const UNIVERSAL_WORKFLOW_POLICY = `PiMarg is active.
2
2
 
3
- For each new substantive request, load and follow the auto-mode-router skill before solution work. Infer the likely intent first; confirm or ask only for missing choices that materially change the route. Establish job/client versus personal context, classify one of the seven work types, choose a dedicated skill spine or Option 4, discover live model choices, and enforce A different from C plus B different from D. Resume an active session for ordinary follow-ups instead of restarting intake. Keep the Markdown plan, decisions, evidence, and one session lesson. Use CodeGraph first for repository-wide architecture and impact when available. Never bypass PiMarg protected-action approvals.`;
3
+ For each new substantive request, load and follow the auto-mode-router skill before solution work. Infer the likely intent first; confirm or ask only for missing choices that materially change the route. Establish job/client versus personal context, classify one of the seven work types, choose a dedicated skill spine or Option 5, discover live model choices, and enforce A different from C plus B different from D. Resume an active session for ordinary follow-ups instead of restarting intake. Keep the Markdown plan, decisions, evidence, and one session lesson. Use CodeGraph first for repository-wide architecture and impact when available. Never bypass PiMarg protected-action approvals.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sangyaahub/pi-marg",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A governed, model-routed development path for Pi Agent and Oh My Pi.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@ For every new substantive user task, load and follow the `auto-mode-router` skil
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
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.
14
- - Confirm one of work types 1–7, then confirm skill mode 1–4 before execution.
14
+ - Confirm one of work types 1–7, then confirm skill mode 1–5 before execution.
15
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.
16
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.
17
17
  - Call `auto_runtime_status` during intake and route only through capabilities it reports available.
@@ -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.8 installed for ${runtime}. Start a fresh runtime session, then run /pi-marg."
74
+ echo "PiMarg v1.0.9 installed for ${runtime}. Start a fresh runtime session, then run /pi-marg."
@@ -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.8") throw new Error("package.json must be v1.0.8");
48
+ if (packageJson.version !== "1.0.9") throw new Error("package.json must be v1.0.9");
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");
@@ -12,4 +12,4 @@ Load only the reference needed for the active task:
12
12
  - For Go, Python, or TypeScript guidance, read [language-skills.md](references/language-skills.md).
13
13
  - For model and token budget decisions, read [cost-control.md](references/cost-control.md).
14
14
 
15
- An add-on supplies constraints, memory, or evidence. The primary Compound Engineering, Superpowers, or GSD spine still owns task state and the authoritative plan. Verify the upstream capability is installed and discovered before saying it ran.
15
+ An add-on supplies constraints, memory, or evidence. The primary Compound Engineering, Superpowers, GSD, or EGM spine still owns task state and the authoritative plan. Verify the upstream capability is installed and discovered before saying it ran.
@@ -8,7 +8,7 @@ description: Classify a new work request, select one development-method skill sp
8
8
  Turn a user request into one controlled workflow.
9
9
 
10
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
- 2. After the user selects mode 1–4, read [routing-matrix.md](references/routing-matrix.md) and select exactly one primary skill spine.
11
+ 2. After the user selects mode 1–5, 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.
14
14
  5. Call `auto_runtime_status`. If it reports `OMP`, read [native-omp-runtime.md](references/native-omp-runtime.md); if it reports `Pi`, read [native-pi-runtime.md](references/native-pi-runtime.md). Record which advisor, task, review, checkpoint/rewind, code-intelligence, debugger, browser/desktop, security, and memory routes are actually available.
@@ -61,12 +61,14 @@ Ask with the question tool. Question: Which method should own this task? Options
61
61
  1. `Compound Engineering`
62
62
  2. `Superpowers`
63
63
  3. `GSD Core`
64
- 4. `Choose the best one for me`
64
+ 4. `Elephant-Goldfish Model (EGM)`
65
+ 5. `Choose the best one for me`
65
66
 
66
67
  - Mode 1: use the Compound Engineering mapping for the confirmed work type.
67
68
  - Mode 2: use the Superpowers mapping.
68
69
  - Mode 3: first verify that GSD skills and their required tools are available in the active runtime. If not, explain the incompatibility and offer a supported alternative.
69
- - Mode 4: choose one primary spine using the routing criteria. Explain the choice in one short sentence and ask for confirmation only if the trade-off is material.
70
+ - Mode 4: EGM is a spec-first spine: the Elephant (this session) drafts the design and fresh-context Goldfish reviewers audit it. First verify that `skill://egm-brainstorm` resolves and that `auto_runtime_status` reports `task`; a review in the same context is not a Goldfish review, so without `task` explain the gap and offer a supported alternative. EGM has no debugging or security route, so for work types 4 and 5 offer a supported alternative instead of forcing it. EGM skills set `disable-model-invocation`, so load them by reading `skill://egm-<name>`; the user can also run `/skill:egm-<name>` on OMP.
71
+ - Mode 5: choose one primary spine using the routing criteria. Explain the choice in one short sentence and ask for confirmation only if the trade-off is material.
70
72
 
71
73
  ## Stage 4 — live model choices
72
74
 
@@ -119,8 +121,8 @@ After intake, emit a compact conversational state block and save the same facts
119
121
  [AUTO-MODE]
120
122
  context: job-client | personal
121
123
  type: 1..7
122
- mode: 1..4
123
- spine: compound-engineering | superpowers | gsd | none
124
+ mode: 1..5
125
+ spine: compound-engineering | superpowers | gsd | egm | none
124
126
  models: A=<selector> B=<selector|n/a> C=<selector> D=<selector|n/a>
125
127
  fallbacks: high=<runtime-selector> low=<different-runtime-selector> active=<none|high|low|exhausted>
126
128
  runtime: advisor=<off|available|on|unavailable> orchestration=<serial|task|workflowz> checkpoint=<off|available|used>
@@ -27,8 +27,9 @@ Activate the saved stage model immediately before its stage. A and C must differ
27
27
  | Compound Engineering | `ce-brainstorm`; then `ce-plan` only when the user moves from requirements to implementation |
28
28
  | Superpowers | `brainstorming`; then `writing-plans` after design approval |
29
29
  | GSD | `gsd-ideate` for exploration, `gsd-spike` for feasibility, or `gsd-project` for a new multi-phase project |
30
+ | EGM | `egm-brainstorm` → `egm-draft` when the user moves from the concepts brief to a design → `egm-review` on the draft before any implementation |
30
31
 
31
- Option 4 default: Compound Engineering for broad product framing; Superpowers for a focused design that will become code soon; GSD for a technical spike or a multi-milestone product.
32
+ Option 5 default: Compound Engineering for broad product framing; Superpowers for a focused design that will become code soon; GSD for a technical spike or a multi-milestone product; EGM when the idea needs a Goldfish-reviewed design document before any code.
32
33
 
33
34
  ## 2 — New feature in an existing repository
34
35
 
@@ -37,8 +38,9 @@ Option 4 default: Compound Engineering for broad product framing; Superpowers fo
37
38
  | Compound Engineering | `ce-brainstorm` when requirements are unclear → `ce-plan` → `ce-work` → `ce-code-review` → `session-lessons`/`ce-compound` when warranted |
38
39
  | Superpowers | `brainstorming` → `using-git-worktrees` when isolation helps → `writing-plans` → `test-driven-development` → `subagent-driven-development` or `executing-plans` → `requesting-code-review` → `finishing-a-development-branch` |
39
40
  | GSD | `gsd-context`/onboard → `gsd-workflow` discuss → plan → execute → verify; `gsd-manage` ship only after approval |
41
+ | EGM | `egm-brainstorm` → `egm-draft` → `egm-review` (or `egm-review-loop` for chosen reviewers and standards) → user approves `design_draft.md` → B implements against it → verification → `egm-drift-report` → D |
40
42
 
41
- Option 4 default: Compound Engineering for one cohesive feature; Superpowers when strict TDD and task-by-task review are the dominant need; GSD for a large feature spanning phases or milestones.
43
+ Option 5 default: Compound Engineering for one cohesive feature; Superpowers when strict TDD and task-by-task review are the dominant need; GSD for a large feature spanning phases or milestones; EGM when design trade-offs need fresh-context review before coding.
42
44
 
43
45
  ## 3 — Improve an existing feature
44
46
 
@@ -47,8 +49,9 @@ Option 4 default: Compound Engineering for one cohesive feature; Superpowers whe
47
49
  | Compound Engineering | `ce-optimize` for a measurable outcome, `ce-polish` for live UX refinement, or `ce-simplify-code` for settled code; finish with `ce-code-review` |
48
50
  | Superpowers | `brainstorming` for the desired behavior → `writing-plans` → `test-driven-development` → execution and review skills |
49
51
  | GSD | `gsd-context` → `gsd-workflow` for a scoped phase → `gsd-quality` verification/review |
52
+ | EGM | `egm-brainstorm` for the desired behavior → `egm-draft` of the change → `egm-review` → B implements → verification → `egm-drift-report` → D |
50
53
 
51
- Option 4 default: Compound Engineering, because its polish, optimize, and simplify paths are specialized for improvement work.
54
+ Option 5 default: Compound Engineering, because its polish, optimize, and simplify paths are specialized for improvement work.
52
55
 
53
56
  ## 4 — Proactive bug discovery or bug fix
54
57
 
@@ -57,8 +60,9 @@ Option 4 default: Compound Engineering, because its polish, optimize, and simpli
57
60
  | Compound Engineering | `ce-dogfood` for browser-flow discovery, `ce-code-review` for code-level discovery, then `ce-debug` for root-cause repair and regression evidence |
58
61
  | Superpowers | `systematic-debugging` → `test-driven-development` for the regression barrier → `verification-before-completion` → `requesting-code-review` |
59
62
  | GSD | `gsd-quality` to route audit/debug/fix work, then `gsd-workflow` plan/execute/verify when the fix is non-trivial |
63
+ | EGM | No debugging route. Offer another spine; use `egm-review` only on a written fix plan the user asks to have reviewed |
60
64
 
61
- Option 4 default: Compound Engineering for proactive discovery across user flows; Superpowers for a known reproducible defect; GSD for a bug program spanning several components. Do not let a discovery skill and a fix skill create separate competing plans.
65
+ Option 5 default: Compound Engineering for proactive discovery across user flows; Superpowers for a known reproducible defect; GSD for a bug program spanning several components. Do not let a discovery skill and a fix skill create separate competing plans.
62
66
 
63
67
  ## 5 — Security review or fixes
64
68
 
@@ -67,8 +71,9 @@ Option 4 default: Compound Engineering for proactive discovery across user flows
67
71
  | Compound Engineering | `ce-code-review` plus the read-only `auto-security-reviewer` and repository-native security tools; use `ce-debug` or `ce-work` only after findings are validated |
68
72
  | Superpowers | `systematic-debugging` and TDD can implement a validated fix, but Superpowers is not a complete security-audit framework; add `auto-security-reviewer` and scanners |
69
73
  | GSD | `gsd-quality` security/audit route → validate findings → plan fixes → execute → verify |
74
+ | EGM | No security-audit route. Offer another spine; `egm-review` may review a written fix design but never replaces `auto-security-reviewer` or scanners |
70
75
 
71
- Option 4 default: GSD when its security skills are available and compatible. Otherwise use the detected security reviewer plus repository-native scanners, with Compound Engineering owning the plan and fix. For high-risk auth, secrets, money, personal data, or public-contract changes, use an independent second model family for review.
76
+ Option 5 default: GSD when its security skills are available and compatible. Otherwise use the detected security reviewer plus repository-native scanners, with Compound Engineering owning the plan and fix. For high-risk auth, secrets, money, personal data, or public-contract changes, use an independent second model family for review.
72
77
 
73
78
  ## 6 — Thoughts about an existing repository or feature
74
79
 
@@ -77,8 +82,9 @@ Option 4 default: GSD when its security skills are available and compatible. Oth
77
82
  | Compound Engineering | `ce-pov` for a decisive assessment, `ce-explain` for teaching, or `ce-ideate` for grounded improvements |
78
83
  | Superpowers | `brainstorming` when the question should end in a proposed design; otherwise answer with read-only repository evidence |
79
84
  | GSD | `gsd-context` to map facts, then the appropriate read-only context or ideation route |
85
+ | EGM | `egm-review` of an existing design document or README against the live code; `egm-drift-report` for doc/code divergence; `egm-bootstrap` writes README files, so run it only when the user asks |
80
86
 
81
- Option 4 default: Compound Engineering for opinion or explanation; GSD for large-repository fact gathering.
87
+ Option 5 default: Compound Engineering for opinion or explanation; GSD for large-repository fact gathering; EGM for design-document review or doc/code drift.
82
88
 
83
89
  ## 7 — Business, sales, or other non-technical analysis
84
90
 
@@ -87,8 +93,24 @@ Option 4 default: Compound Engineering for opinion or explanation; GSD for large
87
93
  | Compound Engineering | `ce-strategy`, `ce-pov`, or `ce-ideate`, depending on whether the output is a strategy, judgment, or option set |
88
94
  | Superpowers | No default business/sales spine. Use it only if a specifically relevant installed skill exists. |
89
95
  | GSD | No default business/sales spine. Do not force a software phase workflow onto non-technical analysis. |
96
+ | EGM | `egm-review-loop` with reviewers and standards chosen for the document. EGM's built-in standards target software specifications, so there is no default business/sales route. |
90
97
 
91
- Option 4 default: Compound Engineering or a dedicated business/marketing/sales skill. Use web research when current market facts matter. Any publication, message, CRM write, social post, or external comment requires `post-web` approval.
98
+ Option 5 default: Compound Engineering or a dedicated business/marketing/sales skill. Use web research when current market facts matter. Any publication, message, CRM write, social post, or external comment requires `post-web` approval.
99
+
100
+ ## EGM stage mapping
101
+
102
+ EGM drafts and reviews documents; it does not implement code. The A/B/C/D sequence stays and maps as:
103
+
104
+ | Stage | EGM work |
105
+ |---|---|
106
+ | A | Elephant: `egm-brainstorm` and `egm-draft`, producing `concepts_brief.md` and `design_draft.md` |
107
+ | C | Goldfish plan review: `egm-review` or `egm-review-loop` on the draft. Reviewers run as fresh-context `task` subagents; without `task`, stop rather than review in the same context |
108
+ | B | Implement the user-approved design. EGM supplies no build route |
109
+ | D | Code second-eye, with `egm-drift-report` output as evidence |
110
+
111
+ - The authoritative plan is the approved design document (`design_draft.md`, saved under `docs/designs/` when the repository uses that folder). The neutral `plan.md` only indexes it.
112
+ - The plan gate is the user's approval of the design after Goldfish findings are resolved.
113
+ - EGM skills write artifacts to the working directory; record those paths in the session ledger.
92
114
 
93
115
  ## Spine ownership rules
94
116
 
@@ -24,6 +24,7 @@ The selected workflow family's native plan remains authoritative:
24
24
  - Compound Engineering: its generated brainstorm/plan document.
25
25
  - Superpowers: its generated design/implementation plan.
26
26
  - GSD: `.planning/` state and phase plans.
27
+ - EGM: the approved design document (`design_draft.md`, preceded by `concepts_brief.md`).
27
28
  - No technical spine: `plan.md` in the neutral session folder.
28
29
 
29
30
  The neutral `plan.md` is an index when a native plan exists. It records the goal, acceptance criteria, current phase, and a link/path to the authoritative plan; it does not duplicate the full plan.
@@ -39,8 +40,8 @@ Record:
39
40
  - Work context: job-client | personal
40
41
  - Branding: client-project-only | existing-project-opt-in
41
42
  - Work type: 1..7 — <label>
42
- - Skill mode: 1..4
43
- - Primary spine: compound-engineering | superpowers | gsd | none
43
+ - Skill mode: 1..5
44
+ - Primary spine: compound-engineering | superpowers | gsd | egm | none
44
45
  - Current phase: intake | analysis | plan | build | verify | review | security | lessons | commit
45
46
  - Authoritative plan: <path or none>
46
47
  - Stage A model: <exact live selector>