Skip to content

A project may be empty (D17): create first, add repositories later - #92

Merged
brettheap merged 1 commit into
mainfrom
change/empty-projects
Aug 6, 2026
Merged

brettheap merged 1 commit into
mainfrom
change/empty-projects

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Brett hit create-project refused: … non-empty repositories list creating a project from the panel, and ruled: "it is better if we allow a project to exist without a repo defined" — create first, populate later via edit-project. Recorded as topic decision D17, realized end to end:

  • Register schema: empty repositories is legal (the task-2.6 minItems: 1 reversed; the field becomes optional); the packaged empty-project negative example converts to a positive one.
  • Engine + route + CLI: the create non-empty guard, the route's 400, and --repo's required flag are dropped; the edit-project last-member floor goes too — removing the last member leaves a project awaiting its next additions.
  • UI: the create panel marks members optional; commission works with zero boxes ticked.
  • Spec delta: "An empty project is legal" replaces the emptying-refused scenario.

Evidence: empty create accepted engine + wire + panel; last-member removal accepted; malformed lists still 400; full suites 2755 passed / 0 failed with exit codes verified (not tail-masked); strict validation 53/53.

🤖 Generated with Claude Code

Brett hit the non-empty guard creating a project from the panel and
ruled: "it is better if we allow a project to exist without a repo
defined." Recorded as topic decision D17 and realized end to end:

The register schema admits an empty repositories set (the original
task-2.6 minItems rule reversed; repositories becomes optional on the
project shape; the packaged empty-project negative converts to a
positive example). The create-project engine guard and the route's
non-empty 400 are dropped (an absent list defaults to empty), the CLI's
--repo becomes optional, and the edit-project last-member floor goes
with them — removing the last member leaves a project awaiting its next
additions. The create panel marks members optional and its commission
button no longer requires a candidate.

Spec delta: the empty-project scenario replaces the emptying-refused
scenario; the requirement text drops the floor clause. Tests: empty
create accepted (engine + wire, panel enabled with zero boxes),
last-member removal accepted, malformed-list still 400. Full suites
2755 passed / 0 failed with exit codes verified (not tail-masked);
strict validation 53/53.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 6, 2026 19:31
@brettheap
brettheap merged commit db7fc75 into main Aug 6, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Implements decision D17 to allow ideation-dashboard projects to exist with an empty repository set (create first, populate later), removing prior “non-empty repositories” guards across the contract, engine, wire route, CLI, and UI, and updating tests/specs/examples accordingly.

Changes:

  • Contract: project-register schema no longer requires repositories and no longer enforces minItems: 1.
  • Engine + wire + CLI: remove create-project non-empty guard, accept missing/empty repositories at the route, and drop --repo requirement.
  • Edit-project: remove “last-member floor” so removing the last member is accepted; update tests/spec text/examples to match.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/ideation-dashboard/test_edit_project.py Updates guard/refusal expectations and adds engine-level test for last-member removal being legal.
tests/ideation-dashboard/test_create_project.py Updates create-project tests so empty repositories and absent repositories in wire body are accepted.
scripts/ideation_dashboard/web/views/repo-selector.js UI create panel now allows commissioning with zero repositories selected and explains it’s optional.
scripts/ideation_dashboard/kickoff.py Removes engine guard requiring at least one repository on create; removes last-member floor on edit.
scripts/ideation_dashboard/gate_routes.py Route accepts missing repositories and only enforces list type (not non-empty).
scripts/ideation_dashboard/cli.py Makes --repo optional for create-project.
openspec/changes/add-opendox-project-header/tasks.md Records completion of D17 work across schema/engine/wire/UI.
openspec/changes/add-opendox-project-header/specs/ideation-dashboard/spec.md Replaces “emptying refused” scenario with “empty project is legal” requirement/scenario.
ideation/staging/dashboard-project-scoping/dashboard-project-scoping.md Adds D17 decision note documenting the empty-project ruling.
examples/ideation-dashboard/project-register-empty-project.example.yaml Adds a positive example of a project with repositories: [].
examples/ideation-dashboard/negative/project-empty-project.yaml Removes the negative “empty project” example (no longer invalid).
contracts/schemas/project-register.schema.yaml Makes repositories optional and removes minItems: 1 constraint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 124 to +134
def test_wire_shapes_and_refusals(tmp_path):
_register_beside(tmp_path)
with _serving(tmp_path) as (host, port, root):
status, payload = _post(host, port, "/actions/gate/edit-project", {})
assert status == 400 and "project_id" in payload["message"]
status, payload = _post(host, port, "/actions/gate/edit-project",
{"project_id": "core", "add": "not-a-list"})
assert status == 400 and "list" in payload["message"]
status, payload = _post(host, port, "/actions/gate/edit-project",
{"project_id": "core",
"remove": ["repoA", "repoB"]})
assert status == 409 and "no member repositories" in payload["message"]
{"project_id": "nope", "add": ["repoA"]})
assert status == 409 and "no project 'nope'" in payload["message"]
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.

2 participants