@davidorex/pi-project-workflows 0.14.4 → 0.26.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @davidorex/pi-project-workflows
2
2
 
3
- Convenience meta-package that re-exports all three [Pi](https://github.com/badlogic/pi-mono) extensions — structured project state, workflow orchestration, and behavior monitoring — in a single install.
3
+ Convenience meta-package that re-exports three [Pi](https://github.com/badlogic/pi-mono) extensions plus a shared agent-runtime library — structured project state, workflow orchestration, behavior monitoring, and agent spec compilation — in a single install.
4
4
 
5
5
  ## Install
6
6
 
@@ -8,17 +8,18 @@ Convenience meta-package that re-exports all three [Pi](https://github.com/badlo
8
8
  pi install npm:@davidorex/pi-project-workflows
9
9
  ```
10
10
 
11
- This installs all three extensions:
12
- - **[@davidorex/pi-project](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-project)** — schema-driven project state (typed blocks, validation, derived state)
11
+ This installs the four constituent packages:
12
+ - **[@davidorex/pi-context](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-context)** — schema-driven project state (typed blocks, validation, derived state)
13
+ - **[@davidorex/pi-jit-agents](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-jit-agents)** — agent spec compilation and in-process dispatch runtime (library, not a Pi extension)
13
14
  - **[@davidorex/pi-workflows](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-workflows)** — workflow orchestration (YAML specs, DAG execution, checkpoint/resume)
14
15
  - **[@davidorex/pi-behavior-monitors](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-behavior-monitors)** — behavior monitors (autonomous watchdogs, pattern classification, steering corrections)
15
16
 
16
17
  ## Getting Started
17
18
 
18
19
  ```
19
- /project init # scaffolds .project/ with schemas and starter blocks
20
+ /context init # scaffolds .project/ with schemas and starter blocks
20
21
  /workflow init # scaffolds .workflows/ for run state
21
- /project status # see derived project state
22
+ /context status # see derived project state
22
23
  /workflow list # discover and run workflows
23
24
  /monitors # list all monitors, scope, and state
24
25
  ```
@@ -26,6 +27,7 @@ This installs all three extensions:
26
27
  ## Documentation
27
28
 
28
29
  See the package READMEs for full API docs, source maps, and LLM guidance:
29
- - [pi-project README](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-project)
30
+ - [pi-context README](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-context)
31
+ - [pi-jit-agents README](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-jit-agents)
30
32
  - [pi-workflows README](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-workflows)
31
33
  - [pi-behavior-monitors README](https://github.com/davidorex/pi-project-workflows/tree/main/packages/pi-behavior-monitors)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davidorex/pi-project-workflows",
3
- "version": "0.14.4",
3
+ "version": "0.26.0",
4
4
  "description": "Pi extensions for structured project state, workflow orchestration, and behavior monitoring — single install for all three",
5
5
  "license": "MIT",
6
6
  "author": "David Ryan",
@@ -29,8 +29,8 @@
29
29
  ]
30
30
  },
31
31
  "dependencies": {
32
- "@davidorex/pi-project": "^0.14.4",
33
- "@davidorex/pi-workflows": "^0.14.4",
34
- "@davidorex/pi-behavior-monitors": "^0.14.4"
32
+ "@davidorex/pi-context": "^0.26.0",
33
+ "@davidorex/pi-workflows": "^0.26.0",
34
+ "@davidorex/pi-behavior-monitors": "^0.26.0"
35
35
  }
36
36
  }
@@ -1 +1 @@
1
- export { default } from "@davidorex/pi-project";
1
+ export { default } from "@davidorex/pi-context";
@@ -76,11 +76,11 @@ Subcommands: `on`, `off`, `help`, `commit-hygiene`, `fragility`, `hedge`, `unaut
76
76
  </commands_reference>
77
77
 
78
78
  <events>
79
- `session_start`, `agent_end`, `turn_start`, `message_end`, `turn_end`, `tool_call`
79
+ `session_start`, `agent_end`, `turn_start`, `tool_call`
80
80
  </events>
81
81
 
82
82
  <bundled_resources>
83
- 5 agents, 3 schemas, 21 examples bundled.
83
+ 5 agents, 5 schemas, 21 examples bundled.
84
84
  See references/bundled-resources.md for full inventory.
85
85
  </bundled_resources>
86
86
 
@@ -131,32 +131,31 @@ write structured findings to JSON files for downstream consumption.
131
131
  </objective>
132
132
 
133
133
  <monitor_locations>
134
- Monitors are discovered from two locations, checked in order:
134
+ Monitors are discovered from three tiers, checked in precedence order; the first match
135
+ by `monitor.name` wins:
135
136
 
136
- 1. **Project**: `.pi/monitors/*.monitor.json` (walks up from cwd to find `.pi/`)
137
+ 1. **Project**: `.pi/monitors/*.monitor.json` (walks up from cwd to find `.pi/`, stops at the `.git` boundary)
137
138
  2. **Global**: `~/.pi/agent/monitors/*.monitor.json` (via `getAgentDir()`)
139
+ 3. **Bundled**: `<package>/examples/*.monitor.json` (the five built-in defaults that ship with the extension)
138
140
 
139
- Project monitors take precedence if a project monitor has the same `name` as a global
140
- one, the global monitor is ignored. The extension silently exits if zero monitors are
141
- discovered after checking both locations.
141
+ When a higher-precedence tier shadows a same-name monitor in a lower tier, the override
142
+ is logged once at session_start so drift is visible. The extension silently exits if
143
+ zero monitors are discovered across all three tiers.
142
144
  </monitor_locations>
143
145
 
144
- <seeding>
145
- On first run in a project, the extension seeds bundled example monitors into
146
- `.pi/monitors/` if ALL of the following are true:
146
+ <overrides>
147
+ To customize a bundled monitor, create `.pi/monitors/<name>.monitor.json` (and its
148
+ `.patterns.json` and `.instructions.json` sidecars) in your project. The override fully
149
+ replaces the bundled version by name. Per-monitor template subdirectories (e.g.,
150
+ `fragility/classify.md`) follow the same multi-tier search via
151
+ `createMonitorAgentTemplateEnv`, so an override directory tree mirrors the bundled
152
+ layout.
147
153
 
148
- - `discoverMonitors()` finds zero monitors (neither project nor global)
149
- - The `examples/` directory exists in the extension package
150
- - The target `.pi/monitors/` directory contains no `.monitor.json` files
151
-
152
- Seeding copies all `.json` files from `examples/` (monitor definitions, patterns, and
153
- instructions files) into `.pi/monitors/`. It skips files that already exist at the
154
- destination. The user is notified: "Edit or delete them to customize."
155
-
156
- To customize seeded monitors, edit the copies in `.pi/monitors/` directly. To remove a
157
- bundled monitor, delete its three files (`.monitor.json`, `.patterns.json`,
158
- `.instructions.json`). Seeding never re-runs once any monitors exist.
159
- </seeding>
154
+ Delete the override to revert to bundled behavior — bundled updates are picked up
155
+ automatically on the next session because tier 3 reads the package examples directly,
156
+ not a copied snapshot. This replaces the prior copy-on-first-run pattern that left
157
+ seeded `.pi/monitors/` files frozen at the package version they were seeded from.
158
+ </overrides>
160
159
 
161
160
  <file_structure>
162
161
  Each monitor is a set of files sharing a name prefix:
@@ -468,7 +467,8 @@ for other extensions or workflows to invoke classification directly.
468
467
  </commands>
469
468
 
470
469
  <bundled_monitors>
471
- Five example monitors ship in `examples/` and are seeded on first run. Each has a
470
+ Five example monitors ship in `examples/` and load directly from the package as the
471
+ third discovery tier. Each has a
472
472
  Nunjucks classify template in `examples/<name>/classify.md` with iteration-aware
473
473
  acknowledgment support:
474
474
 
@@ -8,8 +8,10 @@
8
8
  - `agents/unauthorized-action-classifier.agent.yaml`
9
9
  - `agents/work-quality-classifier.agent.yaml`
10
10
 
11
- ## schemas/ (3 files)
11
+ ## schemas/ (5 files)
12
12
 
13
+ - `schemas/monitor-instruction-list.schema.json`
14
+ - `schemas/monitor-pattern-list.schema.json`
13
15
  - `schemas/monitor-pattern.schema.json`
14
16
  - `schemas/monitor.schema.json`
15
17
  - `schemas/verdict.schema.json`