Skip to content

Make Cloud instructions current and harden environment setup - #3593

Merged
gitar-bot[bot] merged 14 commits into
mainfrom
codex/cloud-policy-overhaul
Oct 17, 2026
Merged

gitar-bot[bot] merged 14 commits into
mainfrom
codex/cloud-policy-overhaul

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Cloud tasks could reload obsolete launch rules and session memories, while setup helpers accepted invalid inputs or reported stale readiness. Consolidate current-host instructions, archive completed prompts and old session state, and make legacy bootstrap validation explicitly selected.

Harden Codex and Claude Cloud setup, diagnostics, GitHub authentication preflight, profile seeding and checkout validation. Preserve existing host memories, provider/production safeguards and specialist programme evidence. Retain the owner-approved restricted continuation and scrubbed offline-check policy from #3581.

Areas touched: Knowledge and records, Delivery and assurance

RAG impact: no retrieval behaviour change — changes cover launch guidance, phase admission and generated package metadata; phase routing, receipts and independent review requirements remain intact.

Verification

  • Final combined Cloud and instruction regression run: 598 tests passed across 17 suites; one historical incident test skipped because its referenced commit is not available locally. Repository isolation self-tests passed 28/28.
  • Typecheck, changed-file lint, generated RAG package parity/receipts, instruction and decision guards, documentation links/script references, repository-awareness snapshot freshness, diff integrity and shell syntax checks passed. Normal push guards enforce formatting, lint and typecheck on the pushed revision.
  • Whole-repository npm run format completed; normal commit hooks synchronized applicable generated documentation.
  • Independent full-scope standards and behavior reviews both PASS at 3af32df42c2dfbefd75a0fff9820ebc2c4c8a316; no actionable findings remain.

check:dead-code-candidate returned diagnostic findings for one obsolete export without callers and two private helpers replaced by the tested checkout validator and strict argument parser. These are reviewed behavioral replacements, not module deletions justified by reachability alone; the diagnostic scan is not reported as passing.

GitHub CI on 3af32df42c2dfbefd75a0fff9820ebc2c4c8a316 is green: run 38945349618, including the PR required aggregate. Both coverage partitions passed 31,782 unit tests in total (one historical skip). Static checks, lint/typecheck, safety, both builds, critical browser checks and all three full browser shards passed. SAST and secret scanning also passed. Workflow-selected skips are recorded as skips, not passing evidence.

Not run locally: application browser/release gates and provider-backed clinical evaluations. CI completed its scope-selected build and browser checks. No live-service mutation, actual-home provisioning or credential-value inspection was used in local verification.

Risk and rollout

  • Risk: setup and admission behavior changes for explicitly selected legacy profiles and fresh Claude Cloud profiles. Invalid inputs fail earlier; obsolete session files are excluded from new seeds. Existing host-written memories remain preserved.
  • Rollback: revert this PR; archived records preserve the earlier instructions and session-state bytes.
  • Provider or production effects: no production configuration, database migration or clinical output change. Publication triggers normal CI. Repository policy activation still requires integration and observing the loaded revision in target tasks.

Notes

This PR uses a separate branch from #3587, which merged during publication; its changes are integrated here without overwriting that work. The earlier legacy runbook and seven session records are retained as labelled history rather than active startup instructions.

@greptile-apps greptile-apps 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.

BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@codeant-ai

codeant-ai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 2d86e86 Oct 16, 2026 · 17:37 17:44

@supabase

supabase Bot commented Oct 16, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@codeant-ai

codeant-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: BigSimmo/PsychSift/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 67f90d95-2af9-4aa8-a117-b5ab90d0950e
📥 Commits

Reviewing files that changed from the base of the PR and between 27ef741 and 3af32df.

📒 Files selected for processing: 100
  • .agents/skills/prompt-perfector/references/repository-workflow.md
  • .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs
  • .agents/skills/rag-cloud-sdd/SKILL.md
  • .claude/agents/rag-retrieval-reviewer.md
  • .claude/cloud-profile/CLAUDE.md
  • .claude/cloud-profile/memory/MEMORY.md
  • .claude/cloud-profile/memory/claude-hook-exec-bit-trap.md
  • .claude/cloud-profile/memory/claude-plugin-native-deps-trap.md
  • .claude/cloud-profile/memory/communication-style-plain-and-brief.md
  • .claude/cloud-profile/memory/never-print-env-values.md
  • .claude/cloud-profile/memory/seed-manifest.json
  • .claude/cloud-profile/memory/token-usage-hygiene.md
  • .claude/cloud-profile/skills/choose-model/SKILL.md
  • .claude/cloud-profile/skills/code-review/SKILL.md
  • .claude/cloud-profile/skills/prompt/SKILL.md
  • .claude/cloud-profile/skills/prompt/references/coding-workflow.md
  • .claude/hooks/testing-policy.sh
  • .claude/settings.json
  • .claude/skills/newtask/SKILL.md
  • .claude/skills/prompt/SKILL.md
  • .claude/skills/prompt/references/coding-workflow.md
  • AGENTS.md
  • README.md
  • data/repo-awareness-snapshot.json
  • docs/README.md
  • docs/agents-guide.md
  • docs/agents/codex-cloud-environment.md
  • docs/agents/codex-reasoning-effort.md
  • docs/agents/shared-context-and-memory.md
  • docs/agents/smart-agent-allocation.md
  • docs/agents/verification-gates.md
  • docs/archive/cloud-session-state-2026-10-16/README.md
  • docs/archive/cloud-session-state-2026-10-16/codex-chat-import-tooling.md
  • docs/archive/cloud-session-state-2026-10-16/db-remediation-coordination-state.md
  • docs/archive/cloud-session-state-2026-10-16/dev-drive-project-location.md
  • docs/archive/cloud-session-state-2026-10-16/ingestion-review-remediation-state.md
  • docs/archive/cloud-session-state-2026-10-16/lighthouse-mobile-root-cls-flake.md
  • docs/archive/cloud-session-state-2026-10-16/local-test-failures-windows.md
  • docs/archive/cloud-session-state-2026-10-16/rag-programme-coordination-state.md
  • docs/archive/codex-cloud-design-status-semantics-2026-10-16.md
  • docs/archive/codex-cloud-legacy-profile-2026-10-16.md
  • docs/archive/rag-coverage-gate-extraction-2026-10-16.md
  • docs/claude-cloud.md
  • docs/codex-cloud.md
  • docs/decisions/2026-10-16-cloud-legacy-profile-scope.md
  • docs/decisions/2026-10-16-cloud-operating-policy-overhaul.md
  • docs/decisions/2026-10-16-cloud-policy-repair-boundary.md
  • docs/decisions/2026-10-16-remove-cloud-xhigh-marker-gate.md
  • docs/decisions/2026-10-16-remove-obsolete-cloud-startup-instructions.md
  • docs/decisions/2026-10-16-user-controlled-reasoning-effort.md
  • docs/organisation/retired-rules.json
  • docs/organisation/systems/knowledge.json
  • docs/process-hardening.md
  • docs/prompts/codex-architecture-maintainability-ultra-review.md
  • docs/prompts/codex-cloud-design-status-semantics.md
  • docs/prompts/codex-data-database-safety-ultra-review.md
  • docs/prompts/codex-documentation-ownership-ultra-review.md
  • docs/prompts/codex-functional-correctness-ultra-review.md
  • docs/prompts/codex-performance-reliability-ultra-review.md
  • docs/prompts/codex-tests-quality-gates-ultra-review.md
  • docs/prompts/mode-aware-clinical-ask-codex-cloud-handover.md
  • docs/prompts/rag-coverage-gate-extraction.md
  • docs/scripts-index.md
  • docs/superpowers/plans/2026-08-22-mode-aware-clinical-ask-implementation.md
  • docs/superpowers/rag-upgrade/CLOUD-EXECUTION-PROMPT.md
  • docs/superpowers/rag-upgrade/canonical/START-HERE.cloud.md
  • docs/superpowers/rag-upgrade/canonical/execution-order.md
  • docs/superpowers/rag-upgrade/canonical/programme-manifest.json
  • docs/superpowers/rag-upgrade/canonical/sdd-execution.md
  • docs/superpowers/rag-upgrade/cloud/START-HERE.md
  • docs/superpowers/rag-upgrade/cloud/execution-order.md
  • docs/superpowers/rag-upgrade/cloud/programme-manifest.json
  • docs/superpowers/rag-upgrade/cloud/sdd-execution.md
  • docs/superpowers/rag-upgrade/local/execution-order.md
  • docs/superpowers/rag-upgrade/local/programme-manifest.json
  • docs/superpowers/rag-upgrade/local/sdd-execution.md
  • plugins/clinical-kb/README.md
  • plugins/clinical-kb/skills/clinical-kb-workflow/SKILL.md
  • scripts/apply-claude-cloud-profile.mjs
  • scripts/check-codex-cloud-setup.mjs
  • scripts/diagnose-codex-cloud.mjs
  • scripts/ensure-codex-cloud-git-remote.mjs
  • scripts/install-codex-cloud-command-shims.sh
  • scripts/maintain-codex-cloud.sh
  • scripts/organisation/check-retired-rules.mjs
  • scripts/rag-phase-launch-check.mjs
  • scripts/run-codex-cloud-github.sh
  • scripts/setup-claude-cloud.sh
  • scripts/setup-codex-cloud.sh
  • tests/claude-cloud-profile.test.ts
  • tests/cloud-installed-guidance.test.ts
  • tests/codex-cloud-diagnose.test.ts
  • tests/codex-cloud-github-lifecycle.test.ts
  • tests/codex-cloud-policy-harness.test.ts
  • tests/codex-cloud-remote.test.ts
  • tests/codex-cloud-setup.test.ts
  • tests/database-skills.test.ts
  • tests/diff-integrity.test.ts
  • tests/organisation-instruction-guards.test.ts
  • tests/rag-plan-package-parity.test.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📝 Walkthrough

