@shinnodua/agent-workflows 0.0.0-stage → 0.2.6

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.
Files changed (190) hide show
  1. package/.agents/agents/backend-developer/agent.md +39 -0
  2. package/.agents/agents/frontend-developer/agent.md +42 -0
  3. package/.agents/agents/project-manager/agent.md +37 -0
  4. package/.agents/agents/tech-lead/agent.md +41 -0
  5. package/.agents/agents/ui-ux-designer/agent.md +41 -0
  6. package/.agents/skills/add-project/SKILL.md +90 -0
  7. package/.agents/skills/add-project/agents/openai.yaml +4 -0
  8. package/.agents/skills/add-project/references/save-protocol.md +90 -0
  9. package/.agents/skills/approve-plan/SKILL.md +86 -0
  10. package/.agents/skills/approve-plan/agents/openai.yaml +4 -0
  11. package/.agents/skills/approve-prd/SKILL.md +59 -0
  12. package/.agents/skills/approve-prd/agents/openai.yaml +4 -0
  13. package/.agents/skills/auto-mode/SKILL.md +103 -0
  14. package/.agents/skills/auto-mode/agents/openai.yaml +4 -0
  15. package/.agents/skills/create-design/SKILL.md +197 -0
  16. package/.agents/skills/create-design/agents/openai.yaml +4 -0
  17. package/.agents/skills/create-diagram/SKILL.md +83 -0
  18. package/.agents/skills/create-diagram/agents/openai.yaml +4 -0
  19. package/.agents/skills/create-plan/SKILL.md +104 -0
  20. package/.agents/skills/create-plan/agents/openai.yaml +4 -0
  21. package/.agents/skills/create-prd/SKILL.md +82 -0
  22. package/.agents/skills/create-prd/agents/openai.yaml +4 -0
  23. package/.agents/skills/griling-plan/SKILL.md +114 -0
  24. package/.agents/skills/griling-plan/agents/openai.yaml +4 -0
  25. package/.agents/skills/griling-prd/SKILL.md +91 -0
  26. package/.agents/skills/griling-prd/agents/openai.yaml +4 -0
  27. package/.agents/skills/package-installation/SKILL.md +67 -0
  28. package/.agents/skills/package-installation/agents/openai.yaml +4 -0
  29. package/.agents/skills/project-setup/SKILL.md +104 -0
  30. package/.agents/skills/project-setup/agents/openai.yaml +3 -0
  31. package/.agents/skills/research/SKILL.md +61 -0
  32. package/.agents/skills/research/agents/openai.yaml +4 -0
  33. package/.agents/skills/sprint-meeting/SKILL.md +230 -0
  34. package/.agents/skills/sprint-meeting/agents/openai.yaml +4 -0
  35. package/.claude/agents/backend-developer.md +7 -0
  36. package/.claude/agents/frontend-developer.md +7 -0
  37. package/.claude/agents/project-manager.md +7 -0
  38. package/.claude/agents/tech-lead.md +7 -0
  39. package/.claude/agents/ui-ux-designer.md +7 -0
  40. package/.claude/skills/add-project/SKILL.md +10 -0
  41. package/.claude/skills/approve-plan/SKILL.md +8 -0
  42. package/.claude/skills/approve-prd/SKILL.md +8 -0
  43. package/.claude/skills/auto-mode/SKILL.md +8 -0
  44. package/.claude/skills/create-design/SKILL.md +8 -0
  45. package/.claude/skills/create-diagram/SKILL.md +8 -0
  46. package/.claude/skills/create-plan/SKILL.md +8 -0
  47. package/.claude/skills/create-prd/SKILL.md +8 -0
  48. package/.claude/skills/griling-plan/SKILL.md +8 -0
  49. package/.claude/skills/griling-prd/SKILL.md +8 -0
  50. package/.claude/skills/package-installation/SKILL.md +8 -0
  51. package/.claude/skills/project-setup/SKILL.md +8 -0
  52. package/.claude/skills/research/SKILL.md +8 -0
  53. package/.claude/skills/sprint-meeting/SKILL.md +8 -0
  54. package/.codex/prompts/add-project.md +3 -0
  55. package/.codex/prompts/approve-plan.md +3 -0
  56. package/.codex/prompts/approve-prd.md +3 -0
  57. package/.codex/prompts/auto-mode.md +3 -0
  58. package/.codex/prompts/create-design.md +3 -0
  59. package/.codex/prompts/create-diagram.md +3 -0
  60. package/.codex/prompts/create-plan.md +3 -0
  61. package/.codex/prompts/create-prd.md +3 -0
  62. package/.codex/prompts/griling-plan.md +3 -0
  63. package/.codex/prompts/griling-prd.md +3 -0
  64. package/.codex/prompts/grilling-plan.md +3 -0
  65. package/.codex/prompts/project-setup.md +3 -0
  66. package/.codex/prompts/research.md +3 -0
  67. package/.codex/prompts/sprint-meeting.md +3 -0
  68. package/.gitmodules.example +9 -0
  69. package/AGENTS.md +84 -0
  70. package/CLAUDE.md +1 -0
  71. package/INSTALL.md +284 -0
  72. package/LICENSE +21 -0
  73. package/README.md +342 -2
  74. package/bin/postinstall.js +57 -0
  75. package/bin/workflows.js +1172 -0
  76. package/bin/workflows.test.mjs +682 -0
  77. package/commands/add-project.md +20 -0
  78. package/commands/approve-plan.md +25 -0
  79. package/commands/approve-prd.md +24 -0
  80. package/commands/auto-mode.md +15 -0
  81. package/commands/create-design.md +20 -0
  82. package/commands/create-diagram.md +16 -0
  83. package/commands/create-plan.md +22 -0
  84. package/commands/create-prd.md +16 -0
  85. package/commands/griling-plan.md +16 -0
  86. package/commands/griling-prd.md +16 -0
  87. package/commands/grilling-plan.md +16 -0
  88. package/commands/project-setup.md +16 -0
  89. package/commands/research.md +16 -0
  90. package/commands/sprint-meeting.md +16 -0
  91. package/dashboard/.agents/skills/coding-conventions/SKILL.md +76 -0
  92. package/dashboard/.agents/skills/coding-conventions/agents/openai.yaml +4 -0
  93. package/dashboard/.agents/skills/design-system-guideline/SKILL.md +51 -0
  94. package/dashboard/.agents/skills/design-system-guideline/agents/openai.yaml +4 -0
  95. package/dashboard/.agents/skills/lint-and-fix/SKILL.md +55 -0
  96. package/dashboard/.agents/skills/lint-and-fix/agents/openai.yaml +4 -0
  97. package/dashboard/.agents/skills/taste-ui/SKILL.md +45 -0
  98. package/dashboard/.agents/skills/taste-ui/agents/openai.yaml +4 -0
  99. package/dashboard/AGENTS.md +43 -0
  100. package/dashboard/bun.lock +352 -0
  101. package/dashboard/index.html +12 -0
  102. package/dashboard/package.json +32 -0
  103. package/dashboard/src/App.tsx +5 -0
  104. package/dashboard/src/features/task-status/components/ActionRequiredPanel/ActionRequiredPanel.module.css +85 -0
  105. package/dashboard/src/features/task-status/components/ActionRequiredPanel/ActionRequiredPanel.tsx +80 -0
  106. package/dashboard/src/features/task-status/components/ArtifactButton/ArtifactButton.module.css +25 -0
  107. package/dashboard/src/features/task-status/components/ArtifactButton/ArtifactButton.tsx +29 -0
  108. package/dashboard/src/features/task-status/components/ArtifactSummaryCards/ArtifactSummaryCards.module.css +29 -0
  109. package/dashboard/src/features/task-status/components/ArtifactSummaryCards/ArtifactSummaryCards.tsx +35 -0
  110. package/dashboard/src/features/task-status/components/CategoryPanel/CategoryPanel.module.css +85 -0
  111. package/dashboard/src/features/task-status/components/CategoryPanel/CategoryPanel.tsx +150 -0
  112. package/dashboard/src/features/task-status/components/DashboardHeader/DashboardHeader.module.css +41 -0
  113. package/dashboard/src/features/task-status/components/DashboardHeader/DashboardHeader.tsx +41 -0
  114. package/dashboard/src/features/task-status/components/FilesPanel/FilesPanel.module.css +25 -0
  115. package/dashboard/src/features/task-status/components/FilesPanel/FilesPanel.tsx +40 -0
  116. package/dashboard/src/features/task-status/components/HardnessEngineeringPanel/HardnessEngineeringPanel.module.css +330 -0
  117. package/dashboard/src/features/task-status/components/HardnessEngineeringPanel/HardnessEngineeringPanel.tsx +299 -0
  118. package/dashboard/src/features/task-status/components/LifecyclePanel/LifecyclePanel.module.css +74 -0
  119. package/dashboard/src/features/task-status/components/LifecyclePanel/LifecyclePanel.tsx +79 -0
  120. package/dashboard/src/features/task-status/components/MarkdownDialog/MarkdownDialog.module.css +133 -0
  121. package/dashboard/src/features/task-status/components/MarkdownDialog/MarkdownDialog.tsx +233 -0
  122. package/dashboard/src/features/task-status/components/Sidebar/Sidebar.module.css +53 -0
  123. package/dashboard/src/features/task-status/components/Sidebar/Sidebar.tsx +163 -0
  124. package/dashboard/src/features/task-status/components/StatusBadge/StatusBadge.module.css +41 -0
  125. package/dashboard/src/features/task-status/components/StatusBadge/StatusBadge.tsx +48 -0
  126. package/dashboard/src/features/task-status/components/TaskOverview/TaskOverview.module.css +97 -0
  127. package/dashboard/src/features/task-status/components/TaskOverview/TaskOverview.tsx +128 -0
  128. package/dashboard/src/features/task-status/components/TaskStatusDashboard/TaskStatusDashboard.module.css +9 -0
  129. package/dashboard/src/features/task-status/components/TaskStatusDashboard/TaskStatusDashboard.tsx +318 -0
  130. package/dashboard/src/features/task-status/components/WorkflowPanel/WorkflowPanel.module.css +221 -0
  131. package/dashboard/src/features/task-status/components/WorkflowPanel/WorkflowPanel.tsx +344 -0
  132. package/dashboard/src/features/task-status/taskStatusConfig.ts +100 -0
  133. package/dashboard/src/features/task-status/utils/actionItems.ts +247 -0
  134. package/dashboard/src/features/task-status/utils/artifactGrouping.ts +328 -0
  135. package/dashboard/src/features/task-status/utils/hardnessScanner.ts +406 -0
  136. package/dashboard/src/features/task-status/utils/lifecycle.ts +73 -0
  137. package/dashboard/src/features/task-status/utils/markdownInline/markdownInline.module.css +11 -0
  138. package/dashboard/src/features/task-status/utils/markdownInline/markdownInline.tsx +104 -0
  139. package/dashboard/src/features/task-status/utils/markdownLinks.ts +83 -0
  140. package/dashboard/src/features/task-status/utils/markdownRenderer/markdownRenderer.module.css +74 -0
  141. package/dashboard/src/features/task-status/utils/markdownRenderer/markdownRenderer.tsx +326 -0
  142. package/dashboard/src/features/task-status/utils/status.ts +7 -0
  143. package/dashboard/src/features/task-status/utils/test/actionItems.test.ts +134 -0
  144. package/dashboard/src/features/task-status/utils/test/artifactGrouping.test.ts +294 -0
  145. package/dashboard/src/features/task-status/utils/test/hardnessScanner.test.ts +138 -0
  146. package/dashboard/src/features/task-status/utils/test/lifecycle.test.ts +49 -0
  147. package/dashboard/src/features/task-status/utils/test/markdownInline.test.ts +41 -0
  148. package/dashboard/src/features/task-status/utils/test/markdownLinks.test.ts +158 -0
  149. package/dashboard/src/features/task-status/utils/test/workspaceMetadata.test.ts +37 -0
  150. package/dashboard/src/features/task-status/utils/workspaceMetadata.ts +175 -0
  151. package/dashboard/src/main.tsx +16 -0
  152. package/dashboard/src/shared/design-system.css +134 -0
  153. package/dashboard/src/shared/design-system.tsx +84 -0
  154. package/dashboard/src/styles.css +41 -0
  155. package/dashboard/src/types.ts +133 -0
  156. package/dashboard/src/workspace-artifacts.d.ts +9 -0
  157. package/dashboard/tsconfig.json +22 -0
  158. package/dashboard/vite.config.ts +579 -0
  159. package/designs/.gitkeep +1 -0
  160. package/docs/add-project-command-completion.md +117 -0
  161. package/docs/public-npm-registry-completion.md +104 -0
  162. package/docs/workflows.png +0 -0
  163. package/docs/workspace-template-setup.md +229 -0
  164. package/meeting-logs/.gitkeep +1 -0
  165. package/modules/.gitkeep +1 -0
  166. package/package.json +96 -5
  167. package/plans/.gitkeep +1 -0
  168. package/prds/.gitkeep +1 -0
  169. package/project/PROJECT.md +26 -0
  170. package/project/repositories.json +72 -0
  171. package/project/validation.json +9 -0
  172. package/project/workflows.json +20 -0
  173. package/research/.gitkeep +1 -0
  174. package/roles/backend-developer.md +26 -0
  175. package/roles/frontend-developer.md +25 -0
  176. package/roles/project-manager.md +42 -0
  177. package/roles/tech-lead.md +42 -0
  178. package/roles/ui-ux-designer.md +43 -0
  179. package/scripts/add-project.mjs +990 -0
  180. package/scripts/add-project.test.mjs +804 -0
  181. package/scripts/check-staged-security.mjs +97 -0
  182. package/scripts/check-staged-security.test.mjs +68 -0
  183. package/scripts/workspace-integrity.ts +220 -0
  184. package/templates/auto-mode-completion-summary-template.md +78 -0
  185. package/templates/meeting-log-template.md +177 -0
  186. package/templates/plan-template.md +219 -0
  187. package/templates/prd-template.md +106 -0
  188. package/templates/research-template.md +119 -0
  189. package/workflows.md +590 -0
  190. package/workspace.config.json +43 -0
