Skip to content

OpenSpec: fix-parent-obstacle-wording (follow-up to prefer-triad-in-project-new) - #15

Merged
brettheap merged 5 commits into
mainfrom
change/fix-parent-obstacle-wording
Oct 9, 2026
Merged

brettheap merged 5 commits into
mainfrom
change/fix-parent-obstacle-wording

Conversation

@brettheap

@brettheap brettheap commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openRepoProject-1

Governing issue: #14 (claimed by lane openRepoProject-1; not closed by this PR, the realization closes it). Proposed on Brett Heap's word "propose the D3 wording follow-up as a new change" (2026-10-09). Ratified by Brett Heap's word "ratify 15" (2026-10-09).

OpenSpec change fix-parent-obstacle-wording: the parent obstacle of project new's creation question is read as is_dir() but worded "does not exist", which is false when the parent path exists as a file. This packet fixes the wording and nothing else.

The packet

  • proposal.md: two case-specific parent sentences; the missing case unchanged; the new sentence states its repair and is not Triad-specific; alternatives (A) one sentence, (C) nothing, (D) exists() rejected with reasons; residuals and known limitations stated.
  • specs/project-command/spec.md: one MODIFIED requirement, "Known Triad obstacles are named before the question and refused on a Triad answer", with eight scenarios: the missing case keeps its title, "The parent exists but is not a directory" is new, the Triad-answer and dry-run scenarios gain the file-parent case, "A single-repository answer is unaffected" has one baseline and no advisory, "No known obstacle" admits a symbolic link to a directory.
  • design.md D1 to D6: the read (is_dir() then exists() on the resolved parent; still three facts), the fixed text (The parent PARENT exists but is not a directory; choose a parent that is a directory. and the README sentence), the tests, the feature 002 supersession statement, the workBenches#145 comment at the realization's merge, and what is explicitly not changed.
  • clarifications.md N1 to N6 and a governance-only tasks.md with one Speckit handoff, to be filled in once after ratification (the next free feature number; lane openRepoProject-2's PRs OpenSpec: add-project-clean-all-safe (batch worktree cleanup from the maintenance design packet) #11 and OpenSpec: add-project-overview (project overview from the maintenance design packet) #12 name 003 and 004).

Review record

  • Alignment review (stack architect, QA lead): 16 fixes applied at 6a93c8f (comment 6072132040).
  • Council (product advocate, systems architect, adversary engineer): 13 concerns, 10 valid and applied, 6 noted for the design, 0 dismissed (comment 6072814758).
  • openspec validate fix-parent-obstacle-wording --strict passes; openspec validate --all --strict 6 of 6; every artifact done. All five files ASCII.
  • Independent re-verification: READY WITH FIXES (opus-xhigh, read-only, by experiment on a scratch copy: D1 applied keeps 94 tests passing with no test edited; every D3 test written and passing, 96 total, 12 failing against the unchanged code; all 10 council and 16 alignment items confirmed applied; strings byte-identical across the five files). One citation fix applied at 6cc92c8 (tasks.md 1.2); five notes recorded in the lane handoff for the realization (baseline wording 'at a terminal without --yes', the README clause for the FILE/sub residual, the brace line in known_obstacle_cases, routes applied to the regular file only, later-Python residuals).

Squash merge on Brett Heap's word.

🤖 Generated with Claude Code

Summary by Sourcery

Correct the parent obstacle message used by project new so it accurately distinguishes missing parents from existing paths that are not directories.

Bug Fixes:

  • Correct the project new parent-obstacle wording so existing non-directory parents are no longer reported as missing.

Enhancements:

  • Document separate handling for missing parents and parents that exist but are not directories while preserving existing Triad obstacle behavior.

Documentation:

  • Update the project command specification and README to describe the corrected parent conditions and guidance.

Tests:

  • Expand project command coverage for file and symbolic-link parents across question, refusal, dry-run, route, and unaffected single-repository flows.

Chores:

  • Add the OpenSpec proposal, design, clarifications, governance tasks, and feature supersession record for the wording correction.

Lane: openRepoProject-1

Proposal only, for the parent-obstacle sentence of project new that says
"does not exist" while the check is "is not a directory" (follow-up R-A of
prefer-triad-in-project-new). Alignment review and council follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Reviewer's Guide

This proposal-only PR documents a narrowly scoped correction to project new obstacle messaging: retain the current wording for missing parents while accurately describing existing file parents, without changing the detection logic or surrounding behavior. It records the intended spec, README, test, governance, and Speckit handoff work for a later ratified implementation.

Sequence diagram for parent obstacle wording in project new

sequenceDiagram
    participant User
    participant ProjectNew
    participant ParentPath

    User->>ProjectNew: project new
    ProjectNew->>ParentPath: is_dir()
    alt Parent is a directory
        ProjectNew-->>User: Continue creation question
    else Parent does not exist
        ProjectNew-->>User: Not possible here: parent does not exist
    else Parent exists but is not a directory
        ProjectNew-->>User: Not possible here: parent exists but is not a directory
    end
Loading

Flow diagram for parent obstacle message selection

flowchart TD
    A[project new reads parent path] --> B{"parent.is_dir()?"}
    B -->|yes| C[No parent obstacle]
    B -->|no| D{Parent path exists?}
    D -->|no| E[Use missing-parent sentence]
    D -->|yes| F[Use non-directory-parent sentence]
    E --> G[Show obstacle in creation question and refusal]
    F --> G
Loading

File-Level Changes

Change Details Files
Adds a proposal for distinguishing missing parents from existing non-directory parents in the project new obstacle wording.
  • Keeps the existing missing-parent sentence unchanged.
  • Introduces a case-specific sentence for a parent path that exists but is not a directory.
  • Preserves the existing parent.is_dir() obstacle check, resolved-path naming, refusal composition, and behavior.
  • Plans coverage for regular files, symlinks, dry-run/refusal paths, and unaffected directory/single-repository cases.
openspec/changes/fix-parent-obstacle-wording/.openspec.yaml
openspec/changes/fix-parent-obstacle-wording/proposal.md
Defines the required specification and documentation updates for the proposed wording correction.
  • Modifies the project-command capability wording to describe the parent as an existing directory and split the obstacle scenarios.
  • Updates README guidance to acknowledge both missing and non-directory parent cases.
  • Limits implementation to a future Speckit feature after ratification; no existing feature or archived change is edited.
openspec/changes/fix-parent-obstacle-wording/proposal.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Lane: openRepoProject-1

QA lead: eleven findings (three mismatches, eight gaps); stack architect:
three mismatches, two drifts and one observation, merged by the lead. The
proposal now states both parent cases in every scenario it names, the
reachability routes, the feature 002 record lines it supersedes, and the
correct source of the PermissionError refusal.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openRepoProject-1

Alignment review complete (proposal at bac4150, fixes at 6a93c8f)

Stack architect: 5 findings (3 mismatches, 2 drifts) plus 1 observation. Mismatches: the PermissionError for an unreadable parent is raised by destination.exists() (project:321) in the existing-destination refusal, never by is_dir(); two citations off by a line. Drifts: the list of tests that keep passing omitted test_inproc_triad_obstacle_runs_nothing; a new fixture does not belong inside the D13 fixtures block. Observation: a symbolic-link loop as parent is a RuntimeError traceback at resolve(), unchanged. The approach is confirmed: parent.exists() read only when parent.is_dir() is false, no exception handling needed, every existing test passes with the mutation applied.

QA lead: 11 findings (3 mismatches, 8 gaps). Gaps: the scenario "A single-repository answer is unaffected" was false for a file parent (the bench path ends in [Errno 17] File exists, exit 2); the delta needs the file-parent case in "A Triad answer with a known obstacle" and "A dry run with a known obstacle", a dangling-symlink scenario, and "No known obstacle" reading "an existing directory, or a symbolic link that resolves to one"; the FILE/sub case named as out of scope; the feature 002 record lines the new feature supersedes listed; the shared known_obstacle_cases() rows named; two bullets made testable (the new sentence's required content; the exact README text); the four reachability routes named for the question test.

Fixes applied: 16 (all; the two lists merged by the lead, the stack architect's wording winning where both touched the same text). Gaps resolved: 8, all added to scope except FILE/sub and the symlink loop, which are stated out of scope.

The proposal is aligned with the main spec, the archived design and the code. Convening the council.

brettheap and others added 2 commits October 9, 2026 02:00
…orded

Lane: openRepoProject-1

Thirteen concerns (product 4, architect 4, adversary 5); the valid ones are
applied to proposal.md and the noted ones constrain design.md through
clarifications.md. Decisions: the new sentence states its repair and is not
Triad-specific; one baseline for the single-repository answer; pathlib read
with version residuals recorded; feature number taken when created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le-wording

Lane: openRepoProject-1

One MODIFIED requirement with its scenarios (the missing case keeps its
title; the non-directory case gets its own), design D1 to D6 fixing the
discriminator, the two sentences and the tests, and a governance-only
tasks.md with one Speckit handoff to be filled in once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openRepoProject-1

Council review complete (aligned proposal at 6a93c8f; resolution at d13e419)

Concerns raised: 13 (Product advocate 4, Systems architect 4, Adversary engineer 5).

VALID, proposal updated (10)

  • The new sentence must not imply that a single repository works where a Triad cannot (product HIGH, adversary MEDIUM): fixed as The parent PARENT exists but is not a directory; choose a parent that is a directory., deliberately not Triad-specific; the scenario that would have pinned the bench path's late [Errno 17] refusal after yes is dropped and that refusal is recorded as a known limitation of the pre-existing path.
  • The reworded "A single-repository answer is unaffected" contradicted the no-advisory rule and had two baselines (architect HIGH, adversary HIGH): one baseline now, the generator chosen by flag at a terminal without --yes, and no creation advisory follows a creation that went through the question.
  • Feature number (product HIGH): lane openRepoProject-2's PRs OpenSpec: add-project-clean-all-safe (batch worktree cleanup from the maintenance design packet) #11 and OpenSpec: add-project-overview (project overview from the maintenance design packet) #12 name 003 and 004, so this feature takes the next free number when /speckit.specify runs, recorded in the handoff when created; realizations touching project and the tests merge main in.
  • workBenches pin (product MEDIUM): at the realization's merge, one comment on workBenches#145 if still open, naming the merge sha and the sha256 of project as an alternative pin target; no new issue.
  • Version residuals (architect MEDIUM, adversary MEDIUM): the Out of Scope bullets are qualified to Python 3.10 and 3.12 (the CI matrix); on 3.13+ a symbolic-link loop and on 3.14 an existing directory under an unsearchable ancestor print the pre-existing missing-parent sentence, recorded as residuals.
  • Truth criterion (adversary MEDIUM): the Why and alternative (B) now argue that each sentence is true of the path it names; the repair argument is kept only for the file-parent sentence; FILE/sub is recorded as a residual dead end, not merely "unchanged".
  • "Three local reads" restated (architect LOW): the facts stay three; the parent is read as is_dir() and, only when false, exists() on the same resolved path.
  • Scenario titles (adversary LOW): the missing case keeps "The parent directory is missing", so feature 002's traceability still points at an existing title; the new case is "The parent exists but is not a directory".
  • README wording, the (B) rationale and the lineage anchor (product LOW).
  • Fixture placement (architect MEDIUM, one phrase): after the End D13 fixtures marker under its own header.

NOTED, captured in clarifications.md for the design (6)

  • Versions verified and residuals; no is_symlink() in the discriminator.
  • Test fixtures: known_obstacle_cases() creates its own file and symlink fixtures; expected PARENT is the resolved path (macOS /private/var); nothing-created via the rglob snapshot; explicit rows for the routes and dry-run tests.
  • exists() over a raw stat; obstacles computed once so the question line and the refusal cannot diverge.
  • The ASCII check in the tasks covers changed strings and added lines (project already carries em dashes elsewhere).
  • Lead decision on the adversary's stat-by-errno and CI-matrix suggestions: declined for this change (a wording follow-up); pathlib read, no third sentence, no CI change; recorded, not dismissed.
  • Confirmed assumptions: resolve() runs for every parent source; one obstacles list feeds the question and the refusal; a FIFO parent gets the new sentence; a second parent sentence is a line inside the existing question, not a new surface or form; the resolved path reveals no more than readlink shows.

DISMISSED (0)

Design, spec delta and governance tasks follow in this pull request; nothing here is ratified.

@brettheap
brettheap marked this pull request as ready for review October 9, 2026 02:28
Lane: openRepoProject-1

Re-verification F1: box 1.2 now cites issuecomment-6072814758 instead of
saying the lead posts it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 17 hours and 34 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap
brettheap merged commit 26a5668 into main Oct 9, 2026
10 checks passed
@brettheap
brettheap deleted the change/fix-parent-obstacle-wording branch October 9, 2026 02:30
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openRepoProject-1
Ratified by Brett Heap's word "ratify 15" (2026-10-09) and landed by squash as 26a5668. The independent re-verification returned READY WITH FIXES (one citation fix, applied at 6cc92c8; five notes carried to the realization). Realization: Speckit feature 003-parent-obstacle-wording on branch 003-parent-obstacle-wording, created from main 26a5668; its PR will close #14.

brettheap added a commit that referenced this pull request Oct 9, 2026
…ent-obstacle-wording) (#17)

* Specify feature 003-parent-obstacle-wording from the ratified change

Lane: openRepoProject-1

Creates the single Speckit feature that realizes OpenSpec change
fix-parent-obstacle-wording (ratified by Brett Heap, "ratify 15",
2026-10-09; PR #15 landed as 26a5668), records the ratification and the
Speckit handoff in the change's tasks.md, and adds the spec quality
checklist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Plan and tasks for feature 003-parent-obstacle-wording

Lane: openRepoProject-1

Restates the ratified design (fix-parent-obstacle-wording D1 to D6) as the
implementation plan and derives the dependency-ordered task list; no code
changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Apply the analyze gate's fixes to quickstart.md and tasks.md

Lane: openRepoProject-1

M1: the quickstart fixture now creates PROJECTS_DIR; L1, L2, L4: counts
pinned at 26a5668, the two scenarios covered by existing tests named in
T002, and T015(a) phrased as the filtered diff.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Realize fix-parent-obstacle-wording: name a parent that is not a directory

Lane: openRepoProject-1

known_obstacles() reads parent.is_dir() and, only when that is false,
parent.exists() on the same resolved parent, and names a parent that
exists but is not a directory with the sentence fixed in design.md D2;
the missing-parent sentence is unchanged. Tests per design.md D3 (new
fixture, four obstacle rows with a nothing-created snapshot, the routes
table, dry-run rows, a single-repository test against the --type test
baseline, a symlink-to-directory test); README sentence per D2;
traceability for the eight delta scenarios. Feature
003-parent-obstacle-wording, governing issue #14.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Tick T001 to T018 on the verified evidence; fix the Phase 2 checkpoint; tick OpenSpec 2.2

Lane: openRepoProject-1

The checkpoint now names all 13 fail-first cases (T007's question-line
check included), per the independent re-verification of PR #17 at
f492558; box 2.2 records that the handoff named the feature before the
first implementation commit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 9, 2026
* Archive fix-parent-obstacle-wording after PR #17 landed

Lane: openRepoProject-1

Moves the ratified change (Brett Heap, "ratify 15", 2026-10-09; packet PR
#15 at 26a5668) to the archive and merges its one MODIFIED requirement into
openspec/specs/project-command/spec.md. The realization is PR #17 (feature
003-parent-obstacle-wording), landed as f401e06;
issue #14 closed; the D5 comment is on workBenches#145.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Name the skipped check in the archived tasks.md 3.1

Lane: openRepoProject-1

Per the independent re-verification of PR #18 (note N1): the rollup
wording now names the skipped Sourcery review, as the precedent did.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant