nobrainer-tech-flow 0.0.0-stage → 2.4.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.
Files changed (149) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +18 -0
  3. package/.claude-plugin/plugin.json +21 -0
  4. package/.codex-plugin/plugin.json +47 -0
  5. package/.opencode/INSTALL.md +37 -0
  6. package/.opencode/plugins/nobrainer-tech-skills.js +66 -0
  7. package/.pi/extensions/nobrainer-tech-skills.js +64 -0
  8. package/AGENTS.md +204 -0
  9. package/CLAUDE.md +204 -0
  10. package/CONTRIBUTING.md +70 -0
  11. package/GEMINI.md +1 -0
  12. package/LICENSE +21 -0
  13. package/README.md +658 -2
  14. package/SECURITY.md +33 -0
  15. package/adapters/bootstrap.md +27 -0
  16. package/assets/nobrainer-tech-logo.svg +1 -0
  17. package/assets/nobrainer-workflow.svg +155 -0
  18. package/assets/plugin-logo.png +0 -0
  19. package/bin/nobrainer-tech-flow.mjs +48 -0
  20. package/docs/BOUNDED_RUNNER.md +60 -0
  21. package/docs/CHAT_PLUGINS.md +29 -0
  22. package/docs/COMPATIBILITY.md +371 -0
  23. package/docs/INSTALL.md +626 -0
  24. package/docs/MIGRATION_TO_FLOW.md +117 -0
  25. package/docs/NAMING.md +39 -0
  26. package/docs/PRIVACY.md +9 -0
  27. package/docs/SESSION_RESTART.md +70 -0
  28. package/docs/SKILL_CURATION.md +124 -0
  29. package/docs/TESTING.md +232 -0
  30. package/docs/TRY_IT.md +109 -0
  31. package/docs/releases/v1.0.0.md +81 -0
  32. package/docs/releases/v1.1.0.md +85 -0
  33. package/docs/releases/v1.10.0.md +34 -0
  34. package/docs/releases/v1.11.0-publication-readback.md +25 -0
  35. package/docs/releases/v1.11.0.md +42 -0
  36. package/docs/releases/v1.12.0.md +30 -0
  37. package/docs/releases/v1.13.0.md +46 -0
  38. package/docs/releases/v1.14.0.md +43 -0
  39. package/docs/releases/v1.14.1.md +21 -0
  40. package/docs/releases/v1.2.0.md +87 -0
  41. package/docs/releases/v1.2.1.md +92 -0
  42. package/docs/releases/v1.3.0-publication-readback.md +69 -0
  43. package/docs/releases/v1.3.0.md +66 -0
  44. package/docs/releases/v1.3.1-publication-readback.md +76 -0
  45. package/docs/releases/v1.3.1.md +59 -0
  46. package/docs/releases/v1.4.0-publication-readback.md +81 -0
  47. package/docs/releases/v1.4.0.md +43 -0
  48. package/docs/releases/v1.5.0-publication-readback.md +76 -0
  49. package/docs/releases/v1.5.0.md +54 -0
  50. package/docs/releases/v1.6.0.md +64 -0
  51. package/docs/releases/v1.6.1-publication-readback.md +53 -0
  52. package/docs/releases/v1.6.1.md +82 -0
  53. package/docs/releases/v1.7.0.md +42 -0
  54. package/docs/releases/v1.7.1-publication-readback.md +64 -0
  55. package/docs/releases/v1.7.1.md +49 -0
  56. package/docs/releases/v1.8.0.md +63 -0
  57. package/docs/releases/v1.8.1.md +32 -0
  58. package/docs/releases/v1.9.0.md +33 -0
  59. package/docs/releases/v2.0.0-candidate.md +28 -0
  60. package/docs/releases/v2.0.0.md +53 -0
  61. package/docs/releases/v2.0.1.md +135 -0
  62. package/docs/releases/v2.0.2.md +189 -0
  63. package/docs/releases/v2.1.0.md +64 -0
  64. package/docs/releases/v2.1.1.md +43 -0
  65. package/docs/releases/v2.2.0.md +64 -0
  66. package/docs/releases/v2.2.1.md +11 -0
  67. package/docs/releases/v2.3.0.md +97 -0
  68. package/docs/releases/v2.3.1.md +71 -0
  69. package/docs/releases/v2.3.2.md +242 -0
  70. package/docs/releases/v2.4.0.md +126 -0
  71. package/gemini-extension.json +6 -0
  72. package/hooks/claude-hooks.json +17 -0
  73. package/hooks/hooks-cursor.json +10 -0
  74. package/hooks/run-hook.cmd +36 -0
  75. package/hooks/session-start +38 -0
  76. package/package.json +69 -4
  77. package/plugin.json +51 -0
  78. package/scripts/build_plugin.py +50 -0
  79. package/scripts/check_flow_update.py +18 -0
  80. package/scripts/check_public_commit.py +86 -0
  81. package/scripts/fetch_public_refs.py +69 -0
  82. package/scripts/install.py +600 -0
  83. package/scripts/install.sh +1392 -0
  84. package/scripts/install_guards.py +279 -0
  85. package/scripts/install_personalization.py +527 -0
  86. package/scripts/install_skills.py +951 -0
  87. package/scripts/npm_install.py +85 -0
  88. package/scripts/recommend_flow_setup.py +1522 -0
  89. package/scripts/validate_skills.py +465 -0
  90. package/skills/nobrainer-auto-fine-tune/SKILL.md +79 -0
  91. package/skills/nobrainer-auto-fine-tune/references/capacity-audit.md +49 -0
  92. package/skills/nobrainer-autoimprove/SKILL.md +212 -0
  93. package/skills/nobrainer-autoimprove/scripts/count_words.py +22 -0
  94. package/skills/nobrainer-browser/SKILL.md +234 -0
  95. package/skills/nobrainer-browser/references/cdp-profile-restart.md +93 -0
  96. package/skills/nobrainer-build/SKILL.md +173 -0
  97. package/skills/nobrainer-codex-context/SKILL.md +111 -0
  98. package/skills/nobrainer-codex-context/scripts/codex_context.py +175 -0
  99. package/skills/nobrainer-decide/SKILL.md +198 -0
  100. package/skills/nobrainer-dispatcher/SKILL.md +256 -0
  101. package/skills/nobrainer-dispatcher/agents/openai.yaml +4 -0
  102. package/skills/nobrainer-rca/SKILL.md +163 -0
  103. package/skills/nobrainer-research/SKILL.md +131 -0
  104. package/skills/nobrainer-review/SKILL.md +195 -0
  105. package/skills/nobrainer-security/SKILL.md +166 -0
  106. package/skills/nobrainer-sessions/SKILL.md +223 -0
  107. package/skills/nobrainer-sessions/references/evidence-receipt.md +55 -0
  108. package/skills/nobrainer-sessions/references/protocol.md +337 -0
  109. package/skills/nobrainer-sessions/references/session-restart.md +255 -0
  110. package/skills/nobrainer-sessions/scripts/evidence_receipt.py +373 -0
  111. package/skills/nobrainer-sessions/scripts/restart_gate.py +140 -0
  112. package/skills/nobrainer-sessions/scripts/run_bounded.py +390 -0
  113. package/skills/nobrainer-sessions/scripts/session_title.py +43 -0
  114. package/skills/nobrainer-skill-doctor/SKILL.md +149 -0
  115. package/skills/nobrainer-skill-doctor/references/astra.md +19 -0
  116. package/skills/nobrainer-skill-doctor/scripts/audit.py +100 -0
  117. package/skills/nobrainer-skill-doctor/scripts/context_candidates.py +133 -0
  118. package/skills/nobrainer-spec-driven-development/SKILL.md +132 -0
  119. package/skills/nobrainer-spec-driven-development/references/spec-template.md +114 -0
  120. package/skills/nobrainer-team/SKILL.md +165 -0
  121. package/skills/nobrainer-team/references/team-plan.md +64 -0
  122. package/skills/nobrainer-tech-flow/SKILL.md +239 -0
  123. package/skills/nobrainer-tech-flow/VERSION +1 -0
  124. package/skills/nobrainer-tech-flow/references/autopilot.md +72 -0
  125. package/skills/nobrainer-tech-flow/references/codex-routing.md +21 -0
  126. package/skills/nobrainer-tech-flow/references/communication.md +108 -0
  127. package/skills/nobrainer-tech-flow/references/correction-hooks.md +110 -0
  128. package/skills/nobrainer-tech-flow/references/daily-update.md +28 -0
  129. package/skills/nobrainer-tech-flow/references/delivery.md +243 -0
  130. package/skills/nobrainer-tech-flow/references/idea-to-delivery.md +82 -0
  131. package/skills/nobrainer-tech-flow/references/long-run-state.md +209 -0
  132. package/skills/nobrainer-tech-flow/references/model-routing.md +83 -0
  133. package/skills/nobrainer-tech-flow/references/optional-decisions.md +83 -0
  134. package/skills/nobrainer-tech-flow/references/project-start.md +22 -0
  135. package/skills/nobrainer-tech-flow/references/routing.md +125 -0
  136. package/skills/nobrainer-tech-flow/references/setup.md +180 -0
  137. package/skills/nobrainer-tech-flow/references/worktrees.md +138 -0
  138. package/skills/nobrainer-tech-flow/scripts/check_flow_update.py +298 -0
  139. package/skills/nobrainer-tech-flow/scripts/cleanup_worktree.py +327 -0
  140. package/skills/nobrainer-tech-flow/scripts/decision_config.py +107 -0
  141. package/skills/nobrainer-tech-flow/scripts/flow_guard.py +252 -0
  142. package/skills/nobrainer-tech-flow/scripts/typed_decisions.py +210 -0
  143. package/skills/nobrainer-wiki/SKILL.md +164 -0
  144. package/skills/nobrainer-wiki/references/setup.md +88 -0
  145. package/skills/nobrainer-writing/SKILL.md +272 -0
  146. package/skills/nobrainer-writing/agents/openai.yaml +4 -0
  147. package/skills/nobrainer-writing/references/brief-artifacts.md +357 -0
  148. package/skills/nobrainer-writing/references/plain-technical-english.md +76 -0
  149. package/skills/nobrainer-writing/references/research.md +86 -0
@@ -0,0 +1,626 @@
1
+ # nobrainer-tech-flow installation
2
+
3
+ All clients consume one canonical `skills/` tree. Prefer an immutable reviewed
4
+ release, dry-run every local target and keep installation evidence separate from
5
+ clean-session routing evidence.
6
+
7
+ New public source links and package/plugin IDs use `nobrainer-tech-flow`.
8
+ Existing `nobrainer-tech-skills` registrations need the reviewed
9
+ [`nobrainer-tech-flow` migration guide](MIGRATION_TO_FLOW.md); do not call an old registration
10
+ upgraded merely because the new source is installed nearby.
11
+
12
+ ## npm command
13
+
14
+ Node 18+ and Python 3.11+ are prerequisites. Preview the setup first:
15
+
16
+ ```sh
17
+ npx nobrainer-tech-flow@2.4.0 --client codex
18
+ npx nobrainer-tech-flow@2.4.0 --client codex --apply
19
+ npx nobrainer-tech-flow@2.4.0 --client codex --undo --apply
20
+ ```
21
+
22
+ Use claude for Claude Code, opencode or copilot for those clients. Add --home PATH
23
+ for an isolated profile. These commands become available once this version is
24
+ published on npm; a source candidate is not registry availability.
25
+
26
+ Application copies the release files into the chosen home directory's
27
+ .nobrainer-tech-flow-npm/2.4.0 and verifies the copy. That folder sits beside
28
+ ~/.nobrainer-tech-flow, where the Git installation suggests a clone, so cleaning
29
+ the clone cannot delete the files the skill links point to. Releases before 2.3.2
30
+ kept their copy in .nobrainer-tech-flow/npm; undo such a setup with the command of
31
+ the release that made it. The existing installer then
32
+ links skills to that stable source and writes its managed instructions. This
33
+ avoids links into npx's temporary cache. Unknown files and conflicting installs
34
+ are preserved. Undo uses the same setup record as the Git installer. Retained
35
+ release files remain available for other profiles; they are not disposable test
36
+ artifacts. No postinstall script runs on npm installation.
37
+
38
+ When switching from an existing Git or npm installation, preview first. If it
39
+ reports a different source, use that installation's recorded undo command before
40
+ applying the new source. The npm command preserves conflicts rather than replacing
41
+ another installation automatically.
42
+
43
+ For ChatGPT and Claude Chat, follow the [native plugin setup](CHAT_PLUGINS.md)
44
+ rather than the coding-client command.
45
+
46
+ ### Publishing and trusted updates
47
+
48
+ The first npm publication requires an authenticated package owner. After the
49
+ package exists, configure its Trusted Publisher with GitHub owner
50
+ `nobrainer-tech`, repository `nobrainer-tech-flow`, workflow `npm-publish.yml`,
51
+ no environment name, and permission to run `npm publish`. A publisher configured
52
+ for a different package or repository does not authorize this package.
53
+
54
+ After the release PR's Validate checks pass and its commit is merged, create the
55
+ matching stable tag. Run the manual Publish npm workflow from that tag. It checks
56
+ the tag against package.json, verifies the packed installation and publishes
57
+ with OIDC provenance. Its bounded registry readback compares the version and
58
+ tarball integrity before reporting delivery. Inspect the registry before retrying
59
+ a run that fails after publication; npm versions cannot be overwritten.
60
+
61
+ See [npm's trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/).
62
+
63
+ ## Safe default
64
+
65
+ ```bash
66
+ (
67
+ set -u
68
+ : "${NB_REVIEWED_COMMIT:?set a reviewed full 40-character commit SHA}"
69
+ test "${#NB_REVIEWED_COMMIT}" -eq 40 || exit 2
70
+ case "$NB_REVIEWED_COMMIT" in *[!0-9a-f]*) exit 2 ;; esac
71
+ git clone --no-checkout https://github.com/nobrainer-tech/nobrainer-tech-flow.git || exit 3
72
+ cd nobrainer-tech-flow || exit 3
73
+ git checkout --detach "$NB_REVIEWED_COMMIT" || exit 3
74
+ test "$(git rev-parse HEAD)" = "$NB_REVIEWED_COMMIT" || exit 3
75
+ python3 scripts/validate_skills.py --suite || exit 4
76
+ python3 scripts/install.py --client codex || exit 4 # preview: changes nothing
77
+ python3 scripts/install.py --client codex --apply || exit 4 # link the skills, add the block
78
+ )
79
+ ```
80
+
81
+ Set `NB_REVIEWED_COMMIT` to the exact full commit SHA you reviewed. The guarded
82
+ subshell rejects unset values, tags, branches and malformed hashes, and stops on
83
+ every failed command. The first installer command is a dry-run; stop the block
84
+ there to read the plan, then run the `--apply` command.
85
+
86
+ `scripts/install.sh` is the shortest path for one client (`claude`, `codex`,
87
+ `opencode` or `copilot`). It needs no Python and asks nothing; it runs as `sh` on
88
+ macOS, Linux and WSL (tested with dash, bash, busybox and zsh emulating sh), and in
89
+ Git Bash on Windows. Run it where the agent runs: an install made inside WSL lands in the WSL
90
+ home, which a Windows-native client does not read.
91
+
92
+ ```sh
93
+ git clone https://github.com/nobrainer-tech/nobrainer-tech-flow ~/.nobrainer-tech-flow
94
+ sh ~/.nobrainer-tech-flow/scripts/install.sh --client claude # preview: changes nothing
95
+ sh ~/.nobrainer-tech-flow/scripts/install.sh --client claude --apply # link all skills, add the block
96
+ sh ~/.nobrainer-tech-flow/scripts/install.sh --client claude --undo --apply
97
+ ```
98
+
99
+ `scripts/install.py` does the same with Python (`python3 scripts/install.py`, same
100
+ flags). The two share the setup record, so either one undoes what the other did.
101
+
102
+ - The preview names the source commit, how many skills it would link and where,
103
+ and shows the exact text it would write to the client's global instruction file.
104
+ - A canonical skill target that is not a link to this checkout is a conflict:
105
+ nothing is written and the command says which one.
106
+ - Running `--apply` again when nothing needs to change prints `UP TO DATE` and no
107
+ restart hint. `INSTALLED` and the restart hint appear only when a link or the
108
+ instruction file was written.
109
+ - It never grants a standing authorization. When the block in the instruction file
110
+ is the text of an earlier version, both scripts replace it with this version's
111
+ text, keep everything outside the two markers byte for byte and save the file as
112
+ it was as a `.bak` copy first. `install.py` also keeps earlier auto-update,
113
+ session-restart and wiki-root settings in the block as `--keep-options` keeps
114
+ them; `install.sh` leaves a block that carries one of those options, or whose
115
+ markers do not stand on lines of their own, exactly as it is and says so. Change
116
+ options with `install_personalization.py`.
117
+ - `--undo` (a preview until `--apply` is added) removes exactly the links the setup
118
+ created and puts the managed block back as it was before the first setup:
119
+ removed, or the block that was there before. The rest of the instruction file
120
+ stays as it is now, so the file comes back byte for byte when nothing else
121
+ changed. It stops with the reason if the file changed since the last run. It is
122
+ the guided setup's rollback, so it also reverses a setup made by the guided setup
123
+ below, and the other way round.
124
+ - `--undo` also removes the folders the setup had to create, such as `~/.agents`
125
+ for Codex or `~/.config/opencode` for a client that never ran, but only when they
126
+ are empty. A folder that was there before the setup, or holds anything else, stays.
127
+ A second undo, or an undo where no setup is recorded, prints `NOTHING TO UNDO`
128
+ with the client and the record it looked for, changes nothing and exits 0. A
129
+ damaged record is still an error.
130
+ - It needs symbolic links. On Windows turn on Developer Mode or run from an
131
+ elevated shell; the command checks first and says so. Otherwise use
132
+ `install_skills.py --mode copy` (see Windows below).
133
+ - `--home` and the client variables behave as described for the individual
134
+ scripts below. When a variable chose the location, the output says so; keep it
135
+ set when you undo.
136
+
137
+ The setup record is `.nobrainer-flow-onboarding-<client>.json` (for example
138
+ `.nobrainer-flow-onboarding-codex.json`) in the chosen home, next to the client's
139
+ folders. Only you can read or write it (mode 0600), and it holds paths and hashes,
140
+ never a secret: the skills folder, the links the setup created, the instruction file
141
+ with its backup and the SHA-256 of what was written, and `created_dirs`, the folders
142
+ the setup created. `--undo --apply` deletes it, so keep it until you no longer need
143
+ to undo. `.nobrainer-flow-onboarding.json` without a client name is the older
144
+ single-client record; `install.py` still reads it, and `install.sh` points you to it.
145
+ A new instruction file the setup creates is owner-only (mode 0600) as well. An
146
+ existing file keeps its mode, and its `.bak` copy has the same mode.
147
+
148
+ The individual scripts remain the way to install a subset, use copies, target
149
+ the shared `agents` folder or another client, and are documented next.
150
+
151
+ An existing unmarked `nobrainer-tech-flow` instruction that still names the retired entry
152
+ skill is a conflict: the personalization installer stops instead of appending
153
+ contradictory rules. Preserve that file, prepare an exact merged replacement
154
+ and review its diff before retrying. This matters for existing Codex and
155
+ Claude profiles that already import personal instructions.
156
+
157
+ `install_skills.py` installs exactly eighteen skills by default. Install an
158
+ explicit subset by repeating `--skill`:
159
+
160
+ ```bash
161
+ python3 scripts/install_skills.py \
162
+ --client agents \
163
+ --skill nobrainer-tech-flow \
164
+ --skill nobrainer-auto-fine-tune \
165
+ --skill nobrainer-sessions \
166
+ --skill nobrainer-spec-driven-development \
167
+ --skill nobrainer-build \
168
+ --skill nobrainer-review
169
+ ```
170
+
171
+ The core skill links to `nobrainer-auto-fine-tune`, `nobrainer-sessions` and
172
+ `nobrainer-spec-driven-development`, so a subset should keep all three to make
173
+ those references available. The guided setup always adds the audit skill;
174
+ Sessions and SDD remain explicit selections, not silently added modules.
175
+ The installer prints a `NOTE:` for every selected skill that links to a skill
176
+ which is neither selected nor already installed; the guided setup prints the same
177
+ note once for its whole install set, with the selection ID to add.
178
+
179
+ Supported local destinations are `claude`, `codex`, `opencode`, `copilot` and
180
+ the shared `agents` path. `codex` and `agents` both target the current shared
181
+ `~/.agents/skills` location documented by
182
+ [Codex Agent Skills](https://developers.openai.com/codex/skills). Claude Code
183
+ follows `CLAUDE_CONFIG_DIR` and OpenCode follows `XDG_CONFIG_HOME`; the installer
184
+ honours both. An empty `XDG_CONFIG_HOME` (or `CODEX_HOME`) counts as unset, as the
185
+ XDG specification (and Codex) say; any other value is used exactly as written. A
186
+ value that is not an absolute path is an error for the client that reads it,
187
+ spaces-only and an empty `CLAUDE_CONFIG_DIR` included: Claude Code resolves such a
188
+ value against its own working directory and does not expand `~`, so the
189
+ installer, which runs from the checkout, cannot know where it points. A variable
190
+ the selected client does not read is ignored. Override a destination only when you
191
+ have inspected it:
192
+
193
+ ```bash
194
+ python3 scripts/install_skills.py \
195
+ --client agents \
196
+ --dest /path/to/controlled/skills \
197
+ --mode copy
198
+ ```
199
+
200
+ `symlink` is the default and keeps one source of truth. `copy` is useful for an
201
+ isolated release/archive test, or where the operating system does not allow
202
+ symlinks (for example Windows without developer mode). Repeating a `copy`
203
+ install over an identical copy reports it as current, whatever `__pycache__`
204
+ directories or `.DS_Store` and `Thumbs.db` files have appeared in it since; any
205
+ other difference, including a loose `.pyc` file that would shadow a module, is a
206
+ conflict and the copy must be replaced by hand after review.
207
+
208
+ Use one channel per client. Gemini CLI, Pi, OpenCode and Kimi Code also read
209
+ `~/.agents/skills`, so installing there (`--client agents` or `codex`) on top of
210
+ their own adapter can list every skill twice. Pick either the adapter or the
211
+ shared folder.
212
+
213
+ ## Conflict and migration behavior
214
+
215
+ `install_skills.py` and `install.sh` never overwrite an unknown directory, file
216
+ or symlink. A foreign target at the retired name `nobrainer-reddit` is reported as
217
+ `PRESERVED_FOREIGN` and left unchanged without blocking installation. A foreign
218
+ target at a renamed alias such as `nb-flow`, a canonical name or an unresolved
219
+ legacy name such as `nobrainer-fast-audit` still stops installation.
220
+
221
+ Both installers use this conflict rule, including the Python/npm setups that
222
+ call `install_skills.py`. An exact stale link from the same checkout still
223
+ blocks installation and requires explicit migration through the Python helper:
224
+
225
+ ```bash
226
+ python3 scripts/install_skills.py --client codex --migrate-legacy
227
+ python3 scripts/install_skills.py --client codex --migrate-legacy --apply
228
+ ```
229
+
230
+ A successful migration atomically moves the exact legacy link out of its public
231
+ name and preserves it under a reported `.nobrainer-migration-*` recovery path.
232
+ The installer prints `BACKUP_PRESERVED`; it never deletes a quarantined claim,
233
+ because portable path deletion cannot be bound atomically to a previously
234
+ verified inode. Inspect client readback before manually removing that exact
235
+ backup. Copy mode builds and verifies the complete tree in a private
236
+ `.nobrainer-install-*` staging directory, then publishes it with a native atomic
237
+ no-replace rename. A failed staged copy remains at the reported private path for
238
+ manual recovery; a concurrently created public target is never overwritten.
239
+
240
+ For a blocking target from another repository, compare semantics, inbound
241
+ references and runtime triggers before retiring it. A similar name is not proof
242
+ of duplication. Back up or preserve an exact Git ref and remove only reviewed
243
+ targets; never delete a whole shared skills directory.
244
+
245
+ ## Global personalization
246
+
247
+ Installing the skills alone does not make the client route tasks through them.
248
+ Preview and apply the managed global instruction block for each supported
249
+ client after inspecting its current file:
250
+
251
+ ```bash
252
+ python3 scripts/install_personalization.py --client codex
253
+ python3 scripts/install_personalization.py --client codex --apply
254
+ ```
255
+
256
+ Repeat with `--client claude`, `opencode` or `copilot` as supported. Without
257
+ `--home` the installer follows the variables the clients read:
258
+ `CLAUDE_CONFIG_DIR` for Claude Code, `CODEX_HOME` for Codex and
259
+ `XDG_CONFIG_HOME` for OpenCode; an explicit `--home` selects the documented
260
+ default locations under it and ignores them. Codex reads
261
+ `AGENTS.override.md` instead of `AGENTS.md` whenever the override is not
262
+ empty, so the installer refuses to write `AGENTS.md` next to one; remove or
263
+ empty the override, or pass `--path` to target it on purpose.
264
+
265
+ Claude Code may already import the Codex global file with `@~/.codex/AGENTS.md`.
266
+ The installer skips the duplicate block only when the Claude file holds nothing
267
+ but that import line and the imported file already carries the managed block;
268
+ otherwise it writes the block to the Claude file. Whether an import inside a
269
+ longer file is live depends on how Claude Code parses the whole file, and an
270
+ independent review found ordinary files that looked like imports and were not.
271
+ A second copy of the block is harmless; a missing one would leave Claude without
272
+ the instructions. A guided setup recorded earlier for the Codex file asks for an
273
+ undo before it writes the Claude file. `agents` needs an explicit verified
274
+ `--path`. For a resolved global wiki,
275
+ pass `--wiki-root PATH` pointing at a directory containing `WIKI.md`; this
276
+ records the actual location in the personalization block. `--auto-update`
277
+ opts into safe checked `nobrainer-tech-flow`-only upgrades where standing owner
278
+ authorization exists, and `--auto-session-restart` opts into evidence-gated
279
+ session rotation. A later run without those flags writes the default block
280
+ again; add `--keep-options` to keep the update, session-restart and wiki-root
281
+ settings already in the block (the guided setup always does). A grant counts
282
+ only as the exact line the installer writes for it, so wording quoted in a
283
+ `--preferences` value never becomes one, and a preference or wiki path must be
284
+ one printable line. A grant line that was edited is not kept, and the run says so
285
+ and names the flag that grants it again. Without the
286
+ update opt-in, the first active `nobrainer-tech-flow` use each day checks and
287
+ notifies. Use a scheduler separately if updates must be checked on inactive days.
288
+
289
+ A newer release must be obtained at a verified immutable ref before any
290
+ installation command is run. See the [daily update contract](../skills/nobrainer-tech-flow/references/daily-update.md).
291
+ Read back the client instruction file, loaded skill name and clean-session
292
+ routing. A written block is configuration evidence, not runtime proof.
293
+
294
+ ## Guided partial setup
295
+
296
+ For a fresh setup, pass a repository link to the `nobrainer-tech-flow` guided
297
+ preflight. It asks for work type, desired outcome, tools and existing setup
298
+ when those facts are not already supplied. A supplied `--repo-path` reads a
299
+ small allowlist of local README, instruction and manifest files plus project
300
+ skill directory names. Otherwise, a `github.com` link uses read-only `gh api`
301
+ when available, then the bounded GitHub HTTPS API for repository metadata and
302
+ README. Other hosts are not fetched. Repository text is untrusted context:
303
+ preflight never executes repository scripts, hooks or installers, and does not
304
+ print README or instruction contents. Use `--offline` to skip remote lookup.
305
+
306
+ The preflight reads the built-in Auto Fine Tune capacity audit and inspects the
307
+ selected client's known configuration file read-only. It reports configured
308
+ model and effort separately; active profile, advertised models, callable
309
+ workers and runtime values remain `UNKNOWN` unless the active client proves
310
+ them. It then prints a short, task-specific recommendation list with stable IDs,
311
+ fit rationale, required dependencies, current target conflicts and change
312
+ scope. Fit scores are heuristics, not benchmarks.
313
+
314
+ ```bash
315
+ python3 scripts/recommend_flow_setup.py \
316
+ --repo-url https://github.com/owner/project \
317
+ --client codex
318
+ ```
319
+
320
+ Answer the questions in a terminal, or pass them so nothing is asked
321
+ (`--work-profile`, `--goal`, `--tools` and `--existing-setup`). Without a
322
+ terminal and with an answer missing, the command stops with `INPUT_REQUIRED`
323
+ and the flags it needs instead of waiting for input:
324
+
325
+ ```bash
326
+ python3 scripts/recommend_flow_setup.py \
327
+ --repo-url https://github.com/owner/project \
328
+ --client codex \
329
+ --work-profile software-development \
330
+ --goal "ship and test a web application" \
331
+ --tools "Codex, Python, GitHub" \
332
+ --existing-setup "pytest and git"
333
+ ```
334
+
335
+ To inspect an already available checkout instead of contacting GitHub, add
336
+ `--repo-path /path/to/checkout`. To keep the whole preflight offline, add
337
+ `--offline`; it will base recommendations on the answers and local client
338
+ configuration only and report that repository content was unavailable.
339
+
340
+ After reviewing the dry-run, repeat the command with your selected IDs
341
+ (`--selection 01,03,04`) and `--apply`. Only those items are added, together with required IDs `01`
342
+ (`nobrainer-tech-flow`)
343
+ and `02` (the Auto Fine Tune capability audit). Personalization is previewed
344
+ and updated through `install_personalization.py`; an optional one-line
345
+ `--preferences` value is shown in the plan before it is saved. Existing
346
+ targets that conflict stop the operation before writes. The successful readback
347
+ reports installed IDs, whether unselected items remain absent, preference-file
348
+ hash and a local rollback-state path. Rollback removes only exact
349
+ `nobrainer-tech-flow` symlinks created by that setup and, if the instruction file
350
+ has not changed since the last run, puts its managed block back as it was before
351
+ the first setup, leaving the rest of the file as it is:
352
+
353
+ ```bash
354
+ python3 scripts/recommend_flow_setup.py \
355
+ --repo-url https://github.com/owner/project \
356
+ --client codex \
357
+ --rollback --apply
358
+ ```
359
+
360
+ The CLI cannot observe the running agent's effective MAIN model, effort, worker
361
+ capacity or runtime context. Those remain `UNKNOWN` until the loaded Auto Fine
362
+ Tune skill checks them in the active client. Do not treat the CLI preflight as
363
+ that runtime proof.
364
+
365
+ ## Project setup
366
+
367
+ After client discovery works, invoke `nobrainer-tech-flow` in the target project in
368
+ setup mode. It will:
369
+
370
+ 1. inspect existing instructions, skills, specs, wiki, sessions, tests and dirty
371
+ state;
372
+ 2. classify each component `CURRENT`, `DRIFTED`, `MISSING`, `NOT_NEEDED` or
373
+ `OWNER_GATE`;
374
+ 3. add one marked project-instruction block only when equivalent routing is
375
+ absent;
376
+ 4. configure correction hooks for changed owner decisions, corrected agent
377
+ errors and failed review;
378
+ 5. add SDD, wiki or sessions only when the project earns their maintenance cost;
379
+ 6. verify the actual client and target workflow before reporting completion.
380
+
381
+ The instruction block is portable behavior, not a copy of all skill bodies.
382
+ Preserve client-managed markers and byte-equality requirements between files
383
+ such as `AGENTS.md` and `CLAUDE.md`.
384
+
385
+ ## Client channels
386
+
387
+ ### Claude Code
388
+
389
+ Use the repository as a plugin or install the canonical skill directories
390
+ through the client-supported Agent Skills path. The checked adapter includes a
391
+ `SessionStart` hook that injects only `adapters/bootstrap.md`.
392
+
393
+ ```bash
394
+ claude plugin marketplace add /path/to/reviewed/nobrainer-tech-flow
395
+ claude plugin install nobrainer-tech-flow@nobrainer-tech
396
+ ```
397
+
398
+ The path is the checkout pinned to a reviewed commit in "Safe default" above.
399
+ `claude plugin marketplace add nobrainer-tech/nobrainer-tech-flow` tracks the
400
+ default branch instead, so prefer it only where that is acceptable. The same
401
+ commands work inside a session as `/plugin marketplace add ...` and
402
+ `/plugin install ...`. A plugin namespaces its skills, so the entry point is
403
+ `/nobrainer-tech-flow:nobrainer-tech-flow`; skills installed with
404
+ `--client claude` keep the plain `/nobrainer-tech-flow`. Either way the model
405
+ can also load the skill by name. The `$` forms are Codex syntax; the Codex section
406
+ below says which one to type.
407
+
408
+ Claude Code lists every skill name but drops the descriptions of the least-used
409
+ skills once the listing passes its budget (1% of the context window by default).
410
+ In a session that already carries many skills the Flow descriptions may reach
411
+ the model as names only. The bootstrap and the personalization block name the
412
+ entry skill, so it can still be loaded by name; what is lost is routing to the
413
+ specialists by their descriptions. The companion
414
+ [`nobrainer-claude`](https://github.com/nobrainer-tech/nobrainer-claude)
415
+ installer can raise the budget on request (`--raise-skill-budget`).
416
+
417
+ After restart, verify:
418
+
419
+ - `nobrainer-tech-flow` is discoverable without pasting its body;
420
+ - the hook emits exactly one bootstrap context;
421
+ - a simple task remains direct;
422
+ - a non-trivial task starts with nobrainer-tech-flow and a compact Progress checklist.
423
+
424
+ #### Optional guards
425
+
426
+ Two opt-in hooks in your Claude Code user `settings.json`, never in the plugin:
427
+
428
+ - before a shell command, Claude Code asks you first (it never denies) for
429
+ `rm -r` (also `/bin/rm`) outside the temporary folders (`$TMPDIR`, `/tmp`,
430
+ `/var/folders`), `git push --force` (also `-f`, `--force-with-lease` or a
431
+ `+branch` refspec), `git reset --hard`, `git clean -f`, `vercel --prod`,
432
+ `npm publish`, `terraform apply` or `destroy`, `kubectl delete` and
433
+ `gh release create`, also with global options before the subcommand
434
+ (`npm -w pkg publish`, `gh -R owner/repo release create`). A relative `rm`
435
+ target counts as temporary only when the working folder is temporary and the
436
+ command does not `cd` or `pushd` first, and a path counts by where its links
437
+ lead. An `rm -r` whose arguments it cannot read, and a command line over 2,000
438
+ characters that names one of these tools, are asked about as well;
439
+ - when a turn that edited files or ran commands ends without a line starting
440
+ with `Proof:` or `Checked:` and without `UNVERIFIED`, the stop is blocked once
441
+ so the agent adds one. A read-only turn, a second stop and an unreadable
442
+ transcript are let through.
443
+
444
+ This is a seatbelt, not a security boundary. It reads the command text, so
445
+ `sh -c`, a variable or an alias gets past it, and a risky phrase inside a quoted
446
+ string (`echo "git reset --hard"`) asks without need.
447
+
448
+ ```bash
449
+ python3 scripts/install.py --client claude --guards # preview the hooks it would add
450
+ python3 scripts/install.py --client claude --guards --apply # add them, with a backup
451
+ python3 scripts/install.py --client claude --guards --undo --apply
452
+ ```
453
+
454
+ `python3 scripts/install_guards.py` takes the same `--apply`, `--undo` and
455
+ `--home` flags. The settings file is `$CLAUDE_CONFIG_DIR/settings.json`, or
456
+ `~/.claude/settings.json` when the variable is unset. The preview lists only the
457
+ hooks it would add or remove, never other settings; other hooks are kept, each
458
+ change writes a new backup, readable only by you, without overwriting an older one, a second `--apply`
459
+ changes nothing, and an invalid file is refused
460
+ (exit 3) without being touched. The hooks run `flow_guard.py` through the
461
+ skill link that `--client claude` created, so install the skills first. A
462
+ plugin-only install, other clients, `scripts/install.sh` and Windows are not
463
+ supported in this version (`UNSUPPORTED`, exit 3). Removing the skills leaves
464
+ the hooks in place, where they do nothing; remove them with `--guards --undo
465
+ --apply`. Restart Claude Code after a change.
466
+
467
+ The hooks follow https://code.claude.com/docs/en/hooks (Claude Code 2.1.302):
468
+ PreToolUse reads `tool_name`, `tool_input.command` and `cwd` and answers
469
+ `hookSpecificOutput.permissionDecision: "ask"` with `permissionDecisionReason`;
470
+ Stop and SubagentStop read `stop_hook_active`, `last_assistant_message`,
471
+ `transcript_path` and `agent_transcript_path` and answer
472
+ `{"decision": "block", "reason": ...}`.
473
+
474
+ ### Codex
475
+
476
+ The `.codex-plugin/plugin.json` manifest exposes `./skills/` and declares no
477
+ plugin hook; bootstrap comes from the personalization block or the skill's own
478
+ trigger. Install through the native plugin channel or use the installer. The
479
+ plugin channel needs a reviewed checkout:
480
+
481
+ ```bash
482
+ codex plugin marketplace add /path/to/reviewed/nobrainer-tech-flow
483
+ codex plugin add nobrainer-tech-flow@nobrainer-tech
484
+ ```
485
+
486
+ The installer's `codex` destination is the shared `~/.agents/skills` path:
487
+
488
+ ```bash
489
+ python3 scripts/install_skills.py --client codex
490
+ python3 scripts/install_skills.py --client codex --apply
491
+ ```
492
+
493
+ Restart Codex and test discovery in a fresh task. Repository instructions or the
494
+ native skill trigger provide bootstrap; a file on disk is not routing proof.
495
+ Use nobrainer-tech-flow for user-facing requests. For the technical explicit
496
+ invocation, type the exact name Codex lists for the module, because on Codex
497
+ 0.157.1 (macOS) the other form adds no module text to the model input. Codex
498
+ lists the module under the plugin name, so you type
499
+ `$nobrainer-tech-flow:nobrainer-tech-flow`, when a plugin manifest sits above the
500
+ folder a link resolves to: a plugin install, the npm package, or the links the
501
+ installer makes into a git checkout. It lists the plain name, so you type
502
+ `$nobrainer-tech-flow`, for a copy made with `install_skills.py --mode copy`.
503
+ [COMPATIBILITY.md](COMPATIBILITY.md) records what was checked. Plain `NBFlow`,
504
+ `NBF` and `nobrainer-tech-flow` are natural-language triggers whose recognition
505
+ depends on the client. Existing legacy entries under `~/.codex/skills` are not
506
+ deleted or rewritten automatically.
507
+
508
+ ### Cursor
509
+
510
+ Use `.cursor-plugin/plugin.json`. Its session hook runs the shared bootstrap
511
+ through `hooks/run-hook.cmd`, which uses Git Bash on Windows: from its install
512
+ folders or beside the `git.exe` on PATH, never a `bash.exe` in the current folder.
513
+ Without Git Bash the hook says so on stderr and exits 1, and the session continues
514
+ without the bootstrap. Repository tests
515
+ cover the manifest and the hook script; Cursor itself has not been read back, so
516
+ confirm one injection and native skill discovery after restart.
517
+
518
+ ### OpenCode
519
+
520
+ Pin the Git package to an immutable full commit in `opencode.json`:
521
+
522
+ ```json
523
+ {
524
+ "plugin": [
525
+ "nobrainer-tech-flow@git+https://github.com/nobrainer-tech/nobrainer-tech-flow.git#NB_REVIEWED_COMMIT_SHA"
526
+ ]
527
+ }
528
+ ```
529
+
530
+ Replace the placeholder before use. The adapter registers `skills/` and puts
531
+ the bootstrap in front of the first user message of each request, once; when
532
+ that message has no text part (after a compaction) it adds a synthetic text part
533
+ instead. Local checkout installation is also available with `--client opencode`.
534
+
535
+ ### GitHub Copilot CLI and shared Agent Skills
536
+
537
+ Use `--client copilot` for `~/.copilot/skills` or `--client agents` for the
538
+ shared `~/.agents/skills` convention. Copilot bootstrap depends on the client's
539
+ current Agent Skills behavior and repository instructions; this package does
540
+ not claim an automatic session hook without runtime readback.
541
+
542
+ ### Gemini CLI
543
+
544
+ `gemini-extension.json` loads `GEMINI.md`, which includes the small bootstrap.
545
+ Install through the current extension mechanism, restart and verify native skill
546
+ discovery and first routing. Manifest parsing alone is `REPOSITORY_CHECKED`.
547
+
548
+ ### Kimi Code
549
+
550
+ `.kimi-plugin/plugin.json` exposes `./skills/` and selects `nobrainer-tech-flow` at session
551
+ start. Its instructions explicitly refuse invented visible-session transport.
552
+ Verify the exact installed version and clean-session behavior.
553
+
554
+ ### Pi
555
+
556
+ The package extension registers `skills/` during resource discovery and adds the
557
+ bootstrap to every model request that does not carry it yet. The host rebuilds
558
+ the message list for each request, so the bootstrap also survives compaction, and
559
+ a marker keeps one request from receiving it twice. Repository tests cover the
560
+ extension contract; a real client readback is still required.
561
+
562
+ ### Windows
563
+
564
+ Run `scripts/install.sh` in Git Bash (it comes with Git for Windows), or the
565
+ Python scripts with `py -3` or `python`. The hook adapters need Git Bash too, not
566
+ the `bash.exe` launcher that Windows ships for WSL (Windows finds that one first
567
+ when a command says just `bash`). The repository pins the hook scripts, the shell
568
+ installer and the bootstrap to LF endings so a Git checkout with
569
+ `core.autocrlf=true` still runs them. Creating symlinks needs developer mode or an
570
+ elevated shell; without either, install with `install_skills.py --mode copy`. CI
571
+ runs the structure validators, the adapter tests, a Windows smoke module and both
572
+ one-command installers on a Windows runner; it does not run the whole suite
573
+ there, and no client was read back on Windows.
574
+
575
+ ### Other Agent Skills clients
576
+
577
+ Use the portable `plugin.json`, the canonical skill directories and explicit
578
+ project instructions. Do not claim automatic bootstrap unless the target client
579
+ actually exposes and passes that integration.
580
+
581
+ ## Dynamic specialists
582
+
583
+ The eighteen curated skills are the stable base. When a concrete work unit still
584
+ has a capability gap, `nobrainer-team` first inventories installed/project
585
+ capabilities, then may evaluate one external skill temporarily. Source/ref,
586
+ scripts, permissions, credentials, network behavior, trigger overlap and
587
+ rollback must be inspected before use. Persistent or global installation is an
588
+ owner gate.
589
+
590
+ ## Readback and acceptance
591
+
592
+ After every install or upgrade:
593
+
594
+ 1. restart the client;
595
+ 2. list/read back the loaded source and skill count;
596
+ 3. start a clean task with no pasted skill body;
597
+ 4. issue one explicit canonical request and one semantic non-trivial request;
598
+ for Codex type the name the client lists for the module:
599
+ `$nobrainer-tech-flow:nobrainer-tech-flow` when it lists modules under the
600
+ plugin name, `$nobrainer-tech-flow` when it lists them plainly (the Codex
601
+ section above says which installs do which);
602
+ 5. confirm nobrainer-tech-flow asks no more than one ordinary requirements round, shows one
603
+ compact Progress checklist and routes a specialist only when needed;
604
+ 6. issue a one-step task and confirm it remains direct;
605
+ 7. simulate a correction and confirm affected TODO/evidence is invalidated;
606
+ 8. record client version, source ref, transcript/evidence and gaps.
607
+
608
+ Use the proof ladder in [COMPATIBILITY.md](COMPATIBILITY.md). Installation is not
609
+ `RUNTIME_VERIFIED` until the clean-session behavior passes.
610
+
611
+ ## Rollback
612
+
613
+ Before applying, record existing target fingerprints and the source ref. To
614
+ roll back:
615
+
616
+ - remove only links/copies created by this exact run, or restore the recorded
617
+ prior targets;
618
+ - inspect any reported `.nobrainer-migration-*` or `.nobrainer-rollback-*`
619
+ recovery path before deleting that exact entry manually;
620
+ - return project instructions to their scoped preimage;
621
+ - restart the client;
622
+ - verify that the previous source and routing behavior are restored.
623
+
624
+ Never remove a shared root recursively. A preserved recovery claim is evidence,
625
+ not garbage: verify its fingerprint and the live client before exact manual
626
+ cleanup. Failed or partial rollback is a blocker, not a warning to ignore.