Переглянути джерело

chore(task): archive 06-12-v7-rfc

lingfengQAQ 1 тиждень тому
батько
коміт
23142e9d75

+ 104 - 0
.trellis/tasks/00-join-codex/prd.md

@@ -0,0 +1,104 @@
+# Joiner Onboarding Task
+
+**You (the AI) are running this task. The developer does not read this file.**
+
+`codex` just ran `trellis init` on a fresh clone, saw "Developer
+initialized", and will now start asking you questions in chat. This joiner task
+exists under `.trellis/tasks/`; when they want to work on it, they should
+start it from a session that provides Trellis session identity.
+
+Your job is to orient them to Trellis. Don't dump all of this at them — open
+with a short greeting, ask where they want to start, and fill in the rest as
+they engage.
+
+---
+
+## Topics to cover (adapt order to their questions)
+
+### 1. What Trellis is + the workflow
+
+Trellis is a workflow layer over Claude Code / Cursor / etc. that keeps AI
+agents consistent with project-specific conventions instead of writing generic
+code every session.
+
+- **Three phases**: Plan (brainstorm → `prd.md`) → Execute (code + check) →
+  Finish (capture + wrap). Full reference: `.trellis/workflow.md`.
+- **Task lifecycle**: planning → in_progress → done → archive, under
+  `.trellis/tasks/`.
+- **Core slash commands**:
+  - `/trellis:continue` — resume the current session's active task
+  - `/trellis:finish-work` — wrap up a finished task
+  - `/trellis:start` — session boot from scratch (not needed here; the
+    SessionStart hook does its job automatically)
+
+### 2. Runtime mechanics (explain when they ask "how does it know what to do")
+
+- **SessionStart hook** runs `get_context.py` and injects identity, git
+  status, session active task, active tasks, and workflow phase into the AI
+  conversation at every session start.
+- **`<workflow-state>` tag** is auto-injected with every user message,
+  carrying the current task + phase hint.
+- **`/trellis:continue`** loads the Phase Index, reads `prd.md` + recent
+  activity, and routes to the right skill (`trellis-brainstorm` for planning,
+  `trellis-implement` for coding, `trellis-check` for verification).
+- **`trellis-implement` sub-agent** is spawned when code needs to be written.
+  The platform hook reads `{TASK_DIR}/implement.jsonl` and auto-injects those
+  spec files + `prd.md` into the sub-agent's prompt so it codes per project
+  conventions.
+- **`trellis-check` sub-agent** follows the same pattern with `check.jsonl`
+  — reviews changes against specs, auto-fixes issues, runs lint/typecheck.
+
+File layout (mention when they ask "where does what live"):
+- `.trellis/.runtime/sessions/<session>.json` — session active-task state, gitignored
+- `.trellis/tasks/<task>/{implement,check}.jsonl` — per-task context manifests
+- `.trellis/spec/` — project-wide conventions (source of truth)
+- `.trellis/workspace/codex/journal-*.md` — their session log,
+  rotated at ~2000 lines
+
+### 3. This project's actual conventions
+
+- Summarize `.trellis/spec/` for them — what coding conventions this
+  specific team enforces.
+- Point at the last 5 entries in `.trellis/tasks/archive/` as a rhythm
+  example of how people actually work here. **If archive is empty** (the
+  project just started), skip this — don't invent examples.
+- Not your job in this onboarding to teach them the business code itself —
+  the README and their teammates handle that.
+
+### 4. Their assigned work
+
+- Check if `.trellis/workspace/codex/` already exists — if yes, it's
+  their journal from another machine and worth mentioning.
+- Run `python ./.trellis/scripts/task.py list --assignee codex` to
+  show tasks assigned to them. (Quote the name if it contains spaces.)
+- Remind them that the "My Tasks" section appears in the SessionStart context
+  on every new session.
+
+---
+
+## Optional: walk through a small task end-to-end
+
+If they want to practice before touching real work, offer to pick a tiny
+P3 task or a typo fix and run the full cycle together: `/trellis:continue`
+→ you implement via sub-agents → `/trellis:finish-work`.
+
+---
+
+## Completion
+
+When they feel oriented (or after you've covered the four topics with
+reasonable back-and-forth), guide them to run:
+
+```bash
+python ./.trellis/scripts/task.py finish
+python ./.trellis/scripts/task.py archive 00-join-codex
+```
+
+---
+
+## Suggested opening line
+
+"Welcome! Your `trellis init` set me up to onboard you to this project. I
+can walk you through the workflow, show you the runtime mechanics under the
+hood, summarize the team's spec, or jump to what you're already curious about
+— which would you prefer?"

+ 26 - 0
.trellis/tasks/00-join-codex/task.json

@@ -0,0 +1,26 @@
+{
+  "id": "00-join-codex",
+  "name": "00-join-codex",
+  "title": "Joining: Onboard to this Trellis project (codex)",
+  "description": "Onboard a new developer to an existing Trellis project: learn the workflow, conventions, and find assigned work",
+  "status": "in_progress",
+  "dev_type": "docs",
+  "scope": null,
+  "package": null,
+  "priority": "P1",
+  "creator": "codex",
+  "assignee": "codex",
+  "createdAt": "2026-06-12",
+  "completedAt": null,
+  "branch": null,
+  "base_branch": null,
+  "worktree_path": null,
+  "commit": null,
+  "pr_url": null,
+  "subtasks": [],
+  "children": [],
+  "parent": null,
+  "relatedFiles": [],
+  "notes": "Generated by trellis init for a new developer joining an existing Trellis project",
+  "meta": {}
+}

+ 1 - 0
.trellis/tasks/archive/2026-06/06-12-v7-rfc/check.jsonl

@@ -0,0 +1 @@
+{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}

+ 1 - 0
.trellis/tasks/archive/2026-06/06-12-v7-rfc/implement.jsonl

@@ -0,0 +1 @@
+{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}

+ 15 - 0
.trellis/tasks/archive/2026-06/06-12-v7-rfc/prd.md

@@ -0,0 +1,15 @@
+# v7 RFC:从 PRD 裁剪发 GitHub Discussions
+
+> 需求真源:PRD §7(发布判据)、ADR 流程-1(Q4):RFC 是 PRD 的大白话裁剪版,发 Discussions(Announcements 分类),开放至少 1 周;issue 区发置顶指引。
+> 口径:面向写小说的用户,不讲术语(长期记忆既定风格)。
+
+## Requirements
+
+- 裁剪主体:PRD §1.1、§2、§3.2、§6、§8。
+- 全程大白话;v7 作者界面词(伏笔/悬念/感情线/细纲/审稿/吃书/全书近况)可以用——它们本来就是人话。
+- 必含:为什么重做、书长什么样、写一章流程、连写、安装变化与迁移承诺、诚实边界、具体的提问清单、时间表、v6 不弃。
+- 发布前作者过目。
+
+## Definition of Done
+
+- RFC 发布到 Discussions(Announcements),issue 区置顶指引发出。

+ 92 - 0
.trellis/tasks/archive/2026-06/06-12-v7-rfc/rfc-draft.md

@@ -0,0 +1,92 @@
+# 【征求意见】webnovel-writer v7 设计公示:架构重写,发布前征集意见
+
+大家好。v6 发布以来收到了大量反馈,其中一部分问题经过多轮修补仍无法根治——原因在底层架构,不在某个具体功能。因此 v7 决定重写整个系统。在动工之前,把完整设计公示出来征集意见:**格式层一旦定稿就要长期保持稳定,现在是影响设计的最佳时机。**
+
+## v6 的主要问题与 v7 的对应解法
+
+| v6 的问题 | v7 的解法 |
+|---|---|
+| 安装门槛高,Python 环境配置常出问题 | 移除 Python 依赖,一条命令完成安装 |
+| 写一章消耗的 token 过多 | AI 按需读取片段,不再全文加载设定与大纲 |
+| AI 不遵守流程、状态记录失真 | 可计数的检查全部交给程序,AI 只承担创作与判断 |
+| 系统记录与作者手改的正文冲突 | 全部状态都是普通文档,手改是正常操作,系统自动对账 |
+| 缺少连写能力 | 支持挂机连写,最终定稿权保留在作者手里 |
+
+## v7 中一本书的形态
+
+一本书就是一个文件夹,目录全中文,内容全部是 Markdown 文档,任何编辑器都能直接打开:
+
+```text
+我的书/
+├── 定稿/        正文、设定(角色卡/世界观/时间线/信息差)、章摘要
+├── 大纲/        总纲、卷纲、伏笔、悬念、感情线
+├── 文风/        文风铁律、金句库
+└── 工作区/      正在写的这章:细纲、草稿、审稿意见
+```
+
+没有数据库,没有隐藏状态。直接修改任何文件都是合法操作——下次启动时系统会识别改动并提议补登,不会报错阻拦。
+
+## 写一章的流程
+
+1. AI 根据全书近况起草**细纲**:本章写什么、推进哪条伏笔、结尾留什么钩子
+2. 作者确认细纲,或修改后确认
+3. AI 写稿
+4. 程序检查:字数、禁词、复读、跨章高频用语(同一个比喻全书第 47 次出现这类)
+5. AI 三审:**读者审**(追读体验)、**编辑审**(结构与商业性)、**设定校对**(是否写漏、是否穿帮)
+6. 作者**审稿**:接受 / 改完接受 / 打回
+7. 定稿
+
+定稿权始终在作者手里——系统不存在任何不经作者确认就写入定稿区的路径。
+
+## 伏笔、悬念、感情线
+
+每条线索一份独立档案:何时埋下、推进到哪、计划何时收尾。搁置过久时系统会提示"悬了太久"——这是提醒,不是错误。允许有收不回的伏笔,系统不强制清账。
+
+## 挂机连写
+
+确认当卷卷纲后,可让 AI 连写一个批次(默认 8 章,可配置)。批次结束后作者统一审稿:整批接受、修改其中几章、或从某章起打回重写。质量防线:每批次做一次体检,体检不过线或连续数章无剧情推进会自动停下。
+
+## 修改与"吃书"
+
+- **未发布章节**:直接修改,设定与时间线自动同步
+- **已发布章节**:生成"顺势圆"方案——在不改动已发布内容的前提下把设定圆回来
+- **修改设定之前**:系统先列出受影响的章节清单,分已发布/未发布两栏
+
+## 导出发布
+
+一键导出纯净正文(单章 / 章节范围 / 全书),可直接发布到内容平台。
+
+## 安装方式的变化
+
+v7 不再通过插件市场分发,统一为:
+
+```
+npx webnovel-writer init
+```
+
+运行环境要求 Node.js 22 或更高版本。**v6 项目提供一次性迁移命令**:正文与全部记录(伏笔、剧情线、设定)完整迁移,失败可整体回退。市场版 v6 停留在最后一个版本,并附新安装方式的指引。
+
+首发支持 Claude Code 与 Codex(维护者亲测);Gemini CLI、Cursor 等待社区验证后纳入支持列表。
+
+## 7.0 明确不做的事
+
+- **不承诺通过 AI 检测器**。v7 的目标是"读者不出戏";检测器对抗是无止境的军备竞赛,不做无法兑现的承诺
+- 文风对标、角色口癖检查等进阶功能安排在 7.x 迭代
+- 敏感词与合规处理不在范围内
+
+## 征集意见
+
+1. 术语是否自然:**伏笔 / 悬念 / 感情线、细纲、审稿、吃书、全书近况**——有别扭的请指出
+2. 写一章的七步流程中,是否有你认为多余、希望可跳过的环节
+3. 挂机连写的批次大小(默认 8 章)与审稿节奏是否符合你的写作习惯
+4. v6 中你依赖、但本文未提及的功能
+
+## 后续节奏
+
+- **意见征集**:本帖开放至少一周
+- **内测**:维护者用 v7 实际写作一本书至 50 章,验证通过后发布
+- **正式发布 7.0**
+
+v6 不会下线:master 分支长期保留,致命问题继续修复。
+
+期待大家的意见。设计阶段的修改成本最低,正式发布后格式将保持长期稳定。

+ 26 - 0
.trellis/tasks/archive/2026-06/06-12-v7-rfc/task.json

@@ -0,0 +1,26 @@
+{
+  "id": "v7-rfc",
+  "name": "v7-rfc",
+  "title": "v7 RFC:从 PRD 裁剪发 Discussions",
+  "description": "",
+  "status": "completed",
+  "dev_type": null,
+  "scope": null,
+  "package": null,
+  "priority": "P2",
+  "creator": "claude",
+  "assignee": "claude",
+  "createdAt": "2026-06-12",
+  "completedAt": "2026-06-12",
+  "branch": null,
+  "base_branch": "v7",
+  "worktree_path": null,
+  "commit": null,
+  "pr_url": null,
+  "subtasks": [],
+  "children": [],
+  "parent": null,
+  "relatedFiles": [],
+  "notes": "",
+  "meta": {}
+}