@rness/cli 0.22.0 → 0.22.2
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 +32 -0
- package/dist/bin/rness.js +2 -2
- package/dist/{chunk-AEL2W76O.js → chunk-A7NX55WK.js} +4 -4
- package/dist/chunk-A7NX55WK.js.map +1 -0
- package/dist/{chunk-XCO5ZT2H.js → chunk-DFGZWBBW.js} +202 -140
- package/dist/chunk-DFGZWBBW.js.map +1 -0
- package/dist/{chunk-S4NARIQP.js → chunk-H5E6FMP6.js} +89 -59
- package/dist/chunk-H5E6FMP6.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{note-XSJ7ASXM.js → note-PANYS7DK.js} +3 -3
- package/dist/{summary-47SFWNSQ.js → summary-K5ETHXOX.js} +3 -3
- package/package.json +1 -1
- package/scaffold/README.md +3 -3
- package/scaffold/WORKSPACE.md +2 -2
- package/scaffold/adr/0000-template.md +5 -5
- package/dist/chunk-AEL2W76O.js.map +0 -1
- package/dist/chunk-S4NARIQP.js.map +0 -1
- package/dist/chunk-XCO5ZT2H.js.map +0 -1
- /package/dist/{note-XSJ7ASXM.js.map → note-PANYS7DK.js.map} +0 -0
- /package/dist/{summary-47SFWNSQ.js.map → summary-K5ETHXOX.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
syncCommand,
|
|
27
27
|
upgradeCommand,
|
|
28
28
|
validateCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-H5E6FMP6.js";
|
|
30
30
|
import {
|
|
31
31
|
BoardRefused,
|
|
32
32
|
COLLECTIONS,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
workspaceDirs,
|
|
67
67
|
writeFileAtomic,
|
|
68
68
|
writeManifest
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-DFGZWBBW.js";
|
|
70
70
|
|
|
71
71
|
// src/index.ts
|
|
72
72
|
async function run2(argv) {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
planIssue,
|
|
8
8
|
postNote,
|
|
9
9
|
sessionFrom
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-A7NX55WK.js";
|
|
11
|
+
import "./chunk-DFGZWBBW.js";
|
|
12
12
|
export {
|
|
13
13
|
KINDS,
|
|
14
14
|
NoteRefused,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
postNote,
|
|
20
20
|
sessionFrom
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=note-
|
|
22
|
+
//# sourceMappingURL=note-PANYS7DK.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
githubRepo,
|
|
3
3
|
journalOf,
|
|
4
4
|
planIssue
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-A7NX55WK.js";
|
|
6
6
|
import {
|
|
7
7
|
branchOf,
|
|
8
8
|
commitsBetween,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
issuesNoted,
|
|
13
13
|
plansInProgress,
|
|
14
14
|
startOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DFGZWBBW.js";
|
|
16
16
|
|
|
17
17
|
// src/board/summary.ts
|
|
18
18
|
import { resolve } from "path";
|
|
@@ -88,4 +88,4 @@ async function postSummary(input) {
|
|
|
88
88
|
export {
|
|
89
89
|
postSummary
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=summary-
|
|
91
|
+
//# sourceMappingURL=summary-K5ETHXOX.js.map
|
package/package.json
CHANGED
package/scaffold/README.md
CHANGED
|
@@ -11,9 +11,9 @@ specifications, plans, standards and skills, resolved per repository by the
|
|
|
11
11
|
|
|
12
12
|
## Commands
|
|
13
13
|
|
|
14
|
-
npm run validate # rness validate
|
|
15
|
-
npm run context # rness context
|
|
16
|
-
npm run sync # rness sync
|
|
14
|
+
npm run validate # rness validate: check this tree against the contract
|
|
15
|
+
npm run context # rness context: print the resolved context for a scope
|
|
16
|
+
npm run sync # rness sync: regenerate blocks (--all clones missing repositories)
|
|
17
17
|
|
|
18
18
|
The CLI is pinned in `package.json`; any `rness` you run inside the workspace
|
|
19
19
|
delegates to that copy.
|
package/scaffold/WORKSPACE.md
CHANGED
|
@@ -5,13 +5,13 @@ A rness workspace mirrors one GitHub organisation:
|
|
|
5
5
|
```
|
|
6
6
|
<org>/
|
|
7
7
|
├── AGENTS.md generated global block, not committed
|
|
8
|
-
├── .rness/ this repository
|
|
8
|
+
├── .rness/ this repository: the organisation's context
|
|
9
9
|
└── org/<repo>/ the repositories you work on, cloned; a monorepo is a
|
|
10
10
|
repository like any other, its parts are declared as scopes
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
The workspace root is never a git repository. `rness.json` is the
|
|
14
|
-
organisation's catalogue: `repos` (every repository rness knows about
|
|
14
|
+
organisation's catalogue: `repos` (every repository rness knows about: each
|
|
15
15
|
teammate clones the ones they need under `org/`, `rness sync --all` clones
|
|
16
16
|
them all) and `scopes` (where context resolves: a repository, or a directory
|
|
17
17
|
inside one, with an optional `extends`).
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
date: YYYY-MM-DD
|
|
3
3
|
status: Proposed | Accepted | Rejected | Superseded
|
|
4
4
|
repo: Repository or scope affected by this decision
|
|
5
|
-
superseded_by: '[NNNN](./NNNN-title.md)
|
|
5
|
+
superseded_by: '[NNNN](./NNNN-title.md) - only present when status is Superseded'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# NNNN
|
|
8
|
+
# NNNN - Short decision title
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -20,8 +20,8 @@ The chosen approach, in one or two clear sentences.
|
|
|
20
20
|
|
|
21
21
|
## Alternatives Considered
|
|
22
22
|
|
|
23
|
-
- **Option A**
|
|
24
|
-
- **Option B**
|
|
23
|
+
- **Option A** - why it was rejected
|
|
24
|
+
- **Option B** - why it was rejected
|
|
25
25
|
|
|
26
26
|
## Consequences
|
|
27
27
|
|
|
@@ -31,4 +31,4 @@ The chosen approach, in one or two clear sentences.
|
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
An ADR is never rewritten when the context changes
|
|
34
|
+
An ADR is never rewritten when the context changes: it is superseded.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/note.ts"],"sourcesContent":["import { relative, resolve, sep } from 'node:path'\n\nimport {\n notePosted,\n notesPosted,\n recordNotice,\n} from '../board/journal-state.ts'\nimport { blobUrl, issueUrl } from '../board/urls.ts'\nimport type { BoardAction } from '../core/board-declaration.ts'\nimport { parseFrontMatter } from '../core/frontmatter.ts'\nimport { branchOf, headOf } from '../core/git.ts'\nimport { JournalRefused } from '../core/github-journal.ts'\nimport type { JournalIssue } from '../core/github-journal.ts'\nimport { cloneHolding } from '../core/repos.ts'\nimport { resolveScope } from '../core/scope.ts'\nimport { plansInProgress, statusTabs } from '../core/status.ts'\nimport {\n type Context,\n type Declared,\n context,\n declaredBoards,\n fromGithub,\n} from './board.ts'\n\n/**\n * `rness note` and `rness_note` (spec 0030 §4, §5): a short note of\n * the agent's on the plan it implements — on the plan's issue in `.rness`,\n * or on an implementation issue in the repository the session works in, a\n * sub-issue of the plan's (§3). Loaded through `import()` only.\n */\n\nexport const KINDS = ['approach', 'deviation', 'blocker', 'done'] as const\nexport type Kind = (typeof KINDS)[number]\nconst TITLE: Readonly<Record<Kind, string>> = {\n approach: 'Approach',\n deviation: 'Deviation',\n blocker: 'Blocker',\n done: 'Done',\n}\nconst MAX = 4000\n/** What a credential looks like; a note that matches is refused, never redacted. */\nconst SECRETS = [\n /ghp_/,\n /gho_/,\n /github_pat_/,\n /AKIA[0-9A-Z]{16}/,\n /-----BEGIN [A-Z ]*PRIVATE KEY/,\n /xox[abpr]-/,\n /sk-[A-Za-z0-9]{20,}/,\n]\n\n/** A refusal said to the agent in one line: the note is not posted. */\nexport class NoteRefused extends Error {}\n\nexport interface NoteInput {\n /** The session's directory. */\n cwd: string\n text: string\n kind?: string\n /** `.rness/`-relative: `plans/0021-x.md`; absent, the one plan in progress. */\n plan?: string\n /** `claude · 1a2b3c4d`, or a session id; absent, `CLAUDE_CODE_SESSION_ID`. */\n session?: string\n env?: NodeJS.ProcessEnv\n /** Internal (tests): GitHub API base. */\n githubApi?: string\n}\n\n/** Where a note went: `acme/api#87`, the reference a pull request uses. */\nexport interface Posted {\n reference: string\n to: 'plan' | 'repo'\n}\n\n/** The session as the hooks name it: `claude · 1a2b3c4d`; null without one. */\nexport function sessionFrom(\n given: string | undefined,\n env: NodeJS.ProcessEnv\n): string | null {\n const raw = given ?? env['CLAUDE_CODE_SESSION_ID'] ?? ''\n if (raw.trim() === '') return null\n // Claude Code's Bash tool carries `CLAUDE_CODE_SESSION_ID` (read\n // 2026-10-06, 2.1.291); a session already named is kept as named.\n return raw.includes(' · ') ? raw : `claude · ${raw.slice(0, 8)}`\n}\n\n/** The text, its kind and the session, checked before anything is read. */\nfunction checked(input: NoteInput): { kind: Kind; session: string } {\n const length = input.text.trim().length\n if (length < 1 || length > MAX)\n throw new NoteRefused(\n `a note holds 1 to ${MAX.toLocaleString('en')} characters (this one ${length})`\n )\n if (SECRETS.some((s) => s.test(input.text)))\n throw new NoteRefused('the note looks like it holds a credential')\n const kind = KINDS.find((k) => k === (input.kind ?? 'approach'))\n if (kind === undefined)\n throw new NoteRefused(\n `--kind is one of ${KINDS.slice(0, -1).join(', ')} or ${KINDS.at(-1)}`\n )\n const session = sessionFrom(input.session, input.env ?? process.env)\n if (session === null)\n throw new NoteRefused(\n 'no session: write it from a Claude Code session, or pass --session'\n )\n return { kind, session }\n}\n\nexport type Journal = Extract<BoardAction, { action: 'journal' }>\n\n/** The board that keeps the journal: the first whose session start declares `journal`. */\nexport function journalOf(\n declared: readonly Declared[]\n): { board: Declared; journal: Journal } | null {\n for (const d of declared)\n for (const a of d.declaration.hooks['session-start'] ?? [])\n if (a.action === 'journal') return { board: d, journal: a }\n return null\n}\n\n/** `git@github.com:acme/api.git` or `https://github.com/acme/api` → `acme`, `api`; null on another host. */\nexport function githubRepo(\n url: string\n): { owner: string; name: string } | null {\n const m =\n /^(?:git@github\\.com:|ssh:\\/\\/git@github\\.com\\/|https:\\/\\/github\\.com\\/)([^/]+)\\/(.+?)(?:\\.git)?\\/?$/.exec(\n url.trim()\n )\n return m === null || m[1] === undefined || m[2] === undefined\n ? null\n : { owner: m[1], name: m[2] }\n}\n\n/** The plan the note is on (spec 0030 §2). */\nasync function planOf(\n c: Context,\n cwd: string,\n given?: string\n): Promise<string> {\n const tabs = await statusTabs(c.rnessDir)\n const plans = tabs.find((t) => t.name === 'plans')?.rows ?? []\n if (given !== undefined) {\n const path = given.replace(/^\\.rness\\//, '')\n if (!plans.some((r) => r.path === path))\n throw new NoteRefused(`${given} is no plan of .rness`)\n return path\n }\n const scope = resolveScope(\n c.manifest,\n relative(c.root, resolve(cwd)).split(sep).join('/')\n )\n const candidates = await plansInProgress(\n { root: c.root, rnessDir: c.rnessDir },\n c.manifest,\n scope\n )\n if (candidates.length === 0)\n throw new NoteRefused(\n `no plan in progress in scope ${scope ?? 'global'}: set one In progress first`\n )\n if (candidates.length > 1)\n throw new NoteRefused(\n `several plans in progress: pass --plan, one of ${candidates.join(', ')}`\n )\n return candidates[0] ?? ''\n}\n\n/** A plan's issue in `.rness`, found by its card's `Path` on the journal's board. */\nexport async function planIssue(\n c: Context,\n board: Declared,\n plan: string\n): Promise<JournalIssue> {\n const items = await fromGithub(\n c.provider.items(board.board, { bodies: false })\n )\n const number = items.find((i) => i.path === plan)?.issue?.number\n const found =\n number === undefined\n ? null\n : await fromGithub(c.provider.issueOf(c.org, '.rness', number))\n if (found === null)\n throw new NoteRefused(`${plan} has no issue yet: rness board push`)\n return {\n id: found.id,\n number: found.number,\n repository: `${c.org}/.rness`,\n }\n}\n\n/** A GitHub refusal to write (a token or organization policy, spec 0028). */\nconst refusedWrite = (e: unknown): boolean =>\n e instanceof Error &&\n /not accessible|forbidden|permission|must have push access/i.test(e.message)\n\n/** The implementation issue's body (spec 0030 §3.2): the plan, its issue, its specification. */\nasync function implementationBody(\n c: Context,\n plan: string,\n planNumber: number\n): Promise<string> {\n const lines = [\n `Plan [\\`${plan}\\`](${blobUrl(c.org, plan)}) · [plan issue](${issueUrl(c.org, planNumber)})`,\n ]\n try {\n const { readFile } = await import('node:fs/promises')\n const front =\n parseFrontMatter(\n await readFile(resolve(c.rnessDir, ...plan.split('/')), 'utf8')\n ) ?? {}\n const spec = /\\(\\.\\.\\/(specs\\/[^)\\s]+\\.md)\\)/.exec(\n String(front['spec'] ?? '')\n )\n if (spec?.[1] !== undefined)\n lines.push(`Specification [\\`${spec[1]}\\`](${blobUrl(c.org, spec[1])})`)\n } catch {\n // No specification named: the plan alone.\n }\n return `${lines.join('\\n')}\\n\\nThe agent's notes on this implementation follow as comments. The pull request that completes it carries \\`Closes\\` with this issue's reference.`\n}\n\n/** Posts a note; throws {@link NoteRefused} or GitHub's error, in one line. */\nexport async function postNote(input: NoteInput): Promise<Posted> {\n const { kind, session } = checked(input)\n const c = await context({\n cwd: input.cwd,\n ...(input.githubApi === undefined ? {} : { githubApi: input.githubApi }),\n })\n const declared = await declaredBoards(c)\n const kept = journalOf(declared)\n if (kept === null)\n throw new NoteRefused(\n 'no board keeps a journal: add { \"action\": \"journal\", \"to\": \"plan\" } to its session-start hooks'\n )\n const plan = await planOf(c, input.cwd, input.plan)\n if ((await notesPosted(c.rnessDir, session, plan)) >= kept.journal.limit)\n throw new NoteRefused(\n 'journal full for this session: put the rest in the pull request'\n )\n const parent = await planIssue(c, kept.board, plan)\n const clone = cloneHolding(c.root, c.manifest.repos, input.cwd)\n\n let target: JournalIssue = parent\n let why: string | null = null\n if (kept.journal.to === 'repo' && clone !== null) {\n const repo = githubRepo(clone.url)\n if (repo === null || repo.owner.toLowerCase() !== c.org.toLowerCase())\n why = `${clone.name} is not on the workspace's provider`\n else\n try {\n const there = await fromGithub(\n c.provider.journalIssue(repo.owner, repo.name, plan)\n )\n if (there !== null) target = there\n else {\n const row = (await statusTabs(c.rnessDir))\n .find((t) => t.name === 'plans')\n ?.rows.find((r) => r.path === plan)\n target = await fromGithub(\n c.provider.createJournalIssue(repo.owner, repo.name, plan, {\n title: `Implement ${row === undefined ? plan : `${row.id} — ${row.title}`}`,\n body: await implementationBody(c, plan, parent.number),\n })\n )\n try {\n await fromGithub(c.provider.addSubIssue(parent.id, target.id))\n } catch {\n // A link GitHub refuses: the issue named on the plan's instead (§3.3).\n await fromGithub(\n c.provider.comment(\n parent.id,\n `Implementation: ${target.repository}#${target.number}`\n )\n )\n }\n }\n } catch (e) {\n if (e instanceof JournalRefused)\n why =\n e.why === 'issues'\n ? `${repo.owner}/${repo.name} takes no issues`\n : `${repo.owner}/${repo.name} is not on GitHub, or this login cannot see it`\n else if (refusedWrite(e))\n why = `${repo.owner}/${repo.name} refuses this login's write`\n else throw e\n }\n }\n if (why !== null)\n await recordNotice(`journal — ${why}, notes go to the plan's issue`)\n\n const where = clone?.dir ?? input.cwd\n const [branch, head] = await Promise.all([branchOf(where), headOf(where)])\n const id = session.split(' · ').pop() ?? session\n const header = [\n `**${TITLE[kind]}**`,\n session,\n ...(branch === null || head === null\n ? []\n : [`\\`${branch}\\` @ \\`${head.slice(0, 7)}\\``]),\n ].join(' · ')\n const body = [\n ...(why === null\n ? []\n : [`_${why}: this note goes to the plan's issue._`, '']),\n header,\n '',\n input.text.trim(),\n '',\n `<!-- rness note ${id} -->`,\n ].join('\\n')\n await fromGithub(c.provider.comment(target.id, body))\n const reference = `${target.repository}#${target.number}`\n await notePosted(c.rnessDir, session, plan, { id: target.id, reference })\n return {\n reference,\n to: target === parent ? 'plan' : 'repo',\n }\n}\n\n/** `rness note`: the text from the argument, or stdin when it is absent or `-`. */\nexport async function noteCommand(opts: {\n text?: string\n kind?: string\n plan?: string\n session?: string\n cwd?: string\n githubApi?: string\n /** Internal (tests): what stdin holds. */\n stdin?: () => Promise<string>\n}): Promise<number> {\n try {\n const text =\n opts.text === undefined || opts.text === '-'\n ? await (opts.stdin ?? readStdin)()\n : opts.text\n const posted = await postNote({\n cwd: opts.cwd ?? process.cwd(),\n text,\n ...(opts.kind === undefined ? {} : { kind: opts.kind }),\n ...(opts.plan === undefined ? {} : { plan: opts.plan }),\n ...(opts.session === undefined ? {} : { session: opts.session }),\n ...(opts.githubApi === undefined ? {} : { githubApi: opts.githubApi }),\n })\n process.stdout.write(`${posted.reference}\\n`)\n return 0\n } catch (e) {\n process.stderr.write(\n `rness: ${e instanceof Error ? e.message : String(e)}\\n`\n )\n return 1\n }\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = []\n for await (const chunk of process.stdin) chunks.push(Buffer.from(chunk))\n return Buffer.concat(chunks).toString('utf8')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,SAAS,WAAW;AA+BhC,IAAM,QAAQ,CAAC,YAAY,aAAa,WAAW,MAAM;AAEhE,IAAM,QAAwC;AAAA,EAC5C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,MAAM;AACR;AACA,IAAM,MAAM;AAEZ,IAAM,UAAU;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,cAAN,cAA0B,MAAM;AAAC;AAuBjC,SAAS,YACd,OACA,KACe;AACf,QAAM,MAAM,SAAS,IAAI,wBAAwB,KAAK;AACtD,MAAI,IAAI,KAAK,MAAM,GAAI,QAAO;AAG9B,SAAO,IAAI,SAAS,QAAK,IAAI,MAAM,eAAY,IAAI,MAAM,GAAG,CAAC,CAAC;AAChE;AAGA,SAAS,QAAQ,OAAmD;AAClE,QAAM,SAAS,MAAM,KAAK,KAAK,EAAE;AACjC,MAAI,SAAS,KAAK,SAAS;AACzB,UAAM,IAAI;AAAA,MACR,q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