You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Force replacement of managed files such as the CI workflow and oxlint config:
65
67
66
68
```bash
67
69
dispatch init --force
68
70
```
69
71
70
-
Use `--force` carefully. It is appropriate after moving repo-specific behavior into `dispatch.config.ts` or `.dispatch/commands/*.ts`; it is not a safe way to blindly overwrite existing project scripts.
72
+
Use `--force` carefully. It is not needed for the generated utility package scripts.
71
73
72
74
## Install Versus Init
73
75
@@ -87,38 +89,49 @@ or by invoking the package as a bootstrap command:
87
89
bunx @memoir/dispatch
88
90
```
89
91
90
-
After initialization, package scripts such as `bun dev` or`bun sync` call the `dispatch` binary from `node_modules/.bin`. The command implementation still comes from the installed package unless the repo overrides it with local config, local command files, or unmanaged package scripts.
92
+
After initialization, package scripts such as `bun sync` and`bun portclean` run visible files in `dispatch/scripts/`. Those files delegate to the `dispatch` binary from `node_modules/.bin`.
91
93
92
94
## Generated Package Scripts
93
95
94
-
`dispatch init`keeps `package.json` intentionally small. It manages only common human workflow aliases:
96
+
`dispatch init`adds easy package-script aliases for common Dispatch workflows:
95
97
96
98
```json
97
99
{
98
100
"scripts": {
99
-
"dev": "dispatch dev",
100
-
"sync": "dispatch sync",
101
-
"sync-careful": "dispatch sync-careful",
102
-
"portclean": "dispatch portclean",
103
-
"update-all": "dispatch update-all",
104
-
"dp": "dispatch dp",
105
-
"menu": "dispatch menu"
101
+
"clean": "bun run dispatch/scripts/clean.ts",
102
+
"sync": "bun run dispatch/scripts/sync.ts",
103
+
"sync-careful": "bun run dispatch/scripts/sync-careful.ts",
104
+
"port": "bun run dispatch/scripts/port.ts",
105
+
"portclean": "bun run dispatch/scripts/portclean.ts",
106
+
"processes": "bun run dispatch/scripts/processes.ts",
107
+
"update": "bun run dispatch/scripts/update.ts",
108
+
"update-all": "bun run dispatch/scripts/update-all.ts",
109
+
"scripts": "bun run dispatch/scripts/scripts.ts",
110
+
"ops": "bun run dispatch/scripts/ops.ts",
111
+
"menu": "bun run dispatch/scripts/menu.ts"
106
112
}
107
113
}
108
114
```
109
115
110
116
People can then use normal package-manager commands:
111
117
112
118
```bash
113
-
bun dev
119
+
bun clean
114
120
bun sync
115
121
bun sync-careful
122
+
bun port
116
123
bun portclean
117
124
bun update-all
118
-
bun dp
119
125
```
120
126
121
-
Quality commands stay available through `dispatch` without adding more package-script noise:
127
+
`dispatch init` intentionally writes those utility script names. It does not generate normal project quality scripts such as `lint`, `test`, or `check`, and it does not replace `dev`.
128
+
129
+
```bash
130
+
bun sync
131
+
bun portclean
132
+
```
133
+
134
+
The same quality commands are always available through the binary too:
122
135
123
136
```bash
124
137
dispatch lint
@@ -133,20 +146,20 @@ If the repo appears to use Convex, `dispatch init` also adds:
133
146
```json
134
147
{
135
148
"scripts": {
136
-
"convex": "dispatch convex",
137
-
"convex:dev": "dispatch convex dev",
138
-
"convex:deploy": "dispatch convex deploy"
149
+
"convex": "bun run dispatch/scripts/convex.ts",
150
+
"convex:dev": "bun run dispatch/scripts/convex-dev.ts",
151
+
"convex:deploy": "bun run dispatch/scripts/convex-deploy.ts"
139
152
}
140
153
}
141
154
```
142
155
143
156
## Agent Instructions
144
157
145
-
`dispatch init` creates or updates the consuming repo's root `AGENTS.md`.
158
+
`dispatch init` creates or updates the consuming repo's root `AGENTS.md` and writes the Dispatch agent option at `dispatch/agents/default.md`.
146
159
147
160
The important behavior is that the target codebase gets instructions when it runs setup. The package having its own `AGENTS.md` is not enough.
148
161
149
-
Dispatch writes only this managed block:
162
+
The root `AGENTS.md` gets only this managed block:
150
163
151
164
```md
152
165
<!-- dispatch:agents:start -->
@@ -156,6 +169,8 @@ Dispatch writes only this managed block:
156
169
157
170
User-authored content outside the block is preserved. On later runs, Dispatch replaces only the managed block.
158
171
172
+
The managed block points agents at the visible `dispatch/` folder, where Dispatch-owned scripts, command guidance, and agent options live. Generated agent profiles include `default.md`, `bun-svelte.md`, `bun-next.md`, `bun-astro.md`, and `quant.md`.
173
+
159
174
If `AGENTS.md` contains only one marker, or markers are in the wrong order, setup refuses to continue. That prevents Dispatch from guessing and overwriting user content.
160
175
161
176
Check the state with:
@@ -206,14 +221,15 @@ Use `commands` when you want to fully override a Dispatch command with an argv a
0 commit comments