omni-pi 0.1.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/CREDITS.md +28 -0
- package/LICENSE +21 -0
- package/README.md +81 -0
- package/agents/brain.md +24 -0
- package/agents/expert.md +21 -0
- package/agents/planner.md +22 -0
- package/agents/worker.md +21 -0
- package/bin/omni.js +79 -0
- package/extensions/omni-core/index.ts +22 -0
- package/extensions/omni-memory/index.ts +72 -0
- package/extensions/omni-skills/index.ts +11 -0
- package/extensions/omni-status/index.ts +11 -0
- package/package.json +75 -0
- package/prompts/brainstorm.md +15 -0
- package/prompts/spec-template.md +14 -0
- package/prompts/task-template.md +16 -0
- package/skills/omni-escalation/SKILL.md +17 -0
- package/skills/omni-execution/SKILL.md +18 -0
- package/skills/omni-init/SKILL.md +19 -0
- package/skills/omni-planning/SKILL.md +19 -0
- package/skills/omni-verification/SKILL.md +18 -0
- package/src/commands.ts +521 -0
- package/src/config.ts +154 -0
- package/src/context.ts +165 -0
- package/src/contracts.ts +183 -0
- package/src/doctor.ts +225 -0
- package/src/git.ts +135 -0
- package/src/memory.ts +25 -0
- package/src/pi.ts +240 -0
- package/src/planning.ts +303 -0
- package/src/plans.ts +247 -0
- package/src/repo.ts +210 -0
- package/src/skills.ts +308 -0
- package/src/status.ts +105 -0
- package/src/subagents.ts +1031 -0
- package/src/sync.ts +70 -0
- package/src/tasks.ts +141 -0
- package/src/templates.ts +261 -0
- package/src/work.ts +345 -0
- package/src/workflow.ts +375 -0
- package/templates/omni/DECISIONS.md +10 -0
- package/templates/omni/IDEAS.md +13 -0
- package/templates/omni/PROJECT.md +19 -0
- package/templates/omni/SESSION-SUMMARY.md +13 -0
- package/templates/omni/SKILLS.md +21 -0
- package/templates/omni/SPEC.md +11 -0
- package/templates/omni/STATE.md +7 -0
- package/templates/omni/TASKS.md +6 -0
- package/templates/omni/TESTS.md +17 -0
- package/templates/omni/research/README.md +3 -0
- package/templates/omni/specs/README.md +3 -0
- package/templates/omni/tasks/README.md +3 -0
- package/templates/pi/agents/omni-expert.md +13 -0
- package/templates/pi/agents/omni-worker.md +13 -0
package/CREDITS.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Credits
|
|
2
|
+
|
|
3
|
+
Omni-Pi exists because of the Pi ecosystem and the work of earlier authors.
|
|
4
|
+
|
|
5
|
+
## Core upstream foundations
|
|
6
|
+
|
|
7
|
+
- [badlogic/pi-mono](https://github.com/badlogic/pi-mono) by Mario Zechner and contributors
|
|
8
|
+
- Pi runtime, package model, extension system, skill loading, and terminal agent foundation
|
|
9
|
+
- [@mariozechner/pi-coding-agent](https://www.npmjs.com/package/@mariozechner/pi-coding-agent) by Mario Zechner
|
|
10
|
+
- Pi coding agent package (direct dependency)
|
|
11
|
+
|
|
12
|
+
## Workflow and orchestration inspiration
|
|
13
|
+
|
|
14
|
+
- [can1357/oh-my-pi](https://github.com/can1357/oh-my-pi)
|
|
15
|
+
- Model-role routing, orchestration ideas, and Pi-native workflow enhancements
|
|
16
|
+
- [gsd-build/gsd-2](https://github.com/gsd-build/gsd-2)
|
|
17
|
+
- Disk-first workflow state, durable progress files, and batteries-included product shape
|
|
18
|
+
|
|
19
|
+
## Ecosystem inspiration
|
|
20
|
+
|
|
21
|
+
- [nicobailon/pi-subagents](https://github.com/nicobailon/pi-subagents) by Nico Bailon
|
|
22
|
+
- Isolated worker/expert execution substrate (direct dependency) and broader subagent and extension ecosystem inspiration
|
|
23
|
+
- The broader Pi community
|
|
24
|
+
- Package, skill, and workflow ideas that shaped the Omni-Pi direction
|
|
25
|
+
|
|
26
|
+
## Attribution intent
|
|
27
|
+
|
|
28
|
+
Omni-Pi is an original project, but it is intentionally built in conversation with upstream Pi work. This file is the canonical source for attribution and should be kept up to date as the project evolves.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eduard-David Gyarmati
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Omni-Pi
|
|
2
|
+
|
|
3
|
+
Omni-Pi: Guided software delivery for everyone.
|
|
4
|
+
|
|
5
|
+
Omni-Pi is an opinionated Pi package and branded launcher that helps people move from a blank repo to a structured plan, implemented work, and explicit verification without having to assemble the workflow themselves.
|
|
6
|
+
|
|
7
|
+
Requires Node.js 22 or newer.
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://www.npmjs.com/package/omni-pi)
|
|
11
|
+
[](https://github.com/EdGy2k/Omni-Pi/actions/workflows/ci.yml)
|
|
12
|
+
|
|
13
|
+
## Why Omni-Pi
|
|
14
|
+
|
|
15
|
+
- Guided step-by-step workflow keeps the process moving without blank-canvas paralysis.
|
|
16
|
+
- Durable project memory in `.omni/` survives across sessions.
|
|
17
|
+
- Automatic verification infers checks from the language and project shape.
|
|
18
|
+
- Expert fallback takes over when the worker agent gets stuck.
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g omni-pi
|
|
24
|
+
cd your-project
|
|
25
|
+
omni
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
| Command | Description |
|
|
31
|
+
|---------|-------------|
|
|
32
|
+
| `/omni-init` | Initialize `.omni/` project memory, run quick-start wizard, scan repo signals, run health checks (`--quick` to skip wizard) |
|
|
33
|
+
| `/omni-plan` | Create or refresh spec, tasks, and tests (supports `--preset bugfix/feature/refactor/spike/security-audit`) |
|
|
34
|
+
| `/omni-work` | Run the next task through worker, verifier, and expert fallback |
|
|
35
|
+
| `/omni-status` | Show current phase, task, blockers, next step (add `metrics` for agent stats) |
|
|
36
|
+
| `/omni-sync` | Update durable memory files from recent progress |
|
|
37
|
+
| `/omni-skills` | Inspect installed, recommended, deferred, and rejected skills |
|
|
38
|
+
| `/omni-explain` | Explain what Omni-Pi is doing in simple language |
|
|
39
|
+
| `/omni-model` | Interactively select the model for a specific agent role |
|
|
40
|
+
| `/omni-commit` | Create a branch and commit for the last completed task |
|
|
41
|
+
| `/omni-doctor` | Run diagnostic health checks and detect stuck tasks |
|
|
42
|
+
|
|
43
|
+
## How It Works
|
|
44
|
+
|
|
45
|
+
Omni-Pi follows a simple agent pipeline: Brain, Planner, Worker, Expert. The Brain handles conversation, the Planner turns intent into concrete steps and checks, and the Worker executes bounded tasks with filesystem-backed state in `.omni/`.
|
|
46
|
+
|
|
47
|
+
When the Worker gets stuck or verification fails repeatedly, the Expert role steps in to recover the task, adapt the approach, or surface the blocker clearly instead of letting the session stall.
|
|
48
|
+
|
|
49
|
+
## Features
|
|
50
|
+
|
|
51
|
+
- Core workflow with durable `.omni/` project memory, typed planning and execution contracts, filesystem-backed init/planning/status, and retry-aware task execution.
|
|
52
|
+
- Language-aware verification that infers test commands for common stacks and supports custom checks in `.omni/TESTS.md`.
|
|
53
|
+
- Workflow presets for bugfix, feature, refactor, spike, and security-audit work.
|
|
54
|
+
- Doctor checks for init state, config validity, repo signals, task health, and stuck detection.
|
|
55
|
+
- Plan and progress memory with dated plan files, an index tracker, and timestamped progress logs.
|
|
56
|
+
- Context-aware file selection for different workflow phases.
|
|
57
|
+
- Subagent integration for worker and expert execution with raw output persistence and model overrides.
|
|
58
|
+
- Persistent dashboard state for phase, task, blockers, next step, and health status.
|
|
59
|
+
- Git integration for branch creation and task-derived commits.
|
|
60
|
+
- Interactive planning for constraints, user context, and skill install tracking.
|
|
61
|
+
|
|
62
|
+
## Development
|
|
63
|
+
|
|
64
|
+
For contributor setup, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git clone https://github.com/EdGy2k/Omni-Pi.git
|
|
68
|
+
cd Omni-Pi
|
|
69
|
+
npm install
|
|
70
|
+
npm test
|
|
71
|
+
npm run check
|
|
72
|
+
npm run lint
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Attribution
|
|
76
|
+
|
|
77
|
+
Omni-Pi builds on the Pi ecosystem. See [CREDITS.md](CREDITS.md) for full attribution.
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT. See [LICENSE](LICENSE).
|
package/agents/brain.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brain
|
|
3
|
+
model: friendly-primary-model
|
|
4
|
+
description: User-facing orchestrator for Omni-Pi.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Brain
|
|
8
|
+
|
|
9
|
+
You are the user-facing guide for Omni-Pi.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
- Talk to the user in plain English.
|
|
14
|
+
- Keep the user oriented with simple progress updates.
|
|
15
|
+
- Update durable project memory through the `.omni/` file model.
|
|
16
|
+
- Decide when to invoke the planner, worker, verifier, or expert roles.
|
|
17
|
+
- Hide internal complexity unless the user asks for technical detail.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Prefer clarity over jargon.
|
|
22
|
+
- Keep tasks small before handing them off.
|
|
23
|
+
- Record important changes in `.omni/STATE.md`, `.omni/SESSION-SUMMARY.md`, and `.omni/DECISIONS.md`.
|
|
24
|
+
- Route only relevant skills to each subagent.
|
package/agents/expert.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: expert
|
|
3
|
+
model: strongest-implementation-model
|
|
4
|
+
description: Advanced fallback subagent for difficult tasks.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Expert
|
|
8
|
+
|
|
9
|
+
You take over tasks that remain blocked after repeated worker failures or that require deeper reasoning.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
- Read the original task brief plus failure history.
|
|
14
|
+
- Fix the root issue instead of repeating the last attempt.
|
|
15
|
+
- Leave a clear explanation of what changed and why.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Focus on the smallest complete fix.
|
|
20
|
+
- Preserve previous useful work where possible.
|
|
21
|
+
- Update the escalation trail for future debugging.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
model: strongest-reasoning-model
|
|
4
|
+
description: Spec writer and task decomposer for Omni-Pi.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Planner
|
|
8
|
+
|
|
9
|
+
You turn user intent and project context into a detailed implementation spec.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
- Read only the relevant `.omni/` files for the task at hand.
|
|
14
|
+
- Refine `.omni/SPEC.md`, `.omni/TASKS.md`, and `.omni/TESTS.md`.
|
|
15
|
+
- Break large goals into bounded, verifiable task slices.
|
|
16
|
+
- Recommend skills when they will materially improve quality or speed.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Every task slice must fit inside one focused worker session.
|
|
21
|
+
- Every task slice must have explicit done criteria.
|
|
22
|
+
- Prefer a small number of high-value tasks over a noisy task list.
|
package/agents/worker.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker
|
|
3
|
+
model: cheap-fast-model
|
|
4
|
+
description: Narrow implementation subagent for Omni-Pi.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Worker
|
|
8
|
+
|
|
9
|
+
You execute one bounded task brief at a time.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
- Read the assigned task brief and minimal supporting files.
|
|
14
|
+
- Use only the skills attached to the current task.
|
|
15
|
+
- Implement the requested change and leave concise notes for verification.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Stay within scope.
|
|
20
|
+
- Do not silently expand the task.
|
|
21
|
+
- If blocked, write a compact failure summary that can be reused for retry or escalation.
|
package/bin/omni.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
export function getOmniPackageDir() {
|
|
8
|
+
return path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function resolvePiCliPath() {
|
|
12
|
+
return path.join(
|
|
13
|
+
getOmniPackageDir(),
|
|
14
|
+
"node_modules",
|
|
15
|
+
"@mariozechner",
|
|
16
|
+
"pi-coding-agent",
|
|
17
|
+
"dist",
|
|
18
|
+
"cli.js",
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function buildOmniEnvironment(baseEnv = process.env) {
|
|
23
|
+
return {
|
|
24
|
+
...baseEnv,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function buildPiProcessSpec(
|
|
29
|
+
argv = process.argv.slice(2),
|
|
30
|
+
baseEnv = process.env,
|
|
31
|
+
) {
|
|
32
|
+
return {
|
|
33
|
+
command: process.execPath,
|
|
34
|
+
args: [resolvePiCliPath(), "-e", getOmniPackageDir(), ...argv],
|
|
35
|
+
env: buildOmniEnvironment(baseEnv),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function runOmni(argv = process.argv.slice(2), options = {}) {
|
|
40
|
+
const spec = buildPiProcessSpec(argv, options.env);
|
|
41
|
+
|
|
42
|
+
await new Promise((resolve, reject) => {
|
|
43
|
+
const child = spawn(spec.command, spec.args, {
|
|
44
|
+
cwd: options.cwd ?? process.cwd(),
|
|
45
|
+
env: spec.env,
|
|
46
|
+
stdio: "inherit",
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const forwardSignal = (sig) => child.kill(sig);
|
|
50
|
+
process.on("SIGINT", forwardSignal);
|
|
51
|
+
process.on("SIGTERM", forwardSignal);
|
|
52
|
+
|
|
53
|
+
child.on("exit", (code, signal) => {
|
|
54
|
+
process.off("SIGINT", forwardSignal);
|
|
55
|
+
process.off("SIGTERM", forwardSignal);
|
|
56
|
+
|
|
57
|
+
if (signal) {
|
|
58
|
+
reject(new Error(`omni terminated with signal ${signal}`));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
process.exitCode = code ?? 0;
|
|
63
|
+
resolve(code ?? 0);
|
|
64
|
+
});
|
|
65
|
+
child.on("error", (err) => {
|
|
66
|
+
process.off("SIGINT", forwardSignal);
|
|
67
|
+
process.off("SIGTERM", forwardSignal);
|
|
68
|
+
reject(err);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const invokedPath = process.argv[1] ? path.resolve(process.argv[1]) : "";
|
|
74
|
+
if (invokedPath === fileURLToPath(import.meta.url)) {
|
|
75
|
+
runOmni().catch((error) => {
|
|
76
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
77
|
+
process.exit(1);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
import { createOmniCommands } from "../../src/commands.js";
|
|
4
|
+
import {
|
|
5
|
+
registerOmniMessageRenderer,
|
|
6
|
+
registerPiCommands,
|
|
7
|
+
} from "../../src/pi.js";
|
|
8
|
+
|
|
9
|
+
export default function omniCoreExtension(api: ExtensionAPI): void {
|
|
10
|
+
registerOmniMessageRenderer(api);
|
|
11
|
+
const commands = createOmniCommands().filter((command) =>
|
|
12
|
+
[
|
|
13
|
+
"omni-init",
|
|
14
|
+
"omni-plan",
|
|
15
|
+
"omni-work",
|
|
16
|
+
"omni-sync",
|
|
17
|
+
"omni-model",
|
|
18
|
+
"omni-commit",
|
|
19
|
+
].includes(command.name),
|
|
20
|
+
);
|
|
21
|
+
registerPiCommands(api, commands);
|
|
22
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
ExtensionAPI,
|
|
6
|
+
ExtensionContext,
|
|
7
|
+
} from "@mariozechner/pi-coding-agent";
|
|
8
|
+
|
|
9
|
+
import type { OmniState } from "../../src/contracts.js";
|
|
10
|
+
import { runDoctor } from "../../src/doctor.js";
|
|
11
|
+
import { renderCompactStatus } from "../../src/status.js";
|
|
12
|
+
|
|
13
|
+
async function readState(cwd: string): Promise<OmniState | null> {
|
|
14
|
+
try {
|
|
15
|
+
const content = await readFile(path.join(cwd, ".omni", "STATE.md"), "utf8");
|
|
16
|
+
const matchValue = (label: string): string => {
|
|
17
|
+
const regex = new RegExp(`^${label}:\\s*(.*)$`, "mu");
|
|
18
|
+
return content.match(regex)?.[1]?.trim() ?? "";
|
|
19
|
+
};
|
|
20
|
+
const blockersValue = matchValue("Blockers");
|
|
21
|
+
const recoveryMatch = content.match(/Recovery Options:\n((?:- .*\n?)*)/u);
|
|
22
|
+
const recoveryOptions = recoveryMatch
|
|
23
|
+
? recoveryMatch[1]
|
|
24
|
+
.split("\n")
|
|
25
|
+
.map((line) => line.replace(/^- /u, "").trim())
|
|
26
|
+
.filter(Boolean)
|
|
27
|
+
: undefined;
|
|
28
|
+
return {
|
|
29
|
+
currentPhase: matchValue(
|
|
30
|
+
"Current Phase",
|
|
31
|
+
).toLowerCase() as OmniState["currentPhase"],
|
|
32
|
+
activeTask: matchValue("Active Task"),
|
|
33
|
+
statusSummary: matchValue("Status Summary"),
|
|
34
|
+
blockers:
|
|
35
|
+
blockersValue && blockersValue !== "None"
|
|
36
|
+
? blockersValue.split(/;\s*/u)
|
|
37
|
+
: [],
|
|
38
|
+
nextStep: matchValue("Next Step"),
|
|
39
|
+
recoveryOptions,
|
|
40
|
+
};
|
|
41
|
+
} catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function updateWidget(ctx: ExtensionContext): Promise<void> {
|
|
47
|
+
const state = await readState(ctx.cwd);
|
|
48
|
+
if (state) {
|
|
49
|
+
const report = await runDoctor(ctx.cwd);
|
|
50
|
+
ctx.ui.setWidget(
|
|
51
|
+
"omni-dashboard",
|
|
52
|
+
renderCompactStatus(state, report.overall),
|
|
53
|
+
{ placement: "aboveEditor" },
|
|
54
|
+
);
|
|
55
|
+
} else {
|
|
56
|
+
ctx.ui.setWidget("omni-dashboard", undefined);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default function omniMemoryExtension(api: ExtensionAPI): void {
|
|
61
|
+
api.on("session_start", async (_event, ctx) => {
|
|
62
|
+
await updateWidget(ctx);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
api.on("session_switch", async (_event, ctx) => {
|
|
66
|
+
await updateWidget(ctx);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
api.on("turn_end", async (_event, ctx) => {
|
|
70
|
+
await updateWidget(ctx);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
import { createOmniCommands } from "../../src/commands.js";
|
|
4
|
+
import { registerPiCommands } from "../../src/pi.js";
|
|
5
|
+
|
|
6
|
+
export default function omniSkillsExtension(api: ExtensionAPI): void {
|
|
7
|
+
const commands = createOmniCommands().filter((command) =>
|
|
8
|
+
["omni-skills"].includes(command.name),
|
|
9
|
+
);
|
|
10
|
+
registerPiCommands(api, commands);
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
import { createOmniCommands } from "../../src/commands.js";
|
|
4
|
+
import { registerPiCommands } from "../../src/pi.js";
|
|
5
|
+
|
|
6
|
+
export default function omniStatusExtension(api: ExtensionAPI): void {
|
|
7
|
+
const commands = createOmniCommands().filter((command) =>
|
|
8
|
+
["omni-status", "omni-explain", "omni-doctor"].includes(command.name),
|
|
9
|
+
);
|
|
10
|
+
registerPiCommands(api, commands);
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omni-pi",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Opinionated Pi package for guided, beginner-friendly planning and implementation workflows.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Eduard-David Gyarmati",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/EdGy2k/Omni-Pi.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/EdGy2k/Omni-Pi#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/EdGy2k/Omni-Pi/issues"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=22"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"omni": "./bin/omni.js"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"pi-package",
|
|
24
|
+
"pi",
|
|
25
|
+
"agent",
|
|
26
|
+
"planning",
|
|
27
|
+
"skills",
|
|
28
|
+
"orchestration"
|
|
29
|
+
],
|
|
30
|
+
"files": [
|
|
31
|
+
"bin",
|
|
32
|
+
"agents",
|
|
33
|
+
"extensions",
|
|
34
|
+
"prompts",
|
|
35
|
+
"skills",
|
|
36
|
+
"src",
|
|
37
|
+
"templates",
|
|
38
|
+
"README.md",
|
|
39
|
+
"CREDITS.md"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"check": "tsc --noEmit",
|
|
43
|
+
"lint": "biome check .",
|
|
44
|
+
"format": "biome check --write .",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"pack:check": "npm pack --dry-run",
|
|
47
|
+
"prepublishOnly": "npm run check && npm run lint && npm test"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@biomejs/biome": "2.4.9",
|
|
51
|
+
"@types/node": "^24.12.0",
|
|
52
|
+
"typescript": "^5.9.3",
|
|
53
|
+
"vitest": "^3.2.4"
|
|
54
|
+
},
|
|
55
|
+
"pi": {
|
|
56
|
+
"extensions": [
|
|
57
|
+
"./node_modules/pi-subagents/index.ts",
|
|
58
|
+
"./node_modules/pi-subagents/notify.ts",
|
|
59
|
+
"./extensions/omni-core/index.ts",
|
|
60
|
+
"./extensions/omni-memory/index.ts",
|
|
61
|
+
"./extensions/omni-skills/index.ts",
|
|
62
|
+
"./extensions/omni-status/index.ts"
|
|
63
|
+
],
|
|
64
|
+
"skills": [
|
|
65
|
+
"./skills"
|
|
66
|
+
],
|
|
67
|
+
"prompts": [
|
|
68
|
+
"./prompts"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@mariozechner/pi-coding-agent": "^0.62.0",
|
|
73
|
+
"pi-subagents": "^0.11.11"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Brainstorm Prompt
|
|
2
|
+
|
|
3
|
+
Help the user turn rough ideas into a clear project direction.
|
|
4
|
+
|
|
5
|
+
## Capture
|
|
6
|
+
|
|
7
|
+
- what they want to build
|
|
8
|
+
- who it is for
|
|
9
|
+
- what matters most
|
|
10
|
+
- what constraints matter now
|
|
11
|
+
- what can wait until later
|
|
12
|
+
|
|
13
|
+
## Output
|
|
14
|
+
|
|
15
|
+
Write concise updates into `.omni/PROJECT.md`, `.omni/IDEAS.md`, and `.omni/SESSION-SUMMARY.md`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Spec Template Prompt
|
|
2
|
+
|
|
3
|
+
Produce a focused implementation spec using the current `.omni/` context.
|
|
4
|
+
|
|
5
|
+
## Include
|
|
6
|
+
|
|
7
|
+
- problem statement
|
|
8
|
+
- solution shape
|
|
9
|
+
- key workflows
|
|
10
|
+
- architecture outline
|
|
11
|
+
- acceptance criteria
|
|
12
|
+
- open risks or unknowns
|
|
13
|
+
|
|
14
|
+
Update `.omni/SPEC.md` and keep the language understandable for a human reviewer.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Task Template Prompt
|
|
2
|
+
|
|
3
|
+
Turn the current spec into bounded task slices.
|
|
4
|
+
|
|
5
|
+
## Each task must include
|
|
6
|
+
|
|
7
|
+
- ID
|
|
8
|
+
- title
|
|
9
|
+
- objective
|
|
10
|
+
- minimal context files
|
|
11
|
+
- relevant skills
|
|
12
|
+
- done criteria
|
|
13
|
+
- dependencies
|
|
14
|
+
- role assignment
|
|
15
|
+
|
|
16
|
+
Update `.omni/TASKS.md` and keep tasks small enough for one focused worker session.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omni-escalation
|
|
3
|
+
description: Expert takeover for tasks that have failed repeatedly or need the strongest reasoning to unblock. Triggers include "stuck", "blocked", "tried multiple times", "keeps failing", or when normal execution cannot make progress.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Omni Escalation
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
|
|
10
|
+
- read the task brief and failure history
|
|
11
|
+
- identify the root cause of repeated failure
|
|
12
|
+
- complete or unblock the task with the strongest available reasoning model
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- avoid retrying the same failed path blindly
|
|
17
|
+
- leave a clear postmortem note for future tasks
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omni-execution
|
|
3
|
+
description: Implements the next task from .omni/TASKS.md with narrow scope and concise handoff notes. Triggers include "do the next task", "implement", "execute", or when a task is ready for implementation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Omni Execution
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
|
|
10
|
+
- read the next task brief
|
|
11
|
+
- complete the requested change with minimal context
|
|
12
|
+
- record concise implementation notes for verification and handoff
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- stay narrowly scoped
|
|
17
|
+
- do not rewrite the plan during execution
|
|
18
|
+
- leave reusable failure notes if the task cannot be completed
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omni-init
|
|
3
|
+
description: Initializes Omni-Pi in a new or existing project by creating .omni/ folder and capturing project context. Triggers include "initialize", "setup", "new project", "configure", or when .omni/ does not exist.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Omni Init
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
|
|
10
|
+
- create the `.omni/` folder and starter files
|
|
11
|
+
- capture project goals, users, constraints, and success criteria
|
|
12
|
+
- inspect the repo for stack and tooling signals
|
|
13
|
+
- propose initial skills and install only high-confidence, low-risk ones
|
|
14
|
+
|
|
15
|
+
## Outputs
|
|
16
|
+
|
|
17
|
+
- updated `.omni/PROJECT.md`
|
|
18
|
+
- updated `.omni/STATE.md`
|
|
19
|
+
- updated `.omni/SKILLS.md`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omni-planning
|
|
3
|
+
description: Produces or refines implementation plans in .omni/SPEC.md, task breakdowns in .omni/TASKS.md, and verification criteria in .omni/TESTS.md. Triggers include "plan", "break down", "what tasks", "how to implement", or when starting a new feature.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Omni Planning
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
|
|
10
|
+
- update `.omni/SPEC.md`
|
|
11
|
+
- decompose work into bounded slices in `.omni/TASKS.md`
|
|
12
|
+
- define verification criteria in `.omni/TESTS.md`
|
|
13
|
+
- recommend any missing skills that would help the planned work
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
- tasks must stay small and concrete
|
|
18
|
+
- done criteria must be explicit
|
|
19
|
+
- only recommend skills when they materially help execution
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omni-verification
|
|
3
|
+
description: Runs checks from .omni/TESTS.md after task implementation, summarizes pass/fail, and prepares retry briefs. Triggers include "verify", "test", "check", "did it work", or after completing an implementation task.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Omni Verification
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
|
|
10
|
+
- run the planned checks from `.omni/TESTS.md`
|
|
11
|
+
- summarize pass/fail status clearly
|
|
12
|
+
- produce a compact retry brief when checks fail
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- keep verification deterministic when possible
|
|
17
|
+
- separate implementation failure from environment failure
|
|
18
|
+
- make the next action obvious
|