feat: card-phase ergonomics stack (SDK, MCP, CLI, docs)#292
Merged
Conversation
…entory Expose get_phase_cards, get_phase_cards_count, get_phase_allowed_move_targets; extend create_card with phase_id and CreateCardInput.title; enrich get_pipe with start_form_phase and per-phase cards_count.
Address review on #281: get_pipe no longer surfaces the private start-form phase or adds an extra GraphQL round trip; cards_count stays on workflow phases via GET_PIPE_QUERY. Rename get_phase_cards_count_payload to get_phase with get_phase_cards_count delegating to it.
Align query and private helper names with get_phase, which returns the full phase row (id, name, cards_count), not a count-only projection.
Add get_phase_cards, get_phase_cards_count, get_phase_allowed_move_targets; phase cards/cards-count/allowed-moves CLI commands; clamp --first to 1-500; label hex validation on create_label/update_label via shared planner.
Move _merge_phase_and_start_form_field_values coverage to the create-card PR where the helper lands. Rename CLI commands to phase count and phase targets per review (action verb and returned entity naming).
Map get_phase not-found ValueErrors to NOT_FOUND in MCP and CLI phase count; dedupe cards page-size validation via shared helper; fix docstrings and registry comment.
…merge Agents can seed cards in orphan phases without execute_graphql; validate phase_id at boundary; fix title_warning to compare API response only.
Replace start_form_phase discovery paths with startFormPhaseId and update get_pipe inventory test to match the simplified SDK response.
Elicit start-form fields (not phase fields) on the interactive phase_id path, then merge programmatic phase values. Drop start-form phase inventory hints from get_pipe. Mirror MCP title_warning on pipefy card create.
…tring
Restore or {} when createCard is GraphQL null; anchor move-target hint to
create-then-move workflow per review feedback.
… CLI Fail fast on malformed ReportCardsFilter (including export paths); CLI label create/update uses normalize_label_color (#RGB expanded to #RRGGBB).
…dation Normalize integer query values to strings before ReportCardsFilter preflight; apply normalized filters on MCP paths. Share label name/color CLI validation; align filter-shape docstrings across all six report tools.
Python does not treat f-strings as docstrings, so the four report tools
documented via f"""...{_REPORT_FILTER_SHAPE_DOC}""" exposed empty MCP
descriptions. Inline the ReportCardsFilter guidance as plain literals and
add regression tests asserting non-empty descriptions and the
current_phase warning on all six filter paths.
Co-authored-by: Gabriel Custodio <gbrlcustodio@users.noreply.github.com>
Align validate_label_name_cli and validate_label_color_cli with validate_report_filter_cli so validation errors share the same format.
Update parity matrix, MCP reference, CHANGELOG, pipefy-pipes-and-cards skill (seed across phases; prefer dedicated tools over execute_graphql); README tool counts and ai-toolkit marketplace metadata.
Update pipes-and-cards reference, parity matrix, skill, and changelog after dropping start_form_phase from get_pipe and renaming SDK get_phase.
Reconcile README tool counts to 152; fix broken skill anchor; align parity/changelog/skill wording with CLI renames, label hex validator, and create_card field-merge behavior; add 0.2.0-beta.3 section.
Ownership repoint and homepage/repository fields already landed on main; revert PR-local edits so this stack does not regress owner metadata. Co-authored-by: Gabriel Custódio <gabriel.custodio@pipefy.com>
…counts) Fix card create CLI examples to use positional PIPE_ID; align phase_id vs skip_elicitation wording with MCP behavior; drop duplicate beta.3 changelog section; correct README domain counts; extend report filter parity notes; reword migration and reports skill per review.
…on at SDK boundary Report ReportCardsFilter preflight and label color normalization were decisions wired at twelve effect sites (six MCP report tools, six CLI commands). Move them into the SDK funnel they all forward through: ReportService create/update/export methods normalize the filter and raise ValueError with the planner message, and PipeConfigService create_label/update_label normalize the hex color. One decision point replaces twelve leaf guards; MCP returns the same error envelope via an explicit ValueError catch and the CLI maps ValueError to exit code 2 (typer.BadParameter for report commands), so messages and exit codes are unchanged. Also renames validate_report_cards_filter -> report_cards_filter_error to match its str|None return (error message or None). Co-authored-by: Gabriel Custodio <gbrlcustodio@users.noreply.github.com>
Restore CLI preflight at option-parse time using SDK planners so invalid input fails before get_authenticated_client. Extract prepare_report_cards_filter for shared use; rename stale tests; amend CHANGELOG and reports docs per review.
…on at SDK boundary (#291) refactor(sdk,mcp,cli): enforce report filter and label color validation at SDK boundary
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
Integrates the full card-phase ergonomics stack into
devafter sequential merge of PRs #281–#291.Included (stack PRs #281–#291)
create_card(phase_id, title),get_pipecards_countget_phase_cards, count, move targets)create_card --phase-idwith field mergeTest plan
uv run pytest -m "not integration"— 3096 passed on rebased refactor(sdk,mcp,cli): enforce report filter and label color validation at SDK boundary #291 head