Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ The interaction contract translates that activity into a surface: what the user

### Surface Type

The surface type classifies activity purpose before frontend implementation: marketing, workbench, operator review, form flow, dashboard monitor, content/report, setup/debug tool, or conversation. It is interaction guidance, not a visual theme.
The surface type classifies activity purpose before frontend implementation: marketing, workbench, operator review, artifact inspector, form flow, dashboard monitor, content/report, setup/debug tool, or conversation. It is interaction guidance, not a visual theme. Artifact Inspector applies only when one rendered artifact is primary, semantic locus selection is required, and supporting context is meaningful relative to that locus; layout vocabulary or a keyword alone is insufficient.

### Surface Presentation Profile

A surface presentation profile applies governed design-system guidance after the surface type is grounded. It can shape density, type hierarchy, region hierarchy, action emphasis, status treatment, and responsive behavior without reclassifying the activity or replacing the interaction contract.

The JudgmentKit default design system selects `judgmentkit.workbench.operational-v1` automatically for a Workbench supplied by the caller or recommended with medium or high confidence. `surface_profile: "none"` opts out, while the exact profile id locks that supported version. The neutral low-confidence Workbench fallback selects no profile. External design systems receive no JudgmentKit profile fallback.
The JudgmentKit default design system selects `judgmentkit.workbench.operational-v1` automatically for a Workbench supplied by the caller or recommended with medium or high confidence. It selects `judgmentkit.artifact-inspector.v1` for a grounded Artifact Inspector. `surface_profile: "none"` opts out, while an exact profile id locks that version. The neutral low-confidence Workbench fallback selects no profile. External design systems receive no JudgmentKit profile fallback.

Artifact Inspector has scoped visual authority rather than whole-surface JudgmentKit authority. JudgmentKit governs the inspector chrome and inspection overlay; the rendered artifact preserves its declared external authority. Reviews must report owned-scope, artifact-preservation, and boundary results separately and must not describe the external artifact as JudgmentKit-conformant.

Profiles remain adapter-layer contracts. Runtime renderers, reusable components, product vocabulary, product geometry, and authorization truth stay with the implementing product.

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ JudgmentKit keeps the core deterministic and lets model assistance enter through
2. Deterministic review packet: turns that evidence into a reviewable activity model candidate with guardrails.
3. Model-assisted candidate review seam: accepts a model-proposed candidate through dependency injection or MCP and runs the same guardrails.
4. Provider-neutral proposer adapter: builds a serializable activity-model request for an injected model caller and returns the proposed candidate to the review seam.
5. Surface-type recommendation: classifies activity purpose as marketing, workbench, operator review, form flow, dashboard monitor, content/report, setup/debug tool, or conversation before workflow or frontend implementation guidance.
5. Surface-type recommendation: classifies activity purpose as marketing, workbench, operator review, artifact inspector, form flow, dashboard monitor, content/report, setup/debug tool, or conversation before workflow or frontend implementation guidance.
6. UI workflow candidate review seam: accepts a model- or agent-proposed workflow candidate and checks grounding, action support, handoff clarity, and disclosure containment before UI implementation.
7. UI implementation contract gate: creates or accepts the repo authority for approved primitives, control semantics, required states, static checks, and browser QA.
8. UI generation handoff gate: turns only ready workflow reviews plus an implementation contract into compact handoffs for the next UI generation pass.
9. Frontend generation context adapter: combines a ready handoff, selected surface type, frontend context, and verification expectations, then applies supported presentation guidance such as the default Workbench operational profile without making styling or component inventory part of the kernel contract.
9. Frontend generation context adapter: combines a ready handoff, selected surface type, frontend context, and verification expectations, then applies governed presentation guidance such as the supported default Workbench operational profile or the proposed Artifact Inspector profile contract without making styling or component inventory part of the kernel contract.
10. Frontend implementation skill context: compiles repo-local frontend skill guidance into a gated MCP packet for agents that cannot read local skills directly, including the active `implementation_contract.design_system_source` for tokens, typography, icons, and component contracts.
11. Optional provider adapters: provider configuration and network calls stay outside the kernel and feed proposed candidates back through the same review contract.

Expand Down Expand Up @@ -82,7 +82,9 @@ The canonical examples live beside it:

They cover setup/onboarding, an operational dashboard, and a high-stakes review/refund workflow. The renderer package is still deferred; these examples prove the contract and repair behavior before visual rendering.

By default, `implementation_contract.design_system_source.mode` is `judgmentkit_default`: tokens, font roles, icon catalog policy, component contracts, and supported surface-presentation profiles come from JudgmentKit `/design-system/` exports. A sufficiently grounded or explicitly selected Workbench receives `judgmentkit.workbench.operational-v1` in frontend-generation context by default; `surface_profile: "none"` opts out without changing the Workbench interaction contract. If a complete `design_system_adapter` is supplied to `create_ui_implementation_contract`, the mode becomes `external_design_system` and that adapter owns tokens, typography, icons, and renderer components. Incomplete external adapters fail instead of falling back to JudgmentKit defaults, and JudgmentKit surface profiles never cross that boundary implicitly.
By default, `implementation_contract.design_system_source.mode` is `judgmentkit_default`: tokens, font roles, icon catalog policy, component contracts, and supported surface-presentation profiles come from JudgmentKit `/design-system/` exports. A sufficiently grounded or explicitly selected Workbench receives `judgmentkit.workbench.operational-v1` in frontend-generation context by default. A grounded Artifact Inspector receives `judgmentkit.artifact-inspector.v1`, which keeps one rendered artifact primary while applying JudgmentKit guidance only to declared chrome and overlay scopes. `surface_profile: "none"` opts out without changing either interaction contract. If a complete `design_system_adapter` is supplied to `create_ui_implementation_contract`, the mode becomes `external_design_system` and that adapter owns tokens, typography, icons, and renderer components. Incomplete external adapters fail instead of falling back to JudgmentKit defaults, and JudgmentKit surface profiles never cross that boundary implicitly.

Artifact Inspector uses an explicit mixed-authority contract: `inspector_chrome` and `inspection_overlay` are JudgmentKit-owned, while `primary_artifact` remains `external_not_reviewed`. A chrome pass is never reported as conformance of the external artifact. Until trusted browser evidence separately proves owned-scope behavior, artifact preservation, and the declared cross-boundary interaction, implementation review remains `review_required`.

The default field-select composition contract is source-backed and documented in [`docs/select-field-composition.md`](https://github.com/mikeylong/judgmentkit/blob/main/docs/select-field-composition.md). It separates selected-value spacing, the reserved trailing indicator slot, and the indicator's placement inside that slot instead of treating a field's content padding as the chevron's physical edge inset.

Expand Down
Loading
Loading