feat: session management extended — complete interview requirements#6
Merged
feat: session management extended — complete interview requirements#6
Conversation
- Move glossary.md, product-definition.md, system.md → docs/spec/ - Convert product-definition.md to product_definition.md with template sections (Quality Attributes, Project Conventions, Deployment, Branch Strategy) - Convert system.md to template format (C4 levels, Domain Model Documentation, Delivery section, Changes table) - Convert branding.md → docs/branding/branding.md with template format - Rename ADR files from ADR-YYYY-MM-DD-slug.md → ADR_YYYYMMDD_slug.md and add Risk Assessment section to each ADR - Convert scope_journal.md → docs/interview-notes/ IN_YYYYMMDD_slug.md files (5 separate session files with template format) - Rename flow-definition-spec.md → flow_definition_spec.md (snake_case) - Update all cross-references (CHANGELOG, index.html, scripts, knowledge, skills) - Update update_index_html.py to parse ADR_YYYYMMDD_slug.md naming
- Add cli-flow-name-resolution feature (7 BDD scenarios, test stubs) - Add session-management (core) feature (8 BDD scenarios, test stubs) - Add session-management-extended feature (ELICITING, 10 scenarios) - Add infrastructure: config.py, session_store.py, resolution.py, session_cmd.py - Add domain: Session, SessionStackFrame dataclasses - Add discovery artifacts: interview notes, domain model, context map, technical design, glossary updates, product definition updates - Add post-mortems for flow protocol violations - Update system.md with Session Tracking and FlowNameResolution contexts
… reviewer requests
…psed into single task
Implement CLI flow name resolution so that short flow names (e.g. 'feature-development-flow') resolve to their YAML files in the configured flows_dir, matching the session store's identifier scheme. - DefaultFlowNameResolver: file-path-first, then name lookup with .yaml extension handling; raises FlowNameNotFoundError with clear message - --flows-dir global flag overrides pyproject.toml flows_dir - Exit code 1 for flow not found (was incorrectly 2/usage error) - flow_file arg changed from type=Path to plain string to accept names Refs: docs/features/backlog/cli-flow-name-resolution.feature (@id: a1b2c3d4, e5f6g7h8, i9j0k1l2, m3n4o5p6, q7r8s9t0, u1v2w3x4, y5z6a7b8)
…are transition Implement core session management for the flowr CLI: - session init <flow>: creates session at flow's initial state, resolves flow names via FlowNameResolver, persists to YAML with atomic writes - session show: displays current session state (flow, state, stack, timestamps) with --format yaml|json output - session set-state <state>: updates session state, validates against flow - --session [<name>] on transition: resolves flow+state from session, performs transition, auto-updates session; push/pop stack for subflows Architecture: SessionStore Protocol in domain layer (hexagonal port), YamlSessionStore adapter in infrastructure layer. Session dataclass with immutable update methods (with_state, push_stack, pop_stack). Refs: docs/features/backlog/session-management.feature (@id: a1b2c3d4, i9j0k1l2, m3n4o5p6, u1v2w3x4, c9d0e1f2, o1p2q3r4, s5t6u7v8, w9x0y1z2)
…ped bookkeeping - Move cli-flow-name-resolution.feature from backlog/ to completed/ - Move session-management.feature from backlog/ to completed/ - Add PM_20260502_flow-bookkeeping-skipped: agent completed features but skipped flow transitions, file moves, and acceptance gates
…e-paths partially implemented without traceability
Implement the Config introspection rule from configurable-paths feature (@id: 2e301322, 36d41122, 9d4c4973): - flowr config: shows resolved config keys with sources - flowr config --json: JSON output of config keys, values, and sources - resolve_config_with_sources(): tracks source of each config value - Refactored config.py: extracted helpers for readability Refs: docs/features/backlog/configurable-paths.feature (@id: 2e301322, 36d41122, 9d4c4973)
…t stakeholder approval
…xt/check, session path resolution Adds the remaining session-management capabilities to complete the original interview requirements (IN_20260501_session-management): - session list subcommand (@id: q7r8s9t0_list) - --session on next command (@id: e7f8g9h0) - --session on check command (@id: i1j2k3l4) - --format json on session show (@id: m3n4o5p6_json) - session init --name explicit (@id: e5f6g7h8) - session set-state validation (@id: g3h4i5j6) - session show not-found error (@id: y5z6a7b8_err) - session set-state not-found error (@id: k7l8m9n0_err) - config default session dir (@id: m5n6o7p8) - config flow name resolution for init (@id: q9r0s1t2) Also adds session path resolution: --session and --name accept both short names and file paths, mirroring the flow name resolution pattern.
- Add unit tests for session commands, session store, config, and output formatting - Add pragma: no cover for unreachable Protocol stubs, Python version fallbacks, and main() dispatch paths covered by integration tests - Fix lint: UP017 (datetime.UTC), DOC201/DOC501 (docstrings), COM812 (trailing commas), PLW1514 (encoding), D104 (package docstring) - Rename unused parameters with underscore prefix (ARG001)
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the session-management feature by implementing all remaining requirements from IN_20260501_session-management that were deferred to "session-management-extended":
session list— lists all sessions with name/flow/state/updated_at, supports--format yaml|json--sessiononnext— read-only session resolution for transition queries--sessiononcheck— read-only session resolution for state inspection--format jsononsession show— JSON output option--sessionand--nameaccept both short names and file paths (mirrors flow name resolution pattern)sessions_dirfrom pyproject.toml, flow name resolution forsession initThis completes all 18 @id examples from the original session-management interview (8 core + 10 extended).
Test plan
ruff checkandruff format --checkpass on changed files--sessionon next/check (new)session list(new)--format jsonon session show (new)