SR Method
SR Method EN

Start with Codex

Complete prompts for installing, upgrading and resuming the SR Method.

Start with Codex

The recommended workflow is prompt-first. The user states the objective and pastes a complete prompt. Codex inspects, scopes, asks for validation, then runs useful scripts.

The commands below are included in prompts as actions that Codex may run. The user does not have to run them manually in normal use.

Complete prompt for first installation

Install the SR Method in this project from the official repository:
https://github.com/syl2042/Aurora_SR_method_codex_pack

Verifiable objective:
install the SR pack in this repository without changing application code, verify the installation completely, verify required skills, produce an actionable installation report, then stop before any application development.

Non-negotiable constraints:
- do not modify application code;
- do not create migrations;
- do not change application dependencies;
- do not touch secrets;
- do not modify environment files containing credentials;
- preserve existing project files;
- do not delete existing project instructions;
- do not change knowledge.mode without explicit validation;
- do not create invented domain skills without human validation;
- do not start application development after installation.

Preparation:
1. Check whether the SR Method is already installed in this repo.
2. If SR_PACK_SOURCE exists, use it only if it points to the official repository.
3. Otherwise, clone or update the official repository in a non-application local path, for example ./.sr-method-pack.
4. Display source URL, source branch, source commit and detected SR version if available.

Installation:
1. Install the pack with the official source installer in controlled write mode.
2. Write only expected SR files: AGENTS.md or tagged SR block, docs/codex/*, docs/domain/* if installed as skeleton, docs/adr/* if installed as skeleton, scripts/codex/*, docs/codex/project-skills/README.md and task memory templates.
3. After installation, check git status --short and confirm no application file changed. If an application file changed, stop and report it as an anomaly.

Mandatory checks after installation:
Run every available command among these, without omitting one when the file exists:

python3 scripts/codex/verify_codex_pack.py
python3 scripts/codex/audit_codex_pack.py --json
python3 scripts/codex/sr_post_install_check.py --root . --json
python3 scripts/codex/find_next_session_prompt.py --root . --json
python3 scripts/codex/audit_sr_project.py --root . --json
python3 scripts/codex/validate_lot_contract.py --file docs/codex/SR_LOTS.yaml
python3 scripts/codex/validate_loop_contract.py --file docs/codex/tasks/_TEMPLATE/loop_contract.json
python3 scripts/codex/validate_sr_contract.py --file docs/codex/tasks/_TEMPLATE/sr_contract.json
python3 scripts/codex/audit_sr_task_contracts.py --root . --json
python3 scripts/codex/validate_skills.py --path docs/codex/project-skills
git diff --check
git status --short

Method skills verification:
1. Check whether SR method skills are installed in ~/.codex/skills.
2. Expected method skills are: aurora-planning-with-files, aurora-diagnose, aurora-tdd, aurora-review-diff, aurora-to-prd, aurora-architecture-check, aurora-repomap-maintainer, aurora-domain-skill-factory, aurora-terminal-token-optimizer, aurora-lot-runner.
3. If ~/.codex/skills exists, run python3 scripts/codex/validate_skills.py --path ~/.codex/skills.
4. If method skills are missing, install only method skills from the source pack to ~/.codex/skills, then validate again.
5. Never copy project domain skills into ~/.codex/skills without explicit validation.

Local domain skills verification:
1. Check docs/codex/project-skills/.
2. Check docs/codex/PROJECT_PROFILE.yaml, section skills.domain.
3. Report local domain skills present, skills declared in the profile and gaps.
4. If the project is domain-heavy but has no domain skill, recommend aurora-domain-skill-factory as next step, without running it.

Allowed safe corrections:
If sr_post_install_check.py proposes safe fixes, you may run python3 scripts/codex/sr_post_install_check.py --root . --fix-safe --json only if these fixes do not touch application code, secrets, dependencies or migrations.

Mandatory final report:
Provide a structured report with these exact sections:
1. Installation
2. Checks executed
3. Method skills
4. Project domain skills
5. Contracts and SR memory
6. SR gates
7. User next steps
8. Stop

End by confirming:
- Application development: not started
- SR installation: OK / partial / blocked
- Recommended next action: ...

Complete prompt for upgrade

Upgrade only the SR Method from the official GitHub repository to the latest available version, verify installation, run post-upgrade SR realignment if required, update docs/CURRENT_STATE.md, then stop before application development.

Official source:
https://github.com/syl2042/Aurora_SR_method_codex_pack

Verifiable objective:
upgrade the SR pack without changing application code, automatically detect the available source version, compare it with installed version, apply only SR upgrade if needed, verify installation, verify SR skills, realign SR state if version or structural SR files changed, produce an actionable final report, then stop.

Non-negotiable constraints:
- do not modify application code;
- do not modify application dependencies;
- do not create migrations;
- do not touch secrets;
- preserve existing SR memories;
- preserve docs/codex/SR_LOTS.yaml;
- preserve docs/codex/SR_INBOX.yaml;
- preserve docs/codex/project-skills/;
- preserve existing handoffs;
- preserve existing project instructions outside tagged SR blocks;
- do not start a feature during this pass;
- do not generate domain skills without human validation;
- do not change knowledge.mode without explicit validation.

Mandatory preparation:
1. Read AGENTS.md, docs/codex/SR_BOOTSTRAP.md, docs/codex/PROJECT_PROFILE.yaml, docs/CURRENT_STATE.md, docs/codex/SR_PACK_VERSION.json if present, docs/codex/SKILL_MAP.md if present, docs/codex/SKILL_DIGEST.md if present.
2. Check git status --short and identify pre-existing changes.
3. Detect installed SR version.
4. Fetch or update the official source.
5. Detect target version, source commit, install scripts and official upgrade prompt.

Decision before upgrade:
- if source version is identical and no SR gap is detected, do not reinstall unnecessarily;
- if source is newer or installation incomplete, apply only SR upgrade;
- if source seems older, stop and ask for human validation.

Upgrade SR memory:
Create or update docs/codex/tasks/YYYY-MM-DD_sr-upgrade/ with task_plan.md, findings.md, progress.md, decisions.md, verification.md, sr_contract.json and loop_contract.json.

Upgrade steps:
1. Read official docs/codex/prompts/05_upgrade_codex_environment.md from the source.
2. Apply only SR upgrade with the official script.
3. Modify only expected SR files.
4. Never overwrite CURRENT_STATE, SR_LOTS, SR_INBOX, project-skills, tasks, handoffs or project instructions without analysis.
5. After upgrade, run git status --short and confirm no application code changed.

Mandatory checks:
Run every available command among: verify_codex_pack.py, audit_codex_pack.py, sr_post_install_check.py, find_next_session_prompt.py, audit_sr_project.py, validate_lot_contract.py, validate_loop_contract.py, validate_sr_contract.py, audit_sr_task_contracts.py, context_budget_report.py, git diff --check, git status --short.

Post-upgrade realignment:
If SR version changed, if structural SR files changed or if CURRENT_STATE.md became obsolete, follow docs/codex/prompts/07_realign_sr_state_after_upgrade.md.

Mandatory final report:
1. Version
2. Files
3. Checks
4. Skills
5. Realignment
6. SR gates
7. Remaining risks
8. Next step

On this page