Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix: refuse run-together CLI shouts with recovery text [B7,A2]
Corey Olsonb943b2e6f3fb
diff --git a/src/commands/shout.js b/src/commands/shout.jsindex 4df95125..1fa988fa 100644--- a/src/commands/shout.js+++ b/src/commands/shout.js@@ -1,5 +1,6 @@/** The pullboard shout command, in its own module so an item adding another command never edits these lines. */import * as store from '../board.js';+import { requireReadableShout } from '../shout-readable.js';import {COORDINATOR,} from '../config.js';@@ -25,6 +26,7 @@ export async function run(io, { first, second, rest, values }) {const hasRecipient = first && recipients.includes(first) && (values.item === undefined || second !== undefined);const to = values.item !== undefined ? `item:${values.item}` : hasRecipient ? first : values.decision ? (me.id === COORDINATOR ? 'person' : COORDINATOR) : first ?? '';const text = [hasRecipient ? second : first, ...(hasRecipient ? rest : [second, ...rest])].filter(Boolean).join(' ');+ requireReadableShout(text);const id = await ordered(ctx, board, 'shout', [{ from: personShout(io, me) ? store.PERSON : me.id, to, text, ...(values.item !== undefined ? { item: Number(values.item) } : {}), lanes: laneNames(ctx.config), decision: Boolean(values.decision), ...(values.news ? { news: true } : {}), evidence }]);io.result?.({ id, decision: Boolean(values.decision) });const agents = store.listAgents(board);diff --git a/src/next-step-defaults.js b/src/next-step-defaults.jsindex e75f3dca..747bc7fd 100644--- a/src/next-step-defaults.js+++ b/src/next-step-defaults.js@@ -1,5 +1,6 @@/** General CLI recovery text; operation-owned codes live in src/moves/ [P4,C7]. */export const DEFAULT_NEXT_STEPS = Object.freeze({+ "SHOUT_SPACES": "rewrite the shout with spaces between words, then send it again","GIT_SYNC_LOG": "restore the append-only refs/pullboard/board history on origin before running pullboard sync","GIT_SYNC_REMOTE": "restore read/write access to origin, then retry the original command or run pullboard sync; keep its pending sealed move","GIT_SYNC_LOCAL_CHANGED": "run pullboard export to preserve local moves, then ask the coordinator to reconcile the local and remote prefixes before syncing",diff --git a/src/shout-readable.js b/src/shout-readable.jsnew file mode 100644index 00000000..c7f35f61--- /dev/null+++ b/src/shout-readable.js@@ -0,0 +1,18 @@+/** CLI readability heuristic measured against native shouts 27877–28876 [B7,A2]. */+import { Refused } from './refused.js';++/** Refuse glued prose without treating hashes, URLs or discussed literals as prose.+ * @param {string} text+ * @returns {void}+ */+export function requireReadableShout(text) {+ let prose = text.replace(/https?:\/\/[^\s]+/gu, ' ')+ .replace(/\b(?:[a-fA-F0-9]{64}|[a-fA-F0-9]{40})\b/gu, ' ');+ const quotes = /`[^`\n]+`|"[^"\n]+"|(?<![A-Za-z])'[^'\n]+'(?![A-Za-z])/gu;+ const outside = prose.replace(quotes, ' ');+ // A quoted bad example is readable in an explanation, not as the whole message.+ if ((outside.match(/[A-Za-z]{2,}/gu) ?? []).length >= 3) prose = outside;+ if (/[a-z]{25,}|[A-Z]{25,}/u.test(prose)) {+ throw new Refused('SHOUT_SPACES', 'Rewrite the shout with spaces between words.');+ }+}