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: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to Context are documented here.

## 0.7.70 - 2026-10-14

- Revising an existing article no longer fails because its old citations are outside the new task's sources. A fragment that omits `references` keeps its validated citations; listing references re-confirms them against the task's authorized sources. Only candidate or approved citations are trusted, never a failed draft's.
- Revision tasks come with an `edits.yaml` skeleton that lists the existing fragment IDs. A complete draft written before the skeleton appeared is still submitted as a whole article.
- Plan amendments accept an article path in `after`, resolve it to the current task, and reject replaced or excluded tasks with a list of candidates. When a replacement keeps the same editing base, its draft is carried to the new task. Sources already authorized and cited by the revised article are added to its task. A plan without `stage` is rejected with an example.
- A citation can be located by `heading` (Markdown files) or by an exact `quote` instead of line numbers. The CLI resolves it to lines and echoes the result in `resolved_references`; stored locators are still line ranges.
- `translate prepare` is incremental: it reports changed sections, titles and surrounding text; writes drafts that keep unchanged translations; and writes a submission file. A draft edited against an older source must be reconciled and confirmed with `source_digest`. A draft without a generation record is set aside as `*.unrecorded.md`. Existing translations gain `source_parts` baselines once, without changing reader text.
- Website translations may translate prose in `text`, `txt`, and `plaintext` code blocks while preserving commands, paths, placeholders, block counts, and language markers. Other code blocks remain unchanged; Mermaid labels can still be translated.
- On multilingual websites, in-page and cross-page anchors keep the reader's language and scroll to the matching heading, including repeated clicks and back/forward navigation.

## 0.7.67 - 2026-10-14

- Knowledge websites open in light mode regardless of the system color scheme. The reader's light/dark and language choices are remembered per origin by default, so sites on one origin share them.
Expand Down
30 changes: 15 additions & 15 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context",
"version": "0.7.67",
"version": "0.7.70",
"packageManager": "bun@1.3.9",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/context-cli/context-workflow/provider.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
schema: agent-graph.provider.v1
id: c4a/context
version: 0.7.67
version: 0.7.70
name: Context workflow
description: Internal work contract for Context knowledge workspaces.
graphs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,3 +706,14 @@ an explicit empty list removes them, and deleting a fragment removes its
citations. Each fragment may cite at most three source positions. Register and
authorize new material before citing it, then follow normal Review, close and
build. Article links alone do not authorize reading new sources or prove a claim.

### Locating submitted references

Submission locators also accept `{path, heading}` or `{path, quote}` instead of
line numbers. Use exactly one form. A heading matches an exact ATX heading
outside code fences in a Markdown source; its region ends before the next
same-level or higher-level heading. A quote is an exact, unique, nonempty
substring (line endings are normalized). Ambiguous matches return candidate
line ranges. Both forms resolve against authorized captured text before hashing;
stored references still contain only `path`, `start_line` and `end_line`.
The three-region limit applies after resolving and deduplicating positions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ map_entries:
```

A translated article keeps every `context:section` marker, id and order, every
fenced code block with its language and content (Mermaid labels may change), and
every link target. Submission validates all items first and saves nothing when
fenced code block and its language marker, and every link target. Prose in
`text`, `txt`, and `plaintext` blocks may be translated; keep commands, paths,
and placeholders such as `<repository>` unchanged. Mermaid labels may change.
All other blocks, including blocks without a language marker, keep their content
unchanged. Submission validates all items first and saves nothing when
any item fails. A digest from before an approved content change is rejected.

`skip` records that the current pending items are published in the primary
Expand All @@ -76,3 +79,24 @@ an outdated notice and a button that switches to the original; a missing page
shows the original with a notice. Navigation titles without a translation use
the translated article title, then the primary title. Site search covers every
language; opening a result in another language switches to it.


## Incremental drafts

`prepare` returns section changes, title/description changes, exterior-text changes
(including the article tail), and section order changes. It writes draft files
and a `submission_path` template. Unchanged parts retain their translation;
changed parts contain the current primary-language text for the Agent to translate.
Review every pending part before submitting; generated source text is not a translation.

Older current translations acquire source-part baselines without changing their
reader text. Older stale translations report `diff: unknown` and get a full source
draft plus a `.previous.md` translation for comparison.

Repeated preparation preserves edited drafts. `draft: rebase-required` means the
source changed while a draft was being edited; that draft is excluded from the
submission template. Reconcile it with the current source, then explicitly add
the returned `source_digest` to that article's submission entry. Never copy a new
digest onto an unreconciled draft. Ordinary submissions still use `expected_digest`.
A draft without a generation record, such as one left by an older workflow, is
kept as `unrecorded_draft` beside a freshly generated draft.
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,14 @@ If the user explicitly requires a different presentation, explain the difference
and resolve that choice before accepting it. Do not rerun unchanged Repair to
force a format the program deliberately omits. Check the actual resulting page;
accepted tasks or an empty Composer result alone do not demonstrate a correction.

### Locating submitted references

Submission locators also accept `{path, heading}` or `{path, quote}` instead of
line numbers. Use exactly one form. A heading matches an exact ATX heading
outside code fences in a Markdown source; its region ends before the next
same-level or higher-level heading. A quote is an exact, unique, nonempty
substring (line endings are normalized). Ambiguous matches return candidate
line ranges. Both forms resolve against authorized captured text before hashing;
stored references still contain only `path`, `start_line` and `end_line`.
The three-region limit applies after resolving and deduplicating positions.
Original file line number Diff line number Diff line change
Expand Up @@ -706,3 +706,14 @@ an explicit empty list removes them, and deleting a fragment removes its
citations. Each fragment may cite at most three source positions. Register and
authorize new material before citing it, then follow normal Review, close and
build. Article links alone do not authorize reading new sources or prove a claim.

### Locating submitted references

Submission locators also accept `{path, heading}` or `{path, quote}` instead of
line numbers. Use exactly one form. A heading matches an exact ATX heading
outside code fences in a Markdown source; its region ends before the next
same-level or higher-level heading. A quote is an exact, unique, nonempty
substring (line endings are normalized). Ambiguous matches return candidate
line ranges. Both forms resolve against authorized captured text before hashing;
stored references still contain only `path`, `start_line` and `end_line`.
The three-region limit applies after resolving and deduplicating positions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,14 @@ build resumes the same stage; a failed build retains the pause and all tasks.
To cancel that pause explicitly, use `context run --resume-writing --format json`.
It preserves approved articles, candidates and existing task input handles.
Partial delivery must include the approved articles needed by its local links.

### Locating submitted references

Submission locators also accept `{path, heading}` or `{path, quote}` instead of
line numbers. Use exactly one form. A heading matches an exact ATX heading
outside code fences in a Markdown source; its region ends before the next
same-level or higher-level heading. A quote is an exact, unique, nonempty
substring (line endings are normalized). Ambiguous matches return candidate
line ranges. Both forms resolve against authorized captured text before hashing;
stored references still contain only `path`, `start_line` and `end_line`.
The three-region limit applies after resolving and deduplicating positions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,72 @@
"minLength": 1
},
"locator": {
"type": "object",
"properties": {
"path": {
"type": "string"
"anyOf": [
{
"type": "object",
"properties": {
"path": {
"type": "string"
},
"start_line": {
"type": "integer",
"minimum": 1
},
"end_line": {
"type": "integer",
"minimum": 1
}
},
"required": [
"path",
"start_line",
"end_line"
],
"additionalProperties": false
},
"start_line": {
"type": "integer",
"minimum": 1
{
"type": "object",
"properties": {
"path": {
"$ref": "#/anyOf/0/properties/sections/items/properties/references/items/properties/locator/anyOf/0/properties/path"
},
"heading": {
"type": "string",
"minLength": 1
}
},
"required": [
"path",
"heading"
],
"additionalProperties": false
},
"end_line": {
"type": "integer",
"minimum": 1
{
"type": "object",
"properties": {
"path": {
"$ref": "#/anyOf/0/properties/sections/items/properties/references/items/properties/locator/anyOf/0/properties/path"
},
"quote": {
"type": "string",
"minLength": 1
}
},
"required": [
"path",
"quote"
],
"additionalProperties": false
}
},
"required": [
"path",
"start_line",
"end_line"
],
"additionalProperties": false
]
}
},
"required": [
"source_ref",
"locator"
],
"additionalProperties": false
},
"maxItems": 3
}
}
},
"required": [
Expand Down
Loading
Loading