Skip to content

feat: implement okf standard#25

Merged
pedronauck merged 3 commits into
mainfrom
okf
Jun 28, 2026
Merged

feat: implement okf standard#25
pedronauck merged 3 commits into
mainfrom
okf

Conversation

@pedronauck

@pedronauck pedronauck commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added OKF topic mode with OKF-specific scaffolding (including index/log setup) and wiki→OKF concept promotion.
    • Introduced okf check CLI command to validate OKF bundles with table/json/tsv output and --strict behavior.
    • Extended topic new with --mode wiki|okf, plus added okf.types configuration for allowed OKF concept types.
  • Bug Fixes
    • Improved rendering/vault writing so links and link syntax match the selected topic mode, including stable relative links for OKF.
  • Tests
    • Added coverage for OKF promote/check flows, topic mode metadata, link formatting, and OKF bundle conformance (including official bundles).

@pedronauck pedronauck self-assigned this Jun 28, 2026
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8e20114b-4c6b-4372-a388-95b79648e98d

📥 Commits

Reviewing files that changed from the base of the PR and between ae68380 and 68f94ac.

⛔ Files ignored due to path filters (2)
  • .compozy/tasks/pr-25/reviews-002/issue_001.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-002/issue_002.md is excluded by !**/*.md
📒 Files selected for processing (2)
  • internal/cli/okf_test.go
  • internal/vault/writer_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • internal/cli/okf_test.go
  • internal/vault/writer_test.go

Walkthrough

Adds OKF as a second topic mode, with mode-aware scaffolding, promotion and conformance checks, relative link rendering, CLI commands, official bundle viewers, and QA review manifests.

Changes

OKF Dual-Mode Feature

Layer / File(s) Summary
Topic mode and OKF config
internal/models/models.go, internal/models/kb_models.go, internal/config/config.go, internal/config/config_test.go
Adds TopicMode, extends topic metadata with Mode, adds OKFConfig{Types []string} to Config, and normalizes okf.types in config loading and tests.
OKF promotion and checks
internal/okf/okf.go, internal/okf/okf_test.go, internal/okf/official_integration_test.go
Implements promotion, bundle checks, index regeneration, log insertion, link rewriting, and lint helpers, with unit and integration coverage.
Mode-aware topic scaffolding
internal/topic/topic.go, internal/topic/topic_test.go, internal/generate/generate.go, internal/generate/generate_test.go
Adds NewWithMode, writes and reads topic mode in metadata, makes scaffolding and counts mode-aware, and preserves existing topic mode during generation target resolution.
Vault link formatting
internal/vault/pathutils.go, internal/vault/pathutils_test.go, internal/vault/render.go, internal/vault/render_wiki.go, internal/vault/writer.go, internal/vault/render_test.go, internal/vault/writer_test.go
Adds wiki and OKF link formatters, selects formatting by topic mode, and updates render/writer link generation and coverage to use relative OKF links.
CLI commands and tests
internal/cli/root.go, internal/cli/topic.go, internal/cli/promote.go, internal/cli/okf.go, internal/cli/topic_test.go, internal/cli/okf_test.go, internal/cli/okf_integration_test.go
Adds topic --mode, promote, and okf check commands, registers them on the root command, and adds unit and integration tests for command behavior.
Official OKF bundle viewers
internal/okf/testdata/official/ga4/viz.html, internal/okf/testdata/official/crypto_bitcoin/viz.html
Adds interactive HTML viewers for the official OKF bundles with graph rendering, details panels, search, filtering, backlinks, and internal link rewriting.
QA review manifests
.compozy/tasks/okf-dual-mode/qa/*
Adds QA manifest and status files recording changed paths, diff-stat summaries, and before/after review status for the round1 and round2 review cycles.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main change: implementing the OKF standard across the repo.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch okf

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
internal/config/config_test.go (1)

40-64: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Wrap these new config cases in t.Run("Should...") subtests.

The OKF assertions add meaningful coverage, but they extend _test.go cases without the required subtest structure, and the normalization scenario is a good fit for a small table-driven case. As per coding guidelines, **/*_test.go: "Default to table-driven tests with focused helpers and t.TempDir() for filesystem isolation." As per path instructions, **/*_test.go: "MUST use t.Run("Should...") pattern for ALL test cases."

Also applies to: 109-183

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/config/config_test.go` around lines 40 - 64, Wrap the new config
assertions in `TestDefaultConfigHasValidDefaults` and the related normalization
coverage in `t.Run("Should...")` subtests so all `_test.go` cases follow the
required pattern. Keep the existing checks in `Default()`/`Validate()`-based
tests, but move each scenario into its own focused `t.Run` block, using
table-driven subtests if helpful for the normalization case. Ensure the added
OKF assertions remain covered inside a `Should...` subtest and preserve the
current test intent while matching the testing convention.

Sources: Coding guidelines, Path instructions

internal/generate/generate.go (1)

451-457: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Don’t hardcode wiki mode in generated topic metadata.

linkFor now dispatches through LinkFormatterFor(topic), so forcing Mode: wiki here makes downstream renders emit wiki-style links even when the resolved topic is OKF. Carry the actual topic mode into models.TopicMetadata instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/generate/generate.go` around lines 451 - 457, The generated topic
metadata is hardcoding the mode in the return value from the topic metadata
builder, which causes downstream link rendering to always behave like wiki mode.
Update the `models.TopicMetadata` construction in the generator so it carries
the actual resolved topic mode instead of forcing `models.TopicModeWiki`, and
make sure the mode value comes from the topic/source being processed so
`LinkFormatterFor(topic)` can render correctly.
internal/topic/topic.go (1)

552-558: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve mode when rewriting topic.yaml.

WriteMetadataFile always passes "", so the YAML omits mode. readTopicMetadata then falls back to wiki, which will silently downgrade an OKF topic the next time a caller rewrites metadata through this helper.

Also applies to: 560-566

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/topic/topic.go` around lines 552 - 558, `WriteMetadataFile` is
always dropping the topic mode by calling `topicMetadataForRef(..., "")`, which
causes rewritten `topic.yaml` files to lose `mode`. Update `WriteMetadataFile`
(and the related caller path in `topicMetadataForRef` / any helper it feeds) to
preserve and pass through the existing mode instead of hardcoding an empty
string, so rewrites keep OKF topics from falling back to wiki.
🧹 Nitpick comments (3)
internal/okf/okf_test.go (1)

15-214: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Wrap test cases in Should... subtests.

These scenarios are direct top-level test bodies; the repo test instructions require t.Run("Should...") for all test cases. The repeated strict/lenient check cases are also good candidates for a small table. As per path instructions, MUST use t.Run("Should...") pattern for ALL test cases; as per coding guidelines, default to table-driven tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/okf/okf_test.go` around lines 15 - 214, The test cases in
TestPromoteWritesConceptIndexAndLog,
TestPromoteRejectsNonOKFTargetBeforeWriting,
TestPromoteWarnsWhenSourceBodyHasNoSentenceFallback,
TestCheckReportsConformanceAndStrictWarnings, and
TestCheckAllowsLenientExternalBundleTraits are written as top-level bodies
instead of required Should... subtests. Wrap each scenario in t.Run with a
Should... name, and for the repeated Check variants in
TestCheckReportsConformanceAndStrictWarnings, prefer a small table-driven set of
subtests to keep the strict and non-strict assertions together.

Sources: Coding guidelines, Path instructions

internal/cli/topic_test.go (1)

82-140: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the required subtest pattern for the new mode cases.

These additions are a good fit for a small table-driven block with t.Run("Should..."), which is the test shape required in this repo.

As per coding guidelines, "**/*_test.go: Default to table-driven tests with focused helpers and t.TempDir() for filesystem isolation." As per path instructions, "**/*_test.go: MUST use t.Run("Should...") pattern for ALL test cases."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/cli/topic_test.go` around lines 82 - 140, The new topic mode tests
in topic_test.go should be wrapped in the repo-required subtest structure
instead of standalone test functions. Refactor TestTopicNewCommandPassesOKFMode
and TestTopicNewCommandRejectsInvalidMode into a small table-driven block using
t.Run with names that start with "Should...", keeping the same assertions and
setup around newRootCommand, runTopicNewWithMode, and topicGetwd. Ensure each
case remains isolated and continues to validate both the accepted okf mode and
the invalid mode error path.

Sources: Coding guidelines, Path instructions

internal/vault/pathutils_test.go (1)

199-235: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use t.Run("Should...") consistently in the new test cases.

This block mixes ad-hoc assertions with subtests, and the subtest names do not follow the required Should... pattern. Split the wiki/OKF/selector checks into named subtests so failures stay consistent with the repo’s test contract. As per path instructions, **/*_test.go “MUST use t.Run("Should...") pattern for ALL test cases.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/vault/pathutils_test.go` around lines 199 - 235, Refactor
TestLinkFormatters to wrap every assertion in t.Run subtests named with the
required “Should...” prefix, instead of mixing direct assertions with ad-hoc
checks. Keep the existing coverage for WikiLinkFormatter, OKFLinkFormatter, and
LinkFormatterFor, but split them into clearly named subtests so failures are
consistent with the test contract and easy to locate.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/cli/okf_integration_test.go`:
- Around line 80-87: The promotion log check in the test is too weak because it
can pass without verifying that InsertLogEntry actually recorded the promotion.
Update the assertion in okf_integration_test.go to look for a promotion-specific
outcome in log.md, using unique symbols like InsertLogEntry,
frontmatter.DateLayout, and the promoted topic/asset name, rather than the
literal year prefix or the generic **Creation** entry. Ensure the test fails
unless the promotion entry itself is present.

