Skip to content

therealahnaf/pim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PIM

The open prompt workspace specification.

PIM standardizes a portable directory of plain UTF-8 .pim templates for an AI application. Application code loads a prompt by its stable agent name, supplies the variables present in that file, and receives a native string.

my-application/
|-- src/
`-- prompts/
    |-- pim.yaml
    |-- supervisor.pim
    `-- research/
        `-- researcher.pim
spec: pim/v0.1

agents:
  supervisor: supervisor.pim
  researcher: research/researcher.pim
You are helping {{customer_name}}.

Use this context:
{{context}}

PIM does not define tools, orchestration, providers, models, or agent relationships. Folders organize files; only the explicit agents map determines application lookup.

Python

The framework-neutral SDK is published as pim-workspace and imported as pim_workspace:

from pim_workspace import PromptWorkspace

prompts = PromptWorkspace("./prompts")
system_prompt: str = prompts.load(
    "researcher",
    customer_name="Ahnaf",
    context={"audience": "Python developers", "priority": 1},
)

Strings are inserted verbatim. Other JSON-compatible values use compact, sorted-key JSON. Missing or unexpected values fail before rendering, and injected text is never evaluated as another template pass.

Install the package from this checkout while it is pre-release:

python -m pip install -e "packages/python"

Repository layout

apps/workbench/     Local Vite host for the reusable editor
packages/core/      TypeScript manifest, rendering, and optional authoring utilities
packages/editor/    Reusable React and Monaco workbench
packages/python/    Framework-neutral Python SDK
spec/               Normative specification and shared conformance vectors
schemas/            Machine-readable manifest schema
examples/           Portable workspace and Python usage examples

The local workbench mounts a prompt directory directly in Chromium. Segments, shortcuts, token analysis, comments, provider advice, and alternate previews are optional authoring features stored locally; they are not portable pim.yaml fields and are never required to load a .pim string.

Run and verify

npm install
npm run dev
npm run check
npm run test:e2e
python -m pip install -e "packages/python[dev]"
python -m pytest packages/python
python -m ruff check packages/python
python -m ruff format --check packages/python
python -m mypy packages/python/src

See the PIM v0.1 specification, JSON Schema, customer-support workspace, project positioning, and migration guide.

Public website: therealahnaf/pim-site. Licensed under Apache-2.0.

About

Public specification, loader, and open editor

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors