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
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ Changelog写英文

不能够直接修改Superpowers和OpenSpec的原始Skill

除非用户明确同意,否则不得使用 Superpowers 的任何 Skill。

Comment on lines +221 to +222

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate files =="
fd -a '^(AGENTS|CLAUDE)\.md$' . || true

echo "== relevant AGENTS.md sections =="
if [ -f AGENTS.md ]; then
  sed -n '1,260p' AGENTS.md | nl -ba | sed -n '180,235p'
fi

echo "== relevant CLAUDE.md sections =="
if [ -f CLAUDE.md ]; then
  sed -n '180,235p' CLAUDE.md | nl -ba | sed -n '185,225p'
fi

echo "== references to Superpowers/Superpowers/Superpower and comet =="
rg -n "Superpowers|Superpower|/comet|comet resume-probe|nextCommand|Comet|Comet workflow|Comet workflow|Comet 工作流" -S . --glob '!node_modules' --glob '!dist' --glob '!build' | head -200

Repository: rpamis/comet

Length of output: 429


🏁 Script executed:

#!/bin/bash
set -u

echo "== AGENTS.md around cited lines =="
awk 'NR>=180 && NR<=235 { printf "%5d: %s\n", NR, $0 }' AGENTS.md

echo "== CLAUDE.md around cited lines =="
awk 'NR>=180 && NR<=235 { printf "%5d: %s\n", NR, $0 }' CLAUDE.md

echo "== eval local skill context =="
if [ -f eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md ]; then
  wc -l eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md
  awk 'NR>=1 && NR<=260 { printf "%5d: %s\n", NR, $0 }' eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md
fi

echo "== references to Superpowers/Superpowers Skill and Comet workflow =="
grep -RIn "除非用户明确同意|Superpowers|Superpowers Skill|/comet|resume-probe|nextCommand|comet workflow|Comet workflow|Comet 工作流" . \
  --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=build \
  2>/dev/null | sed -n '1,240p'

Repository: rpamis/comet

Length of output: 5245


为 Comet 工作流保留 Superpowers Skill 例外

AGENTS.md 和 CLAUDE.md 现在都要求 Superpowers Skill 必须经用户显式同意,但 eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md 明确规定 Comet 工作流在涉及 OpenSpec/Superpowers 依赖 Skill 时必须调用它。把这两条规则直接并列会阻碍正常 /comet 执行;应说明用户调用 /comet 即视为授权,或为仓库自有 Comet 工作流单独增加例外。

📍 Affects 2 files
  • AGENTS.md#L221-L222 (this comment)
  • CLAUDE.md#L219-L220
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 221 - 222, 更新 AGENTS.md 第 221-222 行和 CLAUDE.md 第
219-220 行的 Superpowers Skill 使用规则,为仓库自有 Comet 工作流增加例外:用户调用 /comet 即视为明确授权,允许按
Comet 工作流要求调用 OpenSpec/Superpowers 依赖 Skill;其他场景仍需用户显式同意。

## github规范

不能未经过同意直接在github上评论或者提交PR
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to @rpamis/comet will be documented in this file.

## What's Changed [0.4.0-beta.11] - 2026-07-29

### Changed

- **Project configuration defaults**: New Classic configurations default to `classic.artifact_layout: docs`. `comet update` now fills every missing managed Native and Classic setting, choosing `docs/openspec/` unless an existing root-level `openspec/` project must be preserved.
- **Risk-based Native review**: Independent review is required by the actual implementation scope and risk instead of a change-creation signing mode, so ordinary changes can start immediately while high-risk verification remains fail-closed.

### Removed

- **Native creation authorization**: `comet native new` no longer requires `--creation-authorization`, and the `signed-v2` creation protocol plus `comet native trust authorize` have been removed.

## What's Changed [0.4.0-beta.10] - 2026-07-28

### Added
Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ Changelog写英文

不能够直接修改Superpowers和OpenSpec的原始Skill

除非用户明确同意,否则不得使用 Superpowers 的任何 Skill。

## github规范

不能未经过同意直接在github上评论或者提交PR
Expand Down
18 changes: 16 additions & 2 deletions app/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,21 @@ async function updateSingleProject(
const reportedInstallMode = targets.every((target) => nativeProject && target.scope === 'project')
? 'copy'
: selectedInstallMode;
const classicArtifactLayout = projectConfig?.classic?.artifact_layout ?? 'legacy';
const rawClassic = projectConfigDocument?.value.classic;
const explicitClassicArtifactLayout =
rawClassic !== null &&
typeof rawClassic === 'object' &&
!Array.isArray(rawClassic) &&
((rawClassic as Record<string, unknown>).artifact_layout === 'legacy' ||
(rawClassic as Record<string, unknown>).artifact_layout === 'docs')
? ((rawClassic as Record<string, unknown>).artifact_layout as 'legacy' | 'docs')
: null;
const classicArtifactLayout =
explicitClassicArtifactLayout ??
((await fileExists(path.join(projectPath, 'openspec'))) &&
!(await fileExists(path.join(projectPath, 'docs', 'openspec')))
? 'legacy'
: 'docs');
Comment on lines +1343 to +1357

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^app/commands/update\.ts$|^domains/.*comet[-_]?classic|classic)' | head -200

echo "== update outline =="
ast-grep outline app/commands/update.ts --view compact | sed -n '1,220p'

echo "== relevant update lines =="
sed -n '1310,1375p' app/commands/update.ts
sed -n '1770,1810p' app/commands/update.ts

echo "== classic resolver references =="
rg -n "artifact_layout|classicArtifactLayout|classic.*layout|openspec|docs.*openspec|legacy|docs" app/commands/update.ts domains app -g '*.ts' | head -200

Repository: rpamis/comet

Length of output: 11661


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== update relevant code =="
sed -n '1320,1365p' app/commands/update.ts
sed -n '1760,1810p' app/commands/update.ts

echo "== classic layout domain files =="
wc -l domains/comet-classic/classic-layout*.ts domains/comet-classic/classic-project-config.ts test/domains/comet-classic/classic-layout*.ts
sed -n '1,260p' domains/comet-classic/classic-layout.ts
sed -n '1,220p' domains/comet-classic/classic-layout-initialization.ts
sed -n '1,220p' domains/comet-classic/classic-project-config.ts

echo "== layout config tests =="
sed -n '1,260p' test/domains/comet-classic/classic-layout.test.ts
sed -n '1,260p' test/domains/comet-classic/classic-layout-initialization.test.ts
rg -n "artifact_layout|docs.*openspec|openspec|legacy|classic.*layout|ProjectPath|projectPath" test/domains/comet-classic/classic-layout*.ts domains/comet-classic/classic-layout*.ts test/repository/classic-layout-documentation.test.ts test app/commands/update.ts -g '*.ts' | head -300

Repository: rpamis/comet

Length of output: 50368


将 Classic 布局解析下沉到 domains/comet-classic

app/commands/update.ts:1343-1357 直接实现了 classic.artifact_layout 优先级、文件系统检测和 legacy/docs 业务规则,这在 app/ 中违反了领域边界。把这些逻辑放入 Classic domain resolver,并在 domain tests 中覆盖显式布局、仅 openspec/、仅 docs/openspec/、双根和无根目录场景;update.ts 只保留编排调用。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/commands/update.ts` around lines 1343 - 1357, Move the Classic
artifact-layout resolution currently using rawClassic and filesystem checks into
the resolver under domains/comet-classic, including explicit
classic.artifact_layout precedence and legacy/docs fallback rules. Add domain
tests covering explicit layout, only openspec/, only docs/openspec/, both roots,
and neither root; reduce update.ts to orchestration that calls the domain
resolver.

Source: Coding guidelines

const refreshClassicArtifactRoot =
includesProjectScope && classicProject && targets.some((target) => target.scope === 'project');
let classicLayoutInitializationPermit: ClassicLayoutInitializationPermit | undefined;
Expand Down Expand Up @@ -1777,7 +1791,7 @@ async function updateSingleProject(
await mergeProjectConfig(
configRoot,
languageId ? languageToArtifactLanguage(languageId) : null,
'legacy',
scope === 'project' ? classicArtifactLayout : 'docs',
scope === 'project',
scope === 'project' && classicProject,
);
Expand Down
2 changes: 1 addition & 1 deletion assets/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.0-beta.10",
"version": "0.4.0-beta.11",
"skills": [
"comet/SKILL.md",
"comet-classic/SKILL.md",
Expand Down
3 changes: 1 addition & 2 deletions assets/skills-zh/comet-native/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ Native 主流程不依赖任何外部 Skill。

```text
comet native new <change-name> \
--creation-authorization <owner-provided-path> \
--language zh-CN
```

如果 Runtime 报告缺少外部授权,停止创建并等待 owner。只使用配置指定的 Native artifact root。
只使用配置指定的 Native artifact root。

## Shape

Expand Down
6 changes: 2 additions & 4 deletions assets/skills-zh/comet-native/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ comet native init [--root <artifact-root>] [--language en|zh-CN]
comet native root show
comet native root move <artifact-root>

comet native new <change-name> --creation-authorization <path> [--language en|zh-CN]
comet native new <change-name> [--language en|zh-CN]
comet native list [--cursor <token>]
comet native show <change-name>
comet native status [--cursor <token>]
Expand All @@ -21,8 +21,6 @@ comet native spec rebase <change-name> --summary <text>

`artifact-root` 是项目内相对路径。`new` 在配置缺失时创建默认配置和 `<project>/docs/comet/`。已有配置需要迁移根目录时使用 `root move`,不要直接改配置。

`new` 需要 owner 提供与该 change 匹配的 creation authorization。当前 Agent 不生成授权、不处理私钥。缺少外部动作时,保留 Runtime 错误并等待 owner。

`status` 和 `show` 是只读命令。`new` 和 `select` 会建立当前 Native selection。多个候选无法唯一判断时让用户选择。

`status <change-name> --details` 返回详细 findings 和 acceptance 页:
Expand Down Expand Up @@ -78,7 +76,7 @@ comet native receipt manual <change-name> \

## 外部审核交接

signed-v2 pass 可能要求 implementation attestation、independent review 或 waiver。当前 Agent 可以准备和最终导入交接产物,但不得执行外部角色的 approve/sign,也不得接收其私钥。
高风险 change 的 pass 可能要求 implementation attestation、independent review 或 waiver。当前 Agent 可以准备和最终导入交接产物,但不得执行外部角色的 approve/sign,也不得接收其私钥。

Implementation 交接:

Expand Down
2 changes: 1 addition & 1 deletion assets/skills-zh/comet/reference/classic-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ comet classic root show
## 新旧项目与迁移

- 新 Classic 项目默认使用 `docs/openspec/`。
- 缺少 `classic.artifact_layout` 的旧项目按 `openspec/` 继续运行
- 缺少 `classic.artifact_layout` 时默认使用 `docs/openspec/`;`comet update` 检测到已有根目录 `openspec/` 产物时会显式补为 `legacy`,不会移动产物
- 普通 init/update 不移动旧产物。迁移前运行 `comet classic root move docs --dry-run` 并记录输出的 plan ID;只有用户明确授权后才运行 `comet classic root move docs --apply --plan <id>`。
- 首版迁移不接受任何 active 或 unmanaged OpenSpec change。
3 changes: 1 addition & 2 deletions assets/skills/comet-native/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ If multiple reasonable candidates remain, ask the user to select one. Create a c

```text
comet native new <change-name> \
--creation-authorization <owner-provided-path> \
--language en
```

If the Runtime reports missing external authorization, stop creation and wait for the owner. Use only the Native artifact root selected by project configuration.
Use only the Native artifact root selected by project configuration.

## Shape

Expand Down
6 changes: 2 additions & 4 deletions assets/skills/comet-native/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ comet native init [--root <artifact-root>] [--language en|zh-CN]
comet native root show
comet native root move <artifact-root>

comet native new <change-name> --creation-authorization <path> [--language en|zh-CN]
comet native new <change-name> [--language en|zh-CN]
comet native list [--cursor <token>]
comet native show <change-name>
comet native status [--cursor <token>]
Expand All @@ -21,8 +21,6 @@ comet native spec rebase <change-name> --summary <text>

`artifact-root` is project-relative. `new` creates default configuration and `<project>/docs/comet/` when configuration is absent. Use `root move` to migrate an existing root; do not edit configuration directly.

`new` requires a creation authorization supplied by the owner for that change. The current Agent does not generate authorization or handle private keys. If the external action is missing, preserve the Runtime error and wait for the owner.

`status` and `show` are read-only. `new` and `select` establish the current Native selection. Ask the user when multiple candidates cannot be resolved uniquely.

`status <change-name> --details` returns detailed findings and an acceptance page:
Expand Down Expand Up @@ -78,7 +76,7 @@ Create receipts only for commands or manual observations that actually occurred.

## External review handoff

A signed-v2 pass may require an implementation attestation, independent review, or waiver. The current Agent may prepare and finalize handoff artifacts, but must not perform an external role's approve or sign action or receive its private key.
A high-risk change may require an implementation attestation, independent review, or waiver before it can pass. The current Agent may prepare and finalize handoff artifacts, but must not perform an external role's approve or sign action or receive its private key.

Implementation handoff:

Expand Down
Loading
Loading