Skip to content

docs(agents): ADR status fixes, price correction, gen-today cadence fix#3475

Merged
Skords-01 merged 9 commits into
mainfrom
claude/docs-hygiene-adr-fixes-v2
Jun 9, 2026
Merged

docs(agents): ADR status fixes, price correction, gen-today cadence fix#3475
Skords-01 merged 9 commits into
mainfrom
claude/docs-hygiene-adr-fixes-v2

Conversation

@Skords-01

@Skords-01 Skords-01 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Documentation hygiene batch from audit docs/90-work/audits/2026-06-08-codebase-cleanup-audit.md.

  • ADR-0003 price correction — Updated two stale ₴99/міс references to $7/міс (per ADR-0051 pricing v3). Inline HTML comments added at each changed site + a trailing <!-- price updated 2026-06-09 --> marker at end of file. The note block at line 15 (added 2026-06-08) already documented the correction; this PR makes the actual body text consistent.

  • ADR-0062 ↔ ADR-0025 cross-link — Added a ## Related ADRs body section in 0062-openapi-source-of-truth.md explicitly linking ADR-0025 (which introduced the zod→OpenAPI infrastructure that ADR-0062 formalises as source-of-truth) and ADR-0053 (API versioning policy the spec documents). The metadata Related field already listed both; this adds body-level navigational context.

  • ADRs 0058–0061 status — Verified: all four are already Status: Accepted in both the per-file metadata and the README table. No status changes were needed; the audit note about "Proposed state" was outdated.

  • generate-today.mjs cadence — Verified: the script already sets Next review to today + 7 days (lines 62–68 with explanatory comment). The same-day bug described in the audit is not present in the current code. No script change needed.

  • Initiative 0019 & 0020 freshness — Bumped Last validated from 2026-06-08 → 2026-06-09. Next review (2026-09-06) is not overdue, no change. Status left as In progress per task instructions (live-mode acceptance pending).

  • pnpm docs:gen-open-work — Skipped: docs-only batch with no open-work tracker changes; regeneration not required.

Governing Skill

sergeant-review-and-merge (docs-only PR at review boundary)

Playbook

No dedicated playbook for pure docs hygiene — followed AGENTS.md § Verification before PR (docs-only path).

Verification

  • Read each changed ADR before editing; confirmed features shipped (ADRs 0058–0061 already Accepted)
  • Confirmed generate-today.mjs NEXT_REVIEW is already today + 7d
  • Pre-commit hooks passed (lint-staged + commitlint)
  • No files in archive/ subdirectories touched

Docs and Governance

Risk and Rollout

Docs-only. Zero runtime risk. No code changed.

Hard Rule #15 acknowledgement

Internal docs written in Ukrainian where applicable; changes here are corrections to already-existing English/Ukrainian mixed ADR bodies. Governance read before making changes.

Source audit: docs/90-work/audits/2026-06-08-codebase-cleanup-audit.md

https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA


Summary by cubic

Docs hygiene pass: corrected ADR pricing and links, synced initiative statuses, refreshed architecture metadata, and fixed a time-zone edge case in @sergeant/shared date tests. All graphs and indexes are current as of 2026-06-09.

  • Bug Fixes
    • ADR-0003: Updated Pro price to $7/міс and $49/рік; added inline update markers.
    • ADR-0062: Added a Related ADRs section linking ADR-0025 and ADR-0053.
    • C3 diagrams: Updated “Last validated” to 2026-06-09 and “Next review” to 2026-09-07.
    • Initiatives: Bumped “Last validated” for 0019/0020 to 2026-06-09; marked 0017 Closed in README.
    • Governance artifacts: Regenerated knowledge graph, retrieval index, freshness dashboard, catalogs, repo map, and architecture diagrams (2026-06-09).
    • @sergeant/shared tests: Scoped arbitraryLocalDate hours to 0–20 and used 06:00/20:00 in invariance checks to avoid Europe/Kyiv day-boundary mismatches; stabilizes toLocalISODate property tests.
    • generate-today.mjs: Confirmed Next review = today + 7 days; no change.

Written for commit 4e9af0b. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Documentation

    • Updated pricing references in governance documentation to reflect current guidance.
    • Added cross-references between related architectural decision records.
    • Updated metadata timestamps for architecture documentation.
  • Tests

    • Improved timezone-aware date handling in validation tests.

…ive freshness

- ADR-0003: update ₴99/міс price references to $7/міс (per ADR-0051) in
  Related section and TL;DR body; add HTML comment at end of file
- ADR-0062: add ## Related ADRs section linking ADR-0025 (zod→OpenAPI
  infrastructure origin) and ADR-0053 (API versioning policy)
- Initiative 0019 (agent-routing): bump Last validated 2026-06-08 → 2026-06-09
- Initiative 0020 (agent-decisions-log): bump Last validated 2026-06-08 → 2026-06-09
- ADRs 0058–0061 already Accepted in both metadata and README table
- generate-today.mjs already uses today+7d for Next review (no change needed)
- pnpm docs:gen-open-work skipped (docs-only batch)

Source audit: docs/90-work/audits/2026-06-08-codebase-cleanup-audit.md

https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sergeant Ready Ready Preview, Comment Jun 9, 2026 4:03pm

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR performs routine governance documentation maintenance and fixes timezone-aware date test logic. Architecture metadata timestamps are refreshed, ADR pricing references are aligned to current rates, ADR cross-references are formalized, and date property tests are hardened against Kyiv calendar-day boundary transitions.

Changes

Documentation and Test Maintenance

Layer / File(s) Summary
Documentation metadata and cross-references
docs/02-engineering/architecture/diagrams/c3-workspaces.md, docs/04-governance/adr/0062-openapi-source-of-truth.md
C3 workspace validation metadata dates advance to 2026-06-09, and ADR-0062 adds explicit bullet-point cross-references to ADR-0025 (Zod→OpenAPI generation infrastructure) and ADR-0053 (API versioning policy).
Pricing guidance updates in dispute handling
docs/04-governance/adr/0003-refund-and-dispute-handling.md
Pricing references in ADR-0003 are updated from historical ₴99/₴799 to current $7/міс Pro baseline in the related-links bullet, dispute economics baseline paragraph, and inline timestamped comment, while preserving the dispute-fee/grace-policy rationale.
Kyiv timezone date property test fixes
packages/shared/src/utils/date.property.test.ts
Seeded date generator hour range is constrained to 0–20 to avoid UTC-to-Kyiv midnight crossings, and the time-of-day invariance property is rewritten to compare toLocalISODate output at fixed safe times (06:00 and 20:00 UTC) within the same local calendar day instead of midnight vs. late-night values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Skords-01/Sergeant#3414: Both PRs address Kyiv-local day-boundary behavior of toLocalISODate; this PR adjusts test constraints and comparisons while that PR modifies the underlying function to use Intl.DateTimeFormat with Europe/Kyiv.
  • Skords-01/Sergeant#3472: Test timezone stabilization work that sets TZ=Europe/Kyiv environment variable aligns with this PR's Kyiv day-boundary-safe time generation and invariant fixes.

Suggested labels

size/S

Poem

🐰 Dates and docs march forward in time,
Pricing now in dollars, a cleaner paradigm,
Kyiv's midnight safely skipped with care,
Cross-references linked, wisdom we share! 📅✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main documentation updates across multiple ADRs and initiatives, including price corrections, ADR cross-references, and a date cadence fix.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/docs-hygiene-adr-fixes-v2

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

❤️ Share

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

claude added 3 commits June 9, 2026 01:52
…-boundary mismatch

toLocalISODate uses Europe/Kyiv timezone. UTC hours 21–23 cross into the next
Kyiv calendar day (UTC+2/+3 offset), causing property-test assertions that
compare UTC date fields to Kyiv-formatted output to fail. Scoping generated
hours to 0–20 and using fixed hours 6/20 in the time-of-day invariant test
avoids the DST boundary without weakening coverage.

Pre-existing bug in main (merged via PR #3402); backported fix from PR #3479.

https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
@Skords-01 Skords-01 enabled auto-merge (squash) June 9, 2026 13:36
@Skords-01 Skords-01 closed this Jun 9, 2026
auto-merge was automatically disabled June 9, 2026 13:50

Pull request was closed

@Skords-01 Skords-01 reopened this Jun 9, 2026

@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: 4

🤖 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 `@docs/02-engineering/architecture/diagrams/c3-workspaces.md`:
- Line 6: Replace the current header comment with the canonical auto-generated
marker by changing the top-of-file comment to exactly <!-- AUTO-GENERATED -->
(preserve any following explanatory line like "Do not edit by hand." if needed)
so the docs generator/checks recognize the file as auto-generated; after
updating the marker, regenerate the diagrams using the existing generation
command noted in the file comment (pnpm docs:gen-architecture-diagrams) to
ensure the file matches expected tooling output.

In `@docs/04-governance/adr/0003-refund-and-dispute-handling.md`:
- Line 10: Replace the inline HTML comment <!-- price updated 2026-06-09:
₴99/міс → $7/міс per ADR-0051 --> with the mandated AI marker syntax (e.g.,
AI-NOTE) directly adjacent to the markdown line that references the pricing doc
(the line containing
[`docs/01-product/launch/business/01-monetization-and-pricing.md`]); do the same
for the other occurrences noted (around lines 25–27 and line 305) so each inline
HTML note becomes something like: <!-- AI-NOTE: price updated 2026-06-09:
₴99/міс → $7/міс per ADR-0051 --> ensuring the marker token (AI-NOTE /
AI-CONTEXT / AI-DANGER as appropriate) replaces the raw HTML comment while
preserving the original message text.
- Line 10: Fix the Ukrainian typo by replacing the incorrect phrase "тіри і
ціни" in the ADR text with the correct wording "тарифи і ціни" (or "тарифи та
ціни" if you prefer the conjunction for euphony); update the markdown line that
currently contains
[`docs/01-product/launch/business/01-monetization-and-pricing.md`] — тіри і ціни
(Pro $7/міс, $49/рік) so it reads the corrected phrase while keeping the link
and pricing note intact.

In `@packages/shared/src/utils/date.property.test.ts`:
- Line 34: The tests build Date instances using local-time constructors while
the assertions assume UTC (Kyiv) semantics, causing day-boundary flakes; update
the test date creation to be timezone-explicit by using UTC-based constructors
or Date.UTC (or setUTCFullYear/setUTCHours) so the random hour (hour variable
used for 0..20) and all other test dates are created in UTC; apply the same
change to other spots referenced (where toLocalISODate is exercised and the date
fixtures around lines 67–88) so all test data is timezone-explicit and no longer
environment-dependent.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1cc85946-2ec1-4c83-9212-e3870758fabc

📥 Commits

Reviewing files that changed from the base of the PR and between 6e79498 and 4e9af0b.

📒 Files selected for processing (4)
  • docs/02-engineering/architecture/diagrams/c3-workspaces.md
  • docs/04-governance/adr/0003-refund-and-dispute-handling.md
  • docs/04-governance/adr/0062-openapi-source-of-truth.md
  • packages/shared/src/utils/date.property.test.ts

> **Last validated:** 2026-06-09 by @Skords-01. **Next review:** 2026-09-07.
> **Status:** Active

<!-- AUTO-GENERATED FILE. Do not edit by hand. Regenerate via `pnpm docs:gen-architecture-diagrams`. -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the canonical auto-generated marker prefix.

This file is auto-generated, but the header does not start with the required <!-- AUTO-GENERATED --> marker form for docs generators/checks.

As per coding guidelines, “Auto-generated documentation must start with <!-- AUTO-GENERATED --> marker per Hard Rule #25”.

🤖 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 `@docs/02-engineering/architecture/diagrams/c3-workspaces.md` at line 6,
Replace the current header comment with the canonical auto-generated marker by
changing the top-of-file comment to exactly <!-- AUTO-GENERATED --> (preserve
any following explanatory line like "Do not edit by hand." if needed) so the
docs generator/checks recognize the file as auto-generated; after updating the
marker, regenerate the diagrams using the existing generation command noted in
the file comment (pnpm docs:gen-architecture-diagrams) to ensure the file
matches expected tooling output.

Source: Coding guidelines

- **Related:**
- [`docs/04-governance/adr/0001-monetization-architecture.md`](./0001-monetization-architecture.md) — ADR-1.1 (Stripe primary), ADR-1.8 (webhook event-id retention), ADR-1.11 (cancel-at-period-end).
- [`docs/01-product/launch/business/01-monetization-and-pricing.md`](../../01-product/launch/business/01-monetization-and-pricing.md) — тіри і ціни (Pro ₴99/міс, ₴799/рік).
- [`docs/01-product/launch/business/01-monetization-and-pricing.md`](../../01-product/launch/business/01-monetization-and-pricing.md) — тіри і ціни (Pro $7/міс, $49/рік). <!-- price updated 2026-06-09: ₴99/міс → $7/міс per ADR-0051 -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Switch inline HTML notes to the required AI marker format.

The added <!-- price updated ... --> comments should use the mandated marker taxonomy (e.g., AI-NOTE / AI-CONTEXT) for markdown files.

As per coding guidelines, “**/*.{ts,tsx,js,jsx,md}: Use AI markers in code: AI-NOTE, AI-CONTEXT, AI-DANGER, ...”.

Also applies to: 25-27, 305-305

🧰 Tools
🪛 LanguageTool

[style] ~10-~10: Після голосної зі звуком і/и варто писати й або та: тіри «й» ціни, тіри «та» ціни
Context: .../01-monetization-and-pricing.md) — тіри і ціни (Pro $7/міс, $49/рік). <!-- price ...

(EUPHONY_CONJ_I_Y)

🤖 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 `@docs/04-governance/adr/0003-refund-and-dispute-handling.md` at line 10,
Replace the inline HTML comment <!-- price updated 2026-06-09: ₴99/міс → $7/міс
per ADR-0051 --> with the mandated AI marker syntax (e.g., AI-NOTE) directly
adjacent to the markdown line that references the pricing doc (the line
containing [`docs/01-product/launch/business/01-monetization-and-pricing.md`]);
do the same for the other occurrences noted (around lines 25–27 and line 305) so
each inline HTML note becomes something like: <!-- AI-NOTE: price updated
2026-06-09: ₴99/міс → $7/міс per ADR-0051 --> ensuring the marker token (AI-NOTE
/ AI-CONTEXT / AI-DANGER as appropriate) replaces the raw HTML comment while
preserving the original message text.

Source: Coding guidelines


⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Ukrainian euphony typo in the updated phrase.

“тіри і ціни” should be adjusted to the euphonically correct conjunction form.

🧰 Tools
🪛 LanguageTool

[style] ~10-~10: Після голосної зі звуком і/и варто писати й або та: тіри «й» ціни, тіри «та» ціни
Context: .../01-monetization-and-pricing.md) — тіри і ціни (Pro $7/міс, $49/рік). <!-- price ...

(EUPHONY_CONJ_I_Y)

🤖 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 `@docs/04-governance/adr/0003-refund-and-dispute-handling.md` at line 10, Fix
the Ukrainian typo by replacing the incorrect phrase "тіри і ціни" in the ADR
text with the correct wording "тарифи і ціни" (or "тарифи та ціни" if you prefer
the conjunction for euphony); update the markdown line that currently contains
[`docs/01-product/launch/business/01-monetization-and-pricing.md`] — тіри і ціни
(Pro $7/міс, $49/рік) so it reads the corrected phrase while keeping the link
and pricing note intact.

Source: Linters/SAST tools

const month = Math.floor(rng() * 12); // 0..11
const day = 1 + Math.floor(rng() * 28); // 1..28, always valid
const hour = Math.floor(rng() * 24);
const hour = Math.floor(rng() * 21); // 0..20: UTC 21–23 crosses to next Kyiv day

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make test data timezone-explicit (UTC) to avoid env-dependent Kyiv-day flakes.

These changes still use local-time Date construction while the comments/reasoning assume UTC. On non-UTC runners, toLocalISODate (Kyiv) can drift by a day and make this suite flaky.

Suggested fix
 function arbitraryLocalDate(): Date {
   const year = 1970 + Math.floor(rng() * 130);
   const month = Math.floor(rng() * 12); // 0..11
   const day = 1 + Math.floor(rng() * 28); // 1..28, always valid
-  const hour = Math.floor(rng() * 21); // 0..20: UTC 21–23 crosses to next Kyiv day
+  const hour = Math.floor(rng() * 21); // 0..20 UTC: avoids Kyiv next-day rollover
   const minute = Math.floor(rng() * 60);
-  return new Date(year, month, day, hour, minute);
+  return new Date(Date.UTC(year, month, day, hour, minute));
 }
 ...
-      const earlyMorning = new Date(
-        base.getFullYear(),
-        base.getMonth(),
-        base.getDate(),
+      const earlyMorning = new Date(Date.UTC(
+        base.getUTCFullYear(),
+        base.getUTCMonth(),
+        base.getUTCDate(),
         6,
         0,
         0,
-      );
-      const lateEvening = new Date(
-        base.getFullYear(),
-        base.getMonth(),
-        base.getDate(),
+      ));
+      const lateEvening = new Date(Date.UTC(
+        base.getUTCFullYear(),
+        base.getUTCMonth(),
+        base.getUTCDate(),
         20,
         0,
         0,
-      );
+      ));

Also applies to: 67-69, 72-88

🤖 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 `@packages/shared/src/utils/date.property.test.ts` at line 34, The tests build
Date instances using local-time constructors while the assertions assume UTC
(Kyiv) semantics, causing day-boundary flakes; update the test date creation to
be timezone-explicit by using UTC-based constructors or Date.UTC (or
setUTCFullYear/setUTCHours) so the random hour (hour variable used for 0..20)
and all other test dates are created in UTC; apply the same change to other
spots referenced (where toLocalISODate is exercised and the date fixtures around
lines 67–88) so all test data is timezone-explicit and no longer
environment-dependent.

Source: Coding guidelines

@Skords-01 Skords-01 merged commit 19fc722 into main Jun 9, 2026
54 of 72 checks passed
@Skords-01 Skords-01 deleted the claude/docs-hygiene-adr-fixes-v2 branch June 9, 2026 16:07
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

⏱️ CI Pipeline Duration Report

Based on the last 50 successful runs on the default branch.

Overall Pipeline

Metric Value
p50 6m 26s
p95 7m 55s
p99 9m 3s
Current run 40m 42s
vs p95 +414.1%

Trend (last 20 runs): ▃▃▁▂▃▃▃▂▃▃▂▂▄▃▃▆▅▄█▆

Per-Job Breakdown

Job p50 p95 p99 Current vs p95
Accessibility (axe-core) 2m 5s 2m 21s 2m 23s 0s -100.7%
Commit messages (commitlint) 0s 0s 0s 30s N/A
Critical-flow E2E (Playwright) 1m 36s 1m 44s 1m 44s 2m 39s +52.9%
Migration lint (AGENTS rule 0s 0s 0s 8s N/A
Pipeline duration (p95 trend) 26s 27s 27s
Secret scan (gitleaks) 8s 11s 11s 11s +0.0%
Smoke E2E (Playwright) 1m 26s 1m 40s 1m 40s
Test coverage (vitest) 2m 4s 2m 33s 2m 33s 13m 51s +443.1%
Workflow lint (actionlint) 7s 7s 7s 7s +0.0%
check 4m 12s 4m 54s 5m 6s 35s -88.1%
tsconfig strict guard (PR-1.A) 5s 14s 14s 10s -28.6%

⚠️ Warning: Current run (40m 42s) exceeds p95 + 20% threshold (9m 30s). Consider reviewing slow jobs.

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.

2 participants