You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f7fbbfc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: openspec/specs/roadmap-stage/claims/spec.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,3 +257,55 @@ The plan check SHALL keep the next word of a sentence in a cited command when th
257
257
#### Scenario: An unknown subcommand before an option in a sentence is refused
258
258
-**WHEN** a plan cites `uv run devops ai ast-graph --help to see the options` in a sentence with no code span
259
259
-**THEN** the check returns a problem that names `ast-graph`
260
+
261
+
### Requirement: A class claim quotes the class source at the staged commit
262
+
`check_proposal` SHALL return the class-claim problem when a design decision, a rejected alternative or a `feasibility` line names an internal class under `src/` in a code span that starts with the class name and no other code span of that line holds text of that class at the staged commit.
263
+
264
+
#### Scenario: A decision that names a class with no quote is refused
265
+
-**WHEN** A decision names `StagedTree` in a code span and gives no other code span of that line
266
+
-**THEN**`check_proposal` returns the `stage_problem_class_claim` problem for that decision.
267
+
268
+
#### Scenario: A decision that names a class and quotes it passes
269
+
-**WHEN** A decision names `StagedTree.read` and another code span of the line holds `ls-files`
270
+
-**THEN**`check_proposal` returns no class-claim problem for that decision.
271
+
272
+
#### Scenario: A quote that the class does not hold is refused
273
+
-**WHEN** A `feasibility` line names `StagedTree` and quotes `file text` in a code span
274
+
-**THEN**`check_proposal` returns the class-claim problem for that line.
275
+
276
+
#### Scenario: A name that no class under src defines is no claim
277
+
-**WHEN** A rejected alternative names `ConfigDict` in a code span
278
+
-**THEN**`check_proposal` returns no class-claim problem for that alternative.
279
+
280
+
### Requirement: The class claim reads the class at the staged commit
281
+
The check SHALL read each class that a claim names from the staged commit with `git show`, SHALL compare a whitespace-squashed quote of at least three characters with the whitespace-squashed source of that class, and SHALL read the definition line of a class that declares no base.
282
+
283
+
#### Scenario: The comparison reads the staged commit
284
+
-**WHEN** The working tree holds a text that the class source at the staged commit lacks, and a decision quotes it
285
+
-**THEN**`check_proposal` returns the class-claim problem for that decision.
286
+
287
+
#### Scenario: A quote of fewer than three characters is refused
288
+
-**WHEN** A decision names `StagedTree` and quotes `ls` in a code span
289
+
-**THEN**`check_proposal` returns the class-claim problem for that decision.
290
+
291
+
#### Scenario: A class that declares no base is read
292
+
-**WHEN** A decision names `StagedTree`, which declares no base, and quotes `ls-files`
293
+
-**THEN**`check_proposal` returns no class-claim problem for that decision.
294
+
295
+
### Requirement: The class-claim problem names the class and the plan section
296
+
The class-claim problem SHALL come from a `RoadmapMessages` entry that names the class and the plan section, so the planner knows where to add the quote.
297
+
298
+
#### Scenario: The problem names the class and the section
299
+
-**WHEN** The rule refuses a decision that names `StagedTree`
300
+
-**THEN** The problem holds `StagedTree` and the word `decision`.
301
+
302
+
### Requirement: The replay judges a false class claim
303
+
The stage replay SHALL hold a case whose plan makes a false claim about an internal class, SHALL record that defect under the `paths` gate, and SHALL hold the note that the case reads no commit when it names no commit.
304
+
305
+
#### Scenario: The paths gate catches the false claim
306
+
-**WHEN** The replay runs the case whose decision claims that `StagedTree` holds file text
307
+
-**THEN** The `paths` gate problem holds `StagedTree` and the replay counts the defect as caught.
308
+
309
+
#### Scenario: The case that reads no commit says so
310
+
-**WHEN** The case of the false claim names no base commit and no merge commit
0 commit comments