Starting a New Task and Saving Your Work
A knowledge workspace keeps two kinds of state: the lasting results — approved pages, sources and configuration — and the progress of the task you are working on. This page covers both ends of a task: clearing out an old, unfinished task so you can start fresh, and saving finished work to Git.
Ask for a fresh start when an earlier task was abandoned or interrupted and you want to begin something new without it:
Prepare this workspace for the next task.A clear request like this is enough; the Agent tells you what will be discarded and asks only when the target is unclear or something would be lost that you have not agreed to.
If you only want to add documents without starting any knowledge work, you do not need a fresh start: the Agent registers them, reports what was captured and stops, leaving existing tasks, drafts and approved pages untouched. See Choosing How to Add Material.
What the Agent checks first
The Agent looks at the current work, anything still running, uncommitted changes and the registered sources, and tells you which unfinished drafts and queued updates will be discarded. If a writer is still running, it waits for the result first. A workspace whose status cannot be read is investigated, not assumed to be empty.
Registered sources are not part of a task. A fresh start does not change which sources are registered, and leaving a source out of one task never deletes it or its evidence.
What is discarded and what is kept
| Discarded | Always kept |
|---|---|
| Unfinished production steps, drafts, review state and queued updates | Approved pages, source records and snapshots, project configuration, repository checkouts and existing outputs |
The Agent first shows you exactly what would be removed and goes ahead once you agree. Reports, unique material, unknown files and modified checkouts are kept unless you agree to lose them. Repository checkouts are kept too, because removing them means a slow clone on the next update, and so are the saved source baselines that let later updates tell moved text from changed text.
Ask for a fresh start after a round has finished, not in the middle of one: recording the version, building and retries still need the current task. A successful round already cleans up its own drafts and review state.
Making sure sources are usable
| Source | What the Agent does |
|---|---|
| Repositories | Reuses a matching local checkout, or clones a missing one at its registered commit when you allow it — never a newer one. Modules that share a repository and commit are cloned once. A checkout you changed yourself is never reset. |
| Lark documents | Checks the stored text and attachments and repairs them. If the live document differs from the saved snapshot, that is an update for you to decide, not a repair. |
| Notes, conversation summaries, local files | Keeps the saved content and checks it is in place. Lost originals are never reconstructed from generated knowledge. |
When the workspace is ready
The workspace is ready when no task is left, nothing is running, the configuration loads and the selected sources are at their registered versions. The Agent reports anything that blocks this, with the next step, and then stops — it does not start writing or re-capture everything. To go back to an older version instead, see Versions, Changelog and Restoring.
Saving your work to Git
When a round ends — after you have confirmed the results — the Agent commits the knowledge workspace to Git. In a project planned in stages, the approved plan settles how work is committed across stages.
To commit at another time, just ask:
Commit the knowledge workspace now.If there is no Git repository yet, the Agent agrees with you where it should be before creating one; if nothing changed, it tells you no commit is needed.
Which files are included
The commit holds the lasting state of the knowledge: configuration, source records and snapshots, approved pages, translations and the changelog. Build output, temporary task progress and repository checkouts are left out — outputs can be rebuilt and checkouts restored from the source records. The full list is in The Context Knowledge Workspace.
When the workspace sits inside a larger repository, only the workspace's files are committed; other changes you have made, staged or not, are left as they are.
The commit message and problems
The Agent summarizes the actual change in a message that follows your repository's conventions. If Git identity, hooks, signing, conflicts or permissions get in the way, it tells you what is wrong rather than working around it.
Checking the commit
The Agent finishes with the commit ID and a short description of what changed, after checking that the commit contains the intended files and nothing unrelated was touched. If a hook changed the result, it says so. It does not push, publish or create a remote repository unless you ask for that too.
开始新任务与保存工作
知识工作区保存两类状态:持久的结果(已批准的页面、来源和配置),以及你正在进行的任务的进度。本页介绍任务的两端:清理旧的未完成任务以便重新开始,以及把完成的工作保存到 Git。
当之前的任务被放弃或中断,而你想在没有它的情况下开始新的工作时,请求重新开始:
为下一个任务准备这个知识工作区。像这样清晰的请求就足够了;Agent 会告诉你哪些内容将被丢弃,只有在目标不明确,或会丢失你尚未同意舍弃的内容时才会询问。
如果你只想添加文档、不启动任何知识工作,就不需要重新开始:Agent 会登记它们,报告采集结果后即停止,现有的任务、草稿和已批准页面都不受影响。参见 选择添加材料的方式。
Agent 首先检查什么
Agent 会查看当前工作、仍在运行的内容、未提交的变更和已登记的来源,并告诉你哪些未完成的草稿和排队中的更新会被丢弃。如果仍有写入进程在运行,它会先等待其结果。无法读取状态的知识工作区会被排查,而不会被假定为空。
已登记的来源不属于任务。重新开始不会改变登记了哪些来源;某个来源没有纳入一次任务,也绝不会删除它或它的证据。
哪些被丢弃,哪些被保留
| 丢弃 | 始终保留 |
|---|---|
| 未完成的生产步骤、草稿、审核状态和排队中的更新 | 已批准页面、来源记录和快照、项目配置、仓库检出和已有产出 |
Agent 会先向你展示确切会被移除的内容,在你同意后才执行。除非你同意舍弃,否则报告、独有材料、未知文件和已修改的检出都会保留。仓库检出也会保留,因为删掉它们意味着下次更新时要重新进行缓慢的克隆;已保存的来源基线同样保留,之后的更新靠它区分文本是被移动还是被修改。
请在一轮工作完成之后再请求重新开始,而不是在进行中途:记录版本、构建和重试仍需要当前任务。成功的一轮工作已经会自行清理其草稿和审核状态。
确保来源可用
| 来源 | Agent 会做什么 |
|---|---|
| 仓库 | 复用匹配的本地检出,或在你允许时按登记的 commit 克隆缺失的仓库,绝不会是更新的 commit。共享同一仓库和 commit 的模块只克隆一次。你自己修改过的检出绝不会被重置。 |
| 飞书文档 | 检查已存储的正文和附件并修复。如果当前文档与保存的快照不同,这属于需要你决定的 更新,而不是修复。 |
| 笔记、会话摘要、本地文件 | 保留已保存的内容并检查其是否就位。丢失的原文绝不会根据生成的知识重建。 |
知识工作区何时就绪
当没有遗留任务、没有内容在运行、配置可以加载,且所选来源都处于其登记的版本时,知识工作区就准备好了。Agent 会报告所有阻塞项及其下一步操作,然后停止;它不会开始编写,也不会重新采集全部内容。如果想回到旧版本,参见 版本、Changelog 与恢复。
把工作保存到 Git
一轮工作结束时(在你确认结果之后),Agent 会把知识工作区提交到 Git。在 分阶段规划 的项目中,已批准的计划决定了各阶段如何提交工作。
要在其他时间提交,直接提出即可:
现在提交这个知识工作区。如果还没有 Git 仓库,Agent 会先与你商定仓库应放在哪里,再创建它;如果没有任何变更,它会告诉你无需提交。
包含哪些文件
提交包含知识的持久状态:配置、来源记录和快照、已批准页面、翻译和 changelog。构建产出、临时任务进度和仓库检出不包含在内:产出可以重新构建,检出可以根据来源记录恢复。完整列表见 Context 知识工作区。
当知识工作区位于一个更大的仓库中时,只会提交知识工作区的文件;你做的其他变更,无论是否已暂存,都保持原样。
提交信息与问题
Agent 会按照你仓库的约定,用提交信息概括实际的变更。如果 Git 身份、hook、签名、冲突或权限造成阻碍,它会告诉你问题所在,而不是绕过它。
检查提交
Agent 会先检查提交包含了预期的文件、没有触及无关内容,最后给出提交 ID 和变更的简短说明。如果某个 hook 改变了结果,它会说明。除非你也提出要求,否则它不会推送、发布或创建远程仓库。