In `@internal/cli/okf_test.go`:
- Around line 48-75: The test for the promote command currently verifies flags
and output but does not confirm the positional source document is forwarded into
kokf.Promote. Update the assertion around the promote path in okf_test.go to
capture and verify the input passed to Promot(e) includes the source argument
from command args[0] (research/wiki/concepts/Alpha.md), so a regression in
positional-argument plumbing will fail the test.

In `@internal/cli/okf.go`:
- Around line 66-74: The okf check command currently ignores TopicInfo.Mode from
runOKFTopicInfo and always passes TopicInfo.RootPath into kokf.Check, so non-OKF
topics can be linted as directories instead of being rejected. Update the okf
check flow in the command handler to inspect the returned TopicInfo.Mode before
calling kokf.Check, fail fast for non-OKF topics, and only run the bundle check
when the topic is actually an OKF topic.

In `@internal/cli/topic_test.go`:
- Around line 127-140: The invalid-mode test in
TestTopicNewCommandRejectsInvalidMode is too loose because
strings.Contains(err.Error(), "invalid --mode") can match unrelated failures;
update the assertion to use the shared error-checking helper or compare the full
validation message from newRootCommand()/command.ExecuteContext so only the
intended --mode validation error passes. Keep the test anchored on the specific
invalid-mode path by asserting against the exact error content rather than a
substring.

