prodc 0.6.8__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prodc-0.6.8 → prodc-0.7.0}/CHANGELOG.md +4 -0
- {prodc-0.6.8 → prodc-0.7.0}/PKG-INFO +1 -1
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/__init__.py +1 -1
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/catalog/ux.py +100 -41
- {prodc-0.6.8 → prodc-0.7.0}/.gitignore +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/LICENSE +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/README.md +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/examples/quickstart/features/orders.feature +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/examples/quickstart/needs/jordan.yaml +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/examples/quickstart/prodc.toml +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/pyproject.toml +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/adapters.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/agent.md +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/anchor.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/board.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/callbacks.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/catalog/__init__.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/__init__.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/__main__.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/app.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/commands.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/common.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/render.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/cli/serialize.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/config.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/dedup.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/glossary.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/guide.md +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/inbox.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/issues.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/loader.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/model.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/py.typed +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/report.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/report_export.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/report_html.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/status.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/storybook.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/views.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/src/prodc/writer.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/fixtures/storybook/index.json +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_adapters.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_anchor.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_answer.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_attest_policy.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_awaits.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_callbacks.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_capture_block_scalar.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_catalog_add.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_catalog_lint.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_citation.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_claim_gating.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_cli.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_command_hook.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_confidence.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_config_keys.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_contradicts.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_decisions.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_declared_only.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_dedup.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_dedup_candidates.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_description.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_drafts.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_evalgate.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_expects.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_external_adapter.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_files_key.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_flowsteps.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_gitlab_source.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_glossary.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_importance.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_inbox.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_inventory.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_issues.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_lint_decision.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_loader.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_models.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_needref.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_path.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_path_views.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_playwright.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_principle_withdrawal.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_principles.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_relink.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_report.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_report_export.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_report_html.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_results_reports.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_review.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_roles.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_source_role.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_sources.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_stage.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_staleness.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_status.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_storybook.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_suggest.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_suggest_eval.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_ux_catalog.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_variants.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_view_links.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_views.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_views_report.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_vitest.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_who_variants.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_withdrawn.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_writer.py +0 -0
- {prodc-0.6.8 → prodc-0.7.0}/tests/test_writer_comments.py +0 -0
|
@@ -4,6 +4,8 @@ All notable changes are documented here. Versioning is [SemVer](https://semver.o
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.7.0] - 2026-11-09
|
|
8
|
+
|
|
7
9
|
### Added
|
|
8
10
|
|
|
9
11
|
- A `storybook` proof kind: a need can point at the Storybook stories that show it. prodc
|
|
@@ -19,6 +21,8 @@ All notable changes are documented here. Versioning is [SemVer](https://semver.o
|
|
|
19
21
|
- `prodc.catalog.ux` ships 30 UX laws from lawsofux.com as catalog entries (`UX_CATALOG`).
|
|
20
22
|
Five are checkable (ux-fitts, ux-hick, ux-von-restorff, ux-miller, ux-jakob) and carry a
|
|
21
23
|
`Recipe` with a snippet for the guard test. `docs/ux-laws.md` lists all 30.
|
|
24
|
+
The ux-fitts, ux-hick, and ux-von-restorff recipes now carry real guard code extracted from
|
|
25
|
+
crm (source-file scanning approach); ux-miller and ux-jakob keep placeholder snippets.
|
|
22
26
|
- `Principle` now supports `withdrawn: {reason, date[, kind]}`, reusing the existing `Withdrawal`
|
|
23
27
|
type. A withdrawn principle is not evaluated by lint. `prodc withdraw principle <id>` and
|
|
24
28
|
`prodc reinstate principle <id>` write the field.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: prodc
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Product management as code: roles, flows, and features traced to evidence.
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/cardona-oss/prodc
|
|
6
6
|
Project-URL: Repository, https://gitlab.com/cardona-oss/prodc
|
|
@@ -63,24 +63,42 @@ _FITTS = CatalogEntry(
|
|
|
63
63
|
checkable=True,
|
|
64
64
|
recipe=Recipe(
|
|
65
65
|
kind="vitest",
|
|
66
|
-
summary="
|
|
67
|
-
#
|
|
66
|
+
summary="Test the pure button-style function: every size variant sets minHeight >= 24px.",
|
|
67
|
+
# Real guard from crm: apps/website/src/design/fittssLaw.guard.test.ts
|
|
68
|
+
# jsdom has no layout engine; test the pure style function instead of a rendered bounding box.
|
|
68
69
|
snippet="""\
|
|
69
|
-
//
|
|
70
|
-
import {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
70
|
+
// src/design/fittssLaw.guard.test.ts
|
|
71
|
+
import { describe, expect, it } from "vitest";
|
|
72
|
+
import { buttonVisualStyle, type ButtonSize } from "./primitives/Button";
|
|
73
|
+
|
|
74
|
+
const SIZES: ButtonSize[] = ["sm", "md", "lg"];
|
|
75
|
+
|
|
76
|
+
describe("interactive targets meet the 24x24px minimum (WCAG 2.5.8)", () => {
|
|
77
|
+
it("every size variant sets minHeight >= 24px", () => {
|
|
78
|
+
for (const size of SIZES) {
|
|
79
|
+
const style = buttonVisualStyle({ size });
|
|
80
|
+
expect(
|
|
81
|
+
style.minHeight,
|
|
82
|
+
`size "${size}" minHeight ${style.minHeight} is below the 24px WCAG minimum`,
|
|
83
|
+
).toBeGreaterThanOrEqual(24);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("icon-only buttons set minWidth >= 24px (they form a square target)", () => {
|
|
88
|
+
for (const size of SIZES) {
|
|
89
|
+
const style = buttonVisualStyle({ size, iconOnly: true });
|
|
90
|
+
expect(style.minWidth).toBeGreaterThanOrEqual(24);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it("checks a real primitive, not an empty fixture", () => {
|
|
95
|
+
const style = buttonVisualStyle({ variant: "primary", size: "md" });
|
|
96
|
+
expect(style.minHeight).toBeDefined();
|
|
97
|
+
expect(SIZES.length).toBeGreaterThan(0);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
82
100
|
""",
|
|
83
|
-
proof_locator_hint="vitest:
|
|
101
|
+
proof_locator_hint="vitest:src/design/fittssLaw.guard.test.ts::interactive targets meet the 24x24px minimum (WCAG 2.5.8) > every size variant sets minHeight >= 24px",
|
|
84
102
|
),
|
|
85
103
|
)
|
|
86
104
|
|
|
@@ -93,22 +111,37 @@ _HICK = CatalogEntry(
|
|
|
93
111
|
checkable=True,
|
|
94
112
|
recipe=Recipe(
|
|
95
113
|
kind="vitest",
|
|
96
|
-
summary="Count
|
|
97
|
-
#
|
|
114
|
+
summary="Count top-level nav items per role; each must stay at or below the threshold set when the principle was written.",
|
|
115
|
+
# Real guard from crm: apps/website/src/design/hicksLaw.guard.test.ts
|
|
116
|
+
# Thresholds are the counts at adoption time; the guard prevents growth beyond them.
|
|
98
117
|
snippet="""\
|
|
99
|
-
//
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
118
|
+
// src/design/hicksLaw.guard.test.ts
|
|
119
|
+
import { describe, expect, it } from "vitest";
|
|
120
|
+
import { sectionsForRole } from "../lib/navLens";
|
|
102
121
|
|
|
103
|
-
|
|
122
|
+
// Replace MAX_NAV_ITEMS with the current count per role in your app.
|
|
123
|
+
const MAX_NAV_ITEMS = {N};
|
|
104
124
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
125
|
+
describe("the main nav has at most {N} top-level sections per role", () => {
|
|
126
|
+
it("primary role sees at most {N} sections", () => {
|
|
127
|
+
const sections = sectionsForRole("primary");
|
|
128
|
+
expect(
|
|
129
|
+
sections.length,
|
|
130
|
+
`primary role now has ${sections.length} nav sections (threshold {N}) — ` +
|
|
131
|
+
"update this guard and the principle YAML if the addition is intentional",
|
|
132
|
+
).toBeLessThanOrEqual(MAX_NAV_ITEMS);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it("watches a real nav lens: sections are non-empty and named", () => {
|
|
136
|
+
const sections = sectionsForRole("primary");
|
|
137
|
+
expect(sections.length).toBeGreaterThan(0);
|
|
138
|
+
for (const s of sections) {
|
|
139
|
+
expect(s).toMatch(/^\\//);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
110
143
|
""",
|
|
111
|
-
proof_locator_hint="vitest:
|
|
144
|
+
proof_locator_hint="vitest:src/design/hicksLaw.guard.test.ts::the main nav has at most {N} top-level sections per role > primary role sees at most {N} sections",
|
|
112
145
|
),
|
|
113
146
|
)
|
|
114
147
|
|
|
@@ -123,21 +156,47 @@ _VON_RESTORFF = CatalogEntry(
|
|
|
123
156
|
),
|
|
124
157
|
checkable=True,
|
|
125
158
|
recipe=Recipe(
|
|
126
|
-
kind="
|
|
127
|
-
summary="
|
|
128
|
-
#
|
|
159
|
+
kind="vitest",
|
|
160
|
+
summary="Grep form/dialog source files for variant=\"primary\"; each file must have at most one.",
|
|
161
|
+
# Real guard from crm: apps/website/src/design/vonRestorff.guard.test.ts
|
|
162
|
+
# jsdom has no layout; scan source files statically for variant="primary" in JSX.
|
|
129
163
|
snippet="""\
|
|
130
|
-
//
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
164
|
+
// src/design/vonRestorff.guard.test.ts
|
|
165
|
+
import { readdirSync, readFileSync, statSync } from "node:fs";
|
|
166
|
+
import { join, relative } from "node:path";
|
|
167
|
+
import { describe, expect, it } from "vitest";
|
|
168
|
+
|
|
169
|
+
const SRC = join(import.meta.dirname, "..");
|
|
170
|
+
const FORM_PATTERN = /(?:Form|Dialog|Modal)\\.tsx$/;
|
|
171
|
+
const PRIMARY_BUTTON = /variant="primary"/g;
|
|
172
|
+
|
|
173
|
+
function formFiles(dir: string): string[] {
|
|
174
|
+
const out: string[] = [];
|
|
175
|
+
for (const entry of readdirSync(dir)) {
|
|
176
|
+
const full = join(dir, entry);
|
|
177
|
+
if (statSync(full).isDirectory()) out.push(...formFiles(full));
|
|
178
|
+
else if (FORM_PATTERN.test(entry)) out.push(full);
|
|
179
|
+
}
|
|
180
|
+
return out;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
describe("at most one primary button per form or dialog", () => {
|
|
184
|
+
it("no form or dialog file contains more than one variant=\\"primary\\" button", () => {
|
|
185
|
+
const offenders: string[] = [];
|
|
186
|
+
for (const file of formFiles(SRC)) {
|
|
187
|
+
const src = readFileSync(file, "utf8");
|
|
188
|
+
const count = (src.match(PRIMARY_BUTTON) ?? []).length;
|
|
189
|
+
if (count > 1) offenders.push(`${relative(SRC, file)} (${count} primary buttons)`);
|
|
190
|
+
}
|
|
191
|
+
expect(offenders).toEqual([]);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it("watches a real tree: at least 10 form/dialog files must exist", () => {
|
|
195
|
+
expect(formFiles(SRC).length).toBeGreaterThanOrEqual(10);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
139
198
|
""",
|
|
140
|
-
proof_locator_hint="
|
|
199
|
+
proof_locator_hint="vitest:src/design/vonRestorff.guard.test.ts::at most one primary button per form or dialog > no form or dialog file contains more than one variant=\"primary\" button",
|
|
141
200
|
),
|
|
142
201
|
)
|
|
143
202
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|