Codex Auto Workflow
This project is designed so beginners do not need to install, understand, or operate Git manually. Codex handles Git capability checks, first checkout, synchronization, task execution, upload, and knowledge capture.
Codex-Only First Checkout Loop
When the project is not yet on the user’s computer, the user should
only paste the onboarding prompt from
docs/codex-first-use.md. Codex is responsible for the
rest.
Codex should first determine which path is available:
- Check Codeup authorization because this is a private repository.
- Use Codex built-in Git / Clone / Add repository functionality if available.
- Otherwise run shell checks and commands itself.
- If Git is missing, try to install or enable Git with the user’s approval.
- If Codeup HTTPS credentials or SSH authorization are missing, stop
and ask the user to complete
docs/codeup-auth.md. - If installation or authorization is blocked, stop and report the blocker.
Do not ask the beginner to manually run Git commands.
If command-line Git is available, Codex can use:
git --version
mkdir -p ~/code/zhct
git clone https://codeup.aliyun.com/60069db88deaa14d9e02b875/zhct/bid-analysis-methodology.git ~/code/zhct/bid-analysis-methodology
cd ~/code/zhct/bid-analysis-methodologyIf the directory already exists:
cd ~/code/zhct/bid-analysis-methodology
git pull --rebase --autostashAfter entering the repository, Codex must read AGENTS.md
and follow the project rules.
Codeup Authentication Preflight
The repository is private. Before clone or pull, Codex must distinguish these states:
- Git is installed and Codeup credentials are available: proceed.
- Git is installed but Codeup credentials are missing: stop and ask for HTTPS clone account plus HTTPS clone password / token, or SSH key setup.
- Git is missing: install or enable Git first.
The error below is an authentication problem, not a Git installation problem:
fatal: could not read Username for 'https://codeup.aliyun.com': terminal prompts disabled
When this appears, Codex should use docs/codeup-auth.md
as the recovery path.
First-Checkout Failure Handling
If the first checkout fails, Codex should classify the blocker:
- Codex’s current environment cannot access the local filesystem.
- Git is not installed and Codex cannot install it.
- The user does not have Codeup repository permission.
- Codeup HTTPS clone account and password/token or SSH authorization is missing.
- Git credential helper is unavailable.
- The network cannot reach
codeup.aliyun.com. - The repository URL is incorrect.
Do not continue with project analysis until the repository exists
locally and AGENTS.md has been read.
What Codex Does Automatically
For every user request inside this project, Codex follows this loop:
- Pull the latest cloud version:
bash scripts/sync_workflow.sh pull- Read or re-check the project rules in
AGENTS.md. - Complete the requested work.
- Update or create a topic note under
docs/runs/. - Upload the repository changes:
bash scripts/sync_workflow.sh upload "sync: short task summary"This means the beginner can focus on asking questions and reviewing answers. Codex handles the cloud pull, local update, topic documentation, commit, and push.
Knowledge Capture Standard
Conversation notes live in docs/runs/.
Recommended filename:
docs/runs/YYYYMMDD-topic-name.md
Recommended structure:
# Topic Name
## User Goal
What the user wanted.
## Answer / Decision
What was decided or delivered.
## Changed Files
Files created, changed, or used.
## Validation
Commands run and what passed or failed.
## Reusable Pattern
What should become a future Skill, prompt, checklist, or knowledge-base entry.
## Next Action
What should happen next, if anything.When the same topic continues, append a dated section to the existing file instead of creating a duplicate. Over time, these notes become the source material for:
- project-specific Skills
- standard prompts
- data dictionaries
- reusable analysis workflows
- knowledge-base documents
Beginner Copy-Paste Prompt
Use the full prompt in docs/codex-first-use.md in a new
Codex conversation when the project is not yet on the computer. Short
version:
请全程替我完成项目初始化。不要要求我手动输入 Git 命令。
项目云端地址:
https://codeup.aliyun.com/60069db88deaa14d9e02b875/zhct/bid-analysis-methodology.git
请先检查 Codeup 私有仓库认证。如果没有 HTTPS 克隆账号和 HTTPS 克隆密码/Token,或没有 SSH 授权,请通过问答形式让我点击链接登录 Codeup 生成 Token,并把 Token 贴回给你保存到本机凭据。然后判断 Codex 是否有内置 Git / Clone / Add repository 能力;如果没有,请由你检查并安装或启用 Git,然后 clone 或更新这个项目。进入项目后读取 AGENTS.md。
如果 clone 或 pull 失败,请直接告诉我失败原因,不要继续分析。
Safety Boundary
The repository intentionally ignores:
data/raw/data/processed/
These folders may contain sensitive tender data, contacts, phone numbers, or commercial leads. Codex should summarize this information in reports or topic notes, not upload the raw files unless the user explicitly changes the data sharing policy.