Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Make the startup toast timers fire immediately in the opencode index tests so the deferred notification is asserted deterministically.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…s, bump versions - Add verified_by links to all 22 must-priority requirements - Update test scripts to use --timeout 15000 for consistent CI behavior - Apply changeset version bumps across all packages
There was a problem hiding this comment.
Pull request overview
This PR introduces a configurable OpenCode startup notification (toast/log fallback) while also rolling out a broader traceability schema update (new relationship semantics + typed test verification fields) across core Prolog rules, CLI/MCP schemas, VS Code UI, and repository documentation.
Changes:
- Add
ux.toastStartup(defaulttrue) and implement a startup notifier that prefersclient.tui.showToast, falls back to legacytoast, and otherwise logs viaclient.app.log. - Update traceability semantics/schema: add
executable_for, expand scenario↔test edges (verified_by/validates), and add optional typed test fields (verification_scope,verification_perspective) across Prolog + JSON schemas + extractors + tests. - Refresh docs/fixtures/tests for the new semantics and adjust repo test defaults/formatting.
Reviewed changes
Copilot reviewed 156 out of 164 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode/tests/treeProvider.test.ts | Adds relationship parsing/label tests for validates and executable_for. |
| packages/vscode/tests/traceability.test.ts | Adds RDF-edge parsing tests (currently via duplicated parsing logic). |
| packages/vscode/tests/symbolIndex.test.ts | Formatting-only adjustments. |
| packages/vscode/tests/activation/mcp.test.ts | Formatting-only adjustments. |
| packages/vscode/src/treeProvider.ts | Adds labels + allowlist for validates and executable_for. |
| packages/vscode/src/activation/mcp.ts | Moves // implements markers to their own lines. |
| packages/vscode/package.json | Formatting-only adjustments. |
| packages/opencode/tests/startup-notifier.test.ts | New tests for startup notifier behavior (toast + log fallback). |
| packages/opencode/tests/smart-enforcement-policy.test.ts | Formatting-only adjustments. |
| packages/opencode/tests/scheduler.test.ts | Formatting/indent fixes (test block alignment). |
| packages/opencode/tests/prompt.test.ts | Updates prompt expectations for split traceability semantics. |
| packages/opencode/tests/path-kind-pure.test.ts | Removes stray blank lines. |
| packages/opencode/tests/logging-policy.test.ts | Formatting-only adjustments. |
| packages/opencode/tests/hook-contract.test.ts | Tightens typing in tests; adds toastStartup in config fixture. |
| packages/opencode/tests/fixtures/vendored-only/kibi/package.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/vendored-only/kibi/opencode.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/root-uninitialized/opencode.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/root-uninitialized/.opencode/kibi.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/root-custom-paths/.kb/config.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/root-active/.kb/config.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/maintenance-degraded/.kb/config.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/hybrid-root-plus-vendored/kibi/opencode.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/fixtures/hybrid-root-plus-vendored/.kb/config.json | Pretty-prints JSON fixture. |
| packages/opencode/tests/file-filter.test.ts | Formatting-only adjustments. |
| packages/opencode/tests/config.test.ts | Adds tests for ux.toastStartup default/override behavior. |
| packages/opencode/src/startup-notifier.ts | New startup notifier implementation with toast + structured log fallback. |
| packages/opencode/src/smart-enforcement.ts | Moves // implements markers to their own lines. |
| packages/opencode/src/prompt.ts | Updates guidance text to teach split semantics (implements/covered_by/executable_for). |
| packages/opencode/src/plugin-startup.ts | Extracts startup/setup logic from index.ts into a dedicated module. |
| packages/opencode/src/index.ts | Wires extracted startup + adds delayed startup notification after setup. |
| packages/opencode/src/config.ts | Adds ux.toastStartup to schema/defaults/merge logic. |
| packages/opencode/package.json | Version bump to 0.6.1. |
| packages/opencode/README.md | Documents ux.toastStartup configuration flag. |
| packages/opencode/CHANGELOG.md | Adds 0.6.1 entry and updates prior guidance text to new semantics. |
| packages/mcp/tests/tools/graph.test.ts | Adds traversal coverage for scenario↔test edges and canonical chain traversal. |
| packages/mcp/tests/tools/core-module-branches.test.ts | Formatting-only adjustments. |
| packages/mcp/tests/server/transport.test.ts | Formatting-only adjustments. |
| packages/mcp/tests/server/tools.test.ts | Formatting-only adjustments. |
| packages/mcp/tests/server/docs-coverage.test.ts | Removes stray blank line. |
| packages/mcp/src/tools-config.ts | Adds executable_for to relationship enum + updates description. |
| packages/mcp/src/server/tools.ts | Formatting-only adjustments. |
| packages/mcp/package.json | Version bump to 0.6.1 + dependency bumps for kibi-cli/kibi-core. |
| packages/mcp/CHANGELOG.md | Adds 0.6.1 entry; updates traceability guidance wording. |
| packages/core/tests/schema.plt | Updates relationship count + adds traceability relationship validation tests. |
| packages/core/src/kb.pl | Implements split semantics in inference/validation; adds mixed-role symbol checks. |
| packages/core/src/checks.pl | Updates rule descriptions/suggestions for split semantics; minor fixes. |
| packages/core/schema/validation.pl | Adds typed test enum validation; blocks test-only fields on non-test entities. |
| packages/core/schema/relationships.pl | Adds executable_for and expands valid relationship pairs for scenario/test. |
| packages/core/schema/entities.pl | Adds typed test fields to entity properties. |
| packages/core/package.json | Version bump to 0.4.1. |
| packages/core/CHANGELOG.md | Adds 0.4.1 entry; updates traceability guidance wording. |
| packages/cli/tests/traceability/validate.test.ts | Updates violation text for split semantics guidance. |
| packages/cli/tests/traceability/traceability.test.ts | Adds tests that executable_for is preserved but doesn’t count as reqLinks. |
| packages/cli/tests/traceability/temp-kb.test.ts | Adds staged validation tests for executable_for exclusion and relationship projection. |
| packages/cli/tests/traceability/markdown-validate.test.ts | Adds tests for typed test verification fields extraction/validation. |
| packages/cli/tests/extractors/markdown.test.ts | Removes stray blank line. |
| packages/cli/tests/commands/sync/staging.test.ts | Formatting-only adjustments. |
| packages/cli/tests/commands/sync/extraction.test.ts | Formatting-only adjustments; minor test cleanup. |
| packages/cli/tests/commands/discovery-shared.test.ts | Formatting-only adjustments. |
| packages/cli/tests/commands/check.test.ts | Updates staged-check e2e expectations to enforce split semantics and adds new cases. |
| packages/cli/src/utils/rule-registry.ts | Updates rule descriptions for split semantics. |
| packages/cli/src/utils/branch-resolver.ts | Moves // implements markers to their own lines. |
| packages/cli/src/traceability/validate.ts | Updates formatted violation suggestion text. |
| packages/cli/src/traceability/temp-kb.ts | Moves // implements markers to their own lines. |
| packages/cli/src/traceability/symbol-extract.ts | Adds executable_for to recognized relationship types. |
| packages/cli/src/schemas/relationship.schema.json | Adds executable_for to relationship enum. |
| packages/cli/src/schemas/entity.schema.json | Adds typed test fields + conditional prohibition for non-test entities. |
| packages/cli/src/public/schemas/relationship.ts | Adds executable_for to public schema enum. |
| packages/cli/src/prolog/codec.ts | Moves // implements markers to their own lines. |
| packages/cli/src/extractors/markdown.ts | Adds typed test field extraction + validation + non-test guardrails. |
| packages/cli/src/diagnostics.ts | Moves // implements markers to their own lines. |
| packages/cli/src/commands/sync/extraction.ts | Moves // implements markers to their own lines. |
| packages/cli/src/commands/discovery-shared.ts | Formatting-only adjustments and signature formatting. |
| packages/cli/src/commands/check.ts | Includes executable_for when building staged manifest relationship lookup. |
| packages/cli/package.json | Version bump to 0.5.1 + dependency bump for kibi-core. |
| packages/cli/CHANGELOG.md | Adds 0.5.1 entry; updates traceability guidance wording. |
| package.json | Reduces Bun test default timeout to 15s. |
| documentation/tests/e2e/packed/traceability-gate.test.ts | Adds E2E coverage for executable_for pass + covered_by-only failure. |
| documentation/tests/e2e/packed/opencode-comment-guidance.test.ts | Formatting-only adjustments. |
| documentation/tests/e2e/opencode-plugin-local.test.ts | Formatting-only adjustments. |
| documentation/tests/TEST-vscode-traceability.md | Migrates links to typed validates relationships. |
| documentation/tests/TEST-opencode-smart-enforcement.md | Adds typed validates link to scenario. |
| documentation/tests/TEST-opencode-python-comment-routing.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-opencode-kibi-plugin-v1.md | Migrates to typed validates link to scenario. |
| documentation/tests/TEST-opencode-agent-mcp-only.md | Migrates to typed validates link to scenario. |
| documentation/tests/TEST-mcp-upsert-coverage.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-mcp-search-discovery.md | Adds typed validates link to scenario. |
| documentation/tests/TEST-mcp-query-relationships.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-015.md | Updates validates target to SCEN-012. |
| documentation/tests/TEST-013.md | Updates validates target to SCEN-011. |
| documentation/tests/TEST-012.md | Updates validates target to SCEN-001. |
| documentation/tests/TEST-011.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-010.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-009.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-008.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-007.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-006.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-005.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-004.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-003.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-002.md | Migrates links to typed validates relationship. |
| documentation/tests/TEST-001.md | Migrates links to typed validates relationship. |
| documentation/symbols.yaml | Updates symbol relationships to include coverage links. |
| documentation/scenarios/SCEN-vscode-open-entity.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-vscode-code-action.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-opencode-smart-enforcement.md | Marks scenario active + adds typed verified_by link to test. |
| documentation/scenarios/SCEN-opencode-python-comment-routing.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-opencode-kibi-plugin-v1.md | New scenario file (plugin v1). |
| documentation/scenarios/SCEN-opencode-agent-mcp-only.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-mcp-search-discovery.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-012.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-011.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-009.md | Migrates to typed verified_by link to test. |
| documentation/scenarios/SCEN-008.md | Migrates to typed verified_by link to test. |
| documentation/scenarios/SCEN-007.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-006.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-005.md | Adds typed verified_by link to test. |
| documentation/scenarios/SCEN-003.md | Adds typed verified_by links to tests. |
| documentation/scenarios/SCEN-002.md | Migrates to typed verified_by link to test. |
| documentation/scenarios/SCEN-001.md | Adds typed verified_by links to tests. |
| documentation/requirements/REQ-opencode-smart-enforcement-v1.md | Updates links but currently has invalid duplicated frontmatter terminator. |
| documentation/requirements/REQ-opencode-kibi-plugin-v1.md | Adds scenario link but currently has invalid frontmatter structure. |
| documentation/requirements/REQ-019.md | Updates verified_by target. |
| documentation/requirements/REQ-018.md | Updates verified_by target. |
| documentation/requirements/REQ-015.md | Updates verified_by target. |
| documentation/requirements/REQ-012.md | Updates verified_by target. |
| documentation/requirements/REQ-011.md | Updates verified_by target. |
| documentation/requirements/REQ-009.md | Updates verified_by target. |
| documentation/requirements/REQ-008.md | Updates verified_by target. |
| documentation/requirements/REQ-007.md | Updates specified_by/verified_by targets. |
| documentation/requirements/REQ-006.md | Updates verified_by target. |
| documentation/requirements/REQ-005.md | Updates verified_by target. |
| documentation/requirements/REQ-004.md | Updates verified_by target. |
| documentation/requirements/REQ-003.md | Updates verified_by target. |
| documentation/requirements/REQ-002.md | Updates specified_by/verified_by but currently has invalid duplicated frontmatter terminator. |
| documentation/requirements/REQ-001.md | Updates verified_by target but currently has invalid frontmatter structure. |
| docs/proposals/opencode-monorepo-simplification.md | New proposal doc describing internal package simplification recommendations. |
| docs/prompts/retroactive-init.md | Updates guidance examples to new split semantics. |
| docs/prompts/llm-rules.md | Updates canonical chain + traceability guidance to new semantics. |
| docs/examples/test-verification-fields.md | New example for typed test verification fields. |
| docs/entity-schema.md | Updates schema docs for new relationships and typed test fields (example block currently malformed). |
| docs/cli-reference.md | Updates staged-check documentation for new workflow semantics. |
| docs/architecture.md | Adds link to proposal doc but currently duplicates a heading. |
| AGENTS.md | Updates relationship table and workflow guidance to new semantics. |
| .sisyphus/notepads/traceability-consumer-scope/learnings.md | New internal learnings note for schema migration. |
| .sisyphus/notepads/opencode-plugin-toast-and-architecture-plan/learnings.md | New internal learnings note for startup toast work. |
| .sisyphus/notepads/opencode-plugin-toast-and-architecture-plan/debug-toast-tests.md | New internal debug note. |
| .sisyphus/notepads/opencode-plugin-toast-and-architecture-plan/debug-toast-diagnostics.md | New internal debug note. |
| .sisyphus/notepads/opencode-plugin-toast-and-architecture-plan/debug-toast-blocking.md | New internal debug note. |
| .sisyphus/evidence/task-4-startup-wireup.txt | New evidence note for startup wiring verification. |
| .sisyphus/evidence/task-4-startup-wireup-fallback.txt | New evidence note for fallback behavior. |
| .sisyphus/evidence/task-1-truth-table-rejections.txt | New evidence note for schema change impact. |
| .sisyphus/evidence/task-1-startup-config.txt | New evidence note for config test. |
| .github/copilot-instructions.md | Updates traceability relationship guidance. |
| .changeset/fix-sourcefile-upsert.md | Deleted changeset file. |
| .changeset/fix-prolog-startup-wait.md | Deleted changeset file. |
| .changeset/fix-opencode-bootstrap-absolute-paths.md | Deleted changeset file. |
| .changeset/fix-manifest-lookup-and-prolog-codec.md | Deleted changeset file. |
Comments suppressed due to low confidence (1)
documentation/requirements/REQ-opencode-kibi-plugin-v1.md:29
- The frontmatter is terminated at line 22, but additional
linksentries continue afterwards (lines 23-28) and a second---appears at line 29. This makes the document invalid frontmatter and will break extraction. Move the relates_to links into the frontmatter block and ensure there is exactly one closing---.
| --- | ||
| --- |
There was a problem hiding this comment.
There is an extra --- immediately after the frontmatter terminator. This will be treated as content (or a second frontmatter boundary) and can break markdown/frontmatter parsing. Remove the redundant --- so the file has exactly one frontmatter block.
| // @ts-nocheck | ||
| import { describe, expect, mock, test } from "bun:test"; | ||
| import { notifyStartup } from "../src/startup-notifier"; | ||
|
|
There was a problem hiding this comment.
This new test file disables type-checking for the entire file and then uses as never casts for the client shape. Prefer keeping tests type-checked (define a minimal StartupNotifierClient test double type or use satisfies/explicit typing) so refactors to notifyStartup stay safe.
| "test": "bun test --timeout 15000 packages && bun run test:e2e:local", | ||
| "test:unit": "bun test --timeout 15000 packages/", | ||
| "test:coverage:unit": "rm -rf coverage/unit && mkdir -p coverage/unit && bun test --coverage --coverage-reporter text --coverage-reporter lcov --coverage-dir coverage/unit --timeout 15000 packages/", |
There was a problem hiding this comment.
The root Bun test timeout is reduced from 120s to 15s for all package tests. Given the suite includes Prolog-backed integration tests and filesystem-heavy scenarios, this increases the risk of CI flakiness on slower runners. Consider keeping the higher default and only lowering timeouts for specific fast suites, or rely on per-test timeouts where needed.
| { | ||
| "name": "kibi-mcp", | ||
| "version": "0.6.0", | ||
| "version": "0.6.1", | ||
| "dependencies": { |
There was a problem hiding this comment.
This package version is being bumped directly in package.json. Repo conventions require using Changesets for version/changelog updates to publishable packages (see AGENTS.md Rule 3). Add an appropriate .changeset entry (and avoid manual version bumps) so the release workflow stays consistent.
| expect(log.mock.calls[1]?.[0]).toEqual({ | ||
| body: { | ||
| service: "kibi-opencode", | ||
| level: "warn", | ||
| message: "startup toast failed", | ||
| error: "Error: boom", | ||
| directory: "/tmp/worktree", | ||
| }, | ||
| }); |
There was a problem hiding this comment.
This assertion block is duplicated twice, which adds noise without increasing coverage. Remove the redundant duplicate expectation so the test failure output stays focused.
| @@ -20,9 +21,12 @@ | |||
|
|
|||
| % valid_relationship(RelType, FromType, ToType). | |||
| valid_relationship(depends_on, req, req). | |||
| valid_relationship(executable_for, symbol, test). | |||
| valid_relationship(specified_by, req, scenario). | |||
There was a problem hiding this comment.
The PR title suggests this change is primarily about a configurable startup toast, but the diff also includes a broad traceability schema/relationship semantics update across core/cli/mcp/docs. Consider updating the PR title/description (or splitting) so reviewers can correctly scope and validate the higher-impact traceability changes.
| target: TEST-001 | ||
| target: TEST-005 | ||
| --- | ||
| --- |
There was a problem hiding this comment.
This file has two consecutive --- lines after the frontmatter. That produces an invalid frontmatter layout and can break markdown extraction. Remove the redundant --- so only one frontmatter terminator remains.
| --- |
| - type: verified_by | ||
| target: TEST-001 | ||
| target: TEST-008 | ||
| --- |
There was a problem hiding this comment.
The source: field is currently outside the YAML frontmatter (between two --- lines). This makes the frontmatter invalid and can break extraction. Keep a single frontmatter block that includes source: and remove the extra delimiter.
| --- |
| { | ||
| "name": "kibi-cli", | ||
| "version": "0.5.0", | ||
| "version": "0.5.1", | ||
| "type": "module", |
There was a problem hiding this comment.
This package version is being bumped directly in package.json. Repo conventions require using Changesets for version/changelog updates to publishable packages (see AGENTS.md Rule 3). Add an appropriate .changeset entry (and avoid manual version bumps) so the release workflow stays consistent.
| { | ||
| "name": "kibi-core", | ||
| "version": "0.4.0", | ||
| "version": "0.4.1", | ||
| "private": false, |
There was a problem hiding this comment.
This package version is being bumped directly in package.json. Repo conventions require using Changesets for version/changelog updates to publishable packages (see AGENTS.md Rule 3). Add an appropriate .changeset entry (and avoid manual version bumps) so the release workflow stays consistent.
|
@copilot apply changes based on the comments in this thread in a new MR. |
- Fix extra frontmatter terminators in REQ-001, REQ-002, REQ-opencode-smart-enforcement-v1 - Fix source: field position in REQ-001.md frontmatter - Remove duplicate Component Descriptions heading in docs/architecture.md - Fix malformed TEST-001 frontmatter example in docs/entity-schema.md - Restore intentional 15s test timeouts (kept as-is per author intent) - Revert manual package version bumps; restore five deleted changeset files - Remove @ts-nocheck from startup-notifier.test.ts; use StartupNotifierClient type; remove duplicate assertion - Extract parseRdfRelationships to shared/rdf-parser.ts; update treeProvider.ts and test to use real function Agent-Logs-Url: https://github.com/Looted/kibi/sessions/f01e0436-29c0-4e36-9eef-437d13fbd3fd Co-authored-by: Looted <6255880+Looted@users.noreply.github.com>
Fix review feedback: docs frontmatter, type safety, changesets, and shared RDF parser
No description provided.