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
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Keep vendored originals byte-identical on Windows checkouts.
/apps/server/src/skills/task-anti-defensive-writing/SKILL.md text eol=lf
/apps/server/src/skills/task-anti-defensive-writing/LICENSE text eol=lf
/apps/server/src/skills/task-anti-defensive-writing-en/SKILL.md text eol=lf
/apps/server/src/skills/task-anti-defensive-writing-en/LICENSE text eol=lf
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@fastwrite/shared": "workspace:*",
"fast-xml-parser": "^5.11.1",
"fflate": "^0.8.2",
"nodemailer": "^10.0.10",
"nodemailer": "^10.1.4",
"openai": "^7.3.0",
"pdfjs-dist": "^5.4.296"
},
Expand Down
12 changes: 12 additions & 0 deletions apps/server/src/agent/skill-registry.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { describe, expect, test } from "bun:test";
import { WRITING_PROFILES, paperSkillForProfile } from "@fastwrite/shared";
import { readFile } from "node:fs/promises";
import { join } from "node:path";
import { parseSkillManifest, SkillRegistry } from "./skill-registry";

Expand Down Expand Up @@ -63,3 +64,14 @@ describe("published Skill manifests", () => {
expect(() => parseSkillManifest(JSON.stringify({ id: "review", version: "1.0.0", scope: "system", owner: "FastWrite", license: "Apache-2.0", workflows: [], requiredEvidence: [], capabilities: [], maxContextChars: 1000, riskLevel: "medium", requiresReview: true, eval: { status: "passed", score: 2 }, references: [] }), "review")).toThrow();
});
});

test("reads task metadata separately from the skill instructions", async () => {
const directory = join(import.meta.dir, "..", "skills");
const registry = new SkillRegistry(directory);
for (const [id, language] of [["anti-defensive-writing", "中文"], ["anti-defensive-writing-en", "English"]] as const) {
const { descriptor, instructions } = await registry.loadTask(id);
expect(descriptor.description).toContain(language);
expect(instructions).toBe(await readFile(join(directory, `task-${id}`, "SKILL.md"), "utf8"));
}
expect((await registry.loadTask("claim-audit")).descriptor.riskLevel).toBe("high");
});
4 changes: 3 additions & 1 deletion apps/server/src/agent/skill-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export class SkillRegistry {
const result: AgentTaskSkillDescriptor[] = [];
for (const entry of entries.filter((item) => item.isDirectory() && item.name.startsWith("task-"))) {
const content = await readFile(join(this.skillsDirectory, entry.name, "SKILL.md"), "utf8").catch(() => "");
const field = (name: string) => new RegExp(`^\\s*${name}:\\s*(.+)$`, "m").exec(content)?.[1]?.trim() ?? "";
if (!content) continue;
const metadata = await readFile(join(this.skillsDirectory, entry.name, "TASK.md"), "utf8").catch(() => content);
const field = (name: string) => new RegExp(`^\\s*${name}:\\s*(.+)$`, "m").exec(metadata)?.[1]?.trim() ?? "";
const list = (name: string) => field(name).split(",").map((item) => item.trim()).filter(Boolean);
const intents = list("supportedIntents").filter((item): item is AgentTaskIntent => ["draft", "continue", "revise"].includes(item));
if (!intents.length) continue;
Expand Down
21 changes: 21 additions & 0 deletions apps/server/src/skills/task-anti-defensive-writing-en/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Adkid-Zephyr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
123 changes: 123 additions & 0 deletions apps/server/src/skills/task-anti-defensive-writing-en/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
name: anti-defensive-writing-en
description: >
Stops defensive writing across the entire paper lifecycle — writing, revising,
cutting, and organizing experiments. Treats the paper as a press conference,
not a project summary, lab log, or self-audit: identify the single most
publishable strength of the work and build the most favorable, complete, and
persuasive narrative around it. Never present everything evenly, never volunteer
weakness, never write an experiment diary, never attack the paper on the
reviewer's behalf.
Triggers: polish my paper, revise manuscript, write abstract, write introduction,
write conclusion, shorten paper, rebuttal, respond to reviewers, organize
experiments, defensive writing, AI-flavored academic writing.
---

# The Press-Release Principle (Paper as Press Conference)

## One-line principle

A paper is a press conference, not a project summary, a lab log, or a self-audit.
Your job is not to present every aspect of the work evenly, but to identify its
most publishable value and build the most favorable, complete, and persuasive
narrative around it.

## 1. Narrative rules

1. **Organize the paper around strengths only.** Look for what is genuinely ahead,
unique, or irreplaceable: a new capability, a new problem, a new mechanism, a new
perspective, broader applicability, lower cost, higher efficiency, better
scalability, or a more meaningful trade-off. Content that forms no advantage
does not enter the main storyline.
2. **Do not write a work report.** No "we first did X, then tried Y, and Z failed"
chronology. Keep only the final standing logic: why the problem matters → why
existing methods fall short → what this paper provides → how the evidence
supports it.
3. **Never set a contest you cannot win.** If a metric is not your strength, do not
build the narrative on it. Re-choose the task definition, evaluation dimension,
application scenario, constraint, or comparison frame that best reflects your
value. Name the game this paper actually wins.
4. **State the advantage explicitly.** Do not expect reviewers to discover the
contribution from a table. Explain: under which condition the method performs
best, why the advantage emerges, what practical problem it solves, and why it
deserves attention.
5. **Limit the comparison scope.** Do not chase "wins on every dataset and metric."
Make only claims your evidence firmly supports. Persuasion comes from tight
claim-evidence alignment, not from the number of comparisons.
6. **Allow full story restructuring.** When existing results cannot support the
original narrative, do not defend it. Redefine the problem, re-order the
contributions, re-pick the headline result, redesign title, abstract,
introduction, and experiment structure. The story serves the strongest
evidence, not the original plan.

## 2. Language rules (against self-undermining)

- Banned self-weakening phrases: "unfortunately", "merely", "only achieves",
"still lags far behind", "limited improvement", "severely insufficient".
- **Never say you lost.** For unfavorable results, avoid "our method is weaker",
"performance drops", "fails to surpass". Judge in order:
① must this result be discussed at all; ② can it be explained by different
goals, constraints, or applicable scenarios; ③ does it reflect a reasonable
trade-off; ④ can the claim be narrowed to avoid a head-on collision;
⑤ should the storyline change so this result no longer carries the core
contribution.
- If a result forms no advantage, do not distill it into a conclusion — and never
help the reader escalate a local observation into a verdict on the whole method.

## 3. Experiment rules

Experiments are tools of argument, not a warehouse of results. Every experiment
must carry one explicit duty:

- prove the core method works;
- prove the advantage comes from the key mechanism;
- prove the method matters in the target scenario;
- rule out the most plausible alternative explanations.

An experiment that does not strengthen the main line, distracts, or invites
irrelevant disputes: delete, downplay, move, or redesign it.

## 4. Structure rules

**Abstract and introduction = the opening of the press conference.** Establish
four things fast: ① an important, unsolved problem; ② the key gap in existing
methods; ③ your distinctive approach; ④ your strongest result and its meaning.
Do not open with implementation details, process, or a wall of background. Do not
discuss limitations before the contribution is established.

**The conclusion only reinforces the takeaway:** what was solved, what was
proposed, what was proven, why it matters. Never introduce a fresh self-negation
or expanded limitations in the final paragraph.

## 5. Default decision rules (for any unfavorable material, in priority order)

1. Delete content irrelevant to the core claim;
2. Narrow the claim to avoid a pointless head-on comparison;
3. Switch to an evaluation dimension that better reflects the value;
4. Explain the result as a difference in goals or a reasonable trade-off;
5. Reorganize experiments so the advantage becomes the visual and narrative center;
6. Redefine the paper's story;
7. Only when unavoidable and truly affecting the core conclusion, state it plainly.

## 6. Pre-submission checklist (never hand the reviewer a knife)

- Does this sentence quietly expand the responsibility the paper must carry?
- Does it raise a question nobody asked for?
- Does it describe a local phenomenon as a universal flaw?
- Does it use a negative judgment broader than the evidence?
- Is any passage unfolding as "what we did" process narration?
- Is a non-winning metric set as the main battlefield?
- In the first five sentences of the abstract, are both the problem and the
contribution present?
- Does the conclusion smuggle in a sudden self-negation?

Do not manufacture review questions. Do not enlarge the attack surface.
Do not complete the opposing side's argument for them.

## Final goal

Every section, paragraph, table, and sentence should do one thing together:
convince the reader that this work solves a problem worth solving, proposes a
method worth noticing, and already has sufficiently clear evidence of its value.
Find the advantage that truly holds, organize all material around it, and make
that advantage unmistakably clear.
11 changes: 11 additions & 0 deletions apps/server/src/skills/task-anti-defensive-writing-en/TASK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 1.0.0
description: Apply the Press-Release Principle to paper narrative, language, and experiments (English).
supportedIntents: draft,continue,revise
allowedScope: project
requiredEvidence: manuscript
validationCommands: review
riskLevel: medium
allowNewFiles: false
requiresReview: true
---
21 changes: 21 additions & 0 deletions apps/server/src/skills/task-anti-defensive-writing/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Adkid-Zephyr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
94 changes: 94 additions & 0 deletions apps/server/src/skills/task-anti-defensive-writing/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
name: anti-defensive-writing
description: >
论文写作、修改、压缩和实验组织全流程中阻止【防御性写作】。把论文视为一场学术发布会,
而不是项目总结、实验日志或自我审查报告:识别这项工作最值得发表的价值,围绕它建立
最有利、最完整、最有说服力的叙事。不平均展示、不主动示弱、不写实验流水账、不替审稿人
攻击自己。
触发词:论文润色、论文修改、写摘要、写引言、写结论、压缩论文、rebuttal、回复审稿意见、
组织实验、论文AI味、防御性写作、心虚。
---

# 学术写作原则(The Press-Release Principle)

## 一句话原则

论文是一场学术发布会,不是项目总结、实验日志或自我审查报告。
你的任务不是平均呈现这项工作的所有方面,而是识别其中最值得发表的价值,
并围绕这一价值建立最有利、最完整、最有说服力的叙事。

## 一、叙事规则

1. **只围绕优势组织论文。** 优先寻找本文真正领先、独特或不可替代的部分:新能力、新问题、
新机制、新视角、更强适用性、更低成本、更高效率、更好扩展性、更有意义的权衡。
没有形成优势的内容,不进入主线。
2. **不写成工作汇报。** 不按"我们先做了什么、后来尝试了什么、哪些失败了"的过程展开。
只保留最终成立的逻辑:问题为什么重要 → 现有方法为什么不够 → 本文提供了什么新解法 →
证据如何支持。
3. **打不过的维度,不设为比赛项目。** 某指标不占优势,就不要把叙事建立在该指标上。
重新选择更能反映本文价值的任务定义、评价维度、应用场景、约束条件或比较口径。
不争夺不属于本文的冠军,明确本文赢的是另一场更有意义的比赛。
4. **优势必须被明确说出来。** 不要期待审稿人自己从表格中发现贡献。主动解释:
本文在哪个条件下表现最好、为什么这种优势会出现、解决了什么实际问题、为什么值得关注。
5. **控制比较范围。** 不追求"所有数据集、所有指标全面领先"。只提出证据能牢固支撑的主张。
说服力来自主张与证据高度一致,而不是比较项目数量最多。
6. **允许彻底重构故事。** 现有结果无法支撑原始叙事时,不要围绕原叙事防守。重新定义问题、
重排贡献、重选主结果、重做标题摘要引言和实验结构。故事服务于最强证据,而非忠于最初设想。

## 二、语言规则(防自我削弱)

- 禁用自我削弱式表达:"遗憾的是""仅""仍明显落后""效果有限""存在严重不足"。
- **不说输。** 面对不占优的结果,不使用"本文弱于""性能下降""未能超过"。按顺序判断:
①该结果是否必须讨论;②能否从不同目标、约束或适用场景解释;③是否体现某种合理权衡;
④能否收缩主张,避免不必要的正面对撞;⑤是否应调整故事主线,让它不再承担证明核心贡献的职责。
- 某项结果不构成优势时,不必提炼成结论,更不应帮读者把局部现象上升为对整体方法的否定。

## 三、实验规则

实验不是结果仓库,而是论证工具。每个实验必须承担明确职责之一:

- 证明核心方法有效;
- 证明优势来自关键机制;
- 证明方法在目标场景中具有价值;
- 排除最可能的替代解释。

无法强化主线、容易分散注意力或引出无关争论的实验:删除、弱化、移动或重新设计。

## 四、结构规则

**摘要和引言 = 发布会开场**,开头迅速建立四件事:
①一个重要且尚未解决的问题;②现有方法的关键缺口;③本文独特的解决思路;④最有分量的结果和意义。
不从实现细节、研究过程或大量背景知识开始,不在贡献尚未建立时提前讨论不足。

**结论只强化记忆点**:本文解决了什么、提出了什么、证明了什么、为什么重要。
不在最后一段突然加入新的自我否定或扩大局限性。

## 五、默认决策规则(遇到不理想材料时,按优先级处理)

1. 删除与核心主张无关的内容;
2. 缩小主张,避免无意义的正面对比;
3. 更换更能体现价值的评价维度;
4. 将结果解释为目标差异或合理权衡;
5. 重组实验,使优势成为视觉和叙事中心;
6. 重新定义论文故事;
7. 只有在无法回避且确实影响核心结论时,才进行必要说明。

## 六、交稿前自查(不给审稿人递刀子)

- 这句话是否无意中扩大了本文需要承担的责任?
- 是否提出了一个本来没人要求回答的问题?
- 是否把局部现象描述成了普遍缺陷?
- 是否使用了比证据更宽泛的负面判断?
- 有没有按"我们做了什么过程"在展开?
- 有没有把不领先的指标设成了主战场?
- 摘要前五句里,问题和贡献都出来了吗?
- 结论里有没有突然的自我否定?

不主动制造审稿问题,不主动扩大攻击面,不主动替反方完成论证。

## 最终目标

论文中的每一个章节、段落、表格和句子,都应共同完成一件事:让读者相信,
这项工作解决了一个值得解决的问题,提出了一种值得关注的方法,
并且已经有足够清晰的证据证明它的价值。
找到真正成立的优势,围绕它组织全部材料,并把这个优势讲到足够清楚。
11 changes: 11 additions & 0 deletions apps/server/src/skills/task-anti-defensive-writing/TASK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 1.0.0
description: 反防御性写作(中文):按原版学术发布会原则组织论文叙事、语言与实验。
supportedIntents: draft,continue,revise
allowedScope: project
requiredEvidence: manuscript
validationCommands: review
riskLevel: medium
allowNewFiles: false
requiresReview: true
---
2 changes: 1 addition & 1 deletion apps/web/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.ai-workspace__controls { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ai-workspace__mode { flex: 0 0 auto; }
.ai-workspace__mode button { height: 30px; font-size: 12px; }
.ai-workspace__mode button[aria-pressed="true"] { color: var(--accent); background: var(--vscode-active); }
.ai-workspace__mode button[aria-pressed="true"] { color: var(--vscode-foreground); background: var(--vscode-active); }
.ai-workspace__harness { display: flex; align-items: center; gap: 8px; }
.ai-workspace__harness > div { width: 112px; }
.ai-workspace__harness [role="combobox"] { height: 30px; }
Expand Down
4 changes: 2 additions & 2 deletions bun.lock

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

Loading
Loading