Skip to content

chore: roadmap planning — 6 spec closures, 3 new roadmap specs, FSM short-circuit#33

Merged
darko-mijic merged 3 commits intomainfrom
specs/roadmap-planning
Mar 12, 2026
Merged

chore: roadmap planning — 6 spec closures, 3 new roadmap specs, FSM short-circuit#33
darko-mijic merged 3 commits intomainfrom
specs/roadmap-planning

Conversation

@darko-mijic
Copy link
Copy Markdown
Contributor

@darko-mijic darko-mijic commented Mar 6, 2026

Summary

  • 6 spec closures — retroactively completed fully-implemented specs that were still at roadmap status
  • 3 new roadmap specs — SetupCommand, MCPServerIntegration, MonorepoSupport
  • FSM short-circuit — process-api CLI bypasses pipeline for static FSM queries (~2x faster)
  • Decider fix — unlock-reason now bypasses FSM transition checks for existing files (not just new files)

Spec Closures

Spec Phase Change
ArchitectureDiagramAdvanced 23 roadmapcompleted (all deliverables terminal)
ArchitectureDiagramCore 23 roadmapcompleted (all deliverables terminal)
DocsConsolidationStrategy 35 roadmapcompleted (all 16 deliverables terminal)
StepLintExtendedRules 51 roadmapcompleted (all 6 deliverables terminal)
KebabCaseSlugs 44 roadmapcompleted (all 3 deliverables terminal)
RichContentHelpersTesting 44 roadmapcompleted (3 deliverables added + terminal)
DataAPIPlatformIntegration 25 roadmapcompleted (split into dedicated specs)

All closures use @libar-docs-unlock-reason:Retroactive-completion (or Split-into-dedicated-specs).

New Roadmap Specs

  • SetupCommand (Phase 45) — interactive npx @libar-dev/delivery-process init setup flow
  • MCPServerIntegration (Phase 46) — expose ProcessStateAPI as MCP server for Claude Code
  • MonorepoSupport (Phase 100, deferred) — cross-package config and scoped queries

Other Changes

  • TraceabilityGenerator spec rewritten to reflect codec architecture (Rule-to-Scenario cross-referencing via TraceabilityCodec)
  • FSM short-circuit in process-api.tstryFsmShortCircuit() dispatches directly to FSM modules for isValidTransition, getValidTransitionsFrom, checkTransition, getProtectionInfo without building the pipeline
  • Decider fix — removed isNewFile constraint from unlock-reason bypass in checkStatusTransitions(), enabling retroactive completions of existing files
  • lint-steps help text updated (8 → 12 rules)
  • INDEX.md broken link fixed (PUBLISHING.mdMAINTAINERS.md)
  • Deleted obsolete _claude-md/workflow/session-workflows.md

Test Plan

  • pnpm typecheck — no type errors
  • pnpm test — 8,104 tests pass (125 files)
  • pnpm lint — no lint errors
  • pnpm validate:all — 46/46 phases pass, 0 anti-patterns
  • Process Guard pre-commit hook passes for both commits

Summary by CodeRabbit

  • New Features

    • Added MCP server integration with JSON-RPC initialization, tool registration, and file watching support.
    • Introduced monorepo multi-package configuration with cross-package dependency tracking and per-package coverage reporting.
    • Added interactive setup command for project initialization with preset selection and automatic scaffolding.
    • Implemented FSM short-circuit optimization for static query methods.
  • Improvements

    • Extended lint rules with four new validation checks.
    • Updated validation logic to bypass FSM checks for files with unlock reasons.

… files

The decider previously only bypassed FSM checks for new files with
unlock-reason, blocking legitimate retroactive completions of existing
specs. This removes the isNewFile constraint, making unlock-reason a
universal FSM escape hatch for both new files and existing files.

Adds test scenario verifying existing file with unlock-reason bypasses
FSM check for roadmap → completed transition.
…hort-circuit

Spec closures (retroactive completions):
- ArchitectureDiagramAdvanced, ArchitectureDiagramCore → completed
- DocsConsolidationStrategy → completed (all 16 deliverables)
- StepLintExtendedRules → completed (all 6 deliverables)
- KebabCaseSlugs, RichContentHelpersTesting → completed
- DataAPIPlatformIntegration → completed (split into dedicated specs)

New roadmap specs:
- SetupCommand (Phase 45) — interactive project initialization
- MCPServerIntegration (Phase 46) — MCP server for Claude Code
- MonorepoSupport (Phase 100) — cross-package queries (deferred)

Other changes:
- TraceabilityGenerator spec rewritten for codec architecture
- FSM short-circuit in process-api CLI (~2x faster for static queries)
- lint-steps help text updated (8 → 12 rules)
- INDEX.md broken link fixed (PUBLISHING.md → MAINTAINERS.md)
- Deleted obsolete _claude-md/workflow/session-workflows.md
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

The PR marks multiple delivery process specifications as completed with unlock reasons, introduces new BDD specifications for MCP server integration, monorepo support, and setup command features, implements FSM short-circuiting in the CLI for static queries, adjusts process guard validation to bypass FSM checks when unlock reasons are present, and reorganizes documentation references from PUBLISHING to MAINTAINERS.

Changes

Cohort / File(s) Summary
Feature Spec Status Transitions
delivery-process/specs/architecture-diagram-advanced.feature, delivery-process/specs/architecture-diagram-core.feature, delivery-process/specs/step-lint-extended-rules.feature, delivery-process/specs/docs-consolidation-strategy.feature, tests/features/behavior/kebab-case-slugs.feature, tests/features/behavior/rich-content-helpers.feature
Marked as completed with retroactive-completion unlock reason; updated deliverables and layer ordering; added acceptance-criteria tags and background deliverables sections.
Feature Spec Dependency & Supersession Updates
delivery-process/specs/data-api-platform-integration.feature, delivery-process/specs/data-api-cli-ergonomics.feature, delivery-process/specs/traceability-enhancements.feature
Transitioned status to completed, marked MCP and FSM deliverables as superseded with cross-references to dedicated specs; added dependency annotations.
New Feature Specifications
delivery-process/specs/mcp-server-integration.feature, delivery-process/specs/monorepo-support.feature, delivery-process/specs/setup-command.feature
Introduced comprehensive BDD specifications for MCP server lifecycle integration, multi-package monorepo support with package-scoped filtering and cross-package dependency aggregation, and interactive setup command with preset detection and config scaffolding.
Traceability Codec Redesign
delivery-process/specs/traceability-generator.feature
Refactored from timeline-focused to rule-to-scenario cross-reference matrix; extended TraceabilityCodec to link Verified-by annotations with actual scenarios; added gap detection and coverage reporting.
FSM Short-Circuiting & Guard Logic
src/cli/process-api.ts, src/lint/process-guard/decider.ts
Implemented FSM short-circuit for static query methods (isValidTransition, checkTransition, getValidTransitionsFrom, getProtectionInfo) bypassing pipeline; updated status-transition validation to skip FSM checks when unlock-reason is present regardless of file newness.
Lint Rules Documentation
src/cli/lint-steps.ts
Added four new lint rule entries to help output: hash-in-step-text, keyword-in-description, outline-quoted-values, repeated-step-pattern.
Test Step Implementations
tests/steps/behavior/kebab-case-slugs.steps.ts, tests/steps/behavior/rich-content-helpers.steps.ts, tests/steps/validation/process-guard.steps.ts
Added Background destructuring to describeFeature calls; introduced background deliverables steps; added scenario for unlock-reason FSM bypass validation.
Process Guard Test Coverage
tests/features/validation/process-guard.feature
Added scenario validating that files with unlock-reason bypass FSM checks during status transitions.
Documentation Reorganization
docs/INDEX.md
Replaced PUBLISHING.md references with MAINTAINERS.md in navigation and table of contents.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested labels

specs - plan-level, specs - executable, feature-request

Poem

🐰 Through specs we hop and features grow,
From roadmap dreams to completed glow,
With monorepo paths and MCP streams,
Setup commands craft the developer's dreams,
Each unlock reason marks the way—
Retroactive completions light today!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: roadmap planning with 6 spec closures, 3 new specs, and FSM short-circuit implementation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch specs/roadmap-planning

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@delivery-process/specs/monorepo-support.feature`:
- Around line 69-90: Add an explicit edge-case scenario exercising overlapping
package globs: create a new Scenario (e.g., "Package field selects first
matching glob when globs overlap") that uses a multi-package config with two
overlapping globs (for example "packages/*" and "packages/platform-*") where the
config ordering is explicit, provide a source file path that matches both globs
(e.g., "packages/platform-core/src/events.ts"), scan and extract the file, and
assert the resulting ExtractedPattern.package equals the package from the
first-listed glob; name the scenario to complement the existing "Package field
is set from matching glob" and "Package field is undefined without packages
config" scenarios so behavior is unambiguous.
- Around line 41-58: The spec mixes config types by saying "packages without
their own `features` or `stubs` inherit from top-level `sources`;" update the
text and acceptance criteria to be explicit: state that PackageConfig entries
inherit top-level `sources` only for TypeScript/source globs (used to build the
total source set), and separately state whether `features` and `stubs` are
inherited from top-level (e.g., "packages without their own `features` or
`stubs` inherit top-level `features`/`stubs`" or "packages do not inherit
top-level `features`/`stubs` unless explicitly set"); then adjust the Scenario
"Multi-package config is parsed and validated" to assert the exact inheritance
behavior for `sources`, `features`, and `stubs` so the resolver behavior and
PackageConfig schema are unambiguous.

In `@delivery-process/specs/setup-command.feature`:
- Around line 80-81: Define the --yes behavior unambiguously by updating the
feature text and scenarios so that "--yes" explicitly skips all prompts and
defaults to overwriting existing files (i.e., resolves the
overwrite-confirmation conflict); change the sentence to "The --yes flag skips
all prompts and defaults to overwriting existing files" and update the scenarios
referencing overwrite-confirmation (the examples around lines noted in the
comment) to expect silent overwrite when --yes is present, and if you need the
opposite behavior add a separate flag (e.g., --no-overwrite or
--abort-on-conflict) with its own scenario instead of leaving --yes ambiguous.
- Around line 49-50: Update the init command invariant to detect
delivery-process.config.js as well as delivery-process.config.ts so the init
flow will prompt instead of writing a new config; specifically, modify wherever
the spec or safety-checks reference delivery-process.config.ts (the init command
and related checks mentioned in the comment) to include
delivery-process.config.js as an acceptable existing contract and update the
three other occurrences referenced (lines ~111-113 and ~132-136) to perform the
same check for .js as well as .ts.
- Around line 142-145: The spec currently makes the init command set
package.json's "type" to "module" by default; change it to preserve existing
package.json.module type unless the user explicitly opts into an ESM migration:
update the setup-command.feature scenario for the init command to remove the
default mutation of the "type" field and instead add an explicit prompt/flag for
ESM migration, ensure the acceptance criteria no longer require "type": "module"
to be present (remove that check from the scenario), and mention the recommended
flow using delivery-process.config.js + tsx wrappers as the default path.

In `@src/cli/lint-steps.ts`:
- Line 135: Update the CLI help text for the "keyword-in-description" lint rule
in lint-steps.ts so it matches the implemented checker: mention that description
lines starting with Given, When, Then, And, or But are flagged (the behavior is
implemented in src/lint/steps/feature-checks.ts). Locate the help/description
string for the "keyword-in-description" rule in lint-steps.ts and expand it to
list "And" and "But" alongside "Given/When/Then" so the CLI documentation
reflects the actual rule.

In `@src/cli/process-api.ts`:
- Around line 512-599: The short-circuit path (tryFsmShortCircuit) calls
fsmIsValidTransition, fsmGetValidTransitionsFrom and fsmGetProtectionSummary
without verifying the given status strings, which leads to runtime crashes or
invalid returns; fix by checking that the provided status keys exist in the FSM
valid-status map (VALID_TRANSITIONS) before calling those helpers and throw a
QueryApiError('INVALID_ARGUMENT', '<usage>') when unknown. Specifically: in
tryFsmShortCircuit before calling fsmIsValidTransition (case
'isValidTransition') verify VALID_TRANSITIONS[from] and VALID_TRANSITIONS[to];
before returning fsmGetValidTransitionsFrom (case 'getValidTransitionsFrom')
validate VALID_TRANSITIONS[status]; and before calling fsmGetProtectionSummary
(case 'getProtectionInfo') validate VALID_TRANSITIONS[status]; keep the existing
usage strings and reuse fsmValidateTransition for the 'checkTransition' case
which already validates.

In `@src/lint/process-guard/decider.ts`:
- Around line 301-303: The unconditional skip on transition.hasUnlockReason in
decider.ts is too broad; instead of always continuing when
transition.hasUnlockReason === true, gate the bypass to only the
retroactive-completion path and only when the unlock reason has been validated
by derive-state.ts (the non-placeholder / length check done after
detect-changes.ts). Update the logic in the function that evaluates transitions
(referencing transition.hasUnlockReason and checkProtectionLevel()) to: 1)
consult the derived validation flag produced in derive-state.ts (e.g., a field
like transition.unlockReasonValidated or fileState.unlockReasonValid) rather
than the raw presence bit from detect-changes.ts, and 2) only allow the FSM
bypass when the transition target is the retroactive completion route to
completed (not for arbitrary transitions). Leave checkProtectionLevel() behavior
unchanged for terminal exemptions. This ensures only validated unlock reasons on
the retro-complete path skip the FSM check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 784699b8-b6a4-438d-a296-d81621a3f2dc

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd9dc4 and 12ae696.

⛔ Files ignored due to path filters (1)
  • _claude-md/workflow/session-workflows.md is excluded by none and included by none
📒 Files selected for processing (21)
  • delivery-process/specs/architecture-diagram-advanced.feature
  • delivery-process/specs/architecture-diagram-core.feature
  • delivery-process/specs/data-api-cli-ergonomics.feature
  • delivery-process/specs/data-api-platform-integration.feature
  • delivery-process/specs/docs-consolidation-strategy.feature
  • delivery-process/specs/mcp-server-integration.feature
  • delivery-process/specs/monorepo-support.feature
  • delivery-process/specs/setup-command.feature
  • delivery-process/specs/step-lint-extended-rules.feature
  • delivery-process/specs/traceability-enhancements.feature
  • delivery-process/specs/traceability-generator.feature
  • docs/INDEX.md
  • src/cli/lint-steps.ts
  • src/cli/process-api.ts
  • src/lint/process-guard/decider.ts
  • tests/features/behavior/kebab-case-slugs.feature
  • tests/features/behavior/rich-content-helpers.feature
  • tests/features/validation/process-guard.feature
  • tests/steps/behavior/kebab-case-slugs.steps.ts
  • tests/steps/behavior/rich-content-helpers.steps.ts
  • tests/steps/validation/process-guard.steps.ts

Comment on lines +49 to +50
**Invariant:** The init command reads the target directory for package.json,
tsconfig.json, delivery-process.config.ts, and monorepo markers before prompting
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Detect existing delivery-process.config.js before writing a new config.

The safety checks only look for delivery-process.config.ts. In a repo already using delivery-process.config.js, init can miss the existing contract and create a second config instead of prompting.

♻️ Suggested spec adjustment
-    tsconfig.json, delivery-process.config.ts, and monorepo markers before prompting
+    tsconfig.json, delivery-process.config.ts or delivery-process.config.js, and
+    monorepo markers before prompting
...
-      Given a directory with an existing delivery-process.config.ts
+      Given a directory with an existing delivery-process.config.ts or
+      delivery-process.config.js
Based on learnings, `Use delivery-process.config.ts or .js as the main integration contract and keep scripts thin wrappers around package CLIs`.

Also applies to: 111-113, 132-136

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@delivery-process/specs/setup-command.feature` around lines 49 - 50, Update
the init command invariant to detect delivery-process.config.js as well as
delivery-process.config.ts so the init flow will prompt instead of writing a new
config; specifically, modify wherever the spec or safety-checks reference
delivery-process.config.ts (the init command and related checks mentioned in the
comment) to include delivery-process.config.js as an acceptable existing
contract and update the three other occurrences referenced (lines ~111-113 and
~132-136) to perform the same check for .js as well as .ts.

… FSM input

- Scope unlock-reason FSM bypass to validated reasons targeting completed only
  (was unconditionally bypassing on raw presence bit from detect-changes)
- Add parseProcessStatus() to validate CLI input before FSM short-circuit calls
  (invalid status values previously caused runtime TypeError crashes)
- Expand keyword-in-description help text to include And/But keywords
- Clarify monorepo config inheritance wording and add overlapping globs scenario
- Detect .config.js alongside .config.ts in setup-command spec
- Resolve --yes vs overwrite conflict with --force flag for destructive ops
- Make type:module opt-in via --esm flag instead of default mutation
@darko-mijic darko-mijic merged commit c784377 into main Mar 12, 2026
3 checks passed
@darko-mijic darko-mijic deleted the specs/roadmap-planning branch March 12, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant