@nuucognition/flint-cli 0.6.0-dev.21 → 0.6.0-dev.30

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
@@ -152,24 +152,62 @@ flint open # Open current flint
152
152
  flint open my-project # Open by name from registry
153
153
  ```
154
154
 
155
- **Dev-only:** use the `flint-dev` binary or a source build with no baked `BUILD_MODE`.
155
+ ### `flint cd`
156
+
157
+ Change the current shell directory to a registered Flint.
156
158
 
157
- ### Development builds and atomic live releases
159
+ ```bash
160
+ flint cd "NUU Flint"
161
+ ```
158
162
 
159
- Flint has separate development and live runtime channels:
163
+ A child process cannot change the directory of its parent shell. Install the
164
+ managed shell integration to add the required `flint` shell function:
165
+
166
+ ```bash
167
+ flint setup shell-integration --apply
168
+ ```
160
169
 
161
- - `ndv use flint dev` activates `bin/flint-dev.js`. It consumes the checkout's
162
- `apps/flint-cli/dist`, so `ndv build flint dev` is visible on the next
163
- invocation. Orbh children spawned from this channel remain on the caller's
164
- checkout.
165
- - `bin/flint.js` is the canonical live launcher used by Orbh-managed release
166
- flows. When `.flint-live-build/current` is complete, it consumes that
167
- atomically selected release rather than an in-place checkout build.
168
- - `bin/flint-prod.js` consumes the `dist` shipped inside its installed package.
170
+ The same integration adds fuzzy Flint-name completion for `flint open` and
171
+ `flint cd`. Press Tab in the first argument. The picker starts with the text in
172
+ the current argument, so both of these forms work:
173
+
174
+ ```bash
175
+ flint open ""
176
+ flint cd "nuu"
177
+ ```
178
+
179
+ The completion matrix is macOS with Zsh and Omarchy with Bash. `fzf` supplies
180
+ the fuzzy picker. If `fzf` is not available, the integration uses native prefix
181
+ completion. Fish keeps the directory wrapper and terminal-title integration,
182
+ but it does not have Flint-name completion in this release.
183
+
184
+ **Dev-only:** use the `flint-dev` binary or a source build with no baked `BUILD_MODE`.
169
185
 
170
- The channels are intentionally distinct: NDV owns checkout development, while
171
- the declared `[live-build]` command stages and smoke-tests long-running Orbh
172
- releases before cutover.
186
+ ### Channels: dev, prod, npm
187
+
188
+ Flint runs from the checkout in one of two **profiles**, or from npm
189
+ (protocol: NUU Infrastructure `(Notepad) 007 CLI Build-and-Use Protocol`):
190
+
191
+ - **dev** — `ndv use flint dev` runs `build:dev` (no baked runtime mode:
192
+ dev-only commands, `~/.nuucognition/flint-dev/`) and links
193
+ `bin/flint-dev.js`. Orbh children spawned from this channel remain on the
194
+ caller's checkout.
195
+ - **prod** — `ndv use flint prod` runs `build` (bakes `production`: real
196
+ auth, `~/.nuucognition/flint/`) on the same checkout and links
197
+ `bin/flint-prod.js`.
198
+ - **npm** — the installed package's `bin/flint-prod.js` imports its own
199
+ `dist`. No checkout, so no drift check.
200
+
201
+ Both profiles import `apps/flint-cli/dist/index.js` in-process. Every build
202
+ writes `dist/.build-stamp.json` (`sha`, `dirty`, `builtAt`, `mode`); the
203
+ launcher compares the stamp to HEAD and prints one stderr line when the bundle
204
+ is stale. It never blocks and never builds — run `ndv build flint [dev|prod]`.
205
+ Switching profiles rebuilds, because the profile is baked into the bundle.
206
+
207
+ `flint where` prints channel, launcher, artifact, stamp, HEAD, and drift.
208
+ `FLINT_CLI_FORCE_SOURCE=1` runs the TypeScript source through tsx instead of
209
+ `dist` (it says so on stderr). `NUU_BUILD_STAMP_QUIET=1` silences the
210
+ stale-build line.
173
211
 
174
212
  **Behavior:**
175
213
  - Opens the flint in all apps configured in the current profile config
package/bin/flint-dev.js CHANGED
@@ -6,10 +6,7 @@ import { launchFlint } from './launch-flint.js';
6
6
 
7
7
  // A dev activation is an explicit choice to keep the spawned Orbh process tree
8
8
  // on the caller's checkout instead of silently switching detached auxiliaries
9
- // back to the machine-canonical live launcher.
9
+ // to the machine-canonical launcher.
10
10
  process.env.ORBH_AUX_CODE_SOURCE = 'caller';
11
11
 
12
- await launchFlint({
13
- launcherPath: fileURLToPath(import.meta.url),
14
- preferLiveBuild: false,
15
- });
12
+ await launchFlint({ launcherPath: fileURLToPath(import.meta.url) });
package/bin/flint-prod.js CHANGED
@@ -4,39 +4,69 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
4
4
  import { dirname, join } from 'node:path';
5
5
  import { shouldEnableOpenTuiFfi } from '../dist/open-tui-invocation.js';
6
6
 
7
- const openTuiRequested = shouldEnableOpenTuiFfi({
8
- cli: 'flint',
9
- args: process.argv.slice(2),
10
- envRenderer: process.env.ORBH_TUI_RENDERER,
11
- envNoChrome: process.env.ORBH_NO_CHROME,
12
- stdinTty: Boolean(process.stdin.isTTY),
13
- stdoutTty: Boolean(process.stdout.isTTY),
14
- });
15
- const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);
16
- const ffiSupported = nodeMajor > 26 || (nodeMajor === 26 && nodeMinor >= 1);
17
- const ffiFlag = '--experimental-ffi';
18
- if (openTuiRequested && ffiSupported
19
- && !process.execArgv.includes(ffiFlag)
20
- && !process.env.NODE_OPTIONS?.split(/\s+/).includes(ffiFlag)
21
- && process.execve) {
22
- const options = new Set(process.env.NODE_OPTIONS?.split(/\s+/).filter(Boolean) ?? []);
23
- for (const option of [ffiFlag, '--disable-warning=ExperimentalWarning', '--disable-warning=DEP0205']) options.add(option);
24
- process.execve(process.execPath, process.argv, {
25
- ...process.env,
26
- NODE_OPTIONS: [...options].join(' '),
27
- ORBH_TUI_FFI_REEXEC: '1',
7
+ const args = process.argv.slice(2);
8
+ const completionRequested = args[0] === '__complete';
9
+
10
+ if (!completionRequested) {
11
+ const openTuiRequested = shouldEnableOpenTuiFfi({
12
+ cli: 'flint',
13
+ args,
14
+ envRenderer: process.env.ORBH_TUI_RENDERER,
15
+ envNoChrome: process.env.ORBH_NO_CHROME,
16
+ stdinTty: Boolean(process.stdin.isTTY),
17
+ stdoutTty: Boolean(process.stdout.isTTY),
28
18
  });
19
+ const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);
20
+ const ffiSupported = nodeMajor > 26 || (nodeMajor === 26 && nodeMinor >= 1);
21
+ const ffiFlag = '--experimental-ffi';
22
+ if (openTuiRequested && ffiSupported
23
+ && !process.execArgv.includes(ffiFlag)
24
+ && !process.env.NODE_OPTIONS?.split(/\s+/).includes(ffiFlag)
25
+ && process.execve) {
26
+ const options = new Set(process.env.NODE_OPTIONS?.split(/\s+/).filter(Boolean) ?? []);
27
+ for (const option of [ffiFlag, '--disable-warning=ExperimentalWarning', '--disable-warning=DEP0205']) options.add(option);
28
+ process.execve(process.execPath, process.argv, {
29
+ ...process.env,
30
+ NODE_OPTIONS: [...options].join(' '),
31
+ ORBH_TUI_FFI_REEXEC: '1',
32
+ });
33
+ }
29
34
  }
30
35
 
31
36
  const __dirname = dirname(fileURLToPath(import.meta.url));
32
- const entrypoint = join(__dirname, '..', 'dist', 'index.js');
37
+ const entrypoint = join(
38
+ __dirname,
39
+ '..',
40
+ 'dist',
41
+ completionRequested ? 'completion.js' : 'index.js',
42
+ );
43
+
44
+ // `ndv use flint prod` links this launcher to the checkout's production-profile
45
+ // build. In a checkout the stamp check applies exactly as for flint-dev.js; in
46
+ // an installed npm package cli-core is absent and the check is skipped.
47
+ const { warnIfBuildStale } = await import('@nuucognition/cli-core/launch').catch(() => ({ warnIfBuildStale() {} }));
48
+ warnIfBuildStale({ cli: 'flint', distEntry: entrypoint, rebuildHint: 'Run: ndv build flint prod' });
33
49
 
34
- // Default to production React — see bin/flint.js. The bundled react-reconciler
50
+ // Default to production React — see bin/launch-flint.js. The bundled react-reconciler
35
51
  // is baked to production at build time, but `react` stays external; with
36
52
  // NODE_ENV unset it loads its development build, whose jsx runtime calls
37
53
  // dev-only dispatcher methods the production reconciler never installs
38
54
  // ("dispatcher.getOwner is not a function" on first TUI render).
39
- process.env.NODE_ENV ||= 'production';
55
+ // The marker lets child-spawn boundaries strip the launcher-owned default —
56
+ // see bin/launch-flint.js.
57
+ if (!process.env.NODE_ENV) {
58
+ process.env.NODE_ENV = 'production';
59
+ process.env.ORBH_DEFAULTED_NODE_ENV = '1';
60
+ }
61
+
62
+ // V8 compile cache for the selected entrypoint. It is most important for the
63
+ // main 15 MB bundle. The small completion bundle also uses it without harm.
64
+ try {
65
+ const { enableCompileCache } = await import('node:module');
66
+ enableCompileCache?.();
67
+ } catch {
68
+ /* uncached */
69
+ }
40
70
  process.env.FLINT_CLI_LAUNCHER ??= fileURLToPath(import.meta.url);
41
71
  process.env.FLINT_CLI_ENTRYPOINT ??= entrypoint;
42
72
  await import(pathToFileURL(entrypoint).href);
@@ -3,64 +3,89 @@ import { existsSync } from 'node:fs';
3
3
  import { dirname, join } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
 
6
- import { resolveLiveBuildPackageRoot } from './live-build-path.js';
7
-
8
6
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
- const sourcePackageRoot = join(__dirname, '..');
7
+ const packageRoot = join(__dirname, '..');
8
+
9
+ // The stamp check lives in cli-core (node builtins only). In a checkout it is
10
+ // always present — ndv builds cli-core before any tool; anywhere else the
11
+ // import fails and the check is simply skipped.
12
+ const { warnIfBuildStale, noteSourceRun } = await import('@nuucognition/cli-core/launch')
13
+ .catch(() => ({ warnIfBuildStale() {}, noteSourceRun() {} }));
10
14
 
11
15
  /**
12
- * Run Flint through an explicit runtime channel.
16
+ * Run Flint from this checkout's dev build — the `dev` channel.
13
17
  *
14
- * NDV dev launchers consume the checkout build. Canonical live launchers prefer
15
- * the atomically selected release. Keeping this decision in the entrypoint
16
- * avoids an inherited environment variable silently changing channels.
18
+ * One artifact: `dist-dev/index.js`, built by `ndv use flint dev` / `ndv build
19
+ * flint`. `dist/` stays the prod channel's artifact (built and cached by
20
+ * turbo), so a closure build can never overwrite the bundle this launcher
21
+ * runs. The launcher checks the build stamp against HEAD and warns on drift;
22
+ * it never blocks and never builds. `FLINT_CLI_FORCE_SOURCE=1` is the escape
23
+ * hatch that runs the TypeScript source through tsx instead.
17
24
  */
18
- export async function launchFlint({ launcherPath, preferLiveBuild }) {
19
- const runtimePackageRoot = resolveLiveBuildPackageRoot(sourcePackageRoot, { preferLiveBuild });
20
- const openTuiInvocationEntry = join(runtimePackageRoot, 'dist', 'open-tui-invocation.js');
21
- const { shouldEnableOpenTuiFfi } = await import(openTuiInvocationEntry);
25
+ export async function launchFlint({ launcherPath }) {
26
+ const args = process.argv.slice(2);
27
+ const completionRequested = args[0] === '__complete';
28
+ const forceSource =
29
+ process.env.FLINT_CLI_FORCE_SOURCE === '1' ||
30
+ process.env.FLINT_CLI_FORCE_SOURCE === 'true';
31
+ const entryName = completionRequested ? 'completion' : 'index';
32
+ const srcEntry = join(packageRoot, 'src', `${entryName}.ts`);
33
+ const distEntry = join(packageRoot, 'dist-dev', `${entryName}.js`);
22
34
 
23
- const openTuiRequested = shouldEnableOpenTuiFfi({
24
- cli: 'flint',
25
- args: process.argv.slice(2),
26
- envRenderer: process.env.ORBH_TUI_RENDERER,
27
- envNoChrome: process.env.ORBH_NO_CHROME,
28
- stdinTty: Boolean(process.stdin.isTTY),
29
- stdoutTty: Boolean(process.stdout.isTTY),
30
- });
31
- const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);
32
- const ffiSupported = nodeMajor > 26 || (nodeMajor === 26 && nodeMinor >= 1);
33
- const ffiFlag = '--experimental-ffi';
34
- if (openTuiRequested && ffiSupported
35
- && !process.execArgv.includes(ffiFlag)
36
- && !process.env.NODE_OPTIONS?.split(/\s+/).includes(ffiFlag)
37
- && process.execve) {
38
- const options = new Set(process.env.NODE_OPTIONS?.split(/\s+/).filter(Boolean) ?? []);
39
- for (const option of [ffiFlag, '--disable-warning=ExperimentalWarning', '--disable-warning=DEP0205']) options.add(option);
40
- process.execve(process.execPath, process.argv, {
41
- ...process.env,
42
- NODE_OPTIONS: [...options].join(' '),
43
- ORBH_TUI_FFI_REEXEC: '1',
35
+ // Completion does not need the OpenTUI probe. Keep that dependency outside
36
+ // the latency-sensitive route.
37
+ if (!completionRequested) {
38
+ // The probe ships inside the bundle. Prefer the dev channel's bundle,
39
+ // fall back to the prod dist, and skip the probe when neither is built.
40
+ const openTuiInvocationEntry = ['dist-dev', 'dist']
41
+ .map((dir) => join(packageRoot, dir, 'open-tui-invocation.js'))
42
+ .find((path) => existsSync(path));
43
+ const { shouldEnableOpenTuiFfi } = openTuiInvocationEntry
44
+ ? await import(openTuiInvocationEntry)
45
+ : { shouldEnableOpenTuiFfi: () => false };
46
+
47
+ const openTuiRequested = shouldEnableOpenTuiFfi({
48
+ cli: 'flint',
49
+ args,
50
+ envRenderer: process.env.ORBH_TUI_RENDERER,
51
+ envNoChrome: process.env.ORBH_NO_CHROME,
52
+ stdinTty: Boolean(process.stdin.isTTY),
53
+ stdoutTty: Boolean(process.stdout.isTTY),
44
54
  });
55
+ const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);
56
+ const ffiSupported = nodeMajor > 26 || (nodeMajor === 26 && nodeMinor >= 1);
57
+ const ffiFlag = '--experimental-ffi';
58
+ if (openTuiRequested && ffiSupported
59
+ && !process.execArgv.includes(ffiFlag)
60
+ && !process.env.NODE_OPTIONS?.split(/\s+/).includes(ffiFlag)
61
+ && process.execve) {
62
+ const options = new Set(process.env.NODE_OPTIONS?.split(/\s+/).filter(Boolean) ?? []);
63
+ for (const option of [ffiFlag, '--disable-warning=ExperimentalWarning', '--disable-warning=DEP0205']) options.add(option);
64
+ process.execve(process.execPath, process.argv, {
65
+ ...process.env,
66
+ NODE_OPTIONS: [...options].join(' '),
67
+ ORBH_TUI_FFI_REEXEC: '1',
68
+ });
69
+ }
45
70
  }
46
71
 
47
- const srcEntry = join(sourcePackageRoot, 'src', 'index.ts');
48
- const distEntry = join(runtimePackageRoot, 'dist', 'index.js');
49
-
50
72
  // Default to production React/ink. Unset NODE_ENV loads react-reconciler's
51
73
  // development build, whose per-render performance.measure() calls accumulate
52
74
  // forever in Node's perf buffer — a ~1GB/hour leak in long-lived interactive
53
75
  // views like `orbh list`. Explicit NODE_ENV=development still wins.
54
- process.env.NODE_ENV ||= 'production';
55
-
56
- // Performance: prefer the built dist and run it IN-PROCESS (one node process,
57
- // no tsx, no recompile-on-every-invocation). Set FLINT_CLI_FORCE_SOURCE=1 to
58
- // fall back to the checkout TypeScript source via tsx.
59
- const forceSource =
60
- process.env.FLINT_CLI_FORCE_SOURCE === '1' ||
61
- process.env.FLINT_CLI_FORCE_SOURCE === 'true';
76
+ //
77
+ // The marker records that the default is the launcher's own, not the
78
+ // caller's: child-spawn boundaries (buildHarnessSpawnEnv, the job spawn)
79
+ // strip NODE_ENV again when the marker is present, so agent harnesses and
80
+ // their build tools (pnpm skips devDependencies under production) see the
81
+ // environment the launcher itself received.
82
+ if (!process.env.NODE_ENV) {
83
+ process.env.NODE_ENV = 'production';
84
+ process.env.ORBH_DEFAULTED_NODE_ENV = '1';
85
+ }
62
86
 
63
87
  if (!forceSource && existsSync(distEntry)) {
88
+ warnIfBuildStale({ cli: 'flint', distEntry, rebuildHint: 'Run: ndv build flint' });
64
89
  process.env.FLINT_CLI_LAUNCHER = launcherPath;
65
90
  process.env.FLINT_CLI_ENTRYPOINT = distEntry;
66
91
  // The dist entry parses process.argv and runs the CLI on import. Awaiting
@@ -69,7 +94,9 @@ export async function launchFlint({ launcherPath, preferLiveBuild }) {
69
94
  return;
70
95
  }
71
96
 
72
- const tsxPath = join(sourcePackageRoot, 'node_modules', '.bin', 'tsx');
97
+ noteSourceRun('flint', forceSource ? 'forced' : 'no-dist', 'Run: ndv build flint');
98
+
99
+ const tsxPath = join(packageRoot, 'node_modules', '.bin', 'tsx');
73
100
 
74
101
  // tsx still calls deprecated module.register(); Node 26 turned DEP0205 into a
75
102
  // runtime warning. Disable it just for the source subprocess.
@@ -79,7 +106,7 @@ export async function launchFlint({ launcherPath, preferLiveBuild }) {
79
106
  ? existingNodeOptions
80
107
  : (existingNodeOptions ? `${existingNodeOptions} ${suppressFlag}` : suppressFlag);
81
108
 
82
- const result = spawnSync(tsxPath, [srcEntry, ...process.argv.slice(2)], {
109
+ const result = spawnSync(tsxPath, [srcEntry, ...args], {
83
110
  stdio: 'inherit',
84
111
  env: {
85
112
  ...process.env,
@@ -0,0 +1,7 @@
1
+ {
2
+ "sha": "0f9569f97469cf8638a8de1f80c727f8e79991a3",
3
+ "tree": "0f0bd16a8f0e7d2a638e577d7023bf9faee1b5df",
4
+ "dirty": true,
5
+ "builtAt": "2026-09-05T00:23:54.342Z",
6
+ "mode": "prod"
7
+ }
@@ -12,3 +12,16 @@ You are inside a Flint workspace.
12
12
  {{#if person}}You're acting on behalf of @"Mesh/People/{{person}}.md".{{/if}}
13
13
  Read these files @"Mesh/(System) Flint Init.md" % @"Shards/Flint/init-f.md" % @"Shards/Orbh/init-foh.md"
14
14
  Then, run `flint shard start f` and follow the required readings.
15
+
16
+ ## CRITICAL — Write in ASD-STE100 Simplified Technical English
17
+
18
+ **This rule is mandatory.** Write all human-facing text, Mesh artifacts, session titles/descriptions, updates, messages, and turn results in **ASD-STE100 Simplified Technical English (STE)**.
19
+
20
+ - One idea per sentence. Prefer short sentences (under ~25 words).
21
+ - Prefer simple verb forms and active voice.
22
+ - One term for one thing — do not rotate synonyms.
23
+ - Be concrete: state what you did, what failed, and what is next.
24
+ - Code, commands, identifiers, and quoted errors stay exact; prose around them is STE.
25
+ - Templates, schemas, and literal system strings keep their required form; surrounding text is STE.
26
+
27
+ Unclear writing causes wrong work and unusable Mesh content. Prefer correct STE over fluent or clever English.
@@ -26,6 +26,45 @@ Your Orbh session ID is: {{sessionId}}
26
26
 
27
27
  The harness injects `ORBH_SESSION_ID` into your environment, so `flint orbh` session commands self-target — you omit the id and they act on this session. The id only needs to appear when you act on a different session. If your harness shows a native session or thread ID, that is a different thing and must never be used with Orbh commands.
28
28
 
29
+ ## CRITICAL — Write in ASD-STE100 Simplified Technical English
30
+
31
+ **This rule is mandatory. It is not optional style advice. Treat it as a hard constraint on almost everything you write.**
32
+
33
+ You **must** write in **ASD-STE100 Simplified Technical English (STE)** for:
34
+
35
+ - Every reply to the human in the terminal
36
+ - Every Mesh artifact you create or edit (tasks, notes, specs, reports, handoffs, …)
37
+ - Session titles and descriptions (`flint orbh session register`)
38
+ - Progress and status text (`flint orbh update`, room posts, messages to other sessions)
39
+ - Subagent prompts you compose, and results / returns you write
40
+
41
+ **Why this matters.** STE is a controlled language for clear technical writing. It cuts ambiguity, synonym drift, and dense prose. Humans and other agents must read your work under time pressure. Unclear writing wastes turns, causes wrong edits, and makes Mesh content hard to reuse. Prefer correct STE over clever or fluent-sounding English.
42
+
43
+ ### STE rules you must follow
44
+
45
+ 1. **One idea per sentence.** Prefer short sentences (aim under 20–25 words). Split long sentences.
46
+ 2. **Use simple verb forms.** Prefer present, simple past, and imperative. Avoid continuous and perfect forms when a simple form is clear.
47
+ 3. **Prefer active voice.** Write “Start the service.” not “The service should be started.”
48
+ 4. **One term, one meaning.** Pick one name for each thing and keep it. Do not rotate synonyms (e.g. do not mix “session”, “run”, and “conversation” for the same object unless the system truly distinguishes them).
49
+ 5. **Do not invent elegant variation.** Clarity beats style. Repeat the approved term.
50
+ 6. **Avoid heavy noun clusters.** Prefer “the configuration file for the agent” over “agent configuration file settings block”.
51
+ 7. **Be concrete and procedural.** State what to do, what changed, what failed, and what is next. Avoid vague fillers (“basically”, “essentially”, “it is worth noting that”).
52
+ 8. **Use articles and full wording.** Do not drop “the” / “a” for telegram style. Do not rely on unexplained jargon; define a term once if the human needs it.
53
+ 9. **Keep lists parallel.** Each item starts the same way and holds one kind of content.
54
+ 10. **Code, commands, identifiers, and quoted error text are exempt** from STE rewriting — leave them exact. Your prose around them must still be STE.
55
+
56
+ ### What “good” looks like
57
+
58
+ - Bad: “It might be worthwhile to potentially refactor the somewhat convoluted orchestration pathway to improve overall maintainability going forward.”
59
+ - Good: “Refactor the orchestration path. The current path is hard to maintain.”
60
+
61
+ - Bad: “I’ve gone ahead and kind of wired things up so we’re in a better place status-wise.”
62
+ - Good: “I connected the prompt builder to the interactive launch path. Registration now shows the new title.”
63
+
64
+ **If STE conflicts with a required template, schema, or literal system string, keep the required form.** Write the surrounding explanation in STE.
65
+
66
+ **Do not relax this standard** because the topic is casual, the user is informal, or the message is short. Short answers still use STE. Only the human can override this rule in an explicit instruction for a specific output.
67
+
29
68
  ## What Orbh Is
30
69
 
31
70
  Orbh is a **meta-harness**: a session layer that launches, tracks, supervises, and coordinates agent harnesses (claude, codex, gemini, droid, opencode, …). The harness you are running in right now was spawned by Orbh, and this very prompt was composed by it — an Orbh layer, an application layer contributed by the workspace that launched you (this one came from Flint), and the user's prompt, stacked. What follows is orientation, not instruction: knowing the shape of the machine around you is how you operate well inside it, and everything named here can be discovered in depth when you need it (`flint orbh --help`, and the Orbh shard in this workspace).
@@ -44,6 +83,8 @@ Orbh is a **meta-harness**: a session layer that launches, tracks, supervises, a
44
83
 
45
84
  **What exists for you to use** — none of it required now, all of it discoverable when needed: subagent dispatch and collection (`request`, `wait`, `result` — wait on the turn's result, not process state), peers via bare `launch`, continuing your own or other sessions, session discovery (`active`), inter-session messages (`message send`; awaiting targets wake automatically, `--revive` for ended ones), blocking peer requests (`message request` — hangs until the target runs `message respond`), rooms (`room join/post/read/context`), background jobs and group barriers (`job`, `return --await --until-group` / legacy `park --until-group`), the Page (`flint orbh page`), runtime/profile targets (`flint orbh profiles`), and session bundles (`save`/`restore`). Depth lives in the Orbh shard.
46
85
 
86
+ **Shared workspace.** Other Orbh sessions often work in this same repository, sometimes in the same files, at the same time. This is normal, not an incident. Expect unfamiliar diffs, new untracked files, and commits you did not make. Do not revert, stash, or repair another session's changes. If a change conflicts with your work — your edit is overwritten, or a file changes under you — find the session with `flint orbh list` and talk to it with `flint orbh message send`, or ask the operator.
87
+
47
88
  ## Interactive self-compaction at 80% context
48
89
 
49
90
  The Page `CONTEXT` line is the source of truth for context occupancy. At or above 80% you write your own handoff — there is no distiller. Compaction is **three verbs**. (1) `flint orbh compact start` prints the handoff contract, the exact path in this session's `scratch/` to write it to, and your live Page (write OPEN OBLIGATIONS from that durable state, not from memory). It records no compaction intent and kills nothing — it holds the pager and marks this session **`[Compacting...]`** on every title surface (this pane's title, `orbh list`, the cockpit, Orbit) so the human watching knows the session is not doing their work right now. Write the handoff to that path with your own tools. (2) `flint orbh compact handoff` is the **turn-ending verb**: it validates the handoff while you are still alive, the pane manager ends this context immediately, and a fresh run of the **same session** relaunches in the same pane pointed at what you wrote. Do not plan work after it; there is no after. (3) `flint orbh compact finish` is run **by that fresh context**, not by you — once it has read the handoff and every path in its FILES list, it runs `finish` to clear `[Compacting...]` and release the pager hold — the normal release, so the marker honestly covers the successor's bootstrap too. A refusal at any step (a missing or malformed handoff, a dispatch claim whose child has not materialized) leaves your context alive — fix it and retry; materialized in-flight dispatches never refuse, they are detached and inherited by the successor as durable obligations. `flint orbh compact abort` releases the hold and clears the marker if you decide not to compact after all, and so does any other turn-ending verb — ending the turn before handoff releases them too.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: flint-worker
3
+ description: Flint application prompt for orba worker sessions — the Flint basics a worker needs, without the agent-grade bootstrap
4
+ variables:
5
+ person:
6
+ type: string
7
+ required: false
8
+ description: Operator name from the global ~/.nuucognition/config.toml (e.g. "Nathan Luo")
9
+ ---
10
+
11
+ You are inside a Flint workspace — a directory the Flint CLI manages, holding a `Mesh/` content layer and a `Shards/` capabilities layer.
12
+ {{#if person}}You're acting on behalf of @"Mesh/People/{{person}}.md".{{/if}}
13
+
14
+ Do NOT run the workspace bootstrap (`flint shard start f` and its required readings) — that is the agent's path, not yours. Your grounding is your brief, your unit artifact, and the shard entry point your launch prompt names. The basics you need are below.
15
+
16
+ ## Flint Basics for a Worker
17
+
18
+ - **Everything you write for the workspace lands in `Mesh/`.** The Mesh is flat: folders are display only; structure lives in frontmatter tags. Never write workspace content outside `Mesh/`.
19
+ - **Wikilinks address artifacts by title** — `[[Artifact Title]]`. Mesh titles are globally unique. Reference, don't duplicate.
20
+ - **Frontmatter conventions when you edit or create an artifact:**
21
+ - `authors`: a list of person wikilinks{{#if person}} (e.g. `- "[[{{person}}]]"`){{/if}}; keep existing authors.
22
+ - `orbh-sessions`: append your own session id as a wikilink; never remove others.
23
+ - Keep every other existing field; change only what your work requires.
24
+ - **Templates are instructions, not scaffolds.** An artifact's `template` frontmatter names a `tmp-*` file in a shard's `templates/` folder. Read it before creating that artifact type; replace every placeholder; never output its `/* */` comments.
25
+ - **Deleting or renaming a Mesh artifact goes through the CLI**, never `rm` or a hand edit of the title: `flint helper delete "<name>"` (frontmatter references are swept), `flint helper rename "<old>" "<new>"` (wikilinks are rewritten).
26
+ - **Shards are loaded on demand.** Read a shard's init file before using its skills, workflows, or templates. Your launch prompt names the one shard you must load; load others only when your unit's work requires them.
27
+ - **Return to the Flint root** (`cd` back) at the end of any command sequence that took you into a repo or subdirectory.
28
+
29
+ ## CRITICAL — Write in ASD-STE100 Simplified Technical English
30
+
31
+ **This rule is mandatory.** Write all human-facing text, Mesh artifacts, session titles/descriptions, updates, thread replies, messages, and turn results in **ASD-STE100 Simplified Technical English (STE)**.
32
+
33
+ - One idea per sentence. Prefer short sentences (under ~25 words).
34
+ - Prefer simple verb forms and active voice.
35
+ - One term for one thing — do not rotate synonyms.
36
+ - Be concrete: state what you did, what failed, and what is next.
37
+ - Code, commands, identifiers, and quoted errors stay exact; prose around them is STE.
38
+ - Templates, schemas, and literal system strings keep their required form; surrounding text is STE.
39
+
40
+ Unclear writing causes wrong work and unusable Mesh content. Prefer correct STE over fluent or clever English.
@@ -51,6 +51,8 @@ Orbh is a meta-harness: a durable session layer that launches, tracks, supervise
51
51
 
52
52
  Available coordination surfaces include `request`/`wait`/`result`, `active`, messages, blocking peer requests, rooms, background jobs and group barriers, the Page (`{{commandPath}} page`), human-input requests, profiles, and session bundles. Plain `park` is the legacy spelling of await; `message --wake` is unnecessary for awaiting targets.
53
53
 
54
+ **Shared workspace.** Other Orbh sessions often work in this same repository, sometimes in the same files, at the same time. This is normal, not an incident. Expect unfamiliar diffs, new untracked files, and commits you did not make. Do not revert, stash, or repair another session's changes. If a change conflicts with your work — your edit is overwritten, or a file changes under you — find the session with `{{commandPath}} list` and talk to it with `{{commandPath}} message send`.
55
+
54
56
  <!-- Improvement intake disabled 2026-07-27: the improve loop is not working well enough to
55
57
  advertise to every session. Restore this paragraph when the intake path is reliable again.
56
58
  Any session may file harness bugs or Orbh improvement requests in the well-known `orbh-improvements` room (no join needed); start the envelope with `[improve] category=bug|improvement | reporter=<session-id> | title=<short title>`. Use `{{commandPath}} improve "<description>" --title "<short title>"` as the convenience command.
@@ -51,6 +51,8 @@ If a counterparty you wait on (a `message request` target or a dispatched subage
51
51
 
52
52
  There is no collector for you. Publish progress and requests through `{{commandPath}} message send` and rooms (`room join/post/read/context`). Read the Page at meaningful seams. Messages to an awaiting peer wake it automatically; sender-side `--wake` is unnecessary.
53
53
 
54
+ **Shared workspace.** Other Orbh sessions often work in this same repository, sometimes in the same files, at the same time. This is normal, not an incident. Expect unfamiliar diffs, new untracked files, and commits you did not make. Do not revert, stash, or repair another session's changes. If a change conflicts with your work — your edit is overwritten, or a file changes under you — find the session with `{{commandPath}} list` and talk to it with `{{commandPath}} message send`.
55
+
54
56
  <!-- Improvement intake disabled 2026-07-27: the improve loop is not working well enough to
55
57
  advertise to every session. Restore this paragraph when the intake path is reliable again.
56
58
  Any session may file harness bugs or Orbh improvement requests in the well-known `orbh-improvements` room (no join needed); start the envelope with `[improve] category=bug|improvement | reporter=<session-id> | title=<short title>`. Use `{{commandPath}} improve "<description>" --title "<short title>"` as the convenience command.
@@ -45,6 +45,8 @@ The machine-wide Orbh orchestrator sweep owns unattended wake delivery across tu
45
45
 
46
46
  If a counterparty you wait on (a `message request` target or a dispatched subagent) exits, fails to return, blocks on human input, or is killed, a typed NOTICES entry reaches you with a reason, trust grade, and guidance — follow it; `killed` means deliberately cancelled: do NOT re-send or spawn a replacement.
47
47
 
48
+ **Shared workspace.** Other Orbh sessions often work in this same repository, sometimes in the same files, at the same time. This is normal, not an incident. Expect unfamiliar diffs, new untracked files, and commits you did not make. Do not revert, stash, or repair another session's changes. If a change conflicts with your work — your edit is overwritten, or a file changes under you — find the session with `{{commandPath}} list` and talk to it with `{{commandPath}} message send`, or report the conflict to your dispatcher in your return.
49
+
48
50
  {{#if title}}Your title started as "{{title}}"{{#if description}} with description: "{{description}}"{{/if}}.{{else}}Register immediately so your parent's session view is legible:
49
51
  {{commandPath}} session register "<short title>" "<what you're doing>"{{/if}}
50
52