Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .clinerules
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
# Submit 100% schema-compliant AST differentials to the Forge for deterministic "etching."

# Copyright (c) 2026 CoReason, Inc. Licensed under the Prosperity Public License 3.0.


## The "Zero-Waste Engineering" Mandate
You are strictly bound by the "Borrow vs. Build" philosophy. You MUST maximize the use of stable Open Source Software (OSS) whenever available. You are mathematically forbidden from building custom, proprietary implementations for logging, tracing, graph layout, container routing, UI components, or serialization if a mature OSS standard (e.g., OpenTelemetry, Zep Graphiti, Pi.dev, React Flow) exists to solve the problem.

5 changes: 5 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@
I expect real tests. No mocks.
You are strictly forbidden from using unittest.mock, pytest.MonkeyPatch, responses, or any other mocking library to simulate environment variables, network calls, or API responses.
All tests MUST execute against real local servers, real environment state, or deterministic string/file inputs.


## The "Zero-Waste Engineering" Mandate
You are strictly bound by the "Borrow vs. Build" philosophy. You MUST maximize the use of stable Open Source Software (OSS) whenever available. You are mathematically forbidden from building custom, proprietary implementations for logging, tracing, graph layout, container routing, UI components, or serialization if a mature OSS standard (e.g., OpenTelemetry, Zep Graphiti, Pi.dev, React Flow) exists to solve the problem.

1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
inputs: >-
dist/*.tar.gz
dist/*.whl
release-signing-artifacts: true
source: false

- name: Upload attestations to GitHub Release
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,8 @@ If any of the above verification commands yield a non-zero exit code (failure),
I expect real tests. No mocks.
You are strictly forbidden from using unittest.mock, pytest.MonkeyPatch, responses, or any other mocking library to simulate environment variables, network calls, or API responses.
All tests MUST execute against real local servers, real environment state, or deterministic string/file inputs. Mocking produces false confidence and is mathematically classified as non-isomorphic testing.


## The "Zero-Waste Engineering" Mandate
You are strictly bound by the "Borrow vs. Build" philosophy. You MUST maximize the use of stable Open Source Software (OSS) whenever available. You are mathematically forbidden from building custom, proprietary implementations for logging, tracing, graph layout, container routing, UI components, or serialization if a mature OSS standard (e.g., OpenTelemetry, Zep Graphiti, Pi.dev, React Flow) exists to solve the problem.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ To boot the local ephemeral fleet and project the capability mesh, you must exec
* [uv](https://github.com/astral-sh/uv) (The canonical Python dependency manager)
* Docker Engine (For hosting local Sovereign MCPs)
* Pulumi CLI (For thermodynamic infrastructure actuation)
* [Pi.dev](https://pi.dev) (The standard agentic terminal harness: `npm install -g @earendil-works/pi-coding-agent`)

### The Ignition Sequence

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{ name = "Gowtham A Rao", email = "gowtham.rao@coreason.ai" },
]
dependencies = [
"coreason-manifest==0.60.0",
"coreason-manifest==0.61.0",
"click>=8.1.7",
"loguru>=0.7.2",
"typer>=0.9.0",
Expand Down
54 changes: 54 additions & 0 deletions scripts/setup_pi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
# Copyright (c) 2026 CoReason, Inc
#
# This software is proprietary and dual-licensed
# Licensed under the Prosperity Public License 3.0 (the "License")
# A copy of the license is available at <https://prosperitylicense.com/versions/3.0.0>
# For details, see the LICENSE file
# Commercial use beyond a 30-day trial requires a separate license
#
# Source Code: <https://github.com/CoReason-AI/coreason-ecosystem>

from pathlib import Path


def setup_pi_agent() -> None:
"""Configures the local pi.dev coding agent with CoReason's strict ontology."""

home = Path.home()
pi_dir = home / ".pi" / "agent"

print(f"Configuring pi.dev Sovereign Developer Console at {pi_dir}...")

if not pi_dir.exists():
print(f"Directory {pi_dir} does not exist. Creating it.")
pi_dir.mkdir(parents=True, exist_ok=True)

system_md_path = pi_dir / "system.md"

system_prompt = """# CoReason Sovereign Developer Console
You are the official kinetic execution harness for the CoReason Swarm.
You operate as a zero-waste, deterministic CLI proxy.

## The Hollow Data Plane Mandate
1. **Zero Hallucination:** All structural boundaries must be derived directly from `coreason-manifest` Pydantic models.
2. **Epistemic Isolation:** You must not execute runtime capabilities outside the strict confines of the WASM/OpenShell sandboxes.
3. **URN Addressing:** All newly created capabilities must be registered via `__action_space_urn__` and documented with the 4-part Epistemic Bounds docstring.

## Execution Rules
- Use `Read`, `Write`, `Edit`, and `Bash` tools exclusively to mutate the Abstract Syntax Tree (AST) within the boundaries of the repository.
- Avoid native web-search. Delegate high-entropy semantic logic to external URN Oracles.
- All code generation MUST adhere strictly to the `AGENTS.md` rules inside the corresponding workspace.
"""

with open(system_md_path, "w", encoding="utf-8") as f:
f.write(system_prompt)

print(f"Successfully wrote CoReason Epistemic Constraints to {system_md_path}")
print(
"You may now launch the console by running `npx @mariozechner/pi-coding-agent` in your terminal."
)


if __name__ == "__main__":
setup_pi_agent()
19 changes: 19 additions & 0 deletions src/coreason_ecosystem/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,25 @@ def build_docs_cmd() -> None:
console.print(f"[bold red]Documentation Pipeline Failed:[/bold red] {e}")


@app.command(name="pi")
def pi_terminal() -> None:
"""Launch the pi.dev Sovereign Developer Console."""
import subprocess # nosec: B404

console.print("[bold green]Launching the pi.dev Kinetic Harness...[/bold green]")
try:
# We invoke the pi.dev CLI natively using npx
subprocess.run(["npx", "@mariozechner/pi-coding-agent"], check=True) # nosec: B603, B607
except FileNotFoundError:
console.print(
"[bold red]Error:[/bold red] Node.js and npx are required to launch pi.dev."
)
except subprocess.CalledProcessError as e:
console.print(
f"[bold red]Pi terminal exited with code {e.returncode}[/bold red]"
)


def main() -> None: # pragma: no cover
"""Entry point for the CLI."""
app()
Expand Down
21 changes: 9 additions & 12 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading