Skip to content

LCORE-1736 feature design process improvements#1695

Open
max-svistunov wants to merge 5 commits intolightspeed-core:mainfrom
max-svistunov:lcore-1736-feature-design-process-improvements
Open

LCORE-1736 feature design process improvements#1695
max-svistunov wants to merge 5 commits intolightspeed-core:mainfrom
max-svistunov:lcore-1736-feature-design-process-improvements

Conversation

@max-svistunov
Copy link
Copy Markdown
Contributor

@max-svistunov max-svistunov commented May 6, 2026

Description

Refactor of the feature design process (spikes, spec docs, JIRA filing) based on team's feedback and based on spikes I've done.

Foundation: two-tier config

  • docs/contributing/feature-design.config — team-policy conventions (~50 settings across paths, branching, doc structure, decision presentation, PoC behavior, JIRA conventions, reviewer defaults, finalize behavior, output style, config-application UX). Read by /spike, /spec-doc, /spike-finalize. Includes a new remind_about_google_doc_after_merge setting.
  • .feature-design.config.local.example.feature-design.config.local (gitignored) — per-developer overrides. Sparse subset of the team file.
  • Adopts a third value if_applicable alongside yes/no for include flags. Means: the agent decides whether to include based on whether the feature actually has the concern (e.g., include_security_considerations = if_applicable).

Templates

  • templates/spike-template.md: three audience sections (Strategic / Technical / Stakeholder; Stakeholder is if_applicable); confidence required per recommendation; required Out-of-scope section; e2e kickoff Story (write .feature files, no implementation) and step-definitions Task counterpart pre-filled as the first two proposed JIRAs; new if_applicable sections for PoC findings, incidental findings, proposed incidental JIRAs, external input needed, glossary.
  • templates/spec-doc-template.md: new always-on Acceptance test surface section (maps R1..Rn → observable behaviors; feeds the e2e-kickoff JIRA's feature files); 12-item Aspect-specific concerns group, all if_applicable (Latency/Cost, Observability, Capacity planning, Failure modes, Security, Migration/backcompat, Telemetry/data privacy, Feature flags/rollout, Runbook/oncall, Internationalization, API versioning, Rate limiting/quotas); architecture sub-sections marked if_applicable; Open Questions traceability requirement (each item must trace back to its origin).

Howtos

  • howto-organize-poc-output.md rewritten from a rigid numbered-file scheme (which fit the conversation-compaction PoC but not code-PoCs) to principles, with two illustrative shapes (code PoC vs data/experimental). No prescribed filenames.
  • howto-run-a-spike.md: Configuration paragraph, three-audience guidance, confidence and Out-of-scope requirements, e2e-kickoff convention, new step 11 (Finalize after merge) pointing at /spike-finalize, updated checklist.
  • howto-write-a-spec-doc.md: Configuration paragraph; documents the new Acceptance test surface and aspect-specific concerns sections; Open Questions traceability.

Skills

  • /spike (.claude/commands/spike.md): reads both config files at start; announces config files loaded, actively-honored non-default settings, and items changed since last session (per config_announcement_at_start = notable); maintains a state file at .claude/feature-design.last-seen for change detection; honors on_dirty_working_tree (default ask — describes the situation and asks about worktree / move-aside / stop / proceed); honors decision_presentation_cadence (default mixed); includes the e2e kickoff Story + step-definitions Task as the first two proposed JIRAs; uses TaskCreate/TaskUpdate for spike phase tracking; reminds about /spike-finalize at PR-open time.
  • /spike-finalize (.claude/commands/spike-finalize.md, new): replaces LCORE-???? placeholders with real keys from jiras/ metadata; verifies the spike doc and spec doc don't drift on resolved decisions; greps for orphan LCORE-???? references; checks poc-results/ was removed before merge; reminds the user to create Google Docs versions of the spike + spec docs (per remind_about_google_doc_after_merge).

Guide

  • docs/contributing_guide.md: adds step 6 (/spike-finalize) to the Feature design process flow; points at the new config files.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: Claude Opus 4.7 (1M context)
  • Generated by: Claude Opus 4.7 (1M context)

Related Tickets & Documents

  • Related Issue # LCORE-836 (spike that surfaced these improvements; landed first)
  • Closes # LCORE-1736

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

This PR changes only documentation, configuration files, and Claude Code skill definitions (Markdown files under .claude/commands/). No source code paths are affected; no unit or integration tests apply.

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added configuration system for feature design workflows with local override support
    • Enhanced spike and spec documentation with restructured templates and expanded guidance
    • Introduced post-merge finalization workflow with drift verification and cleanup steps
    • Reorganized PoC artifact organization principles for greater flexibility
  • Chores

    • Updated gitignore to support per-developer configuration files

Introduce a two-tier configuration for the feature design process:

- docs/contributing/feature-design.config — team-policy conventions
  (mostly read-only for individual contributors). Defines section
  inclusion (yes / no / if_applicable), naming patterns, branching
  policy, decision-presentation cadence, PoC behavior, JIRA conventions
  including the e2e-kickoff + step-definitions defaults, reviewer
  defaults (@sbunciak strategic, @tisnik technical), config-application
  UX, and the new remind_about_google_doc_after_merge setting.

- .feature-design.config.local.example — template for per-developer
  overrides. The actual .feature-design.config.local at the repo root
  is gitignored. Settings unset locally fall through to the team file.

The third value `if_applicable` joins `yes`/`no` for include flags. It
signals "the agent decides based on whether the feature actually has
this concern" — useful for sections like security, observability,
capacity planning, latency/cost, etc.
Apply the conventions from docs/contributing/feature-design.config to
the templates, howtos, and the top-level contributing guide.

Spike template (templates/spike-template.md):
- Three audience sections (Strategic / Technical / Stakeholder); the
  Stakeholder section is `if_applicable` and removed when the feature
  did not originate from a named team.
- Confidence required per recommendation (numeric or qualitative per
  config).
- Out-of-scope section is required.
- E2E kickoff Story (write feature files, no implementation) and
  step-definitions Task counterpart are pre-filled stubs as the first
  two proposed JIRAs (per `require_e2e_kickoff_jira` and
  `require_e2e_step_definitions_jira`).
- New sections (`if_applicable`): PoC findings, incidental findings,
  proposed incidental JIRAs, external-input-needed, glossary.

Spec doc template (templates/spec-doc-template.md):
- Acceptance test surface section (always present) — feeds the e2e
  kickoff JIRA's feature-file authoring.
- Aspect-specific concerns regrouped: Latency/Cost, Observability,
  Capacity planning, Failure modes, Security, Migration/backcompat,
  Telemetry/data privacy, Feature flags/rollout, Runbook/oncall,
  Internationalization, API versioning, Rate limiting/quotas — all
  `if_applicable`.
- Architecture sub-sections (Trigger mechanism, Storage, Configuration,
  API changes, Error handling, Security, Migration) marked
  `if_applicable` rather than always-present.
- Open Questions traceability requirement: each item must trace back
  to its origin (spike decision, PoC finding, or reviewer comment).

Howtos:
- howto-run-a-spike.md gains a Configuration paragraph, three-audience
  guidance, confidence and out-of-scope requirements, the e2e-kickoff
  convention, a new step 11 ("Finalize after merge") pointing at
  /spike-finalize, and an updated checklist.
- howto-write-a-spec-doc.md gains a Configuration paragraph and
  describes the new Acceptance test surface and aspect-specific
  concerns sections; Open Questions traceability is documented.
- howto-organize-poc-output.md is rewritten from a rigid numbered-file
  scheme to principles. Covers two common PoC shapes (code PoC vs
  data/experimental) without prescribing filenames.

Top-level guide (docs/contributing_guide.md):
- Adds step 6 (`/spike-finalize`) to the Feature design process flow.
- Points readers at the new feature-design.config and
  .feature-design.config.local files.
/spike (.claude/commands/spike.md):
- Reads docs/contributing/feature-design.config and (if present)
  .feature-design.config.local at session start.
- Announces config files loaded, plus actively-honored non-default
  settings and items changed since last session, per
  `config_announcement_at_start` (default `notable`).
- Maintains a state file at `config_state_file` (default
  `.claude/feature-design.last-seen`) for change detection.
- May propose one-shot or persistent config changes mid-session if
  `agent_may_suggest_config_changes_during_work = yes` (default).
- Honors `on_dirty_working_tree` (default `ask`): describes the
  situation and asks whether to use a worktree, move untracked files
  aside, stop, or proceed. Confirms branch name before creating.
- Honors `decision_presentation_cadence` (default `mixed`): per-decision
  for strategic, batched for technical.
- Includes the e2e kickoff Story and step-definitions Task as the first
  two proposed JIRAs by default.
- Uses TaskCreate/TaskUpdate to track spike phases.
- Reminds the user about /spike-finalize at PR-open time.

/spike-finalize (.claude/commands/spike-finalize.md, new):
- Replaces LCORE-???? placeholders in the spike doc with real keys
  read from the filed-tickets metadata under jiras/.
- Verifies the spike doc and spec doc don't drift on the resolved
  decisions.
- Greps for orphan LCORE-???? references across both docs.
- Reminds about removing poc-results/ if it wasn't already cleaned up.
- Reminds the user to create Google Docs versions of the spike and
  spec docs (per `remind_about_google_doc_after_merge = yes`).
Six small refinements to the feature design process, applied before
opening the LCORE-1736 PR. Each is small; together they cover the
follow-up feedback from the review of the original LCORE-1736 changeset.

1. Trim ### Test patterns subsection in spec-doc-template
   The 5-bullet generic list (pytest framework, AsyncMock pattern, etc.)
   duplicated the project-wide testing conventions in CLAUDE.md.
   Replaced with a one-line pointer to CLAUDE.md and a TODO for
   feature-specific test considerations only.

2. Trim ### Config pattern subsection in spec-doc-template
   Same shape of duplication: the ConfigurationBase / extra="forbid" /
   Field()/@model_validator note is in CLAUDE.md's Configuration
   section. Replaced with a pointer plus a TODO for feature-specific
   config schemas.

3. Add "Tools used to create PR" section to spike-pr-template
   Spike PRs are typically heavy on AI assistance; transparency
   warrants the same Assisted-by/Generated-by note that the project's
   default PR template carries. Adopted just this section from the
   project default; deliberately did NOT pull in the broader project
   PR template's Type-of-change/Checklist/Testing sections (those
   don't fit the spike PR shape, and the spike-pr template already
   carries its own structured asks).

