diff --git a/README.md b/README.md index 87af616..2a3cb60 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,12 @@ Code, Cursor, OpenCode, Copilot CLI, and other coding agents. New chats do not require another `init`. Ordinary questions need no Noxroot task. Noxroot stays in the background until code-changing work needs it. -Inspect the relevant files and checks before the agent starts editing: +Example task brief (illustrative excerpt):

- Noxroot terminal example: preserve project filters on back navigation, with likely source files, a navigation test, and checks to run + Example Noxroot task brief: preserve project filters on back navigation, with relevant files, related tests, and checks to run

-Output excerpt with illustrative project paths and checks, not a captured test run. The brief -identifies likely source files, related tests, and commands to run. It does not claim those checks -have passed. - ## Project memory, not chat history Project memory is the versioned repository knowledge future agents should reuse: architecture, @@ -142,7 +138,7 @@ still inspect the surrounding code. Existing routes stay unchanged. ## Try the read-only diagnosis -Noxroot is not published to npm yet. From source, use Node.js `>=22.12 <27`: +To try Noxroot from source, use Node.js `>=22.12 <27`: ```bash git clone https://github.com/liolevx/noxroot.git diff --git a/docs/assets/noxroot-terminal.png b/docs/assets/noxroot-terminal.png index 6891d44..fbf1934 100644 Binary files a/docs/assets/noxroot-terminal.png and b/docs/assets/noxroot-terminal.png differ diff --git a/src/output.ts b/src/output.ts index e1ed9ae..7272825 100644 --- a/src/output.ts +++ b/src/output.ts @@ -355,18 +355,18 @@ export function renderContext(context: ContextPackage, options: RenderOptions = options, ), ...section( - "Likely owner", + "Relevant files", owners.length ? owners.map(candidatePath) : ["Not established"], options, ), ...section( - "Likely tests", + "Related tests", tests.length ? tests.map(candidatePath) : ["Not established"], options, ), ...section("Also selected", guidance.map(candidatePath), options), ...section( - "Checks", + "Checks to run", context.requiredVerification.length ? context.requiredVerification.map( (check) => `${commandText(check)} · cwd ${check.cwd}`, @@ -414,19 +414,19 @@ export function renderContext(context: ContextPackage, options: RenderOptions = ANSI.green, ), ...section( - "Likely owner", + "Relevant files", context.likelyOwningSource.length ? context.likelyOwningSource.map(candidatePath) : ["Not established"], options, ), ...section( - "Likely tests", + "Related tests", context.likelyTests.length ? context.likelyTests.map(candidatePath) : ["Not established"], options, ), ...section( - "Checks", + "Checks to run", context.requiredVerification.length ? context.requiredVerification.map(commandText) : ["No approved command is available."], diff --git a/tests/documentation.test.ts b/tests/documentation.test.ts index 8a7f2e7..5a88a77 100644 --- a/tests/documentation.test.ts +++ b/tests/documentation.test.ts @@ -37,17 +37,15 @@ describe("documentation examples", () => { it("labels the terminal illustration without inventing a successful run", async () => { const readme = await readFile(path.resolve("README.md"), "utf8"); - expect(readme).toContain( - "Output excerpt with illustrative project paths and checks, not a captured test run.", - ); + expect(readme).toContain("Example task brief (illustrative excerpt):"); expect(readme).toContain( '`context ""` is read-only. It does not start a task or run checks.', ); expect(readme).not.toContain("improve reviewer decision safety"); const png = await readFile(path.resolve("docs/assets/noxroot-terminal.png")); expect(png.subarray(0, 8).toString("hex")).toBe("89504e470d0a1a0a"); - expect(png.readUInt32BE(16)).toBe(594); - expect(png.readUInt32BE(20)).toBe(867); + expect(png.readUInt32BE(16)).toBe(1264); + expect(png.readUInt32BE(20)).toBe(861); }); it("documents the application-agent framework boundary", async () => { @@ -106,7 +104,7 @@ describe("documentation examples", () => { expect(logo).toContain('viewBox="0 0 1600 440"'); expect(logo).toContain("Noxroot owl mark"); expect(readme).toContain('src="docs/assets/noxroot-terminal.png"'); - expect(readme).toContain('width="594"'); + expect(readme).toContain('width="800"'); expect(readme).toContain(".noxroot/skills/verify-change/SKILL.md"); expect(readme).toContain(".noxroot/local/runs/*.json"); expect(readme).not.toContain("—"); diff --git a/tests/output-contract.test.ts b/tests/output-contract.test.ts index fc08fb7..caff16a 100644 --- a/tests/output-contract.test.ts +++ b/tests/output-contract.test.ts @@ -1,7 +1,24 @@ import { expect, it } from "vitest"; -import { renderGuidedFinish } from "../src/output.js"; +import path from "node:path"; +import { buildContext } from "../src/core/context.js"; +import { renderContext, renderGuidedFinish } from "../src/output.js"; import type { GuidedRunRecord } from "../src/orchestration/guided.js"; +it.each([false, true])("uses plain task-brief labels (verbose: %s)", async (verbose) => { + const context = await buildContext( + "save favourite restaurants", + path.resolve("tests/fixtures/nextjs"), + ); + const before = JSON.stringify(context); + const output = renderContext(context, { verbose }); + expect(output).toContain("Relevant files\n"); + expect(output).toContain("Related tests\n"); + expect(output).toContain("Checks to run\n"); + expect(output).not.toMatch(/Likely owner|Likely tests/); + expect(output).not.toContain("passed"); + expect(JSON.stringify(context)).toBe(before); +}); + function record(status: GuidedRunRecord["status"]): GuidedRunRecord { return { id: "one",