Project Documentation

Codex Auto Workflow

由项目内 Markdown 源文件转换生成的 HTML 版本,用于浏览器阅读和团队共享。

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:

  1. Check Codeup authorization because this is a private repository.
  2. Use Codex built-in Git / Clone / Add repository functionality if available.
  3. Otherwise run shell checks and commands itself.
  4. If Git is missing, try to install or enable Git with the user’s approval.
  5. If Codeup HTTPS credentials or SSH authorization are missing, stop and ask the user to complete docs/codeup-auth.md.
  6. 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-methodology

If the directory already exists:

cd ~/code/zhct/bid-analysis-methodology
git pull --rebase --autostash

After 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:

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:

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:

  1. Pull the latest cloud version:
bash scripts/sync_workflow.sh pull
  1. Read or re-check the project rules in AGENTS.md.
  2. Complete the requested work.
  3. Update or create a topic note under docs/runs/.
  4. 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:

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:

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.