The pull request replaces fixed Cloud and workstation assumptions with current-host verification, explicit legacy-profile selection, stricter runtime and credential guards, curated Claude profile installation, updated RAG execution contracts, archived historical guidance, and expanded validation coverage.

Changes: Cloud validation and policy

Layer / File(s) Summary
Cloud evidence and runtime guards
.agents/skills/..., scripts/*codex-cloud*
Cloud workflows use host evidence or explicit attestation. Legacy setup requires explicit selection. Checkout, profile, raw-environment, runtime, and provider checks fail before dependent actions.
Repository and host guidance
AGENTS.md, README.md, docs/agents/*, .claude/skills/*, plugins/clinical-kb/*
Guidance now uses current checkout and host capabilities. Same-task continuation is allowed when ownership is verified.
Validation tests
tests/codex-cloud-*, tests/database-skills.test.ts
Tests cover Cloud evidence, profile selection, raw-boundary outcomes, checkout freshness, credential handling, remote identity, and lifecycle ordering.

Claude profile installation

Layer / File(s) Summary
Curated memory installation
.claude/cloud-profile/memory/*, scripts/apply-claude-cloud-profile.mjs
A versioned seed manifest controls memory installation. Invalid entries stop changes. Existing files and symlinks are preserved.
Provisioning and installed guidance
scripts/setup-claude-cloud.sh, .claude/cloud-profile/*, tests/claude-cloud-profile.test.ts, tests/cloud-installed-guidance.test.ts
Provisioning validates selections before side effects and checks cached runtime markers. Installed guidance is tested for current policy text.

RAG programme controls

Layer / File(s) Summary
Launch and review contracts
.agents/skills/rag-cloud-sdd/SKILL.md, docs/superpowers/rag-upgrade/*, .claude/agents/rag-retrieval-reviewer.md
RAG execution requires declared target and effort, current host readiness, bounded probe findings, route evidence, separate reviews, and current retrieval-quality evidence.
Parity and policy tests
tests/rag-plan-package-parity.test.ts, scripts/rag-phase-launch-check.mjs
Tests cover raw-boundary handling, target and effort validation, and optional legacy attestation compatibility.

Historical records and retired guidance

Layer / File(s) Summary
Archives and decisions
docs/archive/*, docs/decisions/*, docs/organisation/*, data/repo-awareness-snapshot.json
Historical Cloud profiles, prompts, session records, decisions, retired rules, and review-state records are catalogued and separated from active guidance.

Priority: ➖ Normal

Estimated code review effort: 5 (Critical) | ~90 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3af32

This change updates Cloud guidance and setup validation. No unresolved merge-blocking issue was found in the supplied evidence.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 53 functions across 24 files. (69 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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.
Title check Passed The title is concise and accurately summarizes the primary changes to Cloud instructions and environment setup.
Description check Passed The description includes all required sections, explains the changes, documents verification and limitations, and provides risk, rollback, provider, and rollout details.
Full details: Docstring Coverage

Explanation

Docstring coverage is 28.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 53 functions across 24 files. (69 skipped: 69 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T17:42:01.385671Z 2d86e86 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Oct 16, 2026
@codeant-ai

codeant-ai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 3af32df4
Scan Time: 2026-10-17 01:53:48 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found, 7 false positive secrets suppressed
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating S: No issues

View Full Results

Comment thread scripts/maintain-codex-cloud.sh Resolved
@gitar-bot
gitar-bot Bot enabled auto-merge (squash) October 16, 2026 17:41
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 16, 2026

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gitar has auto-approved this PR (configure)

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d86e86fa2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Auto-fix isn't included in your plan ↗

Upgrade to Team

Comment thread .claude/skills/newtask/SKILL.md Resolved
@qodo-code-review

qodo-code-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

No findings for this group


Remediation recommended

1. Offline Cloud checks reject a mode setup ignores 🟠 Medium 🐞 Bug ≡ Correctness
Description
validateInheritedCloudProfileSelection allows only RAG_PROVIDER_MODE=offline for every profile,
including an explicit or cached offline one. setup-codex-cloud.sh and the revised maintenance
script ignore that value for the offline profile and pin it to offline. So when the checker
auto-loads the profile (CODEX_CLOUD=1 and a PATH that skips the shim) or runs with --environment,
an offline environment configured with e.g. RAG_PROVIDER_MODE=auto fails with "must be an approved
value". The same environment provisions and resumes cleanly.
Code

scripts/check-codex-cloud-setup.mjs[R1389-1394]

+  const errors = [];
+  for (const [name, allowed] of Object.entries({
+    RAG_PROVIDER_MODE: ["offline"],
+    NEXT_PUBLIC_DEMO_MODE: profile === "offline" ? ["true"] : ["true", "false"],
+    PLAYWRIGHT_OFFLINE_MODE: profile === "offline" ? ["true"] : ["true", "false"],
+  })) {
Relevance

●●● Strong

Recent accepted precedents favor mode-aware validation when shared checks diverge by provider or
environment.

PR-#3587
PR-#3537

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Setup applies the RAG mode check only to the connected profile and hard-codes offline otherwise.
Maintenance (lines 33-34 and 57-58) was also changed to check only the connected profile. The
checker's new preflight applies ["offline"] whatever the profile is. It runs before the profile is
sourced, and the generated profile would have exported RAG_PROVIDER_MODE=offline for the offline
profile.

scripts/setup-codex-cloud.sh[70-77]
scripts/setup-codex-cloud.sh[196-204]
scripts/maintain-codex-cloud.sh[33-39]
scripts/check-codex-cloud-setup.mjs[1383-1421]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The checker's inherited-selection preflight rejects any `RAG_PROVIDER_MODE` other than `offline`, even for the offline profile. Setup and maintenance ignore that value for offline and pin it, so the checker contradicts them.

## Fix Focus Areas
- scripts/check-codex-cloud-setup.mjs[1383-1400]

## Recommended Fix
Apply the `RAG_PROVIDER_MODE` restriction only when the selected profile is `connected`. Treat an empty value as offline, matching setup's `${RAG_PROVIDER_MODE:-offline}`. If the profile is unset, either skip the RAG check or defer it until after the cached profile is sourced, where the child process validates the profile-pinned value. Add a test: an offline profile with `RAG_PROVIDER_MODE=auto` passes, and a connected profile with `auto` fails.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Informational

No findings for this group

Grey Divider


Resolved findings

1. Offline Cloud environments fail every maintenance run ✓ Resolved
Description
maintain-codex-cloud.sh now aborts whenever an inherited RAG_PROVIDER_MODE is set to anything
other than offline, and it checks this before looking at the access profile.
setup-codex-cloud.sh ignores RAG_PROVIDER_MODE for the offline profile and pins it to offline,
so an offline environment configured with, for example, RAG_PROVIDER_MODE=auto provisions cleanly
and then fails every resume until someone edits the environment.
Code

scripts/maintain-codex-cloud.sh[R33-35]

+if [[ "${RAG_PROVIDER_MODE+yes}" = "yes" && "$RAG_PROVIDER_MODE" != "offline" ]]; then
+  fail "The selected legacy Codex Cloud profile must keep RAG_PROVIDER_MODE=offline."
+fi
Relevance

●●● Strong

Cloud lifecycle inconsistencies causing maintenance failures match recent accepted setup and runtime
validation fixes.

PR-#3587
PR-#2724
PR-#2280

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Setup only enforces RAG_PROVIDER_MODE=offline when access_profile is connected and otherwise
forces rag_provider_mode="offline". Maintenance applies the check to every profile before it
sources the generated profile, and that profile already exports RAG_PROVIDER_MODE=offline for the
offline profile (checked again in load_runtime_profile). The two lifecycle entry points therefore
disagree on the same input.

scripts/setup-codex-cloud.sh[70-77]
scripts/maintain-codex-cloud.sh[23-58]
scripts/setup-codex-cloud.sh[196-203]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Maintenance rejects an inherited non-offline `RAG_PROVIDER_MODE` even for the `offline` profile, but setup accepts it and pins offline. Offline environments then pass setup and fail every maintenance run.

## Fix Focus Areas
- scripts/maintain-codex-cloud.sh[33-35]
- scripts/setup-codex-cloud.sh[70-77]

## Recommended Fix
Apply the pre-profile `RAG_PROVIDER_MODE` check only when the requested (or cached) access profile is `connected`, matching setup. Keep the post-source check in `load_runtime_profile`, which validates the generated profile's pinned value. Add a maintenance test for offline profile + `RAG_PROVIDER_MODE=auto`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Cloud flag unlocks editing the local primary checkout ✓ Resolved
Description
evaluateRepositoryState no longer requires any environment evidence for --cloud (the
cloudEnvironment / CODEX_CLOUD=1 check and the cloud_environment_required reason were
removed). On a local workstation whose primary checkout is the only registered worktree, passing
--cloud with matching expected repo/branch/HEAD now reports SAFE, which defeats the
primary_worktree protection that local workflows depend on.
Code

.agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[77]

-  if (options.cloud && !cloudEnvironment) reasons.push("cloud_environment_required");
Relevance

●●● Strong

Worktree isolation guards are treated as security-critical; bypassing local primary protection
conflicts with the hardening intent.

PR-#2318
PR-#2249

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
After the change, the only conditions for a primary worktree in cloud mode are options.cloud and
state.worktrees.length === 1. Nothing ties --cloud to a disposable host. The updated reference
doc also says --cloud is only a self-attestation and does not detect platform isolation, so a
mistaken or careless agent flag is all it takes to bypass the primary-worktree guard locally.

.agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[61-87]
.agents/skills/prompt-perfector/references/repository-workflow.md[62-85]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`--cloud` now lets a primary checkout pass isolation verification on any host, including the local workstation, as long as it is the only registered worktree.

## Fix Focus Areas
- .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[61-87]
- .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[275-285]

## Recommended Fix
Keep a negative host check even without the legacy `CODEX_CLOUD=1` marker. For example, refuse `--cloud` when `process.platform === "win32"` or when the checkout path matches the known workstation layout, or accept any of several current host signals (e.g. `CODEX_CLOUD`, `CLAUDE_CODE_REMOTE=true`, or an explicit host env set by the platform). Add a self-test case where a local single-worktree primary with `--cloud` and no host signal is rejected.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Auto-mode guidance softens provider confirmation rule ✓ Resolved
Description
The auto-permission classifier's "Routine under this repo's prefix" entry used to say
provider-backed actions (OpenAI, live Supabase, GitHub API writes, hosted CI, verify:release,
non-offline evals) are confirmation-required. It now says they "remain subject to the repo's
provider policy and existing task authorisation", which lets the classifier treat a task description
as authorisation for spend or live-provider actions without an explicit confirmation.
Code

.claude/settings.json[485]

+      "**Routine under this repo's prefix**: read-only and offline gate work inside that verified checkout and its task-owned worktrees is routine; anything provider-backed (OpenAI, live Supabase, GitHub API writes, hosted CI, `verify:release`, non-offline `eval:*`) remains subject to the repo's provider policy and existing task authorisation"
Relevance

●●● Strong

Recent settings precedents accept findings that broaden auto-allowed provider or mutating actions
without explicit confirmation.

PR-#2243
PR-#3243
PR-#2239

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rest of the same environment block still says provider-backed calls "require explicit user
confirmation per repo policy" (Network posture). The edited line is now vaguer than that rule and
contradicts it, and the classifier reads this line when it decides whether an action is routine.

.claude/settings.json[469-485]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The auto-mode environment entry no longer states that provider-backed actions require confirmation, which conflicts with the Network posture entry.

## Fix Focus Areas
- .claude/settings.json[485-485]

## Recommended Fix
Keep the new checkout-agnostic wording, but end the sentence with "...is confirmation-required by the repo's own policy" (or equivalent explicit confirmation language) instead of "existing task authorisation".

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 9 rules
✅ Cross-repo context — repo relationships
  Explored: repo: BigSimmo/Medications (sha: 5baf9f24) — View relationship
✅ REVIEW.md
Review mode: Auto: ⚖️ Balanced: Cloud setup validation changes runtime behavior with environment and shell safety implications.

Grey Divider

Tip of the day
💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 3af32df ⚖️ Balanced

Results up to commit 2d86e86 🧠 Deep


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required

No findings for this group


Remediation recommended

No findings for this group


Informational

No findings for this group


Resolved findings

1. Offline Cloud environments fail every maintenance run ✓ Resolved
Description
maintain-codex-cloud.sh now aborts whenever an inherited RAG_PROVIDER_MODE is set to anything
other than offline, and it checks this before looking at the access profile.
setup-codex-cloud.sh ignores RAG_PROVIDER_MODE for the offline profile and pins it to offline,
so an offline environment configured with, for example, RAG_PROVIDER_MODE=auto provisions cleanly
and then fails every resume until someone edits the environment.
Code

scripts/maintain-codex-cloud.sh[R33-35]

+if [[ "${RAG_PROVIDER_MODE+yes}" = "yes" && "$RAG_PROVIDER_MODE" != "offline" ]]; then
+  fail "The selected legacy Codex Cloud profile must keep RAG_PROVIDER_MODE=offline."
+fi
Relevance

●●● Strong

Cloud lifecycle inconsistencies causing maintenance failures match recent accepted setup and runtime
validation fixes.

PR-#3587
PR-#2724
PR-#2280

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Setup only enforces RAG_PROVIDER_MODE=offline when access_profile is connected and otherwise
forces rag_provider_mode="offline". Maintenance applies the check to every profile before it
sources the generated profile, and that profile already exports RAG_PROVIDER_MODE=offline for the
offline profile (checked again in load_runtime_profile). The two lifecycle entry points therefore
disagree on the same input.

scripts/setup-codex-cloud.sh[70-77]
scripts/maintain-codex-cloud.sh[23-58]
scripts/setup-codex-cloud.sh[196-203]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Maintenance rejects an inherited non-offline `RAG_PROVIDER_MODE` even for the `offline` profile, but setup accepts it and pins offline. Offline environments then pass setup and fail every maintenance run.

## Fix Focus Areas
- scripts/maintain-codex-cloud.sh[33-35]
- scripts/setup-codex-cloud.sh[70-77]

## Recommended Fix
Apply the pre-profile `RAG_PROVIDER_MODE` check only when the requested (or cached) access profile is `connected`, matching setup. Keep the post-source check in `load_runtime_profile`, which validates the generated profile's pinned value. Add a maintenance test for offline profile + `RAG_PROVIDER_MODE=auto`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Cloud flag unlocks editing the local primary checkout ✓ Resolved
Description
evaluateRepositoryState no longer requires any environment evidence for --cloud (the
cloudEnvironment / CODEX_CLOUD=1 check and the cloud_environment_required reason were
removed). On a local workstation whose primary checkout is the only registered worktree, passing
--cloud with matching expected repo/branch/HEAD now reports SAFE, which defeats the
primary_worktree protection that local workflows depend on.
Code

.agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[77]

-  if (options.cloud && !cloudEnvironment) reasons.push("cloud_environment_required");
Relevance

●●● Strong

Worktree isolation guards are treated as security-critical; bypassing local primary protection
conflicts with the hardening intent.

PR-#2318
PR-#2249

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
After the change, the only conditions for a primary worktree in cloud mode are options.cloud and
state.worktrees.length === 1. Nothing ties --cloud to a disposable host. The updated reference
doc also says --cloud is only a self-attestation and does not detect platform isolation, so a
mistaken or careless agent flag is all it takes to bypass the primary-worktree guard locally.

.agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[61-87]
.agents/skills/prompt-perfector/references/repository-workflow.md[62-85]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`--cloud` now lets a primary checkout pass isolation verification on any host, including the local workstation, as long as it is the only registered worktree.

## Fix Focus Areas
- .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[61-87]
- .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs[275-285]

## Recommended Fix
Keep a negative host check even without the legacy `CODEX_CLOUD=1` marker. For example, refuse `--cloud` when `process.platform === "win32"` or when the checkout path matches the known workstation layout, or accept any of several current host signals (e.g. `CODEX_CLOUD`, `CLAUDE_CODE_REMOTE=true`, or an explicit host env set by the platform). Add a self-test case where a local single-worktree primary with `--cloud` and no host signal is rejected.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Auto-mode guidance softens provider confirmation rule ✓ Resolved
Description
The auto-permission classifier's "Routine under this repo's prefix" entry used to say
provider-backed actions (OpenAI, live Supabase, GitHub API writes, hosted CI, verify:release,
non-offline evals) are confirmation-required. It now says they "remain subject to the repo's
provider policy and existing task authorisation", which lets the classifier treat a task description
as authorisation for spend or live-provider actions without an explicit confirmation.
Code

.claude/settings.json[485]

+      "**Routine under this repo's prefix**: read-only and offline gate work inside that verified checkout and its task-owned worktrees is routine; anything provider-backed (OpenAI, live Supabase, GitHub API writes, hosted CI, `verify:release`, non-offline `eval:*`) remains subject to the repo's provider policy and existing task authorisation"
Relevance

●●● Strong

Recent settings precedents accept findings that broaden auto-allowed provider or mutating actions
without explicit confirmation.

PR-#2243
PR-#3243
PR-#2239

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rest of the same environment block still says provider-backed calls "require explicit user
confirmation per repo policy" (Network posture). The edited line is now vaguer than that rule and
contradicts it, and the classifier reads this line when it decides whether an action is routine.

.claude/settings.json[469-485]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The auto-mode environment entry no longer states that provider-backed actions require confirmation, which conflicts with the Network posture entry.

## Fix Focus Areas
- .claude/settings.json[485-485]

## Recommended Fix
Keep the new checkout-agnostic wording, but end the sentence with "...is confirmation-required by the repo's own policy" (or equivalent explicit confirmation language) instead of "existing task authorisation".

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit 59ad331 🧠 Deep


🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required

No findings for this group


Remediation recommended
1. Offline Cloud checks reject a mode setup ignores 🟠 Medium 🐞 Bug ≡ Correctness
Description
validateInheritedCloudProfileSelection allows only RAG_PROVIDER_MODE=offline for every profile,
including an explicit or cached offline one. setup-codex-cloud.sh and the revised maintenance
script ignore that value for the offline profile and pin it to offline. So when the checker
auto-loads the profile (CODEX_CLOUD=1 and a PATH that skips the shim) or runs with --environment,
an offline environment configured with e.g. RAG_PROVIDER_MODE=auto fails with "must be an approved
value". The same environment provisions and resumes cleanly.
Code

scripts/check-codex-cloud-setup.mjs[R1389-1394]

+  const errors = [];
+  for (const [name, allowed] of Object.entries({
+    RAG_PROVIDER_MODE: ["offline"],
+    NEXT_PUBLIC_DEMO_MODE: profile === "offline" ? ["true"] : ["true", "false"],
+    PLAYWRIGHT_OFFLINE_MODE: profile === "offline" ? ["true"] : ["true", "false"],
+  })) {
Relevance

●●● Strong

Recent accepted precedents favor mode-aware validation when shared checks diverge by provider or
environment.

PR-#3587
PR-#3537

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Setup applies the RAG mode check only to the connected profile and hard-codes offline otherwise.
Maintenance (lines 33-34 and 57-58) was also changed to check only the connected profile. The
checker's new preflight applies ["offline"] whatever the profile is. It runs before the profile is
sourced, and the generated profile would have exported RAG_PROVIDER_MODE=offline for the offline
profile.

scripts/setup-codex-cloud.sh[70-77]
scripts/setup-codex-cloud.sh[196-204]
scripts/maintain-codex-cloud.sh[33-39]
scripts/check-codex-cloud-setup.mjs[1383-1421]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The checker's inherited-selection preflight rejects any `RAG_PROVIDER_MODE` other than `offline`, even for the offline profile. Setup and maintenance ignore that value for offline and pin it, so the checker contradicts them.

## Fix Focus Areas
- scripts/check-codex-cloud-setup.mjs[1383-1400]

## Recommended Fix
Apply the `RAG_PROVIDER_MODE` restriction only when the selected profile is `connected`. Treat an empty value as offline, matching setup's `${RAG_PROVIDER_MODE:-offline}`. If the profile is unset, either skip the RAG check or defer it until after the cached profile is sourced, where the child process validates the profile-pinned value. Add a test: an offline profile with `RAG_PROVIDER_MODE=auto` passes, and a connected profile with `auto` fails.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Informational

No findings for this group

Grey Divider

Qodo Logo

Comment thread scripts/maintain-codex-cloud.sh Resolved
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Make Cloud instructions current and harden environment setup

🐞 Bug fix ✨ Enhancement 📝 Documentation 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Replace stale Cloud defaults with current-host guidance and explicitly selected legacy setup.
• Archive completed prompts and session memories without changing existing host memories.
• Harden setup validation, credential preflight, checkout checks and Claude profile seeding.
• Preserve RAG programme safeguards and add focused regression coverage.
Diagram

graph TD
  A["Current Cloud policy"] --> B["Host capability checks"]
  A --> C["Legacy profile selection"] --> D["Raw boundary probe"] --> E["Codex setup and validation"]
  A --> F["Claude setup"] --> G["Profile applier"] --> H["Seed manifest"]
Loading
High-Level Assessment

Keep the selected-legacy approach: it removes obsolete universal requirements without deleting an operational bootstrap or weakening its credential boundary. Manifest-based seeding also prevents archived session state from becoming fresh-host instructions while preserving host-written memory.

Files changed (98) +4096 / -2046

Enhancement (2) +43 / -10
SKILL.mdReview complete owned working changes +12/-7

Review complete owned working changes

• Includes staged, unstaged and untracked files; distinguishes pinned branch review from working-change review and limits external actions to authorized tools.

.claude/cloud-profile/skills/code-review/SKILL.md

check-retired-rules.mjsScan more active Cloud instruction surfaces +31/-3

Scan more active Cloud instruction surfaces

• Covers copyable prompts, programme lifecycle files and plugin skills while excluding preserved verbatim review inputs.

scripts/organisation/check-retired-rules.mjs

Bug fix (13) +570 / -236
verify-repository-isolation.mjsRemove ambient Cloud marker requirement +18/-8

Remove ambient Cloud marker requirement

• Removes the separate cloudEnvironment condition and expands self-tests for checkout identity, branch, HEAD and dirty-state drift.

.agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs

MEMORY.mdRemove archived session state from seed index +11/-12

Remove archived session state from seed index

• Retains reusable guidance links and removes old coordination, workstation and incident records from the fresh-host index.

.claude/cloud-profile/memory/MEMORY.md

SKILL.mdReplace hardcoded Claude model lineup +29/-48

Replace hardcoded Claude model lineup

• Requires verification of supported host models and effort controls before naming a route.

.claude/cloud-profile/skills/choose-model/SKILL.md

testing-policy.shStop treating expected CI as passing evidence +17/-15

Stop treating expected CI as passing evidence

• Updates SessionStart verification guidance to distinguish selected, pending and observed checks and require server readiness before browser runs.

.claude/hooks/testing-policy.sh

apply-claude-cloud-profile.mjsValidate profile seeds before applying changes +97/-12

Validate profile seeds before applying changes

• Rejects unknown arguments and invalid settings safely; validates seed filenames and index links before writes, then copies absent host memories exclusively.

scripts/apply-claude-cloud-profile.mjs

check-codex-cloud-setup.mjsSelect legacy checks deliberately +55/-28

Select legacy checks deliberately

• Stops treating CODEX_CLOUD alone as legacy selection, fixes invalid base-SHA and dependency-fingerprint handling, and blocks runtime probes after environment errors.

scripts/check-codex-cloud-setup.mjs

diagnose-codex-cloud.mjsReject invalid or unsafe diagnostic runs +101/-14

Reject invalid or unsafe diagnostic runs

• Parses documented flags strictly, requires legacy selection, checks provider-variable names before probes and validates Node against package engines.

scripts/diagnose-codex-cloud.mjs

ensure-codex-cloud-git-remote.mjsValidate GitHub remote transport +7/-5

Validate GitHub remote transport

• Stops interpreting a local path shaped like owner/repository as a GitHub remote identity.

scripts/ensure-codex-cloud-git-remote.mjs

install-codex-cloud-command-shims.shProbe inherited environment before shim install +12/-0

Probe inherited environment before shim install

• Rejects unexpected provider variables before cached profile loading while preserving the documented restricted path for known launcher names.

scripts/install-codex-cloud-command-shims.sh

maintain-codex-cloud.shValidate maintenance boundary and cached profile +47/-6

Validate maintenance boundary and cached profile

• Checks the raw environment and requested profile before sourcing cache; restores a missing profile through full setup.

scripts/maintain-codex-cloud.sh

run-codex-cloud-github.shPreflight GitHub authentication safely +21/-2

Preflight GitHub authentication safely

• Requires offline RAG mode and rejects unexpected inherited provider names before login, retaining only the documented setup-PAT exception.

scripts/run-codex-cloud-github.sh

setup-claude-cloud.shValidate Claude tiers before provisioning +108/-54

Validate Claude tiers before provisioning

• Rejects malformed arguments and unknown inline/background tiers before state changes; improves session error context and rechecks cached CLI availability.

scripts/setup-claude-cloud.sh

setup-codex-cloud.shValidate Codex setup before runtime work +47/-32

Validate Codex setup before runtime work

• Runs the raw probe and validates access/retrieval selection early; rejects malformed managed policy markers and fixes diagnostic invocation.

scripts/setup-codex-cloud.sh

Tests (10) +1382 / -71
claude-cloud-profile.test.tsCover Claude profile and tier failure paths +349/-12

Cover Claude profile and tier failure paths

• Adds isolated tests for seed validation, retained memories, malformed settings and arguments, CLI marker drift and nonfatal session reporting.

tests/claude-cloud-profile.test.ts

cloud-installed-guidance.test.tsTest guidance actually installed in Cloud +83/-0

Test guidance actually installed in Cloud

• Installs a fixture profile and checks model, task ownership, provider and complete-diff review guidance.

tests/cloud-installed-guidance.test.ts

codex-cloud-diagnose.test.tsCover explicit and safe diagnostics +136/-6

Cover explicit and safe diagnostics

• Tests argument validation, provider-boundary rejection, repository lock discovery and engine-range handling.

tests/codex-cloud-diagnose.test.ts

codex-cloud-github-lifecycle.test.tsCover GitHub lifecycle preflight +66/-9

Cover GitHub lifecycle preflight

• Exercises PAT handling and offline-mode selection before authentication.

tests/codex-cloud-github-lifecycle.test.ts

codex-cloud-policy-harness.test.tsCover raw-boundary setup paths +292/-22

Cover raw-boundary setup paths

• Tests connected-mode rejection, unexpected provider variables, restricted shim continuation and missing maintenance profiles.

tests/codex-cloud-policy-harness.test.ts

codex-cloud-remote.test.tsReject local-path GitHub impostors +55/-0

Reject local-path GitHub impostors

• Adds remote-identity tests that preserve an existing origin when its URL is not a GitHub transport.

tests/codex-cloud-remote.test.ts

codex-cloud-setup.test.tsCover legacy validation and checkout freshness +249/-20

Cover legacy validation and checkout freshness

• Adds cases for invalid expected bases, provider-name scoping and environment rejection before runtime acceptance.

tests/codex-cloud-setup.test.ts

database-skills.test.tsUpdate plugin skill assertions +5/-1

Update plugin skill assertions

• Aligns skill checks with verified-checkout guidance.

tests/database-skills.test.ts

organisation-instruction-guards.test.tsCover expanded retired-rule scanning +97/-0

Cover expanded retired-rule scanning

• Checks active copied Cloud instructions while leaving historical evidence and verbatim review inputs outside the guard.

tests/organisation-instruction-guards.test.ts

rag-plan-package-parity.test.tsCheck marker-free RAG launch parity +50/-1

Check marker-free RAG launch parity

• Verifies generated package consistency and phase effort floors without requiring a literal confirmation marker.

tests/rag-plan-package-parity.test.ts

Documentation (66) +2051 / -1715
repository-workflow.mdUpdate Cloud isolation guidance +2/-3

Update Cloud isolation guidance

• Aligns repository workflow instructions with explicit Cloud selection and verified checkout state.

.agents/skills/prompt-perfector/references/repository-workflow.md

SKILL.mdUpdate RAG phase skill admission +19/-9

Update RAG phase skill admission

• Uses current-host guidance and ordinary-language effort confirmation while retaining route evidence and independent review requirements.

.agents/skills/rag-cloud-sdd/SKILL.md

rag-retrieval-reviewer.mdReplace stale retrieval-review assumptions +39/-10

Replace stale retrieval-review assumptions

• Recasts dated corpus, model and evaluation observations as historical; retains measured retrieval and provider safeguards.

.claude/agents/rag-retrieval-reviewer.md

CLAUDE.mdScope installed Claude guidance to current authority +11/-0

Scope installed Claude guidance to current authority

• Clarifies that communication preferences and copied skills do not establish tool availability or provider authority.

.claude/cloud-profile/CLAUDE.md

claude-hook-exec-bit-trap.mdMake hook-mode memory host-aware +10/-4

Make hook-mode memory host-aware

• Frames the prior execution-bit incident as guidance to verify current Git configuration.

.claude/cloud-profile/memory/claude-hook-exec-bit-trap.md

claude-plugin-native-deps-trap.mdMake plugin dependency memory host-aware +12/-4

Make plugin dependency memory host-aware

• Calls for current dependency checks rather than treating dated workstation symptoms as present facts.

.claude/cloud-profile/memory/claude-plugin-native-deps-trap.md

communication-style-plain-and-brief.mdRefresh brief communication guidance +8/-4

Refresh brief communication guidance

• Scopes the saved communication preference without making it override current task or project requirements.

.claude/cloud-profile/memory/communication-style-plain-and-brief.md

never-print-env-values.mdClarify credential-safe memory guidance +11/-3

Clarify credential-safe memory guidance

• Retains the historical disclosure lesson while emphasizing names-and-presence reporting instead of credential values.

.claude/cloud-profile/memory/never-print-env-values.md

token-usage-hygiene.mdRemove stale repository and agent assumptions +16/-13

Remove stale repository and agent assumptions

• Ties search, delegation and path resolution to current instructions and the verified checkout.

.claude/cloud-profile/memory/token-usage-hygiene.md

SKILL.mdRefresh installed prompt skill guidance +2/-2

Refresh installed prompt skill guidance

• Aligns copied prompt guidance with the native skill's current workflow wording.

.claude/cloud-profile/skills/prompt/SKILL.md

coding-workflow.mdSupport same-task continuation in installed workflow +7/-8

Support same-task continuation in installed workflow

• Removes automatic fresh-checkout ceremony and preserves provider/network approval boundaries.

.claude/cloud-profile/skills/prompt/references/coding-workflow.md

SKILL.mdMake new-task preparation host-aware +73/-105

Make new-task preparation host-aware

• Replaces fixed drive and forced fresh-worktree steps with task ownership, current checkout checks and same-task continuation.

.claude/skills/newtask/SKILL.md

SKILL.mdRefresh native prompt skill guidance +2/-2

Refresh native prompt skill guidance

• Aligns prompt instructions with current task and host-aware workflow wording.

.claude/skills/prompt/SKILL.md

coding-workflow.mdSupport same-task continuation in native workflow +7/-8

Support same-task continuation in native workflow

• Adjusts checkout, remote freshness and publishing guidance to honor current task ownership and authority.

.claude/skills/prompt/references/coding-workflow.md

AGENTS.mdUpdate root Cloud instruction pointers +2/-3

Update root Cloud instruction pointers

• Aligns root guidance with the revised current-host Cloud policy.

AGENTS.md

README.mdRefresh Cloud policy references +8/-10

Refresh Cloud policy references

• Updates top-level orientation to distinguish current Cloud guidance from selected legacy setup.

README.md

README.mdRefresh documentation index descriptions +17/-17

Refresh documentation index descriptions

• Describes the short Codex Cloud guide, canonical operating policy and user-selected effort guidance.

docs/README.md

agents-guide.mdAlign agent guide with current Cloud policy +1/-1

Align agent guide with current Cloud policy

• Adjusts the agent-facing Cloud policy reference.

docs/agents-guide.md

codex-cloud-environment.mdEstablish canonical current-host Cloud policy +108/-136

Establish canonical current-host Cloud policy

• Separates general host capabilities from selected legacy setup and defines credential, continuation and bounded local repair boundaries.

docs/agents/codex-cloud-environment.md

codex-reasoning-effort.mdRespect user-selected effort without marker gates +18/-62

Respect user-selected effort without marker gates

• Removes prescribed model-effort tables and special resubmission demands while preserving scoped specialist requirements.

docs/agents/codex-reasoning-effort.md

shared-context-and-memory.mdClarify authority of retained memory +1/-1

Clarify authority of retained memory

• Aligns shared-memory guidance with current instructions and non-authoritative host state.

docs/agents/shared-context-and-memory.md

smart-agent-allocation.mdRoute agents using currently supported controls +17/-19

Route agents using currently supported controls

• Removes fixed model-family defaults and requires current tool inventory while retaining specialist review floors.

docs/agents/smart-agent-allocation.md

verification-gates.mdClarify verification evidence boundaries +4/-3

Clarify verification evidence boundaries

• Aligns gate guidance with event-dependent CI selection and observed results.

docs/agents/verification-gates.md

README.mdIndex archived Cloud session memories +19/-0

Index archived Cloud session memories

• Explains that seven preserved records are historical and are no longer fresh-host memory seeds.

docs/archive/cloud-session-state-2026-10-16/README.md

codex-chat-import-tooling.mdArchive chat-import session memory +0/-0

Archive chat-import session memory

• Moves the historical record outside the profile seed directory without changing its contents.

docs/archive/cloud-session-state-2026-10-16/codex-chat-import-tooling.md

db-remediation-coordination-state.mdArchive database coordination memory +0/-0

Archive database coordination memory

• Preserves the dated coordination record without installing it into new Cloud profiles.

docs/archive/cloud-session-state-2026-10-16/db-remediation-coordination-state.md

dev-drive-project-location.mdArchive workstation-location memory +0/-0

Archive workstation-location memory

• Preserves the dated drive-location record without treating it as current-host state.

docs/archive/cloud-session-state-2026-10-16/dev-drive-project-location.md

ingestion-review-remediation-state.mdArchive ingestion coordination memory +0/-0

Archive ingestion coordination memory

• Preserves the dated review record outside fresh-host memory seeds.

docs/archive/cloud-session-state-2026-10-16/ingestion-review-remediation-state.md

lighthouse-mobile-root-cls-flake.mdArchive Lighthouse incident memory +0/-0

Archive Lighthouse incident memory

• Preserves the historical CI incident without presenting it as a current failure.

docs/archive/cloud-session-state-2026-10-16/lighthouse-mobile-root-cls-flake.md

local-test-failures-windows.mdArchive Windows test incident memory +0/-0

Archive Windows test incident memory

• Preserves workstation-specific failures outside fresh-host guidance.

docs/archive/cloud-session-state-2026-10-16/local-test-failures-windows.md

rag-programme-coordination-state.mdArchive RAG programme coordination memory +0/-0

Archive RAG programme coordination memory

• Preserves the historical coordination record without reloading it as current task state.

docs/archive/cloud-session-state-2026-10-16/rag-programme-coordination-state.md

codex-cloud-design-status-semantics-2026-10-16.mdArchive completed clinical-status prompt +292/-0

Archive completed clinical-status prompt

• Preserves the old implementation instructions as historical task evidence, not an active prompt.

docs/archive/codex-cloud-design-status-semantics-2026-10-16.md

codex-cloud-legacy-profile-2026-10-16.mdArchive repository-managed Codex bootstrap +675/-0

Archive repository-managed Codex bootstrap

• Retains the detailed legacy setup for explicitly selected environments; flags historical assumptions and defers to current executable safeguards.

docs/archive/codex-cloud-legacy-profile-2026-10-16.md

rag-coverage-gate-extraction-2026-10-16.mdArchive completed coverage-gate prompt +163/-0

Archive completed coverage-gate prompt

• Preserves the obsolete extraction instructions for provenance without inviting a duplicate implementation.

docs/archive/rag-coverage-gate-extraction-2026-10-16.md

claude-cloud.mdDocument curated seeding and current-host provisioning +103/-72

Document curated seeding and current-host provisioning

• Explains manifest admission, archive separation, host-memory preservation and the limits of cached tier receipts.

docs/claude-cloud.md

codex-cloud.mdReplace legacy runbook with current Cloud navigation +20/-637

Replace legacy runbook with current Cloud navigation

• Points users to the canonical operating policy and explicitly selected archived bootstrap instead of imposing old host assumptions.

docs/codex-cloud.md

2026-10-16-cloud-legacy-profile-scope.mdRecord explicit legacy-profile selection +11/-0

Record explicit legacy-profile selection

• Documents that repository-managed offline/connected setup does not govern every Cloud task.

docs/decisions/2026-10-16-cloud-legacy-profile-scope.md

2026-10-16-cloud-operating-policy-overhaul.mdRecord Cloud policy consolidation +29/-0

Record Cloud policy consolidation

• Captures the decision to retire stale launches and memories while preserving specialist and security safeguards.

docs/decisions/2026-10-16-cloud-operating-policy-overhaul.md

2026-10-16-cloud-policy-repair-boundary.mdRecord bounded repair after failed raw probe +11/-0

Record bounded repair after failed raw probe

• Allows explicitly requested local policy repair without interpreting it as credential-boundary acceptance.

docs/decisions/2026-10-16-cloud-policy-repair-boundary.md

2026-10-16-remove-cloud-xhigh-marker-gate.mdReconcile xhigh marker retirement decision +1/-1

Reconcile xhigh marker retirement decision

• Aligns the existing decision with ordinary-language confirmation and scoped programme contracts.

docs/decisions/2026-10-16-remove-cloud-xhigh-marker-gate.md

2026-10-16-remove-obsolete-cloud-startup-instructions.mdRecord retirement of obsolete startup instructions +11/-0

Record retirement of obsolete startup instructions

• Documents replacement of universal legacy startup assumptions with current-host checks.

docs/decisions/2026-10-16-remove-obsolete-cloud-startup-instructions.md

2026-10-16-user-controlled-reasoning-effort.mdRecord user-owned effort selection +12/-0

Record user-owned effort selection

• Documents removal of literal prompt tokens and resubmission while preserving specialist floors.

docs/decisions/2026-10-16-user-controlled-reasoning-effort.md

process-hardening.mdRefresh Cloud process-hardening reference +2/-1

Refresh Cloud process-hardening reference

• Aligns process guidance with the updated policy and checks.

docs/process-hardening.md

codex-architecture-maintainability-ultra-review.mdUse available routes for architecture review +9/-4

Use available routes for architecture review

• Removes assumed Ultra-mode subagents and adds an honest sequential fallback when delegation is unavailable.

docs/prompts/codex-architecture-maintainability-ultra-review.md

codex-cloud-design-status-semantics.mdRetire completed status-semantics prompt +12/-279

Retire completed status-semantics prompt

• Replaces the copyable implementation request with completion status, archive link and remaining human approval boundary.

docs/prompts/codex-cloud-design-status-semantics.md

codex-data-database-safety-ultra-review.mdUse available routes for database review +9/-4

Use available routes for database review

• Removes assumed Ultra-mode delegation and distinguishes sequential analysis from independent verification.

docs/prompts/codex-data-database-safety-ultra-review.md

codex-documentation-ownership-ultra-review.mdUse available routes for documentation review +9/-4

Use available routes for documentation review

• Adds an explicit fallback when reviewer subagents are unavailable or disallowed.

docs/prompts/codex-documentation-ownership-ultra-review.md

codex-functional-correctness-ultra-review.mdUse available routes for correctness review +14/-3

Use available routes for correctness review

• Bases delegation on callable authorized tools and preserves all review lanes in the fallback.

docs/prompts/codex-functional-correctness-ultra-review.md

codex-performance-reliability-ultra-review.mdUse available routes for performance review +14/-3

Use available routes for performance review

• Removes unavailable-mode assumptions and requires transparent reporting when independent review cannot run.

docs/prompts/codex-performance-reliability-ultra-review.md

codex-tests-quality-gates-ultra-review.mdUse available routes for test-quality review +14/-3

Use available routes for test-quality review

• Adds supported-tool delegation and a sequential fallback without claiming independent subagent proof.

docs/prompts/codex-tests-quality-gates-ultra-review.md

mode-aware-clinical-ask-codex-cloud-handover.mdUpdate clinical-ask Cloud handover admission +32/-19

Update clinical-ask Cloud handover admission

• Allows verified same-task continuation and current-host readiness; retains status-hash and independent-review boundaries.

docs/prompts/mode-aware-clinical-ask-codex-cloud-handover.md

rag-coverage-gate-extraction.mdRetire completed coverage-gate extraction prompt +8/-151

Retire completed coverage-gate extraction prompt

• Replaces the copyable task with an implementation-complete notice and archive reference.

docs/prompts/rag-coverage-gate-extraction.md

scripts-index.mdDescribe selected legacy tooling accurately +26/-26

Describe selected legacy tooling accurately

• Updates the Codex setup and credential-boundary descriptions to reflect opt-in scope and restricted continuation.

docs/scripts-index.md

2026-08-22-mode-aware-clinical-ask-implementation.mdMake clinical-ask plan host-aware +38/-25

Make clinical-ask plan host-aware

• Replaces mandatory legacy bootstrap and plugin assumptions with current-host admission and a direct sequential route.

docs/superpowers/plans/2026-08-22-mode-aware-clinical-ask-implementation.md

CLOUD-EXECUTION-PROMPT.mdScope RAG prompt to current-host readiness +4/-4

Scope RAG prompt to current-host readiness

• Makes legacy setup conditional and accepts ordinary-language xhigh confirmation while retaining phase evidence requirements.

docs/superpowers/rag-upgrade/CLOUD-EXECUTION-PROMPT.md

START-HERE.cloud.mdSeparate RAG host readiness from legacy bootstrap +38/-15

Separate RAG host readiness from legacy bootstrap

• Makes raw probing and setup conditional on legacy selection and retains programme-specific route and receipt checks.

docs/superpowers/rag-upgrade/canonical/START-HERE.cloud.md

execution-order.mdClarify phase effort confirmation +1/-1

Clarify phase effort confirmation

• Accepts ordinary-language xhigh confirmation without removing authoritative runtime route evidence.

docs/superpowers/rag-upgrade/canonical/execution-order.md

sdd-execution.mdRequire useful SDD capability probe +2/-2

Require useful SDD capability probe

• Clarifies user confirmation and requires bounded inspection rather than a dummy agent dispatch.

docs/superpowers/rag-upgrade/canonical/sdd-execution.md

START-HERE.mdMirror Cloud readiness policy in generated package +38/-15

Mirror Cloud readiness policy in generated package

• Carries canonical legacy-selection and raw-boundary wording into the Cloud package.

docs/superpowers/rag-upgrade/cloud/START-HERE.md

execution-order.mdMirror Cloud phase effort wording +1/-1

Mirror Cloud phase effort wording

• Carries canonical ordinary-language confirmation requirements into the Cloud package.

docs/superpowers/rag-upgrade/cloud/execution-order.md

sdd-execution.mdMirror Cloud SDD probe wording +2/-2

Mirror Cloud SDD probe wording

• Carries the canonical bounded-probe and route-evidence wording into the Cloud package.

docs/superpowers/rag-upgrade/cloud/sdd-execution.md

execution-order.mdKeep local execution order aligned +1/-1

Keep local execution order aligned

• Mirrors ordinary-language effort confirmation wording in the local package.

docs/superpowers/rag-upgrade/local/execution-order.md

sdd-execution.mdKeep local SDD instructions aligned +2/-2

Keep local SDD instructions aligned

• Mirrors bounded-probe and confirmation wording without relaxing route evidence.

docs/superpowers/rag-upgrade/local/sdd-execution.md

README.mdMake plugin setup guidance checkout-aware +19/-9

Make plugin setup guidance checkout-aware

• Replaces fixed workstation assumptions with verified repository and current policy references.

plugins/clinical-kb/README.md

SKILL.mdVerify checkout rather than assuming a drive path +12/-4

Verify checkout rather than assuming a drive path

• Links current Cloud and reasoning guidance and clarifies that local server checks do not authorize provider work.

plugins/clinical-kb/skills/clinical-kb-workflow/SKILL.md

rag-phase-launch-check.mjsClarify launch attestation scope +2/-0

Clarify launch attestation scope

• Notes that ordinary-language confirmation suffices and the helper does not prove runtime routing.

scripts/rag-phase-launch-check.mjs

Other (7) +50 / -14
seed-manifest.jsonDeclare allowed Claude memory seeds +12/-0

Declare allowed Claude memory seeds

• Adds the versioned allowlist used to admit reusable Markdown seeds, including MEMORY.md.

.claude/cloud-profile/memory/seed-manifest.json

settings.jsonRemove fixed workstation path from trusted-repo context +2/-2

Remove fixed workstation path from trusted-repo context

• Bases trusted checkout guidance on current Git identity while retaining publication and provider boundaries.

.claude/settings.json

retired-rules.jsonRegister retired Cloud instruction patterns +32/-9

Register retired Cloud instruction patterns

• Adds stale routing, host-marker and legacy-default rules and updates the xhigh marker rule.

docs/organisation/retired-rules.json

knowledge.jsonAssign installed-guidance test ownership +1/-0

Assign installed-guidance test ownership

• Registers the new Cloud installed-guidance suite in the knowledge-system inventory.

docs/organisation/systems/knowledge.json

programme-manifest.jsonUpdate canonical launch-contract wording +1/-1

Update canonical launch-contract wording

• States that xhigh confirmation needs no literal marker or extra CLI attestation.

docs/superpowers/rag-upgrade/canonical/programme-manifest.json

programme-manifest.jsonMirror Cloud manifest launch contract +1/-1

Mirror Cloud manifest launch contract

• Updates generated launch metadata without changing phase routing.

docs/superpowers/rag-upgrade/cloud/programme-manifest.json

programme-manifest.jsonKeep local launch metadata aligned +1/-1

Keep local launch metadata aligned

• Mirrors the canonical launch-contract clarification.

docs/superpowers/rag-upgrade/local/programme-manifest.json

Comment thread .claude/hooks/testing-policy.sh Resolved
@codeant-ai

codeant-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

2 code suggestions

1. When the cache file is absent or invalid, this branch leaves an inherited SHA untouched; an old but reachable commit can make the checkout appear fresh against the wrong base.

Stale reference · scripts/setup-codex-cloud.sh:170-171


2. The docs index still labels this and the two parallel prompts “Codex Local Ultra,” contradicting their new headings and implying a special host mode they do not require.

Inconsistent naming · docs/prompts/codex-functional-correctness-ultra-review.md:1

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 16, 2026

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gitar has auto-approved this PR (configure)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

✅ Committed (3) · ☑ Fixed (3)

Grey Divider

Commits pushed directly to this PR — no separate fix PR opened.

Process — 3 fixed
  • ☑ Fixed: Offline Cloud environments fail every maintenance run
  • ☑ Fixed: Cloud flag unlocks editing the local primary checkout
  • ☑ Fixed: Auto-mode guidance softens provider confirmation rule

@gitar-bot
gitar-bot Bot disabled auto-merge October 16, 2026 17:46
@gitar-bot
gitar-bot Bot enabled auto-merge (squash) October 16, 2026 17:52
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 16, 2026

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gitar has auto-approved this PR (configure)

Comment thread scripts/check-codex-cloud-setup.mjs Resolved
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 59ad331

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gitar has auto-approved this PR (configure)

@gitar-bot

gitar-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor
Code Review ✅ Approved 2 closed / 2 findings

🔴 High risk · Cloud checkout/profile admission and GitHub authentication preflight change access decisions, which could allow unintended remote operations or block legitimate tasks.

Makes Cloud instructions current and hardens Codex and Claude Cloud setup, diagnostics, GitHub authentication preflight, profile seeding and checkout validation. Two issues were resolved: maintenance now accepts the same RAG_PROVIDER_MODE values as setup, and the Cloud host-signal check no longer fails the existing test or contradicts the workflow docs. No open findings remain.

✅ 2 closed
✅ Edge Case: Maintenance rejects RAG_PROVIDER_MODE values that setup accepts

📄 scripts/maintain-codex-cloud.sh:33-35 📄 scripts/setup-codex-cloud.sh:70-77
setup-codex-cloud.sh ignores an inherited RAG_PROVIDER_MODE under the offline profile and forces it to offline (lines 70-77). Under the connected profile it treats an empty value as offline via ${RAG_PROVIDER_MODE:-offline}. maintain-codex-cloud.sh line 33 instead fails whenever the variable is set to anything other than offline, whatever the profile. That includes RAG_PROVIDER_MODE= (empty) and a value like auto under the offline profile, and check-codex-cloud-raw-env.sh does not check this variable. So an environment that sets up cleanly fails every maintenance run with a hard error, and maintenance does not fall back to re-running setup. Apply the same rule in both scripts: check the inherited value only when the requested profile is connected, and treat empty as offline.

✅ Bug: Cloud host-signal check fails existing test and contradicts the workflow docs

📄 .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs:68-72 📄 .agents/skills/prompt-perfector/scripts/verify-repository-isolation.mjs:79 📄 tests/database-skills.test.ts:164 📄 tests/database-skills.test.ts:175 📄 .agents/skills/prompt-perfector/references/repository-workflow.md:64
This commit makes evaluateRepositoryState read process.env.CODEX_CLOUD, CLAUDE_CODE_REMOTE and CODEX_CLOUD_HOST. That breaks two existing contracts.

  1. tests/database-skills.test.ts:175 asserts expect(verifier).not.toContain("process.env.CODEX_CLOUD"). The verifier now contains both process.env.CODEX_CLOUD === and process.env.CODEX_CLOUD_HOST, so this unit test fails.
  2. references/repository-workflow.md:64, which is pinned by the test at line 164, says --cloud by itself attests the workflow choice and that the legacy CODEX_CLOUD=1 marker is "neither required nor sufficient". Under the new code, --cloud on a primary checkout is blocked with cloud_environment_required unless one of those env markers is set. Any current Cloud host that doesn't export one of them (the docs call CODEX_CLOUD=1 legacy) can no longer verify a disposable primary checkout.

Fix: pick one policy. If the host signal should be required, update the workflow reference and the test assertions together. If not, revert this check.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Approved

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 3af32df

@gitar-bot
gitar-bot Bot merged commit ff49ec1 into main Oct 17, 2026
50 of 51 checks passed
@gitar-bot
gitar-bot Bot deleted the codex/cloud-policy-overhaul branch October 17, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔴 Large blast radius size:XXL This PR changes 1000+ lines, ignoring generated files 🕐 40+ Minutes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant