Stable anchors for design decisions so other artifacts can link to them
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #2113 @Nandni17 による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- markdown, typescript, yaml
調査の方向性
Start with schemas/spec-driven/templates/design.md and schema.yaml, especially the design and tasks instructions named in the issue. Review how the existing templates and instructions represent decisions and reference design.md; the proposed template and instruction changes are step 1, while validation is explicitly a separate proposal. Done for this issue means per-decision headings with stable IDs and instructions for relative Markdown links, without a CLI change.
索引モデルが issue の本文から書いたものです。
説明
The problem, in one or two sentences
When proposal.md or tasks.md mentions a design decision, it does so in free text ("as decided above", "per decision 3"). A reviewer can't jump to that decision, and an agent working in a fresh context can't reliably tell which decision a task implements. Nothing flags a mention whose decision has since been renumbered, renamed or removed.
Who this affects
Everyone who uses the spec-driven schema and writes a design.md, with any agent. Reviewers are hit hardest when they read a change on GitHub/GitLab or in an editor's Markdown preview. So are agents running /opsx:apply in a new session, because they rely on the written artifacts and not on the conversation that produced them.
What you tried
I tested this in a small playground repo: pierreboissinot/openspec-playground. It has a ~40-line bookmark CLI, OpenSpec 1.14.1 and the Claude Code integration. A fresh headless Claude Code session ran /opsx:propose once per variant with the same feature prompt: tags plus a Netscape HTML export, with backward-compatible storage.
1. Default spec-driven schema (baseline): artifacts
design.mdhad six decisions, each under its own heading, with no IDs.- Nothing linked to a decision: 0 links across
proposal.md,tasks.mdanddesign.md. tasks.mdcited spec scenarios by quoted name, but restated the design choices inline. For example, task 2.1 repeats the whole--tagparsing decision.- One risk ("hand-rolled parsing can drift") is the trade-off of a decision, with no link between them.
2. Same prompt, plus per-artifact rules in openspec/config.yaml: artifacts (decision headings ### D<n>: <title>; risks and tasks link with relative Markdown links)
- The agent followed the rules: decisions
D1–D6, 4 risks and the migration plan link to decisions, and 6 tasks link to decisions without restating them. - A small script applying GitHub's heading-slug rules found that all 11 links resolve.
- Two problems showed up:
- YAML pitfall. Writing the convention as a rule (
### D<n>: <short title>) makes YAML read the item as a key/value pair. The rule is dropped and the CLI prints only a warning. It works once the item is quoted. - Silent breakage. Retitling one decision (
D5: Export rendering→D5: Render the export by building strings with html.escape) broke 2 links.openspec validate --strictstill reports the change as valid.
- YAML pitfall. Writing the convention as a rule (
So a convention carried only by rules works, but each team has to rediscover it (including the quoting trap), and nothing catches links that break later. The default design.md template gives no structure per decision: ## Decisions holds only a placeholder comment.
Caveats: one run per variant, one agent (Claude Code), one model.
What you have in mind
This is a sketch to discuss, not a fixed design.
Step 1: template and instructions only (no CLI change)
- In
schemas/spec-driven/templates/design.mdand thedesigninstruction inschema.yaml, give each decision its own heading with a stable ID that is never reused, e.g.### D1: Scope model in global config. - In the
tasksinstruction (and whereverdesign.mdcontent is referenced), ask for links to decisions as standard relative Markdown links:[D1](./design.md#d1-scope-model-in-global-config). These are plain links, so they work in every agent, renderer and editor, with nothing to install.
Step 2: optional, a separate change proposal if step 1 is worth it
openspec validatewould report dangling decision references, i.e. links whose target decision doesn't exist. Advisory only.- It would reuse the segment normalization being defined for scenario references in #2029 / #1979, so OpenSpec has a single anchor grammar and not two.
Open questions
- What the anchor points at.
- (a) The generated heading slug: zero syntax, but it changes when the title changes.
- (b) An explicit ID such as
<a id="d1"></a>: stable, but it puts HTML into the artifacts. - (c) The ID alone (
D1), resolved by OpenSpec and not by the renderer: stable, but it isn't a clickable link everywhere.
- Scope. Links between files in the same change survive archiving, because the files move together. A link from a live spec to a decision in an archived
design.mddoesn't survive. I'd keep specs out of scope here. Decisions that outlive their change belong to the broader question in #1980 (and Discussion 1553 on ADRs).
Related: #1980, #783, #1979, #2029, Discussion 1553, Discussion 1564
- 主要言語
- TypeScript
- スター
- 76k
- フォーク
- 5.2k
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 58
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Fission-AI/OpenSpec のほかの issue
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Fission-AI/OpenSpec#2337 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Fission-AI/OpenSpec#2311 ·
メンテナーはふだん 1 日以内に返信
-
sync-specs skill overwrites an existing ADDED requirement, contradicting the CLI's no-op/conflict rule from #1376再び着手できるかも @vaibhavdabas16 が 10 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンapproved
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
Fission-AI/OpenSpec#2289 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
Fission-AI/OpenSpec#2208 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Document the RFC 2119 keyword rule (attribution lost in docs rebuild) and its clarification update RFC 8174対応中かも @sofiaali1521-cloud が 5 日前に担当しました。 オープンdocumentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
Fission-AI/OpenSpec#2200 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
Fission-AI/OpenSpec の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
tashfeenahmed/freellmapi#2217 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vercel-labs/ui#1758 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nicobailon/pi-subagents#3425 ·
メンテナーはふだん 1 日以内に返信