package/README.md CHANGED
@@ -1,3 +1,343 @@
1
- # Temporary Holding Version
1
+ # Agent Workflows
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Installable multi-repository coordination workflow for agent-led product work.
4
+
5
+ This package provides reusable agent rules, skills, command shims,
6
+ PRD/plan/research templates, role definitions, workspace integrity checks, and a
7
+ local dashboard for browsing Markdown artifacts.
8
+
9
+ > **Personal project:** I built Agent Workflows for my own use and continue to
10
+ > shape it around my workflow. If you have ideas for making it clearer or more
11
+ > useful, I welcome suggestions and contributions.
12
+
13
+ ![Workspace delivery workflow](docs/workflows.png)
14
+
15
+ Explore the [interactive workspace delivery workflow](.archify/workflow-workspace-delivery-20260929-093455/workspace-delivery.html).
16
+
17
+ ## Install
18
+
19
+ To have an agent initialize and configure a complete consuming workspace, give it
20
+ the [INSTALL.md bootstrap guide](INSTALL.md).
21
+
22
+ Install the package globally when you want the `workflows` command available in
23
+ your shell:
24
+
25
+ ```sh
26
+ bun add --global @shinnodua/agent-workflows
27
+ ```
28
+
29
+ Or install it in a project as a dev dependency:
30
+
31
+ ```sh
32
+ bun add --dev @shinnodua/agent-workflows
33
+ ```
34
+
35
+ The public npm package requires no authentication. If you previously used GitHub
36
+ Packages, follow [the registry migration notes](#migrating-from-github-packages).
37
+
38
+ Then initialize the project. Use `workflows` after a global install, or
39
+ `bunx workflows` when the package is installed as a project dev dependency:
40
+
41
+ ```sh
42
+ bunx workflows init
43
+ ```
44
+
45
+ `workflows init` writes local discovery shims into the current project, creates
46
+ starter `project/` profile files when they do not exist, and records managed
47
+ files in `.agent-workflows/manifest.json`. The shims let source agents discover
48
+ commands and skills locally while the source of truth stays in the installed
49
+ package.
50
+
51
+ Restart or reload any active agent session after `workflows init`. Source agents
52
+ discover custom agents, commands, and skills from local `.agents/agents/`,
53
+ `.codex/prompts/`, `.claude/agents/`, `.claude/skills/`, `.agents/skills/`,
54
+ `commands/`, and `workflows.md` shims. Claude Code loads `CLAUDE.md`, which
55
+ imports the shared `AGENTS.md` rules. Run `/project-setup` in either agent.
56
+
57
+ To choose a model for each role, edit `agentModels` in `workspace.config.json`.
58
+ The five keys are `project-manager`, `tech-lead`, `ui-ux-designer`,
59
+ `backend-developer`, and `frontend-developer`. Each defaults to `inherit`; replace
60
+ any value with a model ID, or use an object with separate `codex`,
61
+ `antigravity`, and `claude` values when using multiple coding agents. For example:
62
+
63
+ ```json
64
+ {
65
+ "agentModels": {
66
+ "project-manager": "inherit",
67
+ "tech-lead": {
68
+ "codex": "gpt-6-astra",
69
+ "antigravity": "pro",
70
+ "claude": "sonnet"
71
+ },
72
+ "ui-ux-designer": "inherit",
73
+ "backend-developer": "inherit",
74
+ "frontend-developer": "inherit"
75
+ }
76
+ }
77
+ ```
78
+
79
+ Use `bunx workflows agents models --format codex` to list models from the
80
+ installed Codex runtime. Unknown Codex models warn and resolve to `inherit`,
81
+ with a close match suggestion when possible. Antigravity accepts `inherit`,
82
+ `flash`, and `pro`; an unsupported tier warns and falls back to `inherit`.
83
+ Which Antigravity models are available under each tier depends on the user's plan.
84
+ Claude Code model IDs pass through because it does not expose a local model
85
+ catalog; its `models` command documents aliases such as `sonnet` and `opus`.
86
+
87
+ After editing, run `bunx workflows agents sync --format <codex|antigravity>`
88
+ and start a new agent session. Codex and Antigravity discover the same
89
+ `.agents/agents/` files, so sync applies one selected runtime's model to that
90
+ shared frontmatter. Run sync again when switching runtimes. The command also
91
+ updates `.claude/agents/` from the Claude settings;
92
+ `workflows init` and `workflows update` run it automatically. Updates preserve
93
+ your workspace config and add missing model defaults to configs created by older
94
+ package versions. Each workflow model object can set runtime-specific values;
95
+ omitted runtimes inherit their own default. Resolve the model immediately before
96
+ spawning a role using the active runtime.
97
+
98
+ You can override a role's base model for a workflow step. Add `workflowModels`
99
+ alongside `agentModels` in the same config file:
100
+
101
+ ```json
102
+ {
103
+ "workflowModels": {
104
+ "planning": {
105
+ "default": { "codex": "gpt-6-astra", "antigravity": "pro", "claude": "sonnet" },
106
+ "backend-developer": { "codex": "gpt-6-sol", "antigravity": "flash", "claude": "opus" }
107
+ },
108
+ "coding": {
109
+ "backend-developer": { "codex": "gpt-6-astra", "antigravity": "pro", "claude": "sonnet" }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ The supported steps are `research`, `prd`, `design`, `meeting`, `planning`,
116
+ `coding`, and `validation`. A role override wins over its step default, which
117
+ wins over its base `agentModels` value. An explicit `inherit` chooses the runtime
118
+ default. Runtime-specific objects may set any of `codex`, `antigravity`, and
119
+ `claude`; omitted keys inherit. A string remains a shorthand for the same model
120
+ value across runtimes, and the old `agents` key remains an alias for Codex.
121
+ Check a result with `bunx workflows agents resolve planning backend-developer
122
+ --format antigravity --json`. Step overrides apply when the workflow spawns a new role agent;
123
+ `agents sync` updates only base agent files. If coding and validation run in one
124
+ agent session, that agent keeps its coding model.
125
+
126
+ Then fill the project profile with the guided command:
127
+
128
+ ```sh
129
+ /project-setup
130
+ ```
131
+
132
+ After a PRD exists, run a role-agent review meeting from the active agent chat:
133
+
134
+ ```sh
135
+ /sprint-meeting <prd-id>
136
+ ```
137
+
138
+ To let the agent continue through the full feature workflow after you start a
139
+ feature request, enable auto mode:
140
+
141
+ ```sh
142
+ bunx workflows auto on
143
+ ```
144
+
145
+ Check or change it later with `bunx workflows auto status`, `off`, or `toggle`,
146
+ or use `/auto-mode on|off|toggle|status` in the agent chat. Auto mode is off by
147
+ default and is saved in `workspace.config.json` under `autoMode`. Older
148
+ `.agent-workflows/metadata.json` settings migrate when you run `workflows update`
149
+ or an auto-mode command. It runs research,
150
+ PRD, design, sprint meeting, PRD and plan approvals, implementation, and
151
+ validation without routine approval prompts. The agent still asks for decisions
152
+ only the developer can answer.
153
+
154
+ ## Commands
155
+
156
+ ```sh
157
+ bunx workflows init
158
+ auto-mode on|off|toggle|status
159
+ project-setup
160
+ add-project [repository-url]
161
+ sprint-meeting
162
+ bunx workflows dashboard
163
+ bunx workflows update
164
+ bunx workflows integrity
165
+ bunx workflows check
166
+ bunx workflows auto on|off|toggle|status
167
+ bunx workflows agents sync
168
+ bunx workflows agents resolve planning tech-lead --format codex --json
169
+ ```
170
+
171
+ - `workflows init` sets up a developer project to follow the workflow.
172
+ - `auto-mode` and `workflows auto` control workspace-local automatic progression.
173
+ - `project-setup` guides the developer through completing the `project/` profile
174
+ files step by step.
175
+ - `add-project` starts with a repository URL, infers profile values, and reviews
176
+ entries one at a time. Choose Add another repository or Save repositories. Save
177
+ clones and registers the selected submodules, updates related configuration,
178
+ and removes recognized example entries after successful additions; it creates
179
+ no commits. Project setup reuses this flow.
180
+ - `sprint-meeting` runs a time-boxed role-agent PRD review meeting and saves the
181
+ record under `meeting-logs/`.
182
+ - `workflows dashboard` starts the packaged dashboard and reads artifact data
183
+ from the developer project root.
184
+ - `workflows update` refreshes workflow-owned shims and adds missing model defaults to older workspace configs.
185
+ - `workflows integrity` validates workspace artifact metadata.
186
+ - `workflows check` validates syntax, lint rules, configuration, and workspace
187
+ artifacts without enforcing formatting or rewriting files. Use your project's
188
+ dedicated Biome `check`/format command to enforce formatting and assist actions
189
+ such as import sorting.
190
+ - `workflows agents sync` applies per-role models from `workspace.config.json`.
191
+ - `workflows agents resolve` reports the effective model and config source for a workflow step.
192
+
193
+ ## Commit Security Check
194
+
195
+ Install the repository's Git hook once after cloning:
196
+
197
+ ```sh
198
+ bun install
199
+ bun run hooks:install
200
+ ```
201
+
202
+ Before each commit, Lefthook scans staged files for private keys, common service
203
+ tokens, credential assignments, personal email addresses, local home paths, and
204
+ sensitive filenames. A finding blocks the commit and reports its location
205
+ without printing the value. The existing workspace checks run after this scan.
206
+ Run the scan directly with `bun run security:staged`.
207
+
208
+ The scan uses patterns and cannot guarantee that every secret or private detail
209
+ is caught. Review staged changes before committing. Example addresses under
210
+ `example.com`, `example.org`, and `example.net` are allowed.
211
+
212
+ Package installation leaves existing workspace files unchanged. After upgrading,
213
+ run `bunx workflows update` from the project root to refresh the local shims, or
214
+ set `AGENT_WORKFLOWS_AUTO_UPDATE=1` during installation to enable that update in
215
+ the package lifecycle script. Restart or reload any active agent session after
216
+ the refresh.
217
+
218
+ ## Local Shims
219
+
220
+ Agent Workflows keeps reusable source files in the installed package and writes
221
+ small local shims for agent discovery:
222
+
223
+ - `.agents/skills/*/SKILL.md`
224
+ - `.agents/agents/*/agent.md`
225
+ - `.codex/prompts/*.md`
226
+ - `.claude/skills/*/SKILL.md`
227
+ - `.claude/agents/*.md`
228
+ - `commands/*.md`
229
+ - `AGENTS.md`
230
+ - `CLAUDE.md`
231
+ - `workflows.md`
232
+ - reusable `roles/`, `templates/`, and setup docs
233
+
234
+ Those shims point back to
235
+ `node_modules/@shinnodua/agent-workflows/...` for project-local installs, or to
236
+ the actual package install path for global installs. Project-owned files such as
237
+ `project/`, `prds/`, `plans/`, `designs/`, `research/`, `meeting-logs/`,
238
+ `docs/`, and `modules/` remain local to the consuming workspace.
239
+
240
+ ## Build And Release
241
+
242
+ Create a changeset for any package change:
243
+
244
+ ```sh
245
+ bun run changeset
246
+ ```
247
+
248
+ Validate the package before opening a PR:
249
+
250
+ ```sh
251
+ bun run package:build
252
+ ```
253
+
254
+ GitHub Actions runs CI on pull requests and pushes to `main`. The release
255
+ workflow uses Changesets to open a version PR, then publishes after that PR is
256
+ merged.
257
+
258
+ The release workflow publishes `@shinnodua/agent-workflows` publicly to
259
+ `https://registry.npmjs.org`. It uses Node 24, npm 11, and npm trusted publishing
260
+ through GitHub OIDC (`id-token: write`). `GITHUB_TOKEN` supports repository
261
+ automation; no npm publish token is required in CI. Repository Actions settings
262
+ must allow GitHub Actions to create pull requests.
263
+
264
+ ### npm maintainer setup
265
+
266
+ Complete these steps before relying on automated publishing:
267
+
268
+ 1. Confirm your npm account owns or has publish access to the `@shinnodua` scope.
269
+ Check whether the package and intended version already exist on npm:
270
+
271
+ ```sh
272
+ npm view @shinnodua/agent-workflows versions --registry=https://registry.npmjs.org
273
+ ```
274
+
275
+ An E404 can indicate an unpublished package or missing access; verify ownership
276
+ in your npm account before continuing. Never reuse a published version.
277
+ 2. If the package is absent, publish its first version from a validated checkout
278
+ using your npm account. These commands publish a real public package; run them
279
+ only when ready to release:
280
+
281
+ ```sh
282
+ npm login --registry=https://registry.npmjs.org
283
+ bun run package:build
284
+ npm publish --access public --registry=https://registry.npmjs.org
285
+ ```
286
+
287
+ Complete npm's authentication/2FA prompt privately. Keep the checkout's version
288
+ aligned with the version you publish; subsequent versions remain managed by
289
+ Changesets.
290
+ 3. In the npm package's Settings → Trusted Publisher, select GitHub Actions and
291
+ configure:
292
+
293
+ | Field | Value |
294
+ | --- | --- |
295
+ | Organization or user | `shinnodua` |
296
+ | Repository | `agent-workflows` |
297
+ | Workflow filename | `release.yml` |
298
+ | Environment | Leave empty; this workflow has no environment binding |
299
+ | Allowed actions | Enable direct `npm publish` |
300
+
301
+ 4. Merge package changes with a changeset, then merge the generated version PR.
302
+ The release workflow validates and publishes the new version. Confirm its
303
+ availability with `npm view` and an anonymous install in a clean project.
304
+
305
+ See [npm's trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/)
306
+ for account-side configuration and troubleshooting. Local validation and package
307
+ dry-runs do not verify npm ownership, trusted publisher configuration, or a live
308
+ publication.
309
+
310
+ ### Migrating from GitHub Packages
311
+
312
+ For fresh installations with the default npm registry, no `.npmrc` is needed.
313
+ If project or user configuration previously mapped `@shinnodua` to GitHub
314
+ Packages, replace only that scope mapping, preserving unrelated settings:
315
+
316
+ ```ini
317
+ @shinnodua:registry=https://registry.npmjs.org
318
+ ```
319
+
320
+ For a project-level override, you can run:
321
+
322
+ ```sh
323
+ npm config set '@shinnodua:registry' https://registry.npmjs.org --location=project
324
+ ```
325
+
326
+ Existing lockfiles may still contain GitHub Packages tarball URLs. Refresh this
327
+ dependency with your package manager and review its lockfile changes without
328
+ deleting unrelated dependencies or configuration. Package versions must exist
329
+ on npm before consumers can migrate; the registry change alone does not copy
330
+ previous GitHub releases.
331
+
332
+ ## Project Setup
333
+
334
+ After initialization:
335
+
336
+ 1. Edit `project/PROJECT.md` with your product context and ownership boundaries.
337
+ 2. Edit `project/repositories.json` with your repositories and submodule paths.
338
+ 3. Add matching Git submodules under `modules/`.
339
+ 4. Run `bunx workflows integrity` or `bunx workflows check`.
340
+ 5. Start the dashboard with `bunx workflows dashboard`.
341
+
342
+ See [docs/workspace-template-setup.md](docs/workspace-template-setup.md) for the
343
+ full adaptation checklist.
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import fs from "node:fs";
4
+ import path from "node:path";
5
+ import process from "node:process";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const initCwd = process.env.INIT_CWD;
9
+
10
+ if (!initCwd) {
11
+ process.exit(0);
12
+ }
13
+
14
+ const manifestPath = path.join(initCwd, ".agent-workflows", "manifest.json");
15
+
16
+ if (!/^(1|true)$/i.test(process.env.AGENT_WORKFLOWS_AUTO_UPDATE ?? "")) {
17
+ console.log(
18
+ "Agent Workflows left existing workspace files unchanged. Run `bunx workflows update` to refresh commands and skills, or set AGENT_WORKFLOWS_AUTO_UPDATE=1 to enable install-time updates.",
19
+ );
20
+ process.exit(0);
21
+ }
22
+
23
+ if (!fs.existsSync(manifestPath)) {
24
+ console.log(
25
+ "Agent Workflows installed. Run `bunx workflows init` from the project root so source agents can load packaged commands and skills.",
26
+ );
27
+ process.exit(0);
28
+ }
29
+
30
+ const packageRoot = path.resolve(
31
+ path.dirname(fileURLToPath(import.meta.url)),
32
+ "..",
33
+ );
34
+ const workflowsBin = path.join(packageRoot, "bin", "workflows.js");
35
+ const result = spawnSync(
36
+ process.execPath,
37
+ [workflowsBin, "update", "--root", initCwd],
38
+ {
39
+ env: {
40
+ ...process.env,
41
+ AGENT_WORKFLOWS_POSTINSTALL: "1",
42
+ },
43
+ stdio: "inherit",
44
+ },
45
+ );
46
+
47
+ if (result.status === 0) {
48
+ console.log(
49
+ "Agent Workflows command and skill shims were refreshed. Restart or reload any active agent session to pick them up.",
50
+ );
51
+ process.exit(0);
52
+ }
53
+
54
+ console.warn(
55
+ "Agent Workflows could not auto-refresh workflow files. Run `bunx workflows update` from the project root.",
56
+ );
57
+ process.exit(0);