Repository navigation
Description
Problem or Motivation
No job keeps the brain good. The consolidate judge runs only by hand: on 2026-11-10 it judged 6 of 82 shortlists (limit 10 a run, DEFAULT_ROADMAP_CONSOLIDATE_JUDGED, src/devops_cli/config/defaults.py:978), and its plan is a local file with no durable copy. The owner asked on 2026-11-11 for repair, consolidate and evaluate as Jobs or Argo Workflows, never as a loop in a Service pod.
Proposed Solution & Architectural Design
- Commands
devops roadmap brain daily|repair|consolidate|evaluate, thin overbrain-sync,consolidate_shortlist.py,consolidate_judge.py, the decision point module and the store.--dry-runsends 0 requests and prints the requests it would send. - WorkflowTemplate
roadmap-brainin namespacedevops(the Service image, the feat(roadmap): label Service Jobs by repository and item #4558 labels withrow=brain, one model call in flight). CronWorkflowbrain-daily:schedules: ["30 2 * * *"], timezone UTC,concurrencyPolicy: Forbid,startingDeadlineSeconds: 3600,synchronization.mutexes: [brain],retryStrategyfor exit 75 only,activeDeadlineSeconds: 3000. One pod for each run: repair, then signals (the weekly child adds the runner), then consolidate, then evaluate. - No due mark (feat(roadmap): track the roadmap pipeline split into jobs #5482, 2026-11-13). Work that a run leaves waits for the next daily run.
- Repair: rebuild
brain-item,brain-toolandbrain-reffrom the blocks (GitHub wins); rebuild missing insights from the tracker comments; check at most 100 reference links (a 404 two runs in a row marks a reference dead); correct at most 10 item blocks throughAlternativesWriter(read before write); delete old kinds, orphans, and insights superseded or declined for 30 days; set a TTL on avalkey-devopsbrain key that has none; create the tracker issue when its marker is missing; write the index marker last (the index of feat(roadmap): keep alternatives results in a brain index #4676 has the markerbrain-sync, which the sync owns; no kindbrain-builtexists). Bounds: 1,000 deleted keys, 100 link reads, 10 issue writes, 0 model spend, 600 s. - Consolidate: rules first (ADR 0020). Merge tool names with one canonical id, references of one repository and path, and insights whose member sets overlap with Jaccard 0.5 or more. Judge at most 10 shortlists that were not judged before with the existing judge. An ambiguous pair goes to the decision point
brain.merge_same_needin shadow mode. Bounds: 200 changed entries, 10 shortlists, 20 Jev questions, 0.05 USD, 900 s. - Evaluate: rules first (freshness, source state, use, support); a fixed score marks
staleorweak. The decision pointbrain.entry_qualityasks Jev one score question for each insight in shadow mode. Bounds: 300 entries, 50 Jev questions, 0 generative calls, 0.05 USD, 600 s. - The tracker issue: one for each repository, label
type/epicand a marker. Repair creates it once and reads the marker first (ADR 0021 rule 5). The selections of intake, refine, alternatives and stage skip it. - Audit for every task: one JSON log line for each change (logger
devops_cli.roadmap.brain, ids only, never issue text); counters; an XADD tobrain-events; one summary comment on the tracker issue for a run that changed something, with one hidden block for each changed insight (at most 40 blocks a comment, at most 2 comments a day). - Safe stop for every task: each change is one WATCH/MULTI/EXEC transaction; a rebuild writes a temporary key and RENAMEs it; the run record and the cursor are written last. On SIGTERM, the task stops between two transactions, writes
result=stoppedand exits 0. - Instruments:
devops_cli_brain_task_runs_total,devops_cli_brain_task_last_success_timestamp_seconds,devops_cli_brain_entries_changed_total,devops_cli_brain_keys_removed_total,devops_cli_brain_undurable_entries. - Spec in
openspec/specs/project-brain/upkeep/spec.md.
Target Subsystem
SDLC, Git & PR Governance (roadmap upkeep), with Kubernetes manifests in k8s/devops/.
Existing Tool Considered
Argo CronWorkflows and WorkflowTemplates (v4.1.5, the schedules and mutexes fields), the existing consolidate shortlist and judge, the Jev decision point module, valkey-py and OpenTelemetry instruments. #3745 is related: its weekly Service row becomes obsolete. Cost: about 300,000 tokens and 7 hours to build.
Acceptance Criteria
- A test (T9): a task stopped after k transactions and run again gives the state of a clean run.
- A test (T10): each selection skips the tracker issue.
- A test:
--dry-runsends 0 requests. - A test: repair rebuilds
brain-itemfrom fixture blocks with 0 GitHub requests. - Cluster drill: the template with the Valkey address
192.0.2.1(RFC 5737) exits 75 within 61 s and writes nothing to GitHub. - Live:
brain-dailyruns 7 days in a row with resultokorpartial, and the 82 open shortlists are judged within 10 days.
Dependencies
#4566 (Argo Workflows runs roadmap pods in devops), #4676. Related: #3745, #3743. Part of the project brain plan #4624.
Source: #4624
Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: Argo Workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-12-01, maintained.
Reason: Searches and the repository facts confirm Argo Workflows gives the CronWorkflow schedule, concurrency policy, mutex and retry by exit code that the daily brain run needs, and the issue already names it as the chosen engine.
Covers:
- Cron schedule with timezone and startingDeadlineSeconds
- concurrencyPolicy Forbid for overlapping starts
- synchronization mutexes to block a manual run
- retryStrategy keyed on exit code 75
- WorkflowTemplate steps run one pod per run
Lacks:
- Brain repair rebuild and key removal logic
- Consolidate rules, judge and decision points
- Evaluate score and stale marking
- Audit log, brain-events XADD and summary comments
- WATCH/MULTI/EXEC safe-stop transactions
Proposed design
Problem statement
No scheduled job keeps the project brain good. The consolidate judge runs only by hand. Its plan is a local file with no durable copy. The owner asked for repair, consolidate and evaluate as Jobs or Argo Workflows. The change adds the daily run and its tasks.
Acceptance criteria
Requirement: Brain command group
The change SHALL add the command group devops roadmap brain with the subcommands daily, repair, consolidate and evaluate.
Scenario: Each subcommand parses
- WHEN A test runs each brain subcommand with
--help. - THEN Each subcommand exits 0 and prints its name and its options.
Requirement: Dry run sends no request
Each brain subcommand SHALL send no request when --dry-run is set.
Scenario: Repair dry run
- WHEN A test runs
devops roadmap brain repair --dry-runwith a fake GitHub client and a fake Valkey client. - THEN Both clients record 0 requests and the command prints the requests that it would send.
Requirement: Daily task order
The daily subcommand SHALL run repair, signals, consolidate and evaluate in that order.
Scenario: Fake tasks record their order
- WHEN A test runs
devops roadmap brain dailywith fake task functions. - THEN The recorded order is repair, signals, consolidate, evaluate.
Requirement: Repair rebuilds the index keys
Repair SHALL rebuild brain-item, brain-tool and brain-ref from the blocks with 0 GitHub requests and SHALL leave the brain-sync marker to the sync.
Scenario: Rebuild from fixture blocks
- WHEN A test runs repair on fixture blocks with a fake GitHub client.
- THEN The three keys match the fixture, the GitHub client records 0 requests and the
brain-syncmarker is unchanged.
Requirement: Repair rebuilds the member lists
Repair SHALL rebuild the items field of each brain-tool and each brain-ref from the blocks.
Scenario: One item changes its tool
- WHEN A test runs repair on blocks where one item moved from tool A to tool B.
- THEN The
brain-toolfor tool A holds no item, thebrain-toolfor tool B holds the item, and eachbrain-refitems field matches the blocks.
Requirement: Repair removes the keys of an off repository
Repair SHALL remove the brain-item, brain-tool and brain-ref keys of a repository whose alternatives check is off in its first run, before the 1,000-key deletion bound.
Scenario: One off repository and many orphan keys
- WHEN A test runs repair on one repository whose alternatives check is off with three brain keys and on 1,200 orphan keys.
- THEN The three keys are absent, repair deletes 1,000 orphan keys, and the run record lists the removal.
Requirement: Repair rebuilds missing insights
Repair SHALL rebuild each missing insight from the tracker comments and SHALL keep the newest version of each insight.
Scenario: One missing insight and two comment versions
- WHEN A test runs repair on a tracker issue with two comment versions of one missing insight.
- THEN The store holds one insight and its newest version.
Requirement: Reference link check
Repair SHALL check at most 100 reference links and SHALL mark a reference dead only when two runs return 404.
Scenario: A repeated 404
- WHEN A test runs repair twice on 150 references and the fetcher returns 404 for one reference.
- THEN The fetcher records 100 reads in each run and that reference holds
deadafter the second run.
Requirement: Bounded deletion and TTL repair
Repair SHALL delete at most 1,000 old-kind, orphan, superseded or declined-for-30-days keys and SHALL set a TTL on a brain key of valkey-devops that has none.
Scenario: 1,200 orphan keys and one key with no TTL
- WHEN A test runs repair on 1,200 orphan keys and one
valkey-devopsbrain key with no TTL. - THEN Repair deletes exactly 1,000 keys and the key holds a TTL.
Requirement: Bounded item block correction
Repair SHALL correct at most 10 item blocks and SHALL read the issue before each write through AlternativesWriter.
Scenario: 15 blocks need correction
- WHEN A test runs repair on 15 item blocks that need correction and a fake writer.
- THEN The writer records 10 reads and 10 writes, each write follows the read of the same issue, and the task records 0 model calls.
Requirement: Tracker issue per repository
Repair SHALL create the tracker issue only when its marker is absent and SHALL read the marker first.
Scenario: Two repair runs
- WHEN A test runs repair twice on a repository with no tracker issue and a fake GitHub client.
- THEN The client records one issue creation, and the second run records a marker read and no creation.
Requirement: Selections skip the tracker issue
Each roadmap selection SHALL skip an issue that carries the type/epic label and the tracker marker.
Scenario: One tracker issue and one item
- WHEN A test gives the intake, refine, alternatives and stage selections one tracker issue and one item.
- THEN Each selection returns the item alone.
Requirement: Consolidate merges by rule
Consolidate SHALL merge tool names with one canonical id, references of one repository and path, and insights whose member sets reach Jaccard 0.5.
Scenario: One canonical id and a shared member set
- WHEN A test runs consolidate on two tool entries that name one canonical id and two insights that share half of their members.
- THEN The tool entries become one entry and the two insights become one insight.
Requirement: Consolidate bounds and judge
Consolidate SHALL change at most 200 entries, SHALL judge at most 10 shortlists that carry no judge result and SHALL ask at most 20 Jev questions.
Scenario: 12 unjudged and 3 judged shortlists
- WHEN A test runs consolidate on 12 unjudged shortlists, 3 judged shortlists and 250 mergeable pairs.
- THEN The judge records 10 calls, the 3 judged shortlists get no call, the run asks 20 Jev questions and stops at 200 changed entries.
Requirement: Decision points in shadow mode
The decision points brain.merge_same_need and brain.entry_quality SHALL run in shadow mode and SHALL return one band of the closed set.
Scenario: One merge pair and one insight
- WHEN A test resolves
brain.merge_same_needon an ambiguous pair andbrain.entry_qualityon one insight in shadow mode. - THEN Each resolver returns a band, the registry holds both points with mode
shadowand no entry changes.
Requirement: Evaluate score
Evaluate SHALL compute the fixed score from freshness, source state, use and support, and SHALL mark an entry stale or weak from that score.
Scenario: An old, unused entry among 300
- WHEN A test runs evaluate on 300 entries and one entry whose source commit is old and which no job used.
- THEN That entry holds
stale.
Requirement: Evaluate bounds
Evaluate SHALL score at most 300 entries, SHALL ask at most 50 Jev questions and SHALL make 0 generative calls.
Scenario: 350 entries
- WHEN A test runs evaluate on 350 entries.
- THEN The run scores 300 entries, asks 50 Jev questions and records 0 generative calls.
Requirement: Stop between transactions
Each task SHALL write each change in one WATCH/MULTI/EXEC transaction, SHALL write a rebuild to a temporary key and RENAME it, and SHALL write the run record and the cursor last.
Scenario: Stop after k transactions and run again
- WHEN A test stops a repair after k transactions and runs repair again.
- THEN The keys and the run record equal those of an uninterrupted run.
Requirement: Safe stop on SIGTERM
A task SHALL stop between two transactions on SIGTERM, write result=stopped and exit 0.
Scenario: SIGTERM after the first transaction
- WHEN A test sends SIGTERM to a repair run after its first transaction.
- THEN The run record holds
result=stoppedand the process exits 0.
Requirement: Try again later on a store failure
A task SHALL exit 75 when the Valkey client cannot connect and SHALL send no GitHub request.
Scenario: A refused connection
- WHEN A test gives a Valkey client that raises a connection error and a fake GitHub client.
- THEN The task exits 75, the GitHub client records 0 requests and no key is written.
Requirement: Workflow manifests
The change SHALL add WorkflowTemplate roadmap-brain and CronWorkflow brain-daily to k8s/devops/ with the schedule, concurrency policy, start deadline, mutex, active deadline and retry of this issue.
Scenario: Validate the brain manifests
- WHEN A validator runs
uv run devops ci --check --only k8s. - THEN The command exits 0 and reports no error for
k8s/devops/workflowtemplate-roadmap-brain.yamlandk8s/devops/cronworkflow-brain-daily.yaml.
Requirement: One pod runs the daily tasks
The WorkflowTemplate SHALL run the daily command in one pod with the Service image and the row=brain label.
Scenario: Check the live daily workflow
- WHEN A live check runs
kubectl get workflowtemplate roadmap-brain -n devops -o jsonpath='{.spec.templates[0].container.image} {.spec.templates[0].metadata.labels.row}'. - THEN The command prints the Service image and
brain.
Requirement: Audit log and events
Each task SHALL write one JSON log line for each change with ids only and SHALL add one XADD to the stream brain-events.
Scenario: One changed insight
- WHEN A test runs repair on one insight that changed and a fake GitHub client.
- THEN The log holds one line under logger
devops_cli.roadmap.brainwith ids and no issue text, andbrain-eventsholds one entry.
Requirement: Summary comments
Each task SHALL write at most 2 summary comments a day, each with at most 40 hidden blocks.
Scenario: One changed insight
- WHEN A test runs repair on one insight that changed and a fake GitHub client.
- THEN The client records one summary comment with one hidden block.
Requirement: Brain instruments
The change SHALL expose the five devops_cli_brain_* instruments and SHALL update them on each run.
Scenario: One consolidate run that changes an entry
- WHEN A test runs a consolidate task that changes one entry and reads the instrument registry.
- THEN
devops_cli_brain_task_runs_totalanddevops_cli_brain_entries_changed_totaleach carry one increment anddevops_cli_brain_task_last_success_timestamp_secondsis set.
Requirement: No due marks
Repair and consolidate SHALL set no due mark and SHALL leave work that exceeds their bounds for the next daily run.
Scenario: More than 10 unjudged shortlists
- WHEN A test runs consolidate on more than 10 unjudged shortlists.
- THEN The store holds no
brain-consolidatekey and the run records the remaining shortlists for the next daily run.
Requirement: ADR status history
The change SHALL add one dated Fact out of date line to the ## Status History section of ADR 0023 for the due-mark bullet (#5482).
Scenario: ADR 0023 status history
- WHEN A test runs the ADR body-hash check of the repository.
- THEN The body hash of ADR 0023 is unchanged and the last line of its Status History is dated, holds
Fact out of date:and ends with(#5482).
Requirement: Spec delta
The change SHALL write the spec delta at openspec/changes/4687-brain-daily/specs/project-brain/upkeep/spec.md and MUST NOT edit openspec/specs/.
Scenario: Validate the spec delta
- WHEN A validator runs
uv run openspec validate 4687-brain-daily --strict. - THEN The command exits 0 and reports the change
4687-brain-dailyas valid.
Requirement: Pending a person after the merge
After the merge, a person SHALL run the cluster drill with the Valkey address 192.0.2.1 and SHALL confirm 7 daily runs with result ok or partial and 82 judged shortlists within 10 days.
Scenario: Cluster drill and seven daily runs
- WHEN A person runs the cluster drill with the Valkey address
192.0.2.1and checks the run records after the merge. - THEN The drill exits 75 within 61 s and writes nothing to GitHub; 7
brain-dailyrun records hold resultokorpartial; the 82 open shortlists hold judge results within 10 days.
Existing Tool Considered
The alternatives check of 2026-11-26 in the issue body records in-use for argoproj/argo-workflows (Apache-2.0, maintained). The block gives what the tool covers and lacks. The change uses the tool for the daily engine. It builds the repair, consolidate, evaluate, safe-stop, audit, events, link-check and shadow-decision logic itself, which the block lists as lacking. That build costs about 300,000 tokens and 7 hours.
Key questions
- Which component runs the daily brain tasks?: Argo Workflows runs them. CronWorkflow
brain-dailyin namespacedevopsstarts WorkflowTemplateroadmap-brainat 02:30 UTC every day. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, CONTEXT.md]- Chosen: Argo CronWorkflow. Argo Workflows is in use. It gives the cron schedule, the mutex and the retry by exit code.
- Rejected: Loop in a Service pod. The owner refused a loop in a Service pod. Only the router and the sweep create a unit of work.
- Rejected: Plain Kubernetes CronJob. A CronJob gives no step template, no mutex field and no retry by exit code.
- How does the schedule stop a second brain run and a missed start?: The CronWorkflow sets
concurrencyPolicy: Forbid,startingDeadlineSeconds: 3600andsynchronization.mutexes: [brain]. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: Forbid and mutex together. Forbid drops an overlapping start. The mutex also blocks a manual run.
- Rejected:
concurrencyPolicy: Forbidonly. It covers one CronWorkflow. It does not cover a manualbrain repairrun. - Rejected: Mutex only. A mutex waits for the other run. It does not bound a missed start.
- Which tasks does
brain-dailyrun, and in which order?: Repair, signals, consolidate and evaluate run in that order.brain-weeklyruns aggregate and improve and is outside this item. [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md] - How does one pod run all daily tasks?: The WorkflowTemplate runs the
dailycommand in one pod. That command runs repair, signals, consolidate and evaluate in order. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: One
dailycommand in one pod. ADR 0023 records one pod for all tasks of one run. The command keeps the order. - Rejected: A separate pod for each task. It adds pods, labels and retry policy for each task. It breaks the one-pod order.
- Rejected: A loop in the Service pod. The owner refused a loop in a Service pod.
- Chosen: One
- Which existing modules do the new commands call?: The command group joins
src/devops_cli/commands/roadmap.py. The tasks callsrc/devops_cli/roadmap/brain_sync.py,consolidate.py,consolidate_judge.py,decision_table.py,run.py,brain_index.pyandsrc/devops_cli/roadmap/stores/brain_issues.py. Each item block write goes throughAlternativesWriteratsrc/devops_cli/roadmap/alternatives.py:1893. [sources: src/devops_cli/commands/roadmap.py, src/devops_cli/roadmap/brain_sync.py, src/devops_cli/roadmap/consolidate.py, src/devops_cli/roadmap/consolidate_judge.py, src/devops_cli/roadmap/decision_table.py, src/devops_cli/roadmap/run.py, src/devops_cli/roadmap/brain_index.py, src/devops_cli/roadmap/stores/brain_issues.py, src/devops_cli/roadmap/alternatives.py:1893] - What is the current consolidate judge limit for one run?: The limit is 10 shortlists a run.
DEFAULT_ROADMAP_CONSOLIDATE_JUDGEDsets it atsrc/devops_cli/config/defaults.py:995. [sources: src/devops_cli/config/defaults.py:995, src/devops_cli/roadmap/consolidate.py] - Which mode do the new decision points use at first?: Both
brain.merge_same_needandbrain.entry_qualitystart inshadowmode. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, CONTEXT.md]- Chosen:
shadow. A shadow run records the band and changes no entry. A person compares it with the rules. - Rejected:
off. No data would show whether the bands fit these points. - Rejected:
on. No measured bands exist for these points.
- Chosen:
- How does a task keep the store consistent when it stops?: Each change is one WATCH/MULTI/EXEC transaction. Each rebuild writes a temporary key and RENAMEs it. The run record and the cursor are written last. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md]
- Chosen: One transaction for each change. A stop lands between two changes. The store keeps every completed change.
- Rejected: One transaction for the whole run. The bounds reach 1,000 keys. A long WATCH fails more often.
- Rejected: No transaction, with an idempotent re-run. A reader sees a half-rebuilt key set.
- How do the roadmap selections skip the tracker issue?: The tracker issue carries the label
type/epicand a hidden marker. Each selection skips an issue that holds both. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, CONTEXT.md]- Chosen: Label and marker together. Either one alone can be lost. The two together survive a hand edit of the other.
- Rejected: Label only. A person can add a priority label by hand.
- Rejected: Marker only. A person can remove the marker.
- How does a run handle work that exceeds its bounds?: It sets no due mark. It leaves the work for the next daily run. (best practice) [sources: docs/guidelines/agentic-jobs.md, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md]
- Chosen: No due mark.
docs/guidelines/agentic-jobs.mdgives one due predicate per job and no second list of due work. - Rejected: A due mark read by the sweep. No sweep reads a brain due mark after the split. This item does not wait for the brain due predicate.
- Rejected: A due mark read by the next daily run. The daily CronWorkflow starts at 02:30 UTC by its schedule. A mark adds the second due list that the guideline forbids.
- Chosen: No due mark.
- Which store holds the brain key that repair gives a TTL?: The cache tier
valkey-devopsholds it. The index keys live invalkey-roadmap. Each key there has a TTL or one owner. (best practice) [sources: docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen:
valkey-devops. ADR 0023 puts the caches invalkey-devops. The body names that store. - Rejected:
valkey-roadmap. The index keys ofvalkey-roadmapare not the keys that the TTL repair names.
- Chosen:
- What is the index marker, and does repair write it?: The index marker is
brain-sync, and the sync owns it. No kindbrain-builtexists. Repair rebuilds the index entries and leaves the marker. [sources: src/devops_cli/roadmap/brain_index.py, src/devops_cli/roadmap/brain_sync.py] - Which parts of the repair already exist?: The sync copies each check into an empty index at
src/devops_cli/roadmap/brain_sync.py. The removal of the keys of an off repository and the rebuild of theitemsfield do not exist. They are new work. [sources: src/devops_cli/roadmap/brain_sync.py, src/devops_cli/roadmap/brain_index.py, tests/roadmap/test_brain_sync.py] - Where does the change write the brain upkeep spec?: The change writes a spec delta at
openspec/changes/4687-brain-daily/specs/project-brain/upkeep/spec.md. Onlyopenspec archivewritesopenspec/specs/project-brain/upkeep/spec.md. (best practice) [sources: CONTEXT.md, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md]- Chosen: A spec delta in the change folder. Only
openspec archivewrites a living spec. - Rejected: Edit the living spec in the pull request.
CONTEXT.mdreserves the living spec toopenspec archive.
- Chosen: A spec delta in the change folder. Only
- Where do the WorkflowTemplate and the CronWorkflow live?: They live in
k8s/devops/, beside the other roadmap Job manifests. [sources: k8s/devops/cronjob-runner.yaml, k8s/devops/cronjob-stage.yaml, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md] - Which ADR record changes for the removed due mark?: The change adds one dated
Fact out of dateline at the end of the## Status Historysection of ADR 0023. The line covers the due-mark bullet (feat(roadmap): track the roadmap pipeline split into jobs #5482). The body of the accepted record does not change. (best practice) [sources: docs/adr/README.md, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md]- Chosen: One
Fact out of dateline in Status History.docs/adr/README.mdallows only a dated line at the end of the Status History. It gives theFact out of dateform for a bullet that is no longer true. - Rejected: Edit the due-mark bullet in the body.
docs/adr/README.mdfreezes the body of an accepted record. The body-hash check fails. - Rejected: Leave ADR 0023 unchanged. The due-mark bullet would stay wrong.
docs/adr/README.mdsays the same pull request adds the line.
- Chosen: One
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.The brain degrades without daily upkeep, but the system still functions and the owner has not flagged it as urgent.Automates manual maintenance and prevents silent data drift in the roadmap brain.Requires new commands, a CronWorkflow, repair and evaluate logic, audit, safe-stop handling, and a spec.Both add a CronWorkflow for a roadmap job on a cluster schedule, but #4574 schedules the reconcile sweep while the candidate schedules brain repair, consolidate, and evaluate.feat(roadmap): consolidate has a read-only MCP mirror (#4807)
dan-petty commentedon Nov 12, 2026
Scope from the content freshness plan (2026-11-11)
This issue is child 17 of #4880, the content freshness tracker. The scope adds document citations and the scheduled document rules to the daily run.
Why
Brain-daily repair rebuilds item, tool and reference entries, but it does not check document citations. A moved or changed span keeps a stale citation until someone sees it. Nothing runs the scheduled document rules.
New scope
git diff --name-status -M <last>..<head>for each run. It intersects the result in memory with the cited paths (at most 300 entries).git diff --quiet <commit> HEAD -- <generated_from>fails. Repair then asks the resolver of feat(ai): generate the project digest from code at run time #3904 again and files no issue.devops docs drift --format json(feat(docs): devops docs drift reports the drift that no PR check finds #4920) at themainhead and sets the gaugedevops_cli_docs_drift_findings.No new key family: below 10,000 entries the diff is enough, and weekly improve runs the command again. The bounds of this issue stay: at most 60 GitHub requests, 0 model calls and 600 s. Update
k8s/README.mdanddocs/ROUTINE_TASKS.md.Acceptance added
Depends on: #4920, #4479, #3904, and the dependencies that this issue already names.
devops-cli-service commentedon Nov 14, 2026
Alternatives check: in-use
Reason: The searches point to Argo Workflows as the Kubernetes-native workflow engine for scheduled, cron-driven workflows, and the issue itself already builds on it (#4566, ADR 0008 and ADR 0021 run roadmap jobs as cluster pods). It covers the scheduling and orchestration half of the need, but none of the brain repair, consolidate, evaluate, audit or safe-stop logic, which this issue must still write.
The repository already uses this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Refine cannot set this item to Ready at 46c62f3 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
dan-petty commentedon Nov 21, 2026
Dependency decision: remove #4574 from this item.
The owner approved the pipeline split on 2026-11-13. In that design, no job writes a due mark, and
due_jobsis the only source of due work. #4574 runsdue_jobsand reads no due mark (owner decision of 2026-11-13 in #4574). So no sweep readsbrain-repairorbrain-consolidate, and this item does not need #4574.Scope change:
brain-repairandbrain-consolidate, and remove the requirement "Due marks".DEFAULT_ROADMAP_CONSOLIDATE_JUDGED.docs/adr/README.md.Dependencies: #4566, #4676. #4574, #5482, #5502, #5504 and #6596 are sources, not dependencies of this item.
devops-cli-service commentedon Nov 21, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 26, 2026
Requirement for repair, from the build of the brain index (#4676, pull request #7320, 2026-11-26):
brain-item,brain-tool,brain-refandbrain-eventskeys of such a repository in its first run after the change. fix(roadmap): remove cached issues when a repository becomes private #7298 holds the same case for the issue cache, with the bound of 1 hour of the snapshot.itemsfield of its oldbrain-toolhash until that hash is written again or expires. Repair rebuilds theitemsof each tool and each reference from the blocks.devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 27, 2026
Design check, 2026-11-26
Body, 2 corrections: the judge limit is at
src/devops_cli/config/defaults.py:978. The index has the markerbrain-syncand no kindbrain-built(src/devops_cli/roadmap/brain_index.py:56-60).Refine block
brain-builtas the last key.valkey-devopsbrain key. The index keys are invalkey-roadmap. Not verified: which store the body means.brain-item,brain-toolandbrain-refexists in part: the sync copies each check into an empty index (src/devops_cli/roadmap/brain_sync.py:219). The removal and the rebuild ofitemsdo not exist.Dependencies: #4676 is closed. #4566 is open. It waits for #5289 (open). dan-petty/homelab#320 closed on 2026-11-27.
Open question: the scope comment of 2026-11-12 uses #4920 (open). The body does not name it.
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Dec 1, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.