Skip to content

Decompose roadmap task for CLI and daemon work#7

Merged
leynos merged 2 commits intomainfrom
codex/update-roadmap-with-sub-tasks-for-weaver-cli
Oct 5, 2025
Merged

Decompose roadmap task for CLI and daemon work#7
leynos merged 2 commits intomainfrom
codex/update-roadmap-with-sub-tasks-for-weaver-cli

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Oct 4, 2025

Summary

  • break down the Phase 1 roadmap entry for implementing weaver-cli and weaverd into scoped sub-tasks covering configuration, CLI behaviour, daemon bootstrap, process management, and lifecycle commands.

Testing

  • make fmt (fails: existing markdownlint violations in docs/weaver-design.md)

https://chatgpt.com/codex/tasks/task_e_68e05c9ac038832289ec9dfc2118b8fa

Summary by Sourcery

Decompose the Phase 1 roadmap entry into scoped sub-tasks for configuration, CLI behaviour, daemon bootstrap, process management, and lifecycle commands, and align checklist formatting across all roadmap phases.

Documentation:

  • Break down Phase 1 roadmap into discrete checklist items for shared configuration, CLI executable, daemon bootstrap, daemonisation, and lifecycle commands
  • Normalize list formatting and indentation for roadmap entries across phases 1–4

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Oct 4, 2025

Reviewer's Guide

This PR restructures the Phase 1 roadmap entry in docs/roadmap.md by breaking down broad CLI and daemon goals into fine‐grained subtasks covering configuration, CLI behavior, daemon bootstrap, process management, and lifecycle commands, while also normalizing markdown list formatting and indentation throughout the document.

Class diagram for new and updated CLI/daemon components in roadmap

classDiagram
    class WeaverConfig {
      +schema
      +mergeConfigFiles()
      +environmentOverrides()
      +cliFlags()
    }
    class WeaverCLI {
      +initialiseConfig()
      +probeCapabilities()
      +streamRequests()
      +lifecycleCommands()
    }
    class Weaverd {
      +bootstrap()
      +consumeConfig()
      +startBackends()
      +superviseBackends()
      +structuredLogging()
      +errorReporting()
      +daemonise()
      +processManagement()
      +healthChecks()
      +gracefulShutdown()
    }
    WeaverCLI --> WeaverConfig : uses
    Weaverd --> WeaverConfig : uses
Loading

File-Level Changes

Change Details Files
Decompose Phase 1 roadmap entry into detailed sub-tasks
  • Define shared configuration schema using ortho-config
  • Implement weaver-cli as a JSONL client over stdio with --capabilities probe
  • Implement weaverd bootstrap with lazy backend startup and structured logging
  • Add daemonisation and process management (daemonize-me, PID/lock files, health checks, signal shutdown)
  • Provide CLI lifecycle commands (daemon start/stop/status) with socket checks and error handling
docs/roadmap.md
Normalize markdown formatting and list indentation
  • Convert unchecked items to consistent hyphen-prefixed lists
  • Wrap goal descriptions across lines for readability
  • Adjust indentation for nested list items to match style guidelines
docs/roadmap.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 4, 2025

Summary by CodeRabbit

  • Documentation
    • Expanded roadmap with detailed, step-by-step plans across Phases 1–4, replacing placeholders with concrete deliverables and acceptance criteria.
    • Clarified MVP sequencing, including configuration, CLI/daemon lifecycle, and security/sandboxing emphasis.
    • Standardised wording, formatting, and indentation for consistency across phases.
    • Refined descriptions for plugin and analysis components, aligning with human-in-the-loop and Meta-RAG flows.
    • Updated Phase goals to clearer, multi-line statements.
    • Minor correction in Phase 0 checklist state.

Walkthrough

Summarise the docs/roadmap.md updates: rewrite and expand Phase 1–4 roadmap entries into stepwise, actionable tasks with explicit deliverables, acceptance criteria, and named crates/files; adjust formatting and wording across phases; no code, API, or control-flow changes.

Changes

Cohort / File(s) Summary
Roadmap documentation
docs/roadmap.md
Replace terse placeholders with explicit, stepwise plans for Phase 0–4: mark Phase 0 checkbox; restructure Phase 1 into CLI/daemon foundation (weaver-cli, weaverd, weaver-config, ortho-config), deliverables, acceptance criteria, streaming/probing, daemonisation and lifecycle commands; standardise Phase 2 wording for weaver-syntax and weaver-graph; reflow Phase 3 plugin architecture (weaver-plugins, rope, srgn, Jedi) and graceful degradation; update Phase 4 onboarding/interactive-mode and dynamic analysis ingestion wording. Pure documentation changes; no functional code edits.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant CLI as weaver-cli
    participant Config as ortho-config / weaver-config
    participant Daemon as weaverd
    rect rgb(235,245,255)
      Note over CLI,Daemon: Phase 1 — CLI/Daemon lifecycle (new doc plan)
    end
    User->>CLI: invoke command (start|status|stop|bootstrap)
    CLI->>Config: load/validate config schema
    CLI->>Daemon: send bootstrap/start request (IPC)
    Daemon->>Config: read runtime config
    Daemon-->>CLI: ack / streaming logs
    alt daemon not running
      CLI->>Daemon: request daemonisation (fork/exec)
      Daemon->>Daemon: initialise namespaces/seccomp (weaver-sandbox)
    end
    CLI->>Daemon: lifecycle commands (stop|restart|status)
    Daemon-->>User: stream events/logs (async)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Roadmap lines now stand in files bright, ✨
Steps named clear beneath the planning light.
Daemons dream on paper plains,
Plugins plotted, graphs and chains.
No code stirs — just paths to write.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed Acknowledge that the title accurately encapsulates the decomposition of the Phase 1 roadmap tasks for CLI and daemon work, reflecting the primary change concisely and with clarity. Highlight its focused wording and absence of extraneous elements.
Description Check ✅ Passed Recognise that the description outlines the breakdown of the Phase 1 roadmap into scoped sub-tasks for CLI and daemon work and provides context on testing, aligning directly with the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-roadmap-with-sub-tasks-for-weaver-cli

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d09327d and 88c8dd3.

📒 Files selected for processing (1)
  • docs/roadmap.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -yse / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/roadmap.md
🔍 Remote MCP Deepwiki

Summary of additional context relevant to this PR (docs/roadmap.md edits):

  • Changed file: docs/roadmap.md (repository root). Edits expand Phase 1–4 roadmap items into concrete, stepwise deliverables (adds named crates/files: weaver-cli, weaverd, weaver-config, weaver-lsp-host, weaver-sandbox, weaver-schemas, etc.).
  • Repo documentation/wiki contains detailed design and component pages describing the client-daemon architecture, RPC protocol, schemas (weaver_schemas), CLI command surface and daemon handlers — useful to verify roadmap alignment with existing modules (weaver CLI, weaverd, weaver_schemas).
  • Project wiki index confirms docs/roadmap.md is part of the repo docs and lists core components and pages you may reference while reviewing scope/terminology.

Notes for reviewers (actionable):

  • This PR is documentation-only (roadmap content) — no code/API changes detected in the repo docs snapshot above; review focus should be clarity, correctness, and alignment with existing module names/architecture.
  • Cross-check newly mentioned items (e.g., "ortho-config") against the codebase and packaging (weaver_schemas, weaver/cli, weaverd) to ensure names and proposed crates/configs map to actual modules or require new work; the repo docs/wiki are the authoritative reference for current module names.

Sources:

  • Repository wiki structure and pages: Deepwiki_read_wiki_structure, Deepwiki_read_wiki_contents.,
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

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

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `docs/roadmap.md:14` </location>
<code_context>
+for write operations from day one.*
+
+- [ ] Define the shared configuration schema for `weaver-cli` and `weaverd`
+        in `weaver-config`, using `ortho-config` to merge config files,
+        environment overrides, and CLI flags for daemon sockets, logging, and
+        the capability matrix defaults.
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point exceeds the 80 column wrapping limit for paragraphs and bullets.

Please ensure that all bullet points and paragraphs are wrapped to 80 columns for readability and consistency.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 2
<location> `docs/roadmap.md:15` </location>
<code_context>
+
+- [ ] Define the shared configuration schema for `weaver-cli` and `weaverd`
+        in `weaver-config`, using `ortho-config` to merge config files,
+        environment overrides, and CLI flags for daemon sockets, logging, and
+        the capability matrix defaults.
+- [ ] Implement the `weaver-cli` executable as the thin JSONL client that
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Consider wrapping this line to 80 columns to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 3
<location> `docs/roadmap.md:16` </location>
<code_context>
+- [ ] Define the shared configuration schema for `weaver-cli` and `weaverd`
+        in `weaver-config`, using `ortho-config` to merge config files,
+        environment overrides, and CLI flags for daemon sockets, logging, and
+        the capability matrix defaults.
+- [ ] Implement the `weaver-cli` executable as the thin JSONL client that
+        initialises configuration via `ortho-config`, exposes the
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns as per the review instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 4
<location> `docs/roadmap.md:18` </location>
<code_context>
+        environment overrides, and CLI flags for daemon sockets, logging, and
+        the capability matrix defaults.
+- [ ] Implement the `weaver-cli` executable as the thin JSONL client that
+        initialises configuration via `ortho-config`, exposes the
+        `--capabilities` probe, and streams requests to a running daemon over
+        standard IO.
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for consistency with the formatting requirements.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 5
<location> `docs/roadmap.md:19` </location>
<code_context>
+        the capability matrix defaults.
+- [ ] Implement the `weaver-cli` executable as the thin JSONL client that
+        initialises configuration via `ortho-config`, exposes the
+        `--capabilities` probe, and streams requests to a running daemon over
+        standard IO.
+- [ ] Implement the `weaverd` daemon bootstrap that consumes the shared
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns as per the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 6
<location> `docs/roadmap.md:20` </location>
<code_context>
+- [ ] Implement the `weaver-cli` executable as the thin JSONL client that
+        initialises configuration via `ortho-config`, exposes the
+        `--capabilities` probe, and streams requests to a running daemon over
+        standard IO.
+- [ ] Implement the `weaverd` daemon bootstrap that consumes the shared
+        configuration, starts the Semantic Fusion backends lazily, and
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for improved readability.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 7
<location> `docs/roadmap.md:22` </location>
<code_context>
+        `--capabilities` probe, and streams requests to a running daemon over
+        standard IO.
+- [ ] Implement the `weaverd` daemon bootstrap that consumes the shared
+        configuration, starts the Semantic Fusion backends lazily, and
+        supervises them with structured logging and error reporting.
+- [ ] Implement robust daemonisation and process management for `weaverd`,
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns as required by the review instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 8
<location> `docs/roadmap.md:23` </location>
<code_context>
+        standard IO.
+- [ ] Implement the `weaverd` daemon bootstrap that consumes the shared
+        configuration, starts the Semantic Fusion backends lazily, and
+        supervises them with structured logging and error reporting.
+- [ ] Implement robust daemonisation and process management for `weaverd`,
+        including backgrounding with `daemonize-me`, PID/lock file handling,
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for consistency.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 9
<location> `docs/roadmap.md:25` </location>
<code_context>
+        configuration, starts the Semantic Fusion backends lazily, and
+        supervises them with structured logging and error reporting.
+- [ ] Implement robust daemonisation and process management for `weaverd`,
+        including backgrounding with `daemonize-me`, PID/lock file handling,
+        health checks, and graceful shutdown on signals.
+- [ ] Provide lifecycle commands in `weaver-cli` (e.g. `daemon start`, `daemon
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns as per the formatting requirements.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 10
<location> `docs/roadmap.md:26` </location>
<code_context>
+        supervises them with structured logging and error reporting.
+- [ ] Implement robust daemonisation and process management for `weaverd`,
+        including backgrounding with `daemonize-me`, PID/lock file handling,
+        health checks, and graceful shutdown on signals.
+- [ ] Provide lifecycle commands in `weaver-cli` (e.g. `daemon start`, `daemon
+        stop`, `daemon status`) that manage the daemon process, verify socket
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for improved readability.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 11
<location> `docs/roadmap.md:28` </location>
<code_context>
+        including backgrounding with `daemonize-me`, PID/lock file handling,
+        health checks, and graceful shutdown on signals.
+- [ ] Provide lifecycle commands in `weaver-cli` (e.g. `daemon start`, `daemon
+        stop`, `daemon status`) that manage the daemon process, verify socket
+        availability, and surface actionable errors when start-up fails.
+
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns as per the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 12
<location> `docs/roadmap.md:29` </location>
<code_context>
+        health checks, and graceful shutdown on signals.
+- [ ] Provide lifecycle commands in `weaver-cli` (e.g. `daemon start`, `daemon
+        stop`, `daemon status`) that manage the daemon process, verify socket
+        availability, and surface actionable errors when start-up fails.
+
+- [ ] Build the `weaver-lsp-host` crate with support for initialisation,
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for consistency.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 13
<location> `docs/roadmap.md:76` </location>
<code_context>

-    -   [ ] A plugin for `srgn` to provide high-performance, precision syntactic editing.
+  - [ ] A plugin for `srgn` to provide high-performance, precision
+        syntactic editing.

--   [ ] Develop the first specialist sensor plugin:
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for improved readability.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 14
<location> `docs/roadmap.md:96` </location>
<code_context>
--   [ ] Implement a hybrid interactive mode (`--interactive`) that, in case of a "Double-Lock" verification failure, presents the proposed diff and the resulting errors to a human user for manual review, approval, or rejection.
+- [ ] Implement the `onboard-project` command based on the "Meta-RAG" design,
+    orchestrating other Weaver components to generate the `PROJECT.dna` summary
+    file.

--   [ ] Begin research and development for the Dynamic Analysis Ingestion provider for `weaver-graph`, allowing it to consume and merge profiling data from tools like `gprof` and `callgrind`.
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns for improved readability.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 15
<location> `docs/roadmap.md:103` </location>
<code_context>
+    resulting errors to a human user for manual review, approval, or rejection.

+- [ ] Begin research and development for the Dynamic Analysis Ingestion
+    provider for `weaver-graph`, allowing it to consume and merge profiling
+    data from tools like `gprof` and `callgrind`.
</code_context>

<issue_to_address>
**issue (review_instructions):** This bullet point line exceeds the 80 column wrapping limit for paragraphs and bullets.

Please wrap this line to 80 columns as per the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

codescene-delta-analysis[bot]

This comment was marked as outdated.

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bee57da and d09327d.

📒 Files selected for processing (1)
  • docs/roadmap.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -yse / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/roadmap.md
🔍 Remote MCP Ref

Additional Relevant Context for PR Review

  1. Roadmap Document Location
    The file docs/roadmap.md is the source of the PR changes and lives at the repository root under docs/roadmap.md.
    Citation:

  2. Ortho-config Usage
    A key new sub-task in Phase 1 mentions “Define shared configuration schema for weaver-cli/weaverd using ortho-config.”

    • Grepping the codebase shows no occurrences of “ortho-config” in any .py, .md, or config files.
    • Therefore, the repository does not currently integrate or reference ortho-config anywhere.
      Citation: search over Deepwiki and repo contents via Deepwiki_ask_question (no hits).
  3. Markdownlint Failures
    The PR description notes make fmt errors due to existing markdownlint violations in docs/weaver-design.md. These pre-existing lint issues are unrelated to the PR changes in docs/roadmap.md.
    Citation: PR testing notes.

  4. No Functional Impact
    All changes are documentation only; no code, schema, or CLI/daemon logic is affected, so no additional testing beyond markdown validation is required.
    Citation: AI summary of PR ([ai_summary]).

⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

Comment thread docs/roadmap.md Outdated
@leynos leynos merged commit 8cde77a into main Oct 5, 2025
3 checks passed
@leynos leynos deleted the codex/update-roadmap-with-sub-tasks-for-weaver-cli branch October 5, 2025 00:09
leynos added a commit that referenced this pull request Mar 15, 2026
… get-card

This adds support for LSP hover enrichment of symbol cards returned by
`observe get-card` at detail level semantic or higher. When the semantic
backend is available and the LSP language server supports hover, the handler
calls `textDocument/hover` to populate the card's `lsp` field with hover
documentation, type information, and deprecation status.

The feature is gated by capability negotiation and degrades gracefully if
LSP is unavailable (not registered, capability denied, or request failure).
In that case, the card retains the Tree-sitter-only extraction with provenance
`tree_sitter_degraded_semantic`.

Key changes include:
- Adding a Hover capability to weaver-lsp-host with protocol and trait support.
- Extending the `LspHost` with a `hover` method.
- Creating an enrichment module in weaverd to perform hover-based enrichment.
- Updating `observe get-card` handler and router to attempt enrichment.
- Adding unit tests and updating BDD tests to verify proper behaviour and
degradation.
- Updating documentation to reflect enrichment and degradation behaviours.

Closes #7.1.3.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
leynos added a commit that referenced this pull request Mar 25, 2026
…#84)

* feat(observe-get-card): add optional LSP hover enrichment for observe get-card

This adds support for LSP hover enrichment of symbol cards returned by
`observe get-card` at detail level semantic or higher. When the semantic
backend is available and the LSP language server supports hover, the handler
calls `textDocument/hover` to populate the card's `lsp` field with hover
documentation, type information, and deprecation status.

The feature is gated by capability negotiation and degrades gracefully if
LSP is unavailable (not registered, capability denied, or request failure).
In that case, the card retains the Tree-sitter-only extraction with provenance
`tree_sitter_degraded_semantic`.

Key changes include:
- Adding a Hover capability to weaver-lsp-host with protocol and trait support.
- Extending the `LspHost` with a `hover` method.
- Creating an enrichment module in weaverd to perform hover-based enrichment.
- Updating `observe get-card` handler and router to attempt enrichment.
- Adding unit tests and updating BDD tests to verify proper behaviour and
degradation.
- Updating documentation to reflect enrichment and degradation behaviours.

Closes #7.1.3.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* feat(observe): add optional LSP hover enrichment for get-card operation

- Implement optional enrichment of SymbolCards with LSP hover information in the observe get-card semantic detail level.
- Populate SymbolCard.lsp using textDocument/hover when supported by the LSP server.
- Introduce graceful degradation when LSP initialization or hover request fails.
- Add thorough unit tests for LSP enrichment, including stub language server implementations.
- Refactor observe::enrich tests to a dedicated file for clarity.
- Update users-guide and execplan docs to describe new observe.get-card-hover capability controlling this behavior.
- Modify weaver-lsp-host to correctly respect hover capability support according to LSP specification.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* feat(observe): add optional LSP hover enrichment for semantic card data

This change implements optional hover enrichment for `weaver observe get-card --detail semantic` by querying the language server via the `textDocument/hover` LSP request.

- Introduce `get_hover` helper to safely handle LSP server initialization and hover requests with graceful degradation.
- Parse hover response to extract hover text, type hint, and deprecation status from structured markers.
- Improve deprecation detection to avoid false positives from unstructured mentions.
- Add unit tests for hover recording and deprecation logic.
- Update documentation to describe new LSP enrichment behavior and degradation.

If LSP is unavailable or errors occur, the enrichment degrades gracefully to tree-sitter-only data, recording explicit provenance for consumers.

Refs: docs/execplans/7-1-3-implement-optional-lsp-enrichment-for-observe-get-card.md

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* fix(dispatch/observe): add debug logging for URI parse failure in LSP enrichment

Improve diagnostics in try_lsp_enrichment by logging the URI parse error with debug level, aiding in debugging degraded hover enrichment outcomes without changing behavior.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* docs(execplans): add known limitations and clarifications to LSP enrichment doc

- Document known limitation regarding UTF-16 conversion for hover positions using Tree-sitter byte offsets, which impacts multi-byte UTF-8 characters.
- Clarify detection of deprecation in hover response by identifying structured deprecation markers.
- Slight rephrasing and formatting improvements for better context and orientation in the observe get-card documentation.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* feat(lsp-host): add UTF-8 position encoding negotiation in LSP initialization

- Advertise UTF-8 position encoding preference in LSP InitializeParams
- Log a debug message when server declines UTF-8 negotiation
- Allows usage of byte offsets as character offsets for LSP features

This improves correctness for non-ASCII files without requiring major refactoring.

Also includes minor optimizations and test refactors:
- Use iter().any() to avoid String allocation in provenance checks
- Refactor hover enrichment tests for clarity and reuse
- Update test helpers to return temp directory for ephemeral socket

Refs #docs:execplans: implement-optional-lsp-enrichment-for-observe-get-card

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* feat(observe): add UTF-16 offset computation for LSP enrichment positions

- Implement conversion from Tree-sitter byte offsets to UTF-16 code units as required by LSP spec
- Read source files to calculate correct UTF-16 character offsets from byte columns
- Improve LSP hover enrichment accuracy for non-ASCII source files
- Add tests for UTF-16 offset conversion and LSP enrichment with non-ASCII content

This resolves character offset mismatches in LSP requests and enhances support for
source files containing multi-byte UTF-8 characters, ensuring hover info is correctly
aligned.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* feat(lsp-host,enrich,observe): negotiate and support UTF-8 position encoding for LSP

This change adds support for LSP position encoding negotiation in the
initialization handshake. When the server agrees to UTF-8 encoding
(LSP 3.17+), Tree-sitter byte offsets are used directly as character
offsets for hover enrichment and other LSP features, eliminating the
need for UTF-16 offset conversions.

Key changes:
- Added position_encoding field to ServerCapabilitySet and CapabilitySummary.
- Propagate negotiated encoding through capability structures.
- Modify try_lsp_enrichment to accept source text and conditionally convert
  offsets based on the negotiated encoding.
- Refactor enrichment and get_card code to pass source text for offset
  computations.
- Updated tests to provide source text argument.

This improves accuracy of hover positions for non-ASCII source files and
reduces overhead accessing source text from the filesystem during
enrichment.

Refs: docs/execplans/7-1-3-implement-optional-lsp-enrichment-for-observe-get-card.md

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(dispatch/observe): refactor tests by adding helper for degraded enrichment assertions

Extracted repeated assertions checking for degraded enrichment into a new helper function `assert_enrichment_degrades` to reduce duplication in enrichment tests. Also refactored StubLanguageServer test support to use a unified constructor, cleaning up creation of failing and missing hover scenarios.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* test(observe/enrich): refactor enrichment tests with helpers and temp directories

- Introduce assert_lsp_info helper to consolidate LSP info assertions.
- Add check_utf16_offset helper for repetitive UTF-16 conversion checks.
- Use tempfile::TempDir to properly handle temporary dirs in tests.
- Update enrichment test functions to return and keep TempDir to prevent premature cleanup.
- Improve clarity and reduce duplication in observe::enrich test suite.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(lsp-host,enrich): simplify LSP initialization and reorganize hover enrichment

- Extract ProcessLanguageServer initialize handshake into smaller methods
- Separate capability negotiation and capability set construction for clarity
- Simplify position encoding negotiation with logging
- Refactor hover enrichment to separate hover param construction and degrade gracefully
- Improve logging and error handling in hover enrichment
- Remove redundant comments and improve documentation for hover enrichment function

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(dispatch/observe): refactor hover param construction and tests for clarity

- Simplify triple unwrap in get_hover with chained options and results.
- Replace multiple test helper arguments with struct for readability.
- Update test LSP info assertions for clarity and maintainability.
- Minor doc comment fix (initialisation -> initialization).

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* test(observe): enhance LSP enrichment tests for non-ASCII and UTF-8 positions

- Add detailed tests for LSP enrichment with non-ASCII source files.
- Verify correct UTF-16 vs UTF-8 position offset handling in hover requests.
- Modify StubLanguageServer to track last hover params via Arc<Mutex>.
- Update test code to capture and assert expected hover request positions.
- Improve stability and coverage of enrichment logic under various encoding scenarios.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(tests): improve test setup and locking error handling

- In get_card_tests.rs, include TempDir alongside FusionBackends in the backends fixture
  to ensure socket path uses a temporary directory.
- Update tests to destructure fixture tuple and keep TempDir alive.
- In enrich_tests.rs, enhance error handling by replacing unwrap() with expect()
  including informative messages when locking mutexes.
- Improve code formatting for clarity in SourcePosition struct initialization.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* test(observe::enrich): move test utilities to enrich_test_utils.rs

Extract common test utility functions and structs from enrich_tests.rs into a new file enrich_test_utils.rs and import them with a module declaration in enrich.rs. This improves code organization and reusability by separating test utilities from test cases.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(enrich_tests): add helper for building test symbol cards

Introduced `test_symbol_card_with_pos` utility in enrich_test_utils.rs to create test SymbolCard instances with custom source position ranges. Replaced manual SymbolCard constructions in enrich_tests.rs with this helper to reduce code duplication and improve test maintainability.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* test(dispatch/observe): add non-ASCII source tests for LSP enrichment

- Introduced `run_non_ascii_enrichment` test helper for verifying LSP enrichment behavior
  with non-ASCII characters and different position encoding capabilities.
- Rewrote existing tests to use this helper, improving test clarity and reuse.
- Validates correct UTF-16 offset calculation versus byte offset for LSP hover requests,
  including when UTF-8 position encoding is negotiated.
- Improves test coverage for source position handling in enrichment logic involving
  multi-byte UTF-8 characters.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* style(dispatch/observe): format test helpers and update lint expectation

Formatted the function parameter lists and struct field initializations for better readability.
Changed #[allow(dead_code)] to #[expect(dead_code, reason = "keeps helper available for encoding tests")] to clarify why the code is kept despite being unused.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(dispatch/observe): simplify run_non_ascii_enrichment and improve test utils

- run_non_ascii_enrichment now returns just the character offset and asserts success internally
- Replaced manual SymbolCard construction with test_symbol_card_with_pos helper
- Removed redundant assertion and dead code annotation
- Updated tests to match new run_non_ascii_enrichment signature
- Added explicit u32 conversion for byte_col in check_utf16_offset

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(dispatch/observe): remove unused variable in enrich test utility

Removed the unused local variable `character` in `run_non_ascii_enrichment` to clean up the code and return the character value directly.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(observe): simplify test symbol card construction and cleanup imports

- Replaced explicit construction of a `SymbolCard` with calls to helper functions.
- Removed unused imports related to LSP hover types.
- Streamlined `assert_deprecation` by using `markdown_hover` helper.
- Reduced code duplication and improved test utility maintainability.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* refactor(dispatch/observe): use SourcePosition struct for position parameters

Refactored test_symbol_card_with_pos and related calls to use SourcePosition structs instead of separate line and column integers for start and end positions, improving code clarity and consistency in position handling.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* style(dispatch/observe): format SourcePosition structs for code clarity

Improved the formatting of SourcePosition structs in enrich_test_utils.rs for better readability by expanding inline structs into multi-line format.

Also added a new empty .repo.lock file under context_pack/packs as part of repository maintenance.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

* test(dispatch/observe): verify enrichment degradation does not alter provenance

This adds an assertion to ensure that when enrichment degrades, the provenance sources remain unchanged. It also adjusts the rust_card test utility to start with neutral provenance to better validate provenance preservation or modification during enrichment.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>

---------

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
leynos added a commit that referenced this pull request Apr 12, 2026
…ice response

- Replace not_yet_implemented refusal with real graph-slice handler
- Return entry symbol card plus same-file sibling cards up to max_cards budget
- Populate spillover metadata for truncated slices
- Defer multi-file edge extraction and graph traversal to roadmap items 7.2.2-7.2.5
- Add end-to-end snapshot tests with 40 fixtures covering python and rust
- Add new shared fixtures module for graph-slice tests in weaver-e2e
- Update design docs, user guide, and roadmap to reflect stable contract

This change completes roadmap item 7.2.1 by providing a stable JSON request
and response schema with real runtime coverage while deferring full graph
traversal to later roadmap phases. It improves user experience by providing
successful graph-slice responses bounded by budget constraints and exposes
spillover data for client handling of truncation.

Closes #7.2.1

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant