diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd95878..4ea70a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to Context are documented here. +## 0.7.87 - 2026-10-26 + +- Each website article now ends with its sources as a map. The article's sections sit in the middle and the documents they cite sit around them in flat blobs, grouped by where each document comes from: a repository directory, Lark documents or notes. Sections are purple; repository files are green, Skills magenta, Lark documents blue and notes orange. Hovering a section or document highlights what it is linked to and shows the cited line ranges; clicking a document opens the cited lines and clicking a section scrolls to it. A List view shows the same documents by group, and narrow screens show only the list. Other articles citing the same documents are linked below. The map is computed during `context build` from the recorded references, registered sources and committed snapshots, so it needs no agent step. Set `site.sourceMap: false` to keep the plain source list. +- The `context` entry Skill includes a source checklist template a team can fill in before a knowledge base is built, and explains how to register sources from a filled checklist; the planning Skill asks once whether a checklist exists before inventorying sources. + ## 0.7.86 - 2026-10-26 - Website emphasis now follows the CJK-friendly amendment to CommonMark through `markdown-it-cjk-friendly`, replacing 0.7.85's built-in rule. Any East Asian wide or full-width character beside a `*` run, including full-width punctuation, counts like whitespace when deciding whether the run opens or closes emphasis; `_` and runs with no CJK character beside them keep the CommonMark result. Clean content renders as in 0.7.85. diff --git a/bun.lock b/bun.lock index 6e0823f2..fcbbad85 100644 --- a/bun.lock +++ b/bun.lock @@ -18,7 +18,7 @@ }, "packages/context": { "name": "@c4a/context", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "yaml": "^2.5.1", "zod": "^3.23.8", @@ -26,7 +26,7 @@ }, "packages/context-cli": { "name": "@c4a/context-cli", - "version": "0.7.86", + "version": "0.7.87", "bin": { "context": "dist/cli.js", }, @@ -45,6 +45,7 @@ "@c4a/extract-ts": "workspace:*", "@mermaid-js/layout-elk": "0.2.0", "commander": "^11.0.0", + "d3-force": "3.0.0", "fast-xml-parser": "^5.10.1", "handlebars": "^4.7.8", "ink": "^5.0.0", @@ -67,6 +68,7 @@ }, "devDependencies": { "@c4a/core": "workspace:*", + "@types/d3-force": "3.0.10", "esbuild": "0.27.3", "playwright": "1.58.2", "zod-to-json-schema": "^3.25.1", @@ -74,7 +76,7 @@ }, "packages/core": { "name": "@c4a/core", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "picomatch": "^4.0.4", "yaml": "^2.4.5", @@ -86,7 +88,7 @@ }, "packages/dev-cli": { "name": "@c4a/dev-cli", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/context": "workspace:*", "@c4a/core": "workspace:*", @@ -98,7 +100,7 @@ }, "packages/extract": { "name": "@c4a/extract", - "version": "0.7.86", + "version": "0.7.87", "bin": { "c4a-extract-code": "./dist/bin/c4a-extract-code.js", }, @@ -113,7 +115,7 @@ }, "packages/extract-contract": { "name": "@c4a/extract-contract", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "graphql": "^16.14.2", @@ -123,7 +125,7 @@ }, "packages/extract-go": { "name": "@c4a/extract-go", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "@c4a/extract": "workspace:*", @@ -133,7 +135,7 @@ }, "packages/extract-mdx": { "name": "@c4a/extract-mdx", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "remark-mdx": "^3.1.1", @@ -145,7 +147,7 @@ }, "packages/extract-proto": { "name": "@c4a/extract-proto", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "zod": "^3.23.8", @@ -153,7 +155,7 @@ }, "packages/extract-rush": { "name": "@c4a/extract-rush", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "typescript": "^5.5.4", @@ -163,7 +165,7 @@ }, "packages/extract-sql": { "name": "@c4a/extract-sql", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "node-sql-parser": "^5.4.0", @@ -172,7 +174,7 @@ }, "packages/extract-style": { "name": "@c4a/extract-style", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "postcss": "^8.5.26", @@ -184,7 +186,7 @@ }, "packages/extract-thrift": { "name": "@c4a/extract-thrift", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "zod": "^3.23.8", @@ -192,7 +194,7 @@ }, "packages/extract-ts": { "name": "@c4a/extract-ts", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "@c4a/core": "workspace:*", "@c4a/extract": "workspace:*", @@ -203,7 +205,7 @@ }, "packages/tui": { "name": "@c4a/tui", - "version": "0.7.86", + "version": "0.7.87", "dependencies": { "ink": "^5.0.0", "react": "^18.3.1", diff --git a/package.json b/package.json index 524c50bd..27739f77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "context", - "version": "0.7.86", + "version": "0.7.87", "packageManager": "bun@1.3.9", "repository": { "type": "git", diff --git a/packages/context-cli/context-workflow/provider.yaml b/packages/context-cli/context-workflow/provider.yaml index 7dc9ebd8..5ce67d04 100644 --- a/packages/context-cli/context-workflow/provider.yaml +++ b/packages/context-cli/context-workflow/provider.yaml @@ -1,6 +1,6 @@ schema: agent-graph.provider.v1 id: c4a/context -version: 0.7.86 +version: 0.7.87 name: Context workflow description: Internal work contract for Context knowledge workspaces. graphs: diff --git a/packages/context-cli/context-workflow/resources/manuals/guides/package-outputs.md b/packages/context-cli/context-workflow/resources/manuals/guides/package-outputs.md index baf62f9f..09cee90e 100644 --- a/packages/context-cli/context-workflow/resources/manuals/guides/package-outputs.md +++ b/packages/context-cli/context-workflow/resources/manuals/guides/package-outputs.md @@ -121,7 +121,18 @@ zoom, full-screen and source controls. Controls appear on hover or keyboard focu (and remain visible on touch devices). Layout and source/copy actions are on the left, sizing actions on the right. Source view replaces the diagram. Flowcharts default to ELK and can switch to Dagre without changing the article. Offline Review reports use the same viewer and include its resources only when a candidate contains Mermaid. -Article provenance initially shows ten sources; Show more reveals the full list. +Each article ends with its sources as a map: the article's sections in the +middle and the documents they cite around them, grouped by where each document +comes from (a repository directory, Lark documents or notes). Sections are purple; +sources are coloured by type: repository files green, Skills magenta, Lark +documents blue and notes orange. Hovering a section +or document highlights what it is linked to; clicking a document opens the cited +lines, and clicking a section scrolls to it. A List view shows the same documents +by group with their cited line ranges, and narrow screens show only the list. +Below the map, other articles citing the same documents are linked. The map is +computed while building from the recorded references, so it needs no agent +step; set `site.sourceMap: false` to show the plain source list instead, which +initially shows ten sources; Show more reveals the full list. Invalid diagrams and diagrams with embedded image/HTML resources retain their source with a rendering notice instead of blocking publication. Code samples and raw HTML are displayed as content, not executed as Vue components or scripts. diff --git a/packages/context-cli/context-workflow/resources/manuals/reference/project-api.md b/packages/context-cli/context-workflow/resources/manuals/reference/project-api.md index 4f4c22c8..8ba85d6e 100644 --- a/packages/context-cli/context-workflow/resources/manuals/reference/project-api.md +++ b/packages/context-cli/context-workflow/resources/manuals/reference/project-api.md @@ -191,7 +191,8 @@ the same build, beside the KB directory. `` removes one trailing `-kb` from the package name, if present. Omit it for KB-only output. It accepts `title`, `description`, `lang`, a deployment `base` path, an optional top-bar `titleLink`, and an optional `home` presentation. Navigation and language fields are `nav`, `more`, -`socialLinks`, `locales` and `localePreferenceKey`; see +`socialLinks`, `locales` and `localePreferenceKey`; `sourceMap: false` replaces +the per-article source map with a plain source list; see [Package Outputs](../guides/package-outputs.md) and [Site translation](../guides/site-translation.md). `home` accepts `title`, `slogan`, `description`, hero `actions`, and `resources` shown diff --git a/packages/context-cli/package.json b/packages/context-cli/package.json index db637563..4cf2dffc 100644 --- a/packages/context-cli/package.json +++ b/packages/context-cli/package.json @@ -1,7 +1,7 @@ { "name": "@c4a/context-cli", "description": "Local runtime and Agent integration for traceable knowledge production", - "version": "0.7.86", + "version": "0.7.87", "type": "module", "license": "MIT", "engines": { @@ -67,6 +67,7 @@ "@c4a/extract-ts": "workspace:*", "@mermaid-js/layout-elk": "0.2.0", "commander": "^11.0.0", + "d3-force": "3.0.0", "fast-xml-parser": "^5.10.1", "handlebars": "^4.7.8", "ink": "^5.0.0", @@ -89,6 +90,7 @@ }, "devDependencies": { "@c4a/core": "workspace:*", + "@types/d3-force": "3.0.10", "esbuild": "0.27.3", "playwright": "1.58.2", "zod-to-json-schema": "^3.25.1" diff --git a/packages/context-cli/src/__tests__/packageSite.test.ts b/packages/context-cli/src/__tests__/packageSite.test.ts index c1de4460..2e99f28e 100644 --- a/packages/context-cli/src/__tests__/packageSite.test.ts +++ b/packages/context-cli/src/__tests__/packageSite.test.ts @@ -167,7 +167,12 @@ test("VitePress builds an independent site with search, safe prose, anchors and expect(article).not.toContain("