Overview
A practice is a built-in prompt module. Each practice adds its own instructions to the live discourse prompt, the post-session Pattern synthesis prompt and the summary prompt, and may define structured output that is sanitised and stored in its own tables. Sessions can carry up to three practices. They compose in registry order, independent of selection order. A session with no practices keeps byte-identical prompts to the pre-practices baseline (protected by tests).
Facilitators choose practices on the session setup wizard (create and edit). Session type only drives suggestions, not pipeline behaviour on its own.
Framework
Implementation lives inapi/crates/core/src/practice/:
Practiceenum andPracticeModuletrait (label,description,suggested_for, directives, optionaloutput_schema).compose_pattern_block,compose_summary_block,compose_output_schemafor prompt assembly.sanitise_and_persistper module (called from Pattern synthesis afterpractice_outputsare returned).render_summary_sectionsappended when a session summary is read (independent of the summarisation job).
api/crates/core/src/session_practices/ and api/crates/api/src/routes/session/session_practices_routes.rs.
Redis publishes kair:session_practices when work items change so the session UI can refresh.
Product Feature
Purpose: turn product discussion into a triage-ready list of features, improvements and bugs, each grounded in transcript evidence. Work item kinds:feature, improvement, bug.
Common fields: title, area, origin (stated | inferred), reception, priority signal, raised_by, evidence (verbatim excerpt + start_time_seconds), optional pattern_card_key, confidence, suggested labels.
Kind-specific body (stored in JSONB, validated on read): user story / problem / proposal / acceptance criteria for features; current and desired behaviour for improvements; observed / expected behaviour and reproduction context for bugs.
Sanitisation highlights (product_feature.rs):
- Drops items without grounded evidence.
- Caps inferred items at three.
- Merges duplicates by normalised title (
card_keys_match). - Regeneration merge respects
edited_by_useranddismissed/exportedrows.
ui/src/lib/workItems/renderWorkItem.ts), pattern canvas badge when a card links to items.
Project Clarifier
Purpose: surface initiatives that deserve their ownproject (or event) workspace, pre-fill onboarding from the transcript, and create a workspace plus Origin brief in one confirmed step.
Candidate fields: name, pitch, maturity (idea | shaped | committed), champions, onboarding answers (template ids from onboarding_template), clarifying questions, pattern card keys.
Onboarding template is server-side (context.rs); the create-project modal reuses OnboardingEditor.
Create project: POST /sessions/:session_id/project-candidates/:id/create-workspace with placement (child_project, child_event, top_level_project) and carry-forward sections for the Origin brief. See shaping notes in agent-os/specs/2026-09-24-1200-session-practices/shape.md.
Adding a practice
- Add a Postgres enum value on
practice(migrationALTER TYPE ... ADD VALUE). - Add a
Practicevariant and a module implementingPracticeModule. - Register the module in
registry()in fixed order. - Implement
sanitise_and_persistandrender_summary_sections. - Wire
practice_outputssanitisation inpractice/mod.rspersist_practice_outputs. - Expose the key via
GET /practicesand add wizard copy inui/src/lib/i18n/locales/*.json.
Reference evaluation
Hand-labelled synthetic fixtures and metric code live under:- Fixtures:
api/crates/core/eval/session_practices/fixtures/ - Scoring:
api/crates/core/src/practice/evaluation.rs
Product Feature metrics
Fixture:
syn_product_team_export_work_items.json.
Project Clarifier metrics
Fixtures (one per session type):
syn_meeting_playground_candidates.json, syn_assembly_garden_candidates.json, syn_interview_mobility_candidates.json.
No-practice regression
practice::evaluation::discourse_reference_suite_unchanged_without_practices asserts live and synthesis discourse prompts match when the practice block is empty. The moderator eval-discourse fixture suite runs without practices; re-run it when changing discourse prompts:
api/crates/summarisation/src/summary_prompt.rs (empty_practice_block_is_byte_identical).
Related docs
- Summary health evaluation (summary job quality; practice sections are composed at read time)
- Moderator discourse agent (live and synthesis prompts accept practice blocks)
- Shaping spec:
agent-os/specs/2026-09-24-1200-session-practices/shape.md