Skip to content

docs: add a pdd-kit Product Model - #1332

Merged
mforce merged 2 commits into
mforce:mainfrom
itai-gendler:product-model
Oct 21, 2026
Merged

mforce merged 2 commits into
mforce:mainfrom
itai-gendler:product-model

Conversation

@itai-gendler

@itai-gendler itai-gendler commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1302

This adds the Product Model proposed in #1302: plain Markdown under product-model/. Only new files, no code, build or CI changes. product-model/README.md is left out, as you asked.

What's in it

  • 31 entities, from Flock, Daily entry and Egg lot to Sales order and App connection.
  • 88 capabilities in 17 domains, such as Daily entry, Stock, Sales and Reports. Their 165 scenarios include the refusals.
  • 86 business rules, such as "Grading must equal the sellable count exactly to submit or adjust a day" and "A confirmed sale draws each grade's oldest lots first".
  • 3 interfaces (the farm web app, the farm MCP address and operator commands) and one journey, selling eggs to a customer.

Each file links to the code behind it. It was mapped from main at c50b939.

Viewing it

npx pdd-toolkit view mforce/cluckwork --pr 1332

The model was drafted with Claude Code using pdd-kit's pdd-map skill, then reviewed by me.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mforce mforce left a comment •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks, Itai. I checked the PR before merging:

  • Every file is new and under product-model/, and the repo's tracked-file guards pass.
  • All 433 code links resolve on main.
  • A sample of about 45 capabilities, about 40 access rules and the main entity lifecycles match the code. No permission claim contradicts the endpoints.

Two claims need a fix before I merge:

  1. capabilities/provision-farm/capability.md says the farm starts in UTC. provision-account takes --timezone, --locale and --currency (ProvisionAccountCliCommand.cs:13-18), so UTC is only the default when --timezone is left out.
  2. business-rules/corrections-never-take-back-sold-eggs.md and capabilities/void-daily-entry/scenarios/refuse-voiding-a-day-with-sold-eggs.md say a void is refused if any eggs were sold. The guard compares produced with available (EggLot.cs:104-114), so eggs that were allocated or written off block a void too, not only sold ones.

One claim is right and the code is wrong. create-sales-order says an order date is never in the future, but only the web form enforces that. The API accepts a future date. I opened #1333 to fix the code, so please keep that part as it is.

I found a few smaller wording gaps too (the Locked state's depleted-flock exception, the Read-only role description, the CLI writing errors to stderr). I'll handle those myself after merge.

… Model

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@itai-gendler

Copy link
Copy Markdown
Contributor Author

Thanks for checking it so carefully, @mforce. Both fixes are in 3d4e6fb:

  1. Provisioning defaults. provision-farm now says the operator may set the timezone, locale and currency, and that any left out default to UTC, en-US and USD (AccountProvisioner.cs). The Farm entity said the same thing about UTC, so I fixed its Timezone line too.
  2. The void guard. The business rule and the void scenario now say a void is refused while any of the day's lots has sold, allocated or written-off eggs. That matches Produced − Available in AdjustProduction. The adjust scenario's title had the same gap ("below what a lot already sold"), so I fixed it as well. Its steps already listed all three.

I left the future-date line in create-sales-order as it was, for #1333.

I didn't rename any files, so the ids stay the same. It's a separate commit, so you can see just these changes.

@mforce mforce left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I checked both fixes in 3d4e6fb: the provisioning defaults match AccountProvisioner and Account.DefaultLocale, and the void guard now names sold, allocated and written-off eggs. All 433 code links still resolve. Thanks, Itai.

@mforce
mforce merged commit b0a9585 into mforce:main Oct 21, 2026
18 checks passed
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.

Proposal: adopt pdd-kit, open-source Product-Driven Development

2 participants