4. Two new aspect sections in spec-doc-template (per A5 defaults)
   - "Migration tool patterns": invocation/semantics of any user-facing
     migration tool that ships with the feature
   - "Rollout / deployment plan": rollout sequence (distinct from the
     existing "Feature flags / rollout" which is the flag mechanism)
   Both registered as `if_applicable` in feature-design.config.

5. Spike-type-specific PoC notes (per A5 defaults)
   Added two short subsections to howto-organize-poc-output.md:
   - "Performance-focused spikes": include benchmark methodology, raw
     measurements, baseline comparison
   - "Security-focused spikes": include threat model, attack scenarios,
     coordinate with security reviewer on what's public vs restricted

6. Branch-naming consolidation
   feature-design.config is now the canonical source for the
   spike-specific branch name pattern. Renamed the placeholder from
   `{slug}` to `{short-description}` for clarity. Updated
   howto-run-a-spike.md step 1 to point at the config rather than
   restate the convention. Project CLAUDE.md retains the broader
   non-spike branch convention (`lcore-XXXX-short-description`); the
   spike pattern is now its extension.

7. Spike↔spec doc coupling exhortation
   Added to /spike and /spec-doc skills: whenever a non-trivial update
   is made to either doc (decision change, PoC finding integrated,
   reviewer override, open question resolved), the agent must check
   whether the other doc needs a corresponding update and propose it
   in the same turn. Drift is the most common process failure that
   /spike-finalize has to fix retroactively; cheaper to prevent.
…nt conventions

Retroactive update of the reference spike doc
(docs/design/conversation-compaction/conversation-compaction-spike.md) so
that it teaches the conventions documented in
docs/contributing/feature-design.config and
docs/contributing/templates/spike-template.md.

Changes that were safe to apply:

1. Audience-section header rename
   - "Decisions for @ptisnovs and @sbunciak" → "Strategic decisions — for @ptisnovs and @sbunciak"
   - "Technical decisions for @ptisnovs" → "Technical decisions — for @ptisnovs"

2. Confidence value added for Decision 2
   The conversation transcript explicitly states: "Confidence: 85% that
   additive-first is better for production". Added as a quoted
   provenance line under the Decision 2 recommendation. Confidence
   values for other decisions could not be reliably recovered from the
   transcript and are left absent rather than fabricated.

3. JIRA placeholders → real ticket keys (LCORE-1569..LCORE-1575)
   The original 7 proposed JIRAs were filed as LCORE-1569..LCORE-1575
   but the spike doc retained the LCORE-???? placeholders. Replaced
   each placeholder with the filed key. Noted the title rename for
   LCORE-1574 (filed as "Integration tests" rather than the original
   "Verify test coverage").

4. E2E kickoff Story + step-definitions Task stubs added at the top of
   Proposed JIRAs
   Reflect the post-spike convention. Stubs include a reconciliation
   note pointing at the existing LCORE-1673 ("E2E tests for
   conversation compaction") which holds e2e work as a single ticket;
   reconciliation between LCORE-1673 and these stubs is pending
   coordination (left to the user / @ptisnovs).

5. Header note in the Overview section explaining the retroactive
   update.

Changes deliberately not applied (per honest assessment):

- Out-of-scope section: the spike conversation transcript did not
  contain explicit defer/scope statements that could be reliably
  attributed to the spike author. Adding speculative content would
  risk misrepresenting the original spike.
- Confidence values for Decisions other than Decision 2: not
  recoverable from the transcript without intensive search; better
  absent than fabricated.
- Heading-level demotion (H1→H2 throughout): purely structural; the
  doc as it stands is readable and aligned in spirit with the new
  template even if the literal heading levels differ.

The spike doc remains the deliverable for LCORE-1314; this update
adjusts how it presents itself, not what it decided.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

This PR establishes a comprehensive feature-design workflow system, introducing configuration files, process documentation, practical how-to guides, and document templates to standardize spike and spec-doc development practices. It applies the new workflow to an existing spike document as a concrete example.

Changes

Feature-Design Workflow System

Layer / File(s) Summary
Configuration Schema
docs/contributing/feature-design.config, .feature-design.config.local.example, .gitignore
Team-wide configuration schema defined with path conventions, branching rules, document sections, review defaults, and UX settings. Local per-developer overrides supported via .feature-design.config.local (gitignored).
Core Process Commands
.claude/commands/spike.md, .claude/commands/spec-doc.md, .claude/commands/spike-finalize.md
Structured process workflows for spike development (configuration loading, JIRA fetching, branch/worktree checks, decision presentation, task tracking, doc coupling, finalization) and spec-doc coupling policy documented.
How-To Guides & Developer Documentation
docs/contributing/howto-run-a-spike.md, docs/contributing/howto-write-a-spec-doc.md, docs/contributing/howto-organize-poc-output.md, docs/contributing_guide.md
Practical guides added with configuration sections, flexible branch naming, finalization workflows, expanded checklists, and principle-first PoC organization guidance. Contributing guide updated with new steps 5-6 for post-merge finalization.
Document Templates
docs/contributing/templates/spike-template.md, docs/contributing/templates/spec-doc-template.md, docs/contributing/templates/spike-pr-template.md
Spike template restructured with Strategic/Technical/Stakeholder decision sections, confidence metrics, and glossary. Spec-doc template expanded with concrete Architecture subsections (Trigger, Data model, Configuration), API changes, error handling, migration, Acceptance test surface, and Aspect-specific concerns. Spike PR template augmented with "Tools used to create PR" section.
Real-World Application & Integration
docs/design/conversation-compaction/conversation-compaction-spike.md
Existing spike doc refactored to demonstrate new workflow: decisions renamed to Strategic/Technical, confidence metric added, PoC results restructured, and JIRA-driven workstreams (LCORE-1570 through LCORE-1575) introduced with scope, acceptance criteria, and agentic instructions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "LCORE-1736 feature design process improvements" accurately summarizes the main change: comprehensive improvements to the feature design process, covering configuration, templates, documentation, and Claude skills.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants