docs: organize canonical documentation layout (URGENTE)
Group all existing authored guides by domain and ownership, expose complete navigation, and preserve their public routes. Update physical path consumers and release configuration while retaining historical records. Document domain-based specs and ADR slugs without global numbering. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -48,7 +48,7 @@ afterEach(async () => {
|
||||
describe("canonical product catalog", () => {
|
||||
it("admits every documented browser scenario through the named contract", async () => {
|
||||
const guide = await readFile(
|
||||
join(root, "docs/browser-scenario-contract.md"),
|
||||
join(root, "docs/guides/web/browser-scenario-contract.md"),
|
||||
"utf8",
|
||||
);
|
||||
const examples = [
|
||||
@@ -169,7 +169,9 @@ describe("canonical product catalog drift", () => {
|
||||
],
|
||||
};
|
||||
const issues = await documentationFactIssues(root, drifted);
|
||||
expect(issues).toContain("docs/installation.md: missing Future Client");
|
||||
expect(issues).toContain(
|
||||
"docs/getting-started/installation.md: missing Future Client",
|
||||
);
|
||||
expect(issues).not.toContain("README.md: missing Future Client");
|
||||
});
|
||||
|
||||
@@ -183,7 +185,7 @@ describe("canonical product catalog drift", () => {
|
||||
"README_ko.md",
|
||||
"README_ar.md",
|
||||
"website/locales/languages.json",
|
||||
"docs/installation.md",
|
||||
"docs/getting-started/installation.md",
|
||||
"AGENTS.md",
|
||||
".github/pull_request_template.md",
|
||||
];
|
||||
@@ -203,8 +205,8 @@ describe("canonical product catalog drift", () => {
|
||||
);
|
||||
for (const [original, changed] of [
|
||||
[
|
||||
"(docs/installation.md#supported-agents)",
|
||||
"(docs/installation.md#missing-agents)",
|
||||
"(docs/getting-started/installation.md#supported-agents)",
|
||||
"(docs/getting-started/installation.md#missing-agents)",
|
||||
],
|
||||
[
|
||||
"https://rea.tools/zh-CN/guides/native/",
|
||||
|
||||
@@ -29,7 +29,10 @@ describe("documented process CLI workflow", () => {
|
||||
async ({ cli }) => {
|
||||
const root = await createTestTempDirectory("rea-process-cli-");
|
||||
const guide = await readFile(
|
||||
new URL("../../../docs/process-capture.md", import.meta.url),
|
||||
new URL(
|
||||
"../../../docs/guides/runtime/process-capture.md",
|
||||
import.meta.url,
|
||||
),
|
||||
"utf8",
|
||||
);
|
||||
const recipe = /```sh\nrea capture-process ([^\n]+)\n```/u.exec(
|
||||
|
||||
@@ -62,7 +62,10 @@ const captureViaMcp = async (scenario: Record<string, unknown>) => {
|
||||
};
|
||||
|
||||
it("documents a finalization scenario and exit record that match the contract", async () => {
|
||||
const document = await readFile("docs/process-capture.md", "utf8");
|
||||
const document = await readFile(
|
||||
"docs/guides/runtime/process-capture.md",
|
||||
"utf8",
|
||||
);
|
||||
const blocks = [
|
||||
...(document.split("### Finalization interval")[1] ?? "").matchAll(
|
||||
/```json\n([\s\S]*?)\n```/gu,
|
||||
@@ -85,7 +88,10 @@ it("documents a finalization scenario and exit record that match the contract",
|
||||
itWithCaptureCapability.each(["cli", "mcp"] as const)(
|
||||
"hashes the documented complete report despite omitted terminal output through %s",
|
||||
async (adapter) => {
|
||||
const document = await readFile("docs/process-capture.md", "utf8");
|
||||
const document = await readFile(
|
||||
"docs/guides/runtime/process-capture.md",
|
||||
"utf8",
|
||||
);
|
||||
const example = document
|
||||
.split("## Hash a report independently of terminal output")[1]
|
||||
?.match(/```json\n([\s\S]*?)\n```/u)?.[1];
|
||||
|
||||
@@ -32,4 +32,4 @@ or network dependencies.
|
||||
the repository's reconstruction-readiness verifier. `npm run verify:readiness`
|
||||
combines them with the compiled native fixtures, exercises CLI and MCP parity
|
||||
for real analysis operations, and checks the internal machine-readable report
|
||||
documented in `docs/reconstruction-readiness.md`.
|
||||
documented in `docs/development/reconstruction-readiness.md`.
|
||||
|
||||
@@ -36,7 +36,10 @@ const shellExamples = (content: string): string[] =>
|
||||
|
||||
describe("onboarding documentation product facts", () => {
|
||||
it("keeps the installation MCP example aligned with the package registration command", async () => {
|
||||
const content = await readFile(resolve("docs/installation.md"), "utf8");
|
||||
const content = await readFile(
|
||||
resolve("docs/getting-started/installation.md"),
|
||||
"utf8",
|
||||
);
|
||||
expect(jsonExamples(content)).toContainEqual(
|
||||
expect.objectContaining({
|
||||
mcpServers: expect.objectContaining({
|
||||
|
||||
@@ -7,7 +7,9 @@ import { SUPPORTED_NODE_VERSION_RANGE } from "../../src/domain/runtimeVersion.js
|
||||
const readJson = async (path: string): Promise<unknown> =>
|
||||
JSON.parse(await readFile(path, "utf8")) as unknown;
|
||||
|
||||
const versionedDocumentation = ["docs/installation.md"] as const;
|
||||
const versionedDocumentation = [
|
||||
"docs/getting-started/installation.md",
|
||||
] as const;
|
||||
|
||||
describe("release configuration", () => {
|
||||
it("keeps doctor and setup runtime support aligned with package engines", async () => {
|
||||
|
||||
Reference in New Issue
Block a user