diff --git a/.codex b/.codex deleted file mode 100644 index e69de29b..00000000 diff --git a/.codex/skills/gframework-boot/SKILL.md b/.codex/skills/gframework-boot/SKILL.md new file mode 100644 index 00000000..00a323f7 --- /dev/null +++ b/.codex/skills/gframework-boot/SKILL.md @@ -0,0 +1,61 @@ +--- +name: gframework-boot +description: Repository-specific boot workflow for the GFramework repo. Use when Codex needs to start or resume work in this repository from short prompts such as "boot", "continue", "read AGENTS", or "start the next step"; when the user expects Codex to first read AGENTS.md, .ai/environment/tools.ai.yaml, and local-plan tracking files; or when Codex should assess task complexity, decide whether explorer or worker subagents are warranted, and then proceed under the repository's workflow rules. +--- + +# GFramework Boot + +## Overview + +Use this skill to bootstrap work in the GFramework repository with minimal user prompting. +Treat `AGENTS.md` as the source of truth. Use this skill to enforce a startup sequence, not to replace repository rules. + +## Startup Workflow + +1. Read `AGENTS.md` before choosing tools, planning edits, or delegating work. +2. Read `.ai/environment/tools.ai.yaml` to confirm the preferred local toolchain. +3. Inspect `local-plan/todos/` and `local-plan/traces/` before asking the user for missing context. +4. Classify the task state: + - `new`: no matching recovery document exists, or the user is clearly starting fresh work + - `resume`: a matching todo or trace exists and the user is continuing that thread + - `recovery`: prior work looks partial, interrupted, or ambiguous and the next safe recovery point must be reconstructed +5. Choose the best matching `local-plan` artifacts: + - Prefer path names or headings that match the user's task wording + - Break ties by most recently updated trace or todo + - If ambiguity would materially change implementation, summarize the candidates and ask one concise question +6. Classify the task complexity before deciding on subagents: + - `simple`: one concern, one file or module, no parallel discovery required + - `medium`: a small number of modules, some read-only exploration helpful, critical path still easy to keep local + - `complex`: cross-module design, migration, large refactor, or work likely to exceed one context window +7. Apply the delegation policy from `AGENTS.md`: + - Keep the critical path local + - Use `explorer` with `gpt-5.1-codex-mini` for narrow read-only questions, tracing, inventory, and comparisons + - Use `worker` with `gpt-5.4` only for bounded implementation tasks with explicit ownership + - Do not delegate purely for ceremony; delegate only when it materially shortens the task or controls context growth +8. Before editing files, tell the user what you read, how you classified the task, whether subagents will be used, and the first implementation step. +9. Proceed with execution, validation, and documentation updates required by `AGENTS.md`. + +## Task Tracking + +For multi-step, cross-module, or interruption-prone work, maintain the repository recovery artifacts instead of keeping state only in chat. + +- Update the active document under `local-plan/todos/` with completed work, validation results, risks, and the next recovery point. +- Update the matching document under `local-plan/traces/` with key decisions, delegated scope, and the immediate next step. +- If the task is clearly complex and no recovery artifact exists yet, create one before substantive edits. + +## Recovery Heuristics + +- If the user says `next step`, `continue`, `继续`, or similar resume language, assume recovery mode and search `local-plan/` first. +- If the current branch and the newest recovery documents describe the same feature area, prefer resuming that thread. +- If the repository state suggests in-flight work but no recovery document matches, reconstruct the safest next step from code, tests, and Git state before asking the user for clarification. + +## Example Triggers + +- `boot` +- `Use $gframework-boot and continue the current task` +- `Read AGENTS and local-plan, then start the next step` +- `继续当前任务,先看 AGENTS.md 和 local-plan` + +## References + +Read `references/startup-artifacts.md` when you need a quick reminder of the repository entrypoints, task-state heuristics, or delegation defaults without re-reading the entire skill. diff --git a/.codex/skills/gframework-boot/agents/openai.yaml b/.codex/skills/gframework-boot/agents/openai.yaml new file mode 100644 index 00000000..1196a926 --- /dev/null +++ b/.codex/skills/gframework-boot/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "GFramework Boot" + short_description: "Bootstrap GFramework repository tasks" + default_prompt: "Use $gframework-boot to start or resume work in this GFramework repository." diff --git a/.codex/skills/gframework-boot/references/startup-artifacts.md b/.codex/skills/gframework-boot/references/startup-artifacts.md new file mode 100644 index 00000000..5db3a610 --- /dev/null +++ b/.codex/skills/gframework-boot/references/startup-artifacts.md @@ -0,0 +1,31 @@ +# Startup Artifacts + +## Required Reads + +- `AGENTS.md` +- `.ai/environment/tools.ai.yaml` +- `local-plan/todos/` +- `local-plan/traces/` + +## Local-Plan Selection Heuristics + +- Match the user's wording against todo and trace file names first. +- Prefer the newest matching trace when several candidates describe the same feature area. +- If one file records a clearer recovery point than a newer but vague file, prefer the clearer recovery point. + +## Complexity Defaults + +- `simple`: keep everything local, no subagent +- `medium`: keep design local, optionally use one `explorer` for parallel read-only discovery +- `complex`: keep architecture and integration local, delegate only bounded non-blocking subtasks + +## Model Defaults + +- `explorer`: `gpt-5.1-codex-mini` +- `worker`: `gpt-5.4` + +## Startup Summary Template + +Use a short update before execution: + +`Read AGENTS.md, the environment inventory, and the relevant local-plan artifacts. This looks like a task. I will and start with .` diff --git a/AGENTS.md b/AGENTS.md index 100aa81d..2b071867 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,6 +37,16 @@ All AI agents and contributors must follow these rules when writing, reviewing, - The branch naming rule for a new task branch is `/`, where `` should match the intended Conventional Commit category as closely as practical. +## Repository Boot Skill + +- The repository-maintained Codex boot skill lives at `.codex/skills/gframework-boot/`. +- Prefer invoking `$gframework-boot` when the user uses short startup prompts such as `boot`、`continue`、`next step`、 + `按 boot 开始`、`先看 AGENTS`、`继续当前任务`. +- The boot skill is a startup convenience layer, not a replacement for this document. If the skill and `AGENTS.md` + diverge, follow `AGENTS.md` first and update the skill in the same change. +- The boot skill MUST read `AGENTS.md`、`.ai/environment/tools.ai.yaml` and the relevant `local-plan/` artifacts before + substantive execution. + ## Subagent Usage Rules - Use subagents only when the task is complex, the context is likely to grow too large, or the work can be split into