Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ If you see older or external Codex docs mention `$HOME/.agents/skills`, treat th
- `method-forge/`
- Knowledge-base runtime, docs, and CLI entry have moved to `/Users/wz/project/knowledge-base`
- The bootstrap script only installs skills. It does not overwrite existing Codex memory data.
- Keep the shared coding principles aligned across the stack: think before coding, simplicity first, surgical changes, and goal-driven verification.
- If you want the global memory system refreshed for a workspace, use the memory-system refresh workflow in `memory-system/`.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The intended priority order is:

Keep the shared coding principles aligned across the guides and templates: think before coding, simplicity first, surgical changes, and goal-driven verification.

Use the subdirectory that matches the task. If the task is about the knowledge base itself, switch to `/Users/wz/project/knowledge-base`; it is no longer a live subdirectory workflow inside this repo.
Use the subdirectory that matches the task. If a task spans systems, keep the work in this repo and follow the narrowest applicable instructions first. If the task is about the knowledge base itself, switch to `/Users/wz/project/knowledge-base`; it is no longer a live subdirectory workflow inside this repo.

## Install

Expand Down
7 changes: 7 additions & 0 deletions memory-system/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ python3 ~/.codex/scripts/refresh_memory.py --workspace-root "$(git rev-parse --s
- `global` 只保留跨 workspace 稳定成立的长期记忆。
- 先升 `workspace`,再按规则升 `global`。

## Coding Principles

- Think before coding: surface ambiguity and state assumptions when the risk is real.
- Simplicity first: choose the smallest stable solution.
- Surgical changes: touch only what the request requires.
- Goal-driven execution: define success criteria up front, then verify the result.

## Method Forge Autonomous Coding

- 当用户表达“开始落地代码”“开始实现”“开始写代码”“继续写代码”“进入实现阶段”等实现意图时,默认进入 `method-forge` autonomous mode,除非用户明确要求不要自动、先别写代码或只做方案。
Expand Down
7 changes: 7 additions & 0 deletions memory-system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
- `global / workspace / worker-run` 作用域规则
- 记忆系统相关测试与 QA 文档

这套工作区默认遵循的写作与实现原则是:

- 先想清楚再写
- 简单优先
- 只做必要改动
- 先定义成功标准,再验证结果

正式文档入口:

- `docs/codex-global-memory-system-design.md`
Expand Down
1 change: 1 addition & 0 deletions memory-system/codex-global-memory-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- 不导入作者机器上的任何具体记忆
- 不覆盖目标 Codex App 里已有的记忆内容
- 让新开的 worker 默认启用这套全局记忆系统
- 安装后保持通用写作与实现原则一致:先想清楚再写,简单优先,只做必要改动,先定义成功标准再验证

## 默认目标

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This is the app-wide memory system for Codex.
- Shared guides live in `instructions/company/`, `instructions/user/`, and `instructions/local/`.
- Each workspace gets its own memory node under `workspaces/<workspace-key>/`.
- `workspaces/index.json` maps normalized workspace paths to workspace keys.
- Shared guides and workspace templates should follow the same coding principles: think before coding, simplicity first, surgical changes, and goal-driven verification.
- Workspace nodes contain:
- `instructions/repo/GUIDE.md`
- `candidates/`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Company Guide

- Put organization-wide defaults here.
- Think before coding: surface ambiguity and state assumptions when the risk is real.
- Simplicity first: choose the smallest stable solution.
- Surgical changes: touch only what the request requires.
- Goal-driven execution: define success criteria up front, then verify the result.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
- Use Codex App as the primary AI workspace and avoid unnecessary tool switching.
- Default to the simplest stable path that works.
- When the user says phrases like “开始落地代码”, “开始实现”, “开始写代码”, “继续写代码”, or “进入实现阶段”, default to `method-forge` autonomous mode when the relevant skills are available, unless the user explicitly says not to automate, not to write code yet, or to stay at the planning stage. Use native Codex heartbeat/background automation as the listener and `method-forge-execute` as the default inner engine. Keep loop guards plus `verify` mandatory.
- Think before coding: do not silently assume unknowns; surface ambiguity and state assumptions when the risk is real.
- Simplicity first: choose the smallest stable solution; avoid speculative features, abstractions, and configurability.
- Surgical changes: touch only what the request requires; do not refactor adjacent code, comments, or formatting unless needed.
- Goal-driven execution: define success criteria up front, then verify with tests or the narrowest practical check.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- `instructions/repo/GUIDE.md`
- `memories/MEMORY.md`
- `runtime/active_context.md`
- When you edit workspace docs or memory files, think before editing, keep changes simple, touch only what is required, and verify the result.
- After meaningful work, refresh memory with:
- `python3 ~/.codex/scripts/refresh_memory.py --workspace-root "__WORKSPACE_ROOT__"`
- Do not create or maintain a second local memory system in this workspace unless the user explicitly asks for one.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Conventions:
- Global memory root is `~/.codex/memory/`
- The workspace memory node will be created under `~/.codex/memory/workspaces/` on first refresh
- Before complex work, read shared guides first, then the workspace memory node if it already exists
- Apply the global coding principles: think before coding, simplicity first, surgical changes, and goal-driven execution.
- After meaningful work, run:
- `python3 ~/.codex/scripts/refresh_memory.py --workspace-root "__WORKSPACE_ROOT__"`
7 changes: 7 additions & 0 deletions method-forge/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
- knowledge base 和 research 只作为输入,不替代 `spec.md`、`plan.md` 或 `tasks.md`。
- 默认使用 Markdown 模板、短小章节和可 diff 的文档组织;不要引入大而全外部框架目录。

## Coding Principles

- Think before coding: surface ambiguity and state assumptions when the risk is real.
- Simplicity first: choose the smallest stable solution.
- Surgical changes: touch only what the request requires.
- Goal-driven execution: define success criteria up front, then verify the result.

## Method Forge Autonomous Coding

- 当用户表达“开始落地代码”“开始实现”“开始写代码”“继续写代码”“进入实现阶段”等实现意图时,默认进入 `method-forge` autonomous mode,除非用户明确要求不要自动、先别写代码或只做方案。
Expand Down
2 changes: 2 additions & 0 deletions method-forge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

它不重复实现 Codex App 已经原生提供的工程能力。

使用 `method-forge` 时,同样保持这套通用原则:先想清楚再写、简单优先、只做必要改动、先定义成功标准再验证。

## 负责范围

- 请求 intake 与任务分流
Expand Down
4 changes: 4 additions & 0 deletions method-forge/docs/method/activation-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ activation rules 用于把用户的自然语言意图自动映射到 `method-for
- 默认进入 `method-forge` autonomous mode
- `method-forge-execute` 作为 autonomous 的默认内层执行引擎

这些触发规则应保持简单稳定,只覆盖必须的入口,不额外扩展成新的流程体系。

## 2. 触发优先级

### 2.1 明确指定 `method-forge`
Expand Down Expand Up @@ -114,6 +116,8 @@ activation rules 用于把用户的自然语言意图自动映射到 `method-for

- `~/.codex/skills/` 或 `$CODEX_HOME/skills/`

如果外部资料里看到 `$HOME/.agents/skills`,按旧口径或别名理解即可;当前这套仓库和本地 Codex App 环境统一以 `~/.codex/skills/` 或 `$CODEX_HOME/skills/` 为准。

安装后需要重启 Codex 才能稳定拾取新技能。

### 6.2 触发规则被共享
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/autonomous-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- 可监控
- 不死循环

推进时保持同一组默认原则:先想清楚再做、简单优先、只做必要改动、先定义成功标准再验证。

## 2. 核心模型

这层扩展遵守现有边界:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/codex-native-boundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

如果不先划清边界,很容易把原生能力又包成第二套平台,结果是规则变多、入口变重、维护成本变高。

划边界时保持最小原则:先想清楚,再只补必要的那一层,不额外扩出新平台。

## 2. Codex App 原生负责

以下能力保持交给 Codex App 或当前环境原生机制:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/consumer-adoption.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- 变更包索引
- 落地检查清单

接入时保持原则简单稳定:先想清楚再加规则,只接入必要内容,优先让结果可验证。

## 2. 推荐接入方式

消费方 workspace 不需要搬运整个 `method-forge/` 目录。
Expand Down
1 change: 1 addition & 0 deletions method-forge/docs/method/failure-rework-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- 失败后优先修订原文档,不另开平行文档
- 阻塞点要写清楚,不能只写“后续处理”
- 回退路径要固定,让下一个执行者知道从哪里继续
- 回退时保持最小修复,先想清楚再改,避免把失败处理变成新的复杂分支

## 2. 失败类型与回退路径

Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/loop-guard-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

loop guard 规则用于防止 autonomous 执行在同一步骤上无限重试或在没有进展时持续循环。

守住边界时同样遵循最小原则:只做能验证的下一步,不把重试变成额外分支。

## 2. 推荐保护项

### 2.1 单步最大重试次数
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/orchestration-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- 直接实现功能
- 代替 Codex App 原生 automations

编排规则要保持最小可用:只定义下一步、顺序和停点,不额外发明新的流程层。

## 2. 全局规则

- `feature-intake` 是默认入口
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/resume-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

resume 规则用于让 autonomous 执行在暂停、中断或报错后,能够从文档状态恢复,而不是从头猜。

恢复时也要保持简单:优先从最小、最明确的真相源继续,不额外扩张范围。

## 2. 恢复入口

每次恢复都先读:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/skill-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- 不改造 knowledge base 本体
- 不包装 Codex 原生工程能力

实现 skills 时保持规则简单、稳定、可验证,只补缺口,不扩成新的复杂约定。

## 2. 核心技能总表

| Skill | 作用 | 主要输入 | 主要输出 | 下一步门 |
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/template-lint-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- 可交接
- 不留空壳章节和假完成状态

lint 也遵循同一原则:检查最小必需项,避免把规则写得比模板本身更复杂。

## 2. 通用规则

- 不保留未填的占位符含义不明字段
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/workflow-health-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

workflow health check 用于判断一套 `method-forge` 流程是否还在健康运行,而不是只检查文件是否存在。

健康检查也要保持最小化:先看是否仍然简单、明确、可验证,再看是否需要扩展修复。

## 2. 何时检查

推荐在以下时点做一次:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/method/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- 让质量门发生在实现前后,而不是只在收尾时补救
- 让 memory 与 knowledge-base 只在合适的位置介入

默认遵循同一组工作原则:先想清楚再写、简单优先、只做必要改动、先定义成功标准再验证。

## 2. 推荐产物包

本 workspace 只提供方法与模板,不强制消费方采用固定目录。
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/presets/minimal-change-package/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Minimal Change Package Preset

This preset is intentionally small: keep the package focused, explicit, and easy to verify.

## Purpose

这是一个给消费方 workspace 使用的轻量 preset 入口。
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/adoption-checklist-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Adoption Checklist

Keep the adopted workflow simple, explicit, and tightly scoped: think before adding rules, change only what is needed, and verify each required artifact.

## Workspace Setup

- [ ] `AGENTS.md` 已写入入口、质量门和边界硬规则
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Autonomous Cycle Report

Use this report to record the smallest meaningful cycle result, the assumptions left open, and any change in progress or guard status.

## Cycle

- cycle_timestamp:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Autonomous Heartbeat Prompt

Keep each cycle focused on the smallest safe next step, and stop only when the task is actually blocked, completed, or waiting on a human.

Use this prompt only when a Codex native heartbeat automation has been explicitly requested or an existing autonomous run is being resumed for a `method-forge` task.

```text
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/code-review-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Code Review

Review the smallest meaningful change set, keep the review grounded in the current source of truth, and call out any unresolved assumptions.

## Scope

- change_summary:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/consumer-agents-rules-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Consumer AGENTS Rules Snippet

Keep these rules minimal and stable: think before adding new guidance, keep the scope small, and verify the result with the actual workflow artifacts.

- 所有非闲聊、非纯问答请求默认先产出 `intake.md`。
- 中等及以上复杂度、跨文件、边界不清或风险较高的请求,必须先走 `spec -> plan -> plan-review -> tasks` 再进入实现。
- 任何实质性变更完成后,必须补 `verify.md`;“代码写完了”不等于“交付完成了”。
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/intake-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Intake

Write the intake as the smallest clear decision point: confirm the scope, choose the simplest path, and record unresolved assumptions explicitly.

## Request Summary

- request:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/memory-candidate-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Memory Candidate

Only capture a candidate when the result is already verified, stable, and worth reusing without adding extra scope.

## Candidate Summary

- summary:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/package-index-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Package Index

Keep the index small and explicit so the package can be understood at a glance, without extra process or duplicated truth.

## Change

- change_id:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/plan-review-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Plan Review

Keep the review focused on scope clarity, ordering, and avoidable complexity before implementation starts.

## Findings

-
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/plan-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Plan

Keep the plan simple, explicit, and implementation-ready; add only the details needed to execute safely.

## Architecture

-
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/run-state-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Run State

Keep the run state honest and minimal: record the current truth, the next safe action, and any blocking assumption.

## Task

- task_id:
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/spec-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

-

Keep the spec small and explicit: think before filling it out, choose the simplest stable scope, and only include what the change truly requires.

## User Value

-
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/tasks-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tasks

Break work into the smallest executable tasks that can be verified independently.

## Task List

### T1
Expand Down
2 changes: 2 additions & 0 deletions method-forge/docs/templates/verify-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

-

Use this check to verify the smallest practical result, and call out any assumptions that were not fully resolved before implementation.

## Status

| Field | Value |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Workflow Health Report

Use this report to check whether the workflow is still simple, stable, and correctly bounded by its current artifacts.

## Scope

- workspace:
Expand Down