In `@internal/okf/official_integration_test.go`:
- Around line 14-16: The official integration subtests are using raw bundle IDs
as names instead of the required behavior-oriented `Should...` pattern. Update
the `t.Run` call in `official_integration_test.go` so each case name follows the
`Should...` convention while still iterating over the same bundle list, keeping
the test logic in `t.Run` and the surrounding loop unchanged.

In `@internal/okf/okf_test.go`:
- Around line 216-224: The test helper assertIssue currently matches only
severity, file path, and target, so it can miss regressions in the actual
diagnostic text. Update assertIssue in okf_test.go to also accept an expected
message substring and verify it against each models.LintIssue’s
message/diagnostic text before returning. Then update the callers to pass the
expected message so the tests assert the exact behavior using the existing
assertIssue helper.

In `@internal/okf/okf.go`:
- Around line 94-128: Make concept path allocation atomic in
Promote/allocateConceptPath: the current os.Stat check can race with the later
os.WriteFile in Promot e, letting two concurrent promotions pick the same
concept path. Update allocateConceptPath to reserve the file with exclusive
creation (O_CREATE|O_EXCL) or otherwise atomically claim the path before
writing, and on collision retry the path selection and dependent transform using
conceptKey, allocateConceptPath, and os.WriteFile.
- Around line 577-580: In loadConcepts, the frontmatter.Parse error is currently
being swallowed by returning nil, which lets malformed concept files disappear
from the regenerated index. Update the logic around frontmatter.Parse so it
preserves and returns parse errors, and only skips files when there is truly no
frontmatter (for example, an empty values result without an error). Make sure
the handling in loadConcepts still supports RegenerateIndex but does not
silently drop concepts from malformed files.

In `@internal/topic/topic_test.go`:
- Around line 236-312: Wrap the new test coverage in named subtests using the
required t.Run("Should...") pattern in TestNewWithModeCreatesOKFTopicSkeleton
and TestReadTopicMetadataDefaultsMissingModeToWiki. Keep the existing assertions
and helpers, but move each case into a subtest block so the *_test.go file
follows the repo’s test conventions and remains table-driven/focused where
appropriate.

In `@internal/topic/topic.go`:
- Around line 437-440: The createTopicSkeleton helper is incorrectly
short-circuiting for TopicModeOKF, which skips the standard topic scaffold.
Update createTopicSkeleton so it always creates the normal topic directories and
base files owned by kb topic new, then apply any OKF-specific additions on top;
keep the scaffold generation for raw, wiki, outputs, bases, CLAUDE.md,
AGENTS.md, and log.md, and ensure raw/codebase remains present for later
inspection commands.

In `@internal/vault/render_test.go`:
- Around line 266-290: The OKF link assertions in
TestRenderDocumentsUseOKFMarkdownLinkSyntax are currently expecting root-scoped
paths instead of the true relative targets. Update the test to verify the actual
nested relative links produced by vault.RenderDocuments for the
raw/codebase/files/commands/run.ts.md document and the
wiki/codebase/index/Codebase Dashboard.md document, using the symbol and concept
link outputs from the fixture rather than the broken root-relative paths. Keep
the checks focused on the rendered document bodies and ensure they assert the
correct relative markdown destinations.

In `@internal/vault/render_wiki.go`:
- Around line 108-117: The OKF link generation in the wiki renderer is using an
empty fromDir, so links in rendered markdown are rooted at the topic instead of
relative to the current document. Update the linkFor calls in the wiki rendering
flow to pass the rendered document’s own directory as fromDir before building
links, especially for the codebase index and concept pages. Use the current
document context from the render function that emits wiki pages so
dashboard/index-to-concept and concept-to-concept links resolve with correct
relative paths. Apply the same fromDir fix to every linkFor invocation in this
render path, including the navigation and article link sections.

In `@internal/vault/render.go`:
- Around line 190-191: Update the OKF link generation path so `linkFor` receives
the current document directory instead of an empty root path. Thread the source
directory through `linkForNode` and any related callers that currently pass
fromDir as "", so `LinkFormatterFor(...).Link(...)` can build correct relative
links for nested raw documents. Focus on the `linkFor` and `linkForNode` flow in
`render.go` and preserve existing behavior outside OKF mode.

In `@internal/vault/writer.go`:
- Around line 475-477: The OKF bridge links in writer.go are being resolved from
the bundle root because linkFor is called with an empty source directory, which
breaks navigation for files rendered under wiki/index/. Update the three linkFor
calls in this block to pass wiki/index as the source directory so
GetWikiIndexPath(CodebaseDashboardTitle),
GetWikiIndexPath(CodebaseConceptIndexTitle), and
GetWikiIndexPath(CodebaseSourceIndexTitle) resolve correctly in OKF bundles.

---

Outside diff comments:
In `@internal/config/config_test.go`:
- Around line 40-64: Wrap the new config assertions in
`TestDefaultConfigHasValidDefaults` and the related normalization coverage in
`t.Run("Should...")` subtests so all `_test.go` cases follow the required
pattern. Keep the existing checks in `Default()`/`Validate()`-based tests, but
move each scenario into its own focused `t.Run` block, using table-driven
subtests if helpful for the normalization case. Ensure the added OKF assertions
remain covered inside a `Should...` subtest and preserve the current test intent
while matching the testing convention.

In `@internal/generate/generate.go`:
- Around line 451-457: The generated topic metadata is hardcoding the mode in
the return value from the topic metadata builder, which causes downstream link
rendering to always behave like wiki mode. Update the `models.TopicMetadata`
construction in the generator so it carries the actual resolved topic mode
instead of forcing `models.TopicModeWiki`, and make sure the mode value comes
from the topic/source being processed so `LinkFormatterFor(topic)` can render
correctly.

In `@internal/topic/topic.go`:
- Around line 552-558: `WriteMetadataFile` is always dropping the topic mode by
calling `topicMetadataForRef(..., "")`, which causes rewritten `topic.yaml`
files to lose `mode`. Update `WriteMetadataFile` (and the related caller path in
`topicMetadataForRef` / any helper it feeds) to preserve and pass through the
existing mode instead of hardcoding an empty string, so rewrites keep OKF topics
from falling back to wiki.

---

Nitpick comments:
In `@internal/cli/topic_test.go`:
- Around line 82-140: The new topic mode tests in topic_test.go should be
wrapped in the repo-required subtest structure instead of standalone test
functions. Refactor TestTopicNewCommandPassesOKFMode and
TestTopicNewCommandRejectsInvalidMode into a small table-driven block using
t.Run with names that start with "Should...", keeping the same assertions and
setup around newRootCommand, runTopicNewWithMode, and topicGetwd. Ensure each
case remains isolated and continues to validate both the accepted okf mode and
the invalid mode error path.

In `@internal/okf/okf_test.go`:
- Around line 15-214: The test cases in TestPromoteWritesConceptIndexAndLog,
TestPromoteRejectsNonOKFTargetBeforeWriting,
TestPromoteWarnsWhenSourceBodyHasNoSentenceFallback,
TestCheckReportsConformanceAndStrictWarnings, and
TestCheckAllowsLenientExternalBundleTraits are written as top-level bodies
instead of required Should... subtests. Wrap each scenario in t.Run with a
Should... name, and for the repeated Check variants in
TestCheckReportsConformanceAndStrictWarnings, prefer a small table-driven set of
subtests to keep the strict and non-strict assertions together.

In `@internal/vault/pathutils_test.go`:
- Around line 199-235: Refactor TestLinkFormatters to wrap every assertion in
t.Run subtests named with the required “Should...” prefix, instead of mixing
direct assertions with ad-hoc checks. Keep the existing coverage for
WikiLinkFormatter, OKFLinkFormatter, and LinkFormatterFor, but split them into
clearly named subtests so failures are consistent with the test contract and
easy to locate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 48271340-f5ae-4363-9d87-d8261e5ed6a2

📥 Commits

Reviewing files that changed from the base of the PR and between 5203284 and dae2f86.

⛔ Files ignored due to path filters (144)
  • .agents/skills/compozy/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/compozy/references/cli-reference.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/compozy/references/config-reference.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/compozy/references/skills-reference.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/compozy/references/workflow-guide.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-create-prd/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-create-prd/references/question-protocol.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-create-tasks/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-create-tasks/references/task-context-schema.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-create-tasks/references/task-template.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-create-techspec/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-execute-task/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-execute-task/references/tracking-checklist.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-fix-reviews/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/references/adr-template.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/references/business-analyst.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/references/council.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/references/idea-template.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/references/product-strategist.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-idea-factory/references/question-protocol.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-review-round/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/references/automation.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/references/resolution-patterns.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/references/scripts-tools.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/references/strategies.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/references/troubleshooting.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/scripts/analyze-conflicts.sh is excluded by !.agents/**
  • .agents/skills/git-rebase/scripts/pre-rebase-backup.sh is excluded by !.agents/**
  • .agents/skills/git-rebase/scripts/validate-merge.sh is excluded by !.agents/**
  • .claude/ledger/2026-06-27-MEMORY-okf-skill-sync.md is excluded by !**/*.md, !.claude/**
  • .compozy/tasks/okf-dual-mode/_prd.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/_techspec.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/adrs/adr-001.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/adrs/adr-002.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/adrs/adr-003.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/adrs/adr-004.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/adrs/adr-005.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/adrs/adr-006.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-findings-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-findings-round2.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-prompt-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-prompt-round2.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-remediation-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-summary-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/impl-review-summary-round2.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-findings-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-findings-round2.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-incorporation-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-incorporation-round2.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-prompt-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-prompt-round2.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-summary-round1.md is excluded by !**/*.md
  • .compozy/tasks/okf-dual-mode/qa/peer-review-summary-round2.md is excluded by !**/*.md
  • AGENTS.md is excluded by !**/*.md
  • CLAUDE.md is excluded by !**/*.md
  • README.md is excluded by !**/*.md
  • config.example.toml is excluded by !**/*.toml
  • internal/okf/testdata/official/LICENSE.md is excluded by !**/*.md
  • internal/okf/testdata/official/README.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/datasets/crypto_bitcoin.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/datasets/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/tables/blocks.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/tables/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/tables/inputs.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/tables/outputs.md is excluded by !**/*.md
  • internal/okf/testdata/official/crypto_bitcoin/tables/transactions.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/datasets/ga4_obfuscated_sample_ecommerce.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/datasets/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/joins/events___ads_clickstats.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/joins/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/avg_pageviews.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/avg_spend_per_purchase_session_by_user.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/avg_transactions_per_purchaser.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/day_count.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/event_count.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/new_user_count.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/overall_avg_spend_per_purchase_session.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/references/metrics/user_count.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/tables/events_.md is excluded by !**/*.md
  • internal/okf/testdata/official/ga4/tables/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/datasets/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/datasets/stackoverflow.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/badge_classes.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/close_as_off_topic_reason_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/close_reason_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/creative_commons_by_sa_4_0_license.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/flag_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/link_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/pending_flags.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_feedback.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_history_type_ids.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_notice_class_ids.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_notice_duration_ids.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_notice_type_definitions.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_notice_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_notices.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/post_type_ids.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/related_questions.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/review_rejection_reasons.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/review_task_result_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/review_task_results.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/review_task_states.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/review_task_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/review_tasks.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/sede_databases.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/sede_databases_markdown.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/sede_ineachdb.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/sede_sites.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/sede_tables.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/sede_users.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/suggested_edit_votes.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/suggested_edits.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/tag_synonyms.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/references/vote_types.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/badges.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/comments.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/index.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/post_history.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/post_links.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_answers.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_moderator_nomination.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_orphaned_tag_wiki.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_privilege_wiki.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_questions.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_tag_wiki.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_tag_wiki_excerpt.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/posts_wiki_placeholder.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/stackoverflow_posts.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/tags.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/users.md is excluded by !**/*.md
  • internal/okf/testdata/official/stackoverflow/tables/votes.md is excluded by !**/*.md
  • internal/topic/assets/okf-claude-template.md is excluded by !**/*.md
  • skills/kb/SKILL.md is excluded by !**/*.md
  • skills/kb/references/architecture.md is excluded by !**/*.md
  • skills/kb/references/frontmatter-schemas.md is excluded by !**/*.md
  • skills/kb/references/okf-mode.md is excluded by !**/*.md
📒 Files selected for processing (48)
  • .compozy/tasks/okf-dual-mode/qa/impl-review-changed-files-round1.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-changed-files-round2.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-diff-round1.patch
  • .compozy/tasks/okf-dual-mode/qa/impl-review-diff-round2.patch
  • .compozy/tasks/okf-dual-mode/qa/impl-review-diff-stat-round1.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-diff-stat-round2.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-events-round1.jsonl
  • .compozy/tasks/okf-dual-mode/qa/impl-review-events-round2.jsonl
  • .compozy/tasks/okf-dual-mode/qa/impl-review-result-round1.err
  • .compozy/tasks/okf-dual-mode/qa/impl-review-result-round2.err
  • .compozy/tasks/okf-dual-mode/qa/impl-review-status-after-round1.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-status-after-round2.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-status-before-round1.txt
  • .compozy/tasks/okf-dual-mode/qa/impl-review-status-before-round2.txt
  • .compozy/tasks/okf-dual-mode/qa/peer-review-events-round1.jsonl
  • .compozy/tasks/okf-dual-mode/qa/peer-review-events-round2.jsonl
  • .compozy/tasks/okf-dual-mode/qa/peer-review-result-round1.err
  • .compozy/tasks/okf-dual-mode/qa/peer-review-result-round2.err
  • .compozy/tasks/okf-dual-mode/qa/peer-review-status-after-round1.txt
  • .compozy/tasks/okf-dual-mode/qa/peer-review-status-after-round2.txt
  • .compozy/tasks/okf-dual-mode/qa/peer-review-status-before-round1.txt
  • .compozy/tasks/okf-dual-mode/qa/peer-review-status-before-round2.txt
  • internal/cli/okf.go
  • internal/cli/okf_integration_test.go
  • internal/cli/okf_test.go
  • internal/cli/promote.go
  • internal/cli/root.go
  • internal/cli/topic.go
  • internal/cli/topic_test.go
  • internal/config/config.go
  • internal/config/config_test.go
  • internal/generate/generate.go
  • internal/models/kb_models.go
  • internal/models/models.go
  • internal/okf/official_integration_test.go
  • internal/okf/okf.go
  • internal/okf/okf_test.go
  • internal/okf/testdata/official/crypto_bitcoin/viz.html
  • internal/okf/testdata/official/ga4/viz.html
  • internal/okf/testdata/official/stackoverflow/viz.html
  • internal/topic/topic.go
  • internal/topic/topic_test.go
  • internal/vault/pathutils.go
  • internal/vault/pathutils_test.go
  • internal/vault/render.go
  • internal/vault/render_test.go
  • internal/vault/render_wiki.go
  • internal/vault/writer.go

Comment thread internal/cli/okf_integration_test.go
Comment thread internal/cli/okf_test.go Outdated
Comment thread internal/cli/okf.go
Comment thread internal/cli/topic_test.go
Comment thread internal/okf/official_integration_test.go Outdated
Comment thread internal/topic/topic.go Outdated
Comment thread internal/vault/render_test.go
Comment thread internal/vault/render_wiki.go Outdated
Comment thread internal/vault/render.go
Comment thread internal/vault/writer.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
internal/cli/okf_test.go (1)

18-79: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the required t.Run("Should...") wrapper for these cases.

Both tests assert real CLI behavior, but the top-level cases still bypass the mandated subtest pattern. As per path instructions, **/*_test.go: MUST use t.Run("Should...") pattern for ALL test cases.

Also applies to: 131-168

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/cli/okf_test.go` around lines 18 - 79, Wrap the CLI test cases in
the required t.Run("Should...") subtest pattern instead of keeping them as
top-level tests; update the relevant test functions in okf_test.go so each real
behavior assertion runs inside a descriptive Should-prefixed subtest. Keep the
existing setup and assertions, but move the command execution and result checks
under the t.Run wrapper to satisfy the test convention for all *_test.go cases.

Source: Path instructions

internal/vault/writer_test.go (1)

213-246: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Wrap this case in t.Run("Should...").

This test hits the right behavior, but it skips the repo’s required subtest shape for Go tests. As per path instructions, **/*_test.go: MUST use t.Run("Should...") pattern for ALL test cases.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/vault/writer_test.go` around lines 213 - 246, Wrap the body of
TestWriteVaultUsesRelativeOKFTopicIndexBridgeLinks in a t.Run subtest whose name
starts with "Should..." to match the repo-wide Go test pattern. Keep the
existing assertions and setup inside the subtest, and use the same test function
and helper symbols (TestWriteVaultUsesRelativeOKFTopicIndexBridgeLinks,
testWriteVaultInputs, vault.WriteVault, readFile) so the case is still easy to
locate.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/cli/okf_test.go`:
- Around line 18-79: Wrap the CLI test cases in the required t.Run("Should...")
subtest pattern instead of keeping them as top-level tests; update the relevant
test functions in okf_test.go so each real behavior assertion runs inside a
descriptive Should-prefixed subtest. Keep the existing setup and assertions, but
move the command execution and result checks under the t.Run wrapper to satisfy
the test convention for all *_test.go cases.

In `@internal/vault/writer_test.go`:
- Around line 213-246: Wrap the body of
TestWriteVaultUsesRelativeOKFTopicIndexBridgeLinks in a t.Run subtest whose name
starts with "Should..." to match the repo-wide Go test pattern. Keep the
existing assertions and setup inside the subtest, and use the same test function
and helper symbols (TestWriteVaultUsesRelativeOKFTopicIndexBridgeLinks,
testWriteVaultInputs, vault.WriteVault, readFile) so the case is still easy to
locate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87afdde8-17d0-429f-9242-e3ff75d9a74c

📥 Commits

Reviewing files that changed from the base of the PR and between dae2f86 and ae68380.

⛔ Files ignored due to path filters (20)
  • .compozy/tasks/pr-25/reviews-001/issue_001.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_002.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_003.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_004.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_005.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_006.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_007.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_008.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_009.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_010.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_011.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_012.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_013.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_014.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_015.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_016.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_017.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_018.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_019.md is excluded by !**/*.md
  • .compozy/tasks/pr-25/reviews-001/issue_020.md is excluded by !**/*.md
📒 Files selected for processing (18)
  • internal/cli/okf.go
  • internal/cli/okf_integration_test.go
  • internal/cli/okf_test.go
  • internal/cli/topic_test.go
  • internal/config/config_test.go
  • internal/generate/generate.go
  • internal/generate/generate_test.go
  • internal/okf/official_integration_test.go
  • internal/okf/okf.go
  • internal/okf/okf_test.go
  • internal/topic/topic.go
  • internal/topic/topic_test.go
  • internal/vault/pathutils_test.go
  • internal/vault/render.go
  • internal/vault/render_test.go
  • internal/vault/render_wiki.go
  • internal/vault/writer.go
  • internal/vault/writer_test.go
🚧 Files skipped from review as they are similar to previous changes (9)
  • internal/okf/official_integration_test.go
  • internal/vault/pathutils_test.go
  • internal/config/config_test.go
  • internal/cli/okf.go
  • internal/vault/render_test.go
  • internal/cli/okf_integration_test.go
  • internal/cli/topic_test.go
  • internal/vault/writer.go
  • internal/okf/okf.go

@pedronauck
pedronauck merged commit 04bdb8e into main Jun 28, 2026
8 of 9 checks passed
@pedronauck
pedronauck deleted the okf branch June 28, 2026 02:54
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