Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

<p align="center">
<img src="docs/assets/noxroot-terminal.png" alt="Noxroot terminal example: preserve project filters on back navigation, with likely source files, a navigation test, and checks to run" width="594">
<img src="docs/assets/noxroot-terminal.png" alt="Example Noxroot task brief: preserve project filters on back navigation, with relevant files, related tests, and checks to run" width="800">
</p>

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,
Expand Down Expand Up @@ -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
Expand Down
Binary file modified docs/assets/noxroot-terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down Expand Up @@ -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."],
Expand Down
10 changes: 4 additions & 6 deletions tests/documentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<task>"` 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 () => {
Expand Down Expand Up @@ -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("—");
Expand Down
19 changes: 18 additions & 1 deletion tests/output-contract.test.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down