Skip to main content

Scope and publication policy

Keep apps/docs as the source of record and render generated Markdown in Wiki. Start with workspace-only mirrors. Require a separate publication decision before creating a share-enabled mirror or changing public docs URLs. Use DOCS-WIKI-CLASSIFICATION.md as a private review input. Its inventory at 76e405a5b7 proposes 273 public candidates, 119 pages needing Iris review and 205 internal pages out of 597. The candidates include 84 end-user or learner pages, 103 developer pages and 86 generated reference pages. The file flags 65 public candidates with links into held build content. Reconcile the old paths against the exact import commit and review changed or new pages. ACK-CLASSIFY must approve explicit public entries at the reviewed source digest. Require an explicit audience: public tag on the source for the public mirror. The candidate list, viewer audience tags such as users and passing scans confer no publication permission. Missing rows or approvals, needs Iris review, build/devops and build/development-tools stay internal. Preserve the stricter held-build link checks. Use an explicit root workspace ID and verify it against the authenticated target before any write. Preserve navigation order and deterministic page paths. Assign pages to these proposed spaces: Wiki permissions apply at space level. Managers retain access under the current model. The public mode permits workspace membership or proof of share access, so public classification alone does not create an anonymously reachable canonical URL. Test the actual share flow before publishing links. Space access:52

Conversion

The offline converter uses W1’s Markdown and MDX syntax parser with static component mappings for Wiki’s Streamdown renderer. It resolves link destinations through the pinned inventory and emits portable .md files for the import CLI. MDX imports, executable expressions and unsupported components hold the affected page for review. W1 parser:27, W1 stringify:11, Wiki storage:36, Streamdown view:158 W1 component mapping:118, Runtime callouts:114 Build the route map before conversion. Index normalized docs URLs, aliases and actual output heading IDs. Resolve relative, root-relative and absolute docs links, reference links and card destinations through that map. Carry fragments onto the output heading or through a reviewed anchor alias. Verify same-page fragments, duplicate headings, slug collisions, encoded paths, locales and renamed pages. Use the Wiki router’s canonical URL for internal links. Check target visibility at each hop, including any redirect and cross-space share scope. The public link graph must close over destinations approved for the same reader. A public page with a held, unknown, inaccessible or unresolved destination fails validation. If edits are approved, replace a necessary reference with safe generic prose and rescan. Drop both the URL and any title or path that reveals held information. Block publication if an external redirect resolves to held content. Keep tokens and private manifest details out of rendered links, telemetry and redirects. Wiki URL builder:36, W1 link policy:152 Resolve assets inside the source tree with path containment and no symlink escape. Record each file’s hash, type, size, alt text, source and visibility. Reuse reviewed canonical public assets, or copy vetted bytes to the approved public storage path with content-addressed names. Use an authenticated asset route for restricted bytes. Keep signed URLs out of Markdown. Validate media type and size, strip sensitive metadata and reject active or unreviewed content. Check rendered asset access with the same owner, member, share reader and anonymous identities used for page tests.

Sync and safety

Generate deterministic Markdown and a private manifest keyed by source path, target workspace, space and page path. Include exact source and rendered hashes, converter version, classification approval and destination graph. Export target state before apply. Compare each imported path to its last-applied digest. Hold pages with unexpected edits, archives or collisions for explicit reconciliation. Treat renames as a move and redirect decision and removals as an explicit archive or unpublish decision. Stable no-op retries preserve revisions. Space manager access means a dry run plus digest check alone cannot prevent concurrent editing. Use an exclusive write window for the pilot. Establish server-side expected-revision checks before allowing automated sync to run alongside editors. Generate parent-first directories with at most 200 Markdown files per invocation. Use explicit slug and parent front matter. Respect the 1,000,000-byte page body cap and the CLI’s 8 MiB serialized JSON request limit. Preview each directory with ttr wiki import SPACE STAGED_DIR --workspace ROOT_WS_ID --json. Review the complete plan, then repeat with --apply on the same immutable staging output after target revalidation. Record the per-page receipts and reconcile partial results before retrying. The import applies sequentially and omits base_revision. The database treats identical content as unchanged. Re-export and dry run again to prove convergence. CLI import:160, CLI directory and batching:20, Import schema:97, SQL change detection:232 Run node scripts/docs-audit.js for every sync. Apply the same hashed-term and public-safety checks to staged Markdown, metadata, code fences, asset references and redirects. Scan parsed visible content with scanPublicSafety against the approved link graph as well. Adapt the visibility lookup for the real dashboard or public route because W1 assumes its own Wiki URL shape. Preserve normalization and scan normalized and decoded links, titles and asset destinations. Validate output against the renderer as well as the parser. Hold on any finding, scanner error or incomplete coverage. Keep raw matches and the classification manifest out of public receipts. Run scans before sharing and on each subsequent import. Enforce the publication gate on the actual rendered revisions. Restrict writes and review accessible older revisions, exports, search, backlinks and caches before broadening access. Docs safety checks:58, Wiki safety checks:213

Redirects and rollout

Keep docs URLs canonical during the pilot. After approval, generate explicit one-to-one redirects from the same manifest only for validated, reachable public destinations. Keep auth-only or token-gated destinations off the public redirect map. Test anonymous access, legacy locale and deep links, fragments, loops and search indexing. Anchor compatibility requires rendered IDs or aliases because request handlers cannot inspect the URL fragment. Introduce reversible temporary redirects first. Use permanent redirects only after the acceptance window and keep a switch back to the original docs. Leave held paths on the existing docs hosting policy. Wiki classification does not change their availability on the docs site or in the repository.

Generate the internal pilot seed

Run from a checkout containing the converter. Set DOCS_SOURCE_SHA to the full source commit and CLASSIFICATION_FILE to the approved private inventory. Choose a new SEED_DIR outside the repository under an existing directory.
The converter reads tracked blobs at the pinned commit. It stages Section A platform/ pages tagged for users in platform-docs with Workspace visibility. Eligible build/ and reference/ pages and in-scope Section B pages go to developer-docs with Restricted visibility. Section C and explicitly held directories stay out of both spaces. Unclassified pages and eligible pages changed since the classification base require review. The converter emits neither audience tags nor public share settings. A held or unresolved destination blocks the source page. Links from Workspace pages to Restricted pages also block. The converter repeats validation until every remaining link and heading fragment resolves within the staged graph. --allow-unimported-link-text allows an explicitly reviewed run to keep the label for a known destination outside the final seed. Held, inaccessible and unresolved destinations still block. The pilot uses the default strict mode. Images and asset destinations become external links, with pinned hashes and sizes recorded for tracked assets. Verify external asset access separately before applying. Keep manifest.json private. It records the classification and source digests, proposed destinations, output digests, graph, assets, per-space counts and page-level blockers. Each batch listed in the manifest is parsed with the same directory planner as ttr wiki import and checked for payload limits. Use the listed batch order and preview each batch with the root workspace ID.
For spaces split into batches, substitute each listed directory. Before applying, verify the authenticated workspace ID, space visibility and share-link state, and reconcile the target revisions against an export during the exclusive write window. The offline seed does not establish target access, renderer parity or revision state. Apply only after the target dry run and rollout checks pass. Run the focused converter tests with bun run --cwd packages/wiki-core test -- tooling/docs-wiki.