pi-monofold 0.3.0 → 0.3.1
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 +90 -124
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
# pi-monofold
|
|
2
2
|
|
|
3
|
+
[](https://github.com/eiei114/pi-monofold/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/eiei114/pi-monofold/actions/workflows/publish.yml)
|
|
3
5
|
[](https://www.npmjs.com/package/pi-monofold)
|
|
4
|
-
[](https://github.com/eiei114/pi-monofold/actions/workflows/auto-release.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/pi-monofold)
|
|
6
7
|
[](./LICENSE)
|
|
7
8
|
[](https://github.com/eiei114/pi-monofold)
|
|
9
|
+
[](https://docs.npmjs.com/generating-provenance-statements)
|
|
8
10
|
|
|
9
|
-
Pi
|
|
11
|
+
Pi extension that folds multiple local repositories and folders into a guarded **Virtual Monorepo** for AI agents.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
## What this is
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
Pi Monofold (`pi-monofold`) keeps repositories physically separate while giving Pi a lightweight manifest, routed writes, workspace-aware reads, guarded commands, and explicit git flows. Documentation, rules, product context, and implementation code can appear as one connected system without migrating everything into a single git repository.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
See [docs/usage.md](./docs/usage.md) for configuration, commands, agent tools, and guard behavior.
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- **Virtual monorepo manifest** — declare workspaces and project workspaces in `.pi/monofold.yaml`
|
|
22
|
+
- **Routed Markdown writes** — route PRDs, progress notes, and other doc types to configured folders
|
|
23
|
+
- **Workspace-aware reads** — list, read, search, and tree views scoped to readable workspaces
|
|
24
|
+
- **Capability guard** — block or confirm `read` / `write` / `edit` / `grep` / `find` / `bash` based on workspace tags
|
|
25
|
+
- **Focus presets** — tag-based focus targets for the control workspace
|
|
26
|
+
- **Natural-language commands** — `/monofold:explore`, `/monofold:write`, `/monofold:config`, `/monofold:git`, and more
|
|
27
|
+
- **Strict agent tools** — `monofold_*` tools for programmatic access behind the command surface
|
|
28
|
+
- **Config migration** — upgrade legacy `.pi/monofold.yml` with backups and validation
|
|
16
29
|
|
|
17
30
|
## Install
|
|
18
31
|
|
|
@@ -26,16 +39,16 @@ Pi Monofold is a Pi package. Install it with Pi's package installer from git or
|
|
|
26
39
|
pi install git:github.com/eiei114/pi-monofold
|
|
27
40
|
```
|
|
28
41
|
|
|
29
|
-
|
|
42
|
+
Project-local install:
|
|
30
43
|
|
|
31
44
|
```powershell
|
|
32
45
|
pi install -l git:github.com/eiei114/pi-monofold
|
|
33
46
|
```
|
|
34
47
|
|
|
35
|
-
Pin a version
|
|
48
|
+
Pin a version:
|
|
36
49
|
|
|
37
50
|
```powershell
|
|
38
|
-
pi install git:github.com/eiei114/pi-monofold@v0.1
|
|
51
|
+
pi install git:github.com/eiei114/pi-monofold@v0.3.1
|
|
39
52
|
```
|
|
40
53
|
|
|
41
54
|
Try without installing:
|
|
@@ -46,13 +59,11 @@ pi -e git:github.com/eiei114/pi-monofold
|
|
|
46
59
|
|
|
47
60
|
### From npm
|
|
48
61
|
|
|
49
|
-
After the package is published to npm:
|
|
50
|
-
|
|
51
62
|
```powershell
|
|
52
63
|
pi install npm:pi-monofold
|
|
53
64
|
```
|
|
54
65
|
|
|
55
|
-
|
|
66
|
+
Project-local install:
|
|
56
67
|
|
|
57
68
|
```powershell
|
|
58
69
|
pi install -l npm:pi-monofold
|
|
@@ -61,7 +72,7 @@ pi install -l npm:pi-monofold
|
|
|
61
72
|
Pin a version:
|
|
62
73
|
|
|
63
74
|
```powershell
|
|
64
|
-
pi install npm:pi-monofold@0.1
|
|
75
|
+
pi install npm:pi-monofold@0.3.1
|
|
65
76
|
```
|
|
66
77
|
|
|
67
78
|
Try without installing:
|
|
@@ -70,137 +81,92 @@ Try without installing:
|
|
|
70
81
|
pi -e npm:pi-monofold
|
|
71
82
|
```
|
|
72
83
|
|
|
73
|
-
|
|
84
|
+
## Quick start
|
|
74
85
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
npm run typecheck
|
|
80
|
-
```
|
|
86
|
+
1. Install the extension (see [Install](#install)).
|
|
87
|
+
2. In your control repository, create `.pi/monofold.yaml` with at least one workspace entry (or run `/monofold:init`).
|
|
88
|
+
3. Start Pi in the control repository and run `/monofold:explore show the project workspaces`.
|
|
89
|
+
4. Use `/monofold:write` for routed Markdown outputs and `/monofold:git` for guarded git workflows.
|
|
81
90
|
|
|
82
|
-
|
|
91
|
+
Example command flows: [docs/examples.md](./docs/examples.md).
|
|
83
92
|
|
|
84
|
-
|
|
85
|
-
pi -e .
|
|
86
|
-
```
|
|
93
|
+
## Usage summary
|
|
87
94
|
|
|
88
|
-
|
|
95
|
+
| Surface | Purpose |
|
|
96
|
+
|---------|---------|
|
|
97
|
+
| `/monofold:explore` | List, read, search, or inspect workspace trees |
|
|
98
|
+
| `/monofold:write` | Create routed Markdown outputs |
|
|
99
|
+
| `/monofold:config` | Add or change workspaces and project workspaces |
|
|
100
|
+
| `/monofold:git` | Run guarded git status, commit, push, or commit+push |
|
|
101
|
+
| `/monofold:guide` | Interactive guide for common flows |
|
|
102
|
+
| `/monofold:init` | Create or update `.pi/monofold.yaml` |
|
|
103
|
+
| `/monofold:update` | Migrate legacy config and optionally request config edits |
|
|
89
104
|
|
|
90
|
-
|
|
105
|
+
Agent tools (`monofold_list`, `monofold_read`, `monofold_write`, `monofold_git`, `monofold_init`) sit behind these commands. Full reference: [docs/usage.md](./docs/usage.md).
|
|
91
106
|
|
|
92
|
-
|
|
93
|
-
<control-repo>/.pi/monofold.yaml
|
|
94
|
-
```
|
|
107
|
+
## Package contents
|
|
95
108
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
capabilities: [read, writeDocs, git]
|
|
118
|
-
contextFiles: [README.md, CONTEXT.md]
|
|
119
|
-
routes:
|
|
120
|
-
default: "Notes"
|
|
121
|
-
prd:
|
|
122
|
-
path: "Docs/PRD"
|
|
123
|
-
filenameTemplate: "prd-{{slug}}.md"
|
|
124
|
-
metadata:
|
|
125
|
-
type: prd
|
|
126
|
-
projects:
|
|
127
|
-
- name: "Launch plan"
|
|
128
|
-
path: "Projects/Launch"
|
|
129
|
-
tags: [project, launch]
|
|
130
|
-
contextFiles: [CONTEXT.md]
|
|
131
|
-
routes:
|
|
132
|
-
default: "."
|
|
133
|
-
progress: "Progress"
|
|
134
|
-
|
|
135
|
-
- name: "Application"
|
|
136
|
-
path: "../app"
|
|
137
|
-
tags: [development, app]
|
|
138
|
-
capabilities: [read, editCode, runCommands, git]
|
|
139
|
-
contextFiles: [README.md, AGENTS.md]
|
|
109
|
+
```text
|
|
110
|
+
pi-monofold/
|
|
111
|
+
├── .github/workflows/
|
|
112
|
+
│ ├── auto-release.yml # Auto-tag + release on merge to main
|
|
113
|
+
│ ├── ci.yml # Validate on PR / push
|
|
114
|
+
│ └── publish.yml # Publish to npm (Trusted Publishing)
|
|
115
|
+
├── docs/
|
|
116
|
+
│ ├── usage.md # Config, commands, agent API, guard
|
|
117
|
+
│ ├── examples.md # Command examples
|
|
118
|
+
│ └── release.md # Release and publish flow
|
|
119
|
+
├── tests/
|
|
120
|
+
│ └── focus-preset.test.ts
|
|
121
|
+
├── CHANGELOG.md
|
|
122
|
+
├── SECURITY.md
|
|
123
|
+
├── focus-preset.ts
|
|
124
|
+
├── index.ts
|
|
125
|
+
├── LICENSE
|
|
126
|
+
├── package.json
|
|
127
|
+
├── README.md
|
|
128
|
+
├── validation.ts
|
|
129
|
+
└── tsconfig.json
|
|
140
130
|
```
|
|
141
131
|
|
|
142
|
-
##
|
|
143
|
-
|
|
144
|
-
Optional `focusPresets` define tag-based focus targets for the control workspace. Preset `id` values must be unique. Each target uses `targetTags`, matching workspace tags the same way as other Monofold target selectors. Targets that match zero configured workspaces are allowed in config and emit a runtime warning when the active preset is applied.
|
|
132
|
+
## Development
|
|
145
133
|
|
|
146
|
-
|
|
134
|
+
Clone and validate:
|
|
147
135
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
- `/monofold:explore [request]`: list, read, search, or inspect workspace trees.
|
|
155
|
-
- `/monofold:write [request]`: create routed Markdown outputs.
|
|
156
|
-
- `/monofold:config [request]`: add or change Workspaces and Project Workspaces.
|
|
157
|
-
- `/monofold:git [request]`: run git status, commit, push, or commit+push workflows.
|
|
158
|
-
- `/monofold:guide`: start an interactive guide for Explore, Write, Config, Git, init, and update flows.
|
|
159
|
-
- `/monofold:init`: create or update `.pi/monofold.yaml` with an interactive wizard.
|
|
160
|
-
- `/monofold:update [request]`: migrate/clean up legacy config and optionally hand a config-change request to the agent.
|
|
161
|
-
|
|
162
|
-
Examples:
|
|
163
|
-
|
|
164
|
-
```text
|
|
165
|
-
/monofold:explore show the project workspaces
|
|
166
|
-
/monofold:write write today's progress note for Pi Monofold
|
|
167
|
-
/monofold:config add 4_Project/NewApp as a Project Workspace under Obsidian Vault with tag project,newapp
|
|
168
|
-
/monofold:git commit and push the pi-monofold dev workspace
|
|
169
|
-
/monofold:guide
|
|
136
|
+
```powershell
|
|
137
|
+
git clone https://github.com/eiei114/pi-monofold.git
|
|
138
|
+
cd pi-monofold
|
|
139
|
+
npm install
|
|
140
|
+
npm run check
|
|
170
141
|
```
|
|
171
142
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
## Agent API
|
|
143
|
+
Try the local checkout without installing:
|
|
175
144
|
|
|
176
|
-
|
|
145
|
+
```powershell
|
|
146
|
+
pi -e .
|
|
147
|
+
```
|
|
177
148
|
|
|
178
|
-
|
|
179
|
-
- `monofold_read`: read files, search text, or show a tree inside readable workspaces.
|
|
180
|
-
- `monofold_write`: create routed Markdown outputs by `routeType`, `title`, and `body`.
|
|
181
|
-
- `monofold_git`: run guarded workspace git `status`, `commit`, `push`, or `commitPush`.
|
|
182
|
-
- `monofold_init`: queue `/monofold:init`.
|
|
149
|
+
## Release
|
|
183
150
|
|
|
184
|
-
|
|
151
|
+
Releases are automated. See [docs/release.md](./docs/release.md) for details.
|
|
185
152
|
|
|
186
|
-
|
|
153
|
+
1. Bump `version` in `package.json` and update `CHANGELOG.md`.
|
|
154
|
+
2. Merge to `main`.
|
|
155
|
+
3. **Auto Release** tags `v<version>` and creates a GitHub release when the tag is new.
|
|
156
|
+
4. The tag triggers **Publish**, which publishes to npm with OIDC provenance.
|
|
187
157
|
|
|
188
|
-
|
|
158
|
+
## Security
|
|
189
159
|
|
|
190
|
-
|
|
160
|
+
Pi Monofold intercepts standard Pi tool calls when monofold config is present. Writes and shell commands are allowed only when the resolved workspace grants the matching capability. Git commit/push via raw `bash` is blocked; use `/monofold:git` or `monofold_git` instead.
|
|
191
161
|
|
|
192
|
-
|
|
162
|
+
Report vulnerabilities per [SECURITY.md](./SECURITY.md).
|
|
193
163
|
|
|
194
|
-
|
|
195
|
-
/monofold:update add 4_Project/NewApp as a Project Workspace under Obsidian Vault with tags project,newapp and progress route Progress
|
|
196
|
-
```
|
|
164
|
+
## Links
|
|
197
165
|
|
|
198
|
-
|
|
166
|
+
- **Repository**: <https://github.com/eiei114/pi-monofold>
|
|
167
|
+
- **npm**: <https://www.npmjs.com/package/pi-monofold>
|
|
168
|
+
- **Issues**: <https://github.com/eiei114/pi-monofold/issues>
|
|
199
169
|
|
|
200
|
-
|
|
170
|
+
## License
|
|
201
171
|
|
|
202
|
-
|
|
203
|
-
- Docs write: requires `writeDocs`.
|
|
204
|
-
- Code edit: requires `editCode`.
|
|
205
|
-
- Bash: requires workspace cwd and `runCommands`.
|
|
206
|
-
- Git commit/push via bash: blocked; use `/monofold:git` or the `monofold_git` agent tool.
|
|
172
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED