Skip to content

Offer the Triad first in project new (feature 002-triad-first-project-new) - #8

Merged
brettheap merged 15 commits into
mainfrom
002-triad-first-project-new
Oct 8, 2026
Merged

brettheap merged 15 commits into
mainfrom
002-triad-first-project-new

Conversation

@brettheap

@brettheap brettheap commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openRepoProject-1

Closes #3

Realizes the ratified OpenSpec change prefer-triad-in-project-new (task 5.6 of openxFactory's prefer-triad-project-shape) through the single Speckit feature specs/002-triad-first-project-new/. Governance: PR #5, ratified by Brett Heap ("ratify 5", 2026-10-07, #5 (comment)), landed on main as ca4c615. Head at open: b046707 (main da33d92 merged in); head at ready: f8dde97 (the re-verification fixes).

What changes

  • project new asks a person at the terminal who has not chosen by flag one question: Triad (first, default) or single repository. Enter, 1, y, yes take the Triad; 2, n, no take a single repository, with no reason asked. One retry, then a refusal with exit 2; end of input refuses; Ctrl-C prints Cancelled. and exits 130. The question creates nothing: each answer re-enters today's path and keeps its own confirmation (openRepoShape's typed confirmation, or yes).
  • Known Triad obstacles are read locally before asking (name form, openRepoShape on PATH, parent directory) and named under the Triad entry; a Triad answer that meets one is refused at once, before any further prompt and with no network access.
  • A Triad answer asks for the GitHub organization and then the visibility (typed in full), restates the choice in one line, and runs openRepoShape without --yes.
  • A single repository created without the question (chosen by flag, or not at a person's terminal) is followed by two warning: lines on stderr through a guarded descriptor write: stdout, files, .project.json and the exit status are unchanged, and a stderr that cannot be written (closed, full device, broken pipe) is ignored.
  • The question is never asked when a choosing flag is given (--shape, --org, --visibility, --family, --elected-by, --bench, --type, --description, --yes), when stdin or stdout is not a terminal, when CI is anything other than empty, 0, false or no, or for a <user>-wip workspace name. Under --workflow, project's own offer comes first and setup-openspeckit runs as before.
  • README "Create a project" and its Configuration table (CI row), and a new AGENTS.md section telling agents to offer the Triad in conversation, then run project new with a choosing flag, and never answer the prompts on a person's behalf.

Only new() changes in project, plus new module-level helpers and constants. ask(), confirm(), choose(), execute(), show_plan(), parser(), main() and every other subcommand are unchanged (checked by ast source comparison). No new flag, no new import, no environment read other than CI, no network on the creation path. Every new string is ASCII and matches the ratified design's D13 character for character (checked by script against the fixtures).

Evidence

  • Tests: 94 pass (43 original, unchanged; 51 new, of which 36 drive a pseudo-terminal headless (35 named test_pty_)). Every one of the 47 scenarios of the ratified spec delta has at least one test: specs/002-triad-first-project-new/traceability.md.
  • CI: green on all four jobs (ubuntu-latest and macos-latest, Python 3.10 and 3.12) at every phase commit; the /dev/full test is skipped on macOS by design.
  • Guarded advisory: the rejected write forms (print to stderr, buffered write with the error swallowed) were shown to fail the stderr-closed, full-device and closed-pipe tests; the ratified form passes them with exit 0 and unchanged stdout.
  • Verification tasks T066 to T073 of the feature's tasks.md all pass: traceability 47/47, fixtures 25/25, five consecutive pty-only runs with no timeout, openspec validate --all --strict 6/6, ASCII check over all added lines, diff scope, and a pty-driven walk of every quickstart section (48 runs, 0 divergences; not walked by a person at a real terminal).
  • Review gates on the Speckit artifacts: a /speckit-analyze pass returned READY WITH FIXES (3 medium, 10 low), all applied at cbceb2b before implementation reached the affected tasks. An independent re-verification of this PR at b046707 against the ratified packet (every D13 string, all 47 scenarios read against their tests, nine behaviour probes in py-bench, Non-Goals by ast, 21 mutation probes, three full suite runs) returned READY WITH FIXES: one test-only gap (no test pinned the typed organization's case) and six notes; all applied at f8dde97.

Notes for the reviewer

  • Lead rulings recorded in the lane handoff: the ratified D13 parent-obstacle wording ("does not exist") stays although the check is is_dir(), logged as a wording follow-up; the organization is passed as typed, only the visibility is lower-cased; the fake setup-openspeckit marker carries its arguments.
  • test_advisory_is_never_a_report_input is pty-driven but keeps the name tasks.md gave it, so -k test_pty_ does not select it; it runs in the full suite.
  • After this merges: the merge sha is posted on issue project new offers the Triad first (openxFactory prefer-triad-project-shape, task 5.6) #3 for codeXfactory-5's bookkeeping, and one issue is opened on opensoft/workBenches for lane project-command to move the pinned project artifact. onp and new-project.sh offer nothing until that pin moves. The OpenSpec change is archived after.

Squash merge on Brett Heap's word only.

🤖 Generated with Claude Code

brettheap and others added 15 commits October 7, 2026 10:17
Lane: openRepoProject-1

Creates the single Speckit feature that realizes OpenSpec change
prefer-triad-in-project-new (ratified by Brett Heap, "ratify 5",
2026-10-07; PR #5 landed as ca4c615), 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]>
…fications.md

Lane: openRepoProject-1
The proposal's status paragraph now states the ratification ("ratify 5", PR #5) and the landing sha instead of the pre-ratification draft status. clarifications.md gains the lane line the other files of the change carry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openRepoProject-1
The plan sequences the ratified design (D1 to D14) into nine slices, with research, the data model, the project new command-line contract and a quickstart validation guide. It cites the design rather than restating it and contradicts none of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openRepoProject-1
Seventy-three dependency-ordered tasks in eight phases, tests before implementation in each user-story phase, with every one of the 47 delta scenarios named by at least one test task and a traceability record to be kept in traceability.md. Landing, the workBenches issue and the issue comments stay with the lane lead.

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

Adds the D13 fixtures, the D14 environment, fakes, pty and in-process helpers,
the terminal-rule test, person_at_terminal(), the pinned name forms and the
offer value computed once in new(), which nothing reads yet.

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

A person at a terminal without a choosing flag is asked Triad or single
repository once the name is known; the single-repository answer, retries,
refusals and interrupts work end to end, with T012 to T022 as pty tests.

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

A Triad answer asks for the organization and then the visibility, restates
them, and re-enters the unchanged shape branch, so openRepoShape runs without
--yes and keeps its own confirmation; T025 to T033 cover it at the pty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… 1 to 4

Lane: openRepoProject-1

Applies the 13 findings of the /speckit-analyze pass (C1, C2, G1 and ten
LOW) to tasks.md, contracts/project-new.md, data-model.md and plan.md, and
ticks T001 to T034, verified by the lead at 4f23450 (65 tests OK on all
four CI jobs).

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

Lane: openRepoProject-1

The obstacle reader checks the name form, openRepoShape on PATH and the parent directory before the
question, names each under the Triad entry, and refuses a Triad answer that meets one (T035 to T041).

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

Lane: openRepoProject-1

A single repository created without the question gets the two advisory lines through a guarded
descriptor write that cannot reach stdout or change the exit status (T042 to T053).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e workflow follow-up

Lane: openRepoProject-1

An asked invocation now meets the --workflow prerequisite refusal before the question, and the tests
pin the -wip silence and the advisory's place ahead of setup-openspeckit (T054 to T061).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e agent rule

Lane: openRepoProject-1

README "Create a project" and its Configuration table, and an AGENTS.md section, describe the question,
what skips it, the Triad prompts, the stderr advisory, the --workflow order, Ctrl-C and agents (T062 to T064).

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

Ticks T035 to T073, verified by the lead at 4e20f61 (94 tests OK on all
four CI jobs; traceability 47 of 47; fixtures 25 of 25), and removes a
stray punctuation seam left by the analyze edit to T043.

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

F1 pins the typed organization's case on its way to openRepoShape; F2
states that CI is compared case-insensitively and stripped; F3 corrects a
comment; F6 and F7 are governance bookkeeping (handoff wording, box 2.2,
spec status).

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

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@brettheap
brettheap marked this pull request as ready for review October 8, 2026 23:22
@sourcery-ai

sourcery-ai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Sorry @brettheap, your pull request is larger than the review limit of 150,000 diff characters

@brettheap
brettheap merged commit d7f6b0e into main Oct 8, 2026
10 checks passed
@brettheap
brettheap deleted the 002-triad-first-project-new branch October 8, 2026 23:43
brettheap added a commit that referenced this pull request Oct 9, 2026
origin/main is d7f6b0e (PR #8, feature 002), with 94 tests. Every
project:N and README citation stays pinned at da33d92; at d7f6b0e the
cited clean and repo_state code (manifest() onward) sits exactly 141
lines lower and README.md:187 is :275. Feature 004's specify and plan
re-pin citations against the main of that day (Dependencies and
Sequencing; Impact).

Lane: openRepoProject-2
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 9, 2026
Lane: openRepoProject-1

Ticks tasks 3.1 to 3.3 and 3.5 with their evidence, syncs the project-command
spec from the change's delta (one modified and six added requirements, 47
scenarios), and moves the change to openspec/changes/archive/.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 9, 2026
V12 (AE-4) after merging origin/main at 7a9134b (e21b24d):

- Dependencies and Sequencing: PR #8 merged at d7f6b0e (141 lines in
  project, tests 43 to 94) and PR #13's archive of
  prefer-triad-in-project-new merged at 7a9134b; "archive in either
  order" and "whichever lands second" replaced by those facts.
- Citations stay pinned at da33d92: at 7a9134b lines 285-1007 of
  project sit 141 lower (probe and execute unmoved), the cited test
  lines 383 lower, README citations up to 88 lower; feature 003
  re-pins at its specify and plan.
- Capabilities, project-command: all ten requirements at 7a9134b
  accounted for. "Inspect and diagnose" and "Explicit maintenance"
  (MODIFIED) are verbatim and unchanged, 22 lines lower; "Delegate
  project creation", "Distribution and compatibility" and the six
  requirements the archive added are listed untouched, verbatim.
- Impact: 94 existing tests; 002 merged by PR #8.
- Why: the defects still hold at 7a9134b. Corrections C1: main is no
  longer da33d92.
- Lead ruling (lane 3's final read of #12): the 1 MiB cap on the
  manifest read that resolves a merge target lives in the shared
  evidence model (What Changes; project-command ADDED; Git-first; a
  test). P6-1 confirmed already present (reap waits the 2 s grace,
  then abandons the child as probe-timeout).

Lane: openRepoProject-2
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.

project new offers the Triad first (openxFactory prefer-triad-project-shape, task 5.6)

1 participant