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
28 changes: 17 additions & 11 deletions ITERATION_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,66 +16,72 @@

---

## 2026-08-08:主线优化审计——迭代事实、运行时身份与待审状态发生分叉
## 2026-08-08:主线优化审计与合并收口

**场景**:项目主编排同时核对映射 runtime、Vault 治理层、遗留开发 worktree、`flg status`、`flg capture list`、`doctor --strict` 和全量测试。

### FLG-ITER-20260808-01:三份迭代日志已形成并行事实源 [fixing — P0]
**收口证据**:PR #42 已合并到 `master`,merge commit 为 `73902fc`;合并后全量测试为 `189 passed`。以下 01–05 均依据该合并与测试证据收口为 `fixed`。

### FLG-ITER-20260808-01:三份迭代日志已形成并行事实源 [fixed — P0]

**现象**:映射 runtime 的日志只有 137 行并带 8 月 6 日未提交记录;Vault 同名日志有 1777 行并记录到 8 月 4 日;遗留 `agent/english-ledger-closeout` 分支又包含一组 7 月 17—18 日记录。三份文件出现重复编号和不同状态。

**影响**:不同 Agent 会从不同工作目录得到不同的产品优先级;同一缺陷可能在一份日志中仍是 `observed`,在另一份日志中已经跨项目复现为 `confirmed`。

**处理方向**:代码仓本文件成为唯一产品迭代事实源;Vault 文件只保留为历史来源档案或生成镜像;迁移时保留来源路径、原日期和原状态,不删除历史文件。规则见 `docs/product/iteration-log-governance.md`。

### FLG-ITER-20260808-02:短确认与用户方向归因已跨项目重复 [fixing — P0]
**修复**:PR #42 将代码仓日志和治理规则合并到 `master`(`73902fc`);Vault 同名文件保持历史档案边界。

### FLG-ITER-20260808-02:短确认与用户方向归因已跨项目重复 [fixed — P0]

**现象**:五个相互独立的产品、恢复和市场验证项目均出现“Assistant 展开方案 + User 回复同意/可以/没问题”后 closeout 漏掉真实方向,或只生成 Assistant shell candidate。历史来源 `vault@2026-07-22#96`、`vault@2026-07-31#100`、`vault@2026-08-01#105`、`vault@2026-08-04#110` 与本轮会话属于同一模式。

**影响**:安全门阻止了错误写入,但重要方向仍依赖宿主人工补账;只依赖 closeout 的宿主会静默丢失用户已经确认的决策。

**处理方向**:只在前文存在单一明确方案时,将短确认绑定为带 `source_actor=user`、确认原文和方案范围的 candidate;多方案或歧义上下文 abstain;candidate 仍须经过 review,不得自动写正式账本。

**候选验证**:隔离候选已补合成回归与真实 PBL Markdown 会话回放;原始确认、`source_actor=user` 和带 inline code 的确认范围均保留。状态仍为 `fixing`,等待主线集成门
**修复验证**:PR #42 已合并合成回归与真实 PBL Markdown 会话回放;原始确认、`source_actor=user` 和带 inline code 的确认范围均保留。

### FLG-ITER-20260808-03:Project identity 通过不代表映射 runtime 可复现 [fixing — P0]
### FLG-ITER-20260808-03:Project identity 通过不代表映射 runtime 可复现 [fixed — P0]

**现象**:repo-map 的 ledger root、code repo 和 HEAD commit 均匹配时,映射 runtime 即使存在未提交代码,`doctor --strict` 仍显示 `Project identity OK`。

**影响**:主编排无法区分远端可复现基线与本地候选行为,测试和账本维护可能实际运行在未记录的代码上。

**处理方向**:runtime attestation 同时报告 branch、HEAD 和 dirty state;没有 repo-map 的普通项目保持兼容;strict 行为必须显式、可测试。

**候选验证**:隔离候选能在真实治理根显示映射 branch、HEAD 与 `dirty (4 changes)`;branch/HEAD 漂移使 strict 失败,dirty 当前只告警。状态仍为 `fixing`
**修复验证**:PR #42 已合并 runtime branch、HEAD 与 dirty state 报告;branch/HEAD 漂移使 strict 失败,dirty 当前只告警。

### FLG-ITER-20260808-04:status 未显示 pending captures [fixing — P1]
### FLG-ITER-20260808-04:status 未显示 pending captures [fixed — P1]

**现象**:`flg status` 显示没有待审 patch,但同一项目的 `flg capture list` 有 4 个 `pending_review` capture。

**影响**:自然语言宿主和接手 Agent 容易把“没有 patch”误读成“没有待审判断”。

**处理方向**:status 独立汇总 pending captures,不把 capture 和 patch 合并成同一种生命周期。

**候选验证**:隔离候选在真实治理根同时显示“无 pending patch”和“4 pending captures”。状态仍为 `fixing`
**修复验证**:PR #42 已合并 pending captures 独立汇总,真实治理根可同时显示“无 pending patch”和“4 pending captures”。

### FLG-ITER-20260808-05:init 创建路径在窄终端被截断 [fixing — P2]
### FLG-ITER-20260808-05:init 创建路径在窄终端被截断 [fixed — P2]

**现象**:全量测试在默认窄终端下为 `174 passed, 1 failed`;失败用例显示 `Created in:` 的长路径被 Rich 截断。将终端宽度扩大后用例通过。

**影响**:用户在最需要确认项目落点的首次初始化阶段,可能看不到完整目录。

**处理方向**:路径输出使用不截断的 plain/overflow-safe 渲染,并保留窄终端回归测试。

**候选验证**:30 列终端宽度回归通过;完整候选测试为 `188 passed`。状态仍为 `fixing`。
**修复验证**:PR #42 已合并 30 列终端宽度回归;合并后全量测试为 `189 passed`。

### FLG-ITER-20260808-06:Context Pack 的近期状态与长期叙事需要分层召回 [confirmed — P1]
### FLG-ITER-20260808-06:Context Pack 的近期状态与长期叙事需要分层召回 [partially fixed — P1]

**现象**:历史评估已经证明 Context Pack 对短而干净的原始历史并不占优;另有真实任务分别出现旧 Next Actions 继续进入 resume pack,以及早期产品母叙事未被默认 pack 召回。来源簇:`vault@2026-07-22#90`、`vault@2026-08-01#104`、`vault@2026-08-04#112`。

**影响**:无差别扩大默认上下文会破坏压缩价值,只保留最近状态又可能让品牌、叙事和长期策略任务缺少关键历史。

**处理方向**:保持默认 resume pack 有界;后续以显式任务意图或主题查询实验“近期执行状态 + 长期母叙事”分层召回,并把 stale/superseded 检查放在增加更多内容之前。

**当前状态**:Continuity Manifest v1 已实现“紧凑地图 → 按判断 ID 展开”的第一段纵切,复用正式账本与现有 evidence/trace 入口,保持 resume 兼容。长期母叙事的主题召回仍未实现,因此本条只标记为 partially fixed。

### FLG-ITER-20260808-07:长期判断账本与任务执行层仍靠宿主纪律交接 [observed — P1]

**现象**:多个任务级沙盒和实时控制实验表明,FLG 能提供长期边界,执行层能提供 scope、验收和当前任务状态,但二者之间尚无最小、可审计的交接字段。pending captures 对 status 不可见是这一问题的一个具体表现。来源簇:`vault@2026-07-27#97-99`、`vault@2026-08-01#102`。
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ flg review --patch .flg/patches/<closeout-patch>.md --report-only
flg review --patch .flg/patches/<closeout-patch>.md --autonomous
flg merge --patch .flg/patches/<closeout-patch>.md --yes
flg context --mode resume
flg context --mode manifest
flg handoff
```

Expand Down Expand Up @@ -402,7 +403,8 @@ This ensures multi-agent relay works correctly: Agent B can see Agent A's closeo
| `flg onboard [--yes]` | Check the environment, run the guided demo, and install the host skill |
| `flg session save <file>` | Archive a raw session before closeout |
| `flg review --patch <file> [--report-only] [--autonomous]` | Inspect candidates internally, then process eligible decisions in the background |
| `flg context --mode resume` | Generate bounded agent startup Context Pack |
| `flg context --mode resume` | Generate the bounded full startup Context Pack |
| `flg context --mode manifest` | Generate a compact project map with evidence/trace expansion commands |
| `flg evidence <decision-id>` | Show evidence behind a reviewed decision |
| `flg merge --patch <file> [--yes]` | Merge routine patch updates without a prompt |
| `flg handoff` | Generate agent handoff summary |
Expand All @@ -428,8 +430,8 @@ This ensures multi-agent relay works correctly: Agent B can see Agent A's closeo
- rebuilding runtime indexes from formal project files with `doctor` and `reindex`
- continuation by a later agent using real, long, and contradictory project history

Automatic quadrant routing, a blindspot engine, and `flg trace` are not completed
capabilities in the current version.
Automatic quadrant routing and a blindspot engine are not completed capabilities
in the current version.

## Smoke Test

Expand Down
26 changes: 26 additions & 0 deletions docs/product/context-pack-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,30 @@ The Context Pack is the first concrete artifact that turns this definition into
flg context --mode resume --budget 4000
```

For a smaller navigation-first entrypoint, use:

```bash
flg context --mode manifest
```

The generated Continuity Manifest contains identity, the current goal, judgment
statuses and IDs, active-work pointers, source health, and exact commands for
expanding a judgment through the existing `evidence` and `trace` paths. It is a
derived view. The formal ledger and current project files remain authoritative,
and `.flg/context/evidence_index.json` remains the only evidence index.

Default output:

```text
.flg/context/startup.md
```

Manifest output:

```text
.flg/context/manifest.md
```

## Contract Principles

### 1. Reviewed state first
Expand Down Expand Up @@ -71,6 +89,14 @@ The pack should include evidence references, not full source history.
The agent should be able to retrieve evidence on demand through `flg evidence`
and `flg trace` commands.

### 6. Project Continuity Layer stays navigational

The Continuity Manifest is the compact map for deciding what to expand. The
resume pack remains the bounded working payload. `flg evidence <decision-id>`
and `flg trace <decision-id>` supply judgment detail and provenance on demand.
This layer does not load raw sessions, copy full rationale into the manifest,
introduce another index, or become a new fact-writing surface.

## Required Sections

A valid v0 Context Pack should include these sections.
Expand Down
26 changes: 12 additions & 14 deletions docs/product/current-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ Its job is to let project state, boundaries, judgments, progress, and next actio

## Current Verification

- The pre-candidate mapped-runtime run yielded `174 passed` and one
narrow-terminal path-rendering failure
- Goal-oriented local candidate passes `188` tests; it is not committed, merged,
released, or installed as the mapped runtime
- PR #42 is merged into `master` at merge commit `73902fc`
- The post-merge full suite passes `189` tests
- `python scripts/smoke_test.py` passed
- English-native deterministic gate passed
- Real FlowGrid ledger audit passed with an expected undeclared-evidence-basis warning
Expand All @@ -41,10 +39,10 @@ Its job is to let project state, boundaries, judgments, progress, and next actio
- Five isolated `gpt-5.4` campaign continuations and separately scored results show Context Pack is stable and better than no state, but not superior to clean raw history; see [the stability result](../../evals/results/continuation-stability-20260722.md)
- Three repeated iteration-feedback patterns are now mapped to executable rules and verification in [the closure note](iteration-feedback-20260722.md)

## Goal-Oriented Local Candidate
## Goal-Oriented Reliability Integration

The isolated `candidate/goal-oriented-opt-20260808` worktree addresses the
highest-impact repeated failures without changing the v0.4 product boundary:
PR #42 merged the goal-oriented reliability work into `master` at `73902fc`
without changing the v0.4 product boundary:

- attributed short user confirmations can bind to one unambiguous Assistant
proposal while ambiguous choices abstain;
Expand All @@ -53,15 +51,16 @@ highest-impact repeated failures without changing the v0.4 product boundary:
- `doctor` shows mapped runtime branch, HEAD, and dirty state;
- `status` reports pending captures separately from patches;
- `init` preserves the complete creation path in narrow terminals;
- legacy Chinese ledger parsing and durable raw-source provenance fixes from an
unmerged development branch are included for integrated validation.
- legacy Chinese ledger parsing and durable raw-source provenance fixes are
included in the merged integration.

The real PBL confirmation transcript now produces one user-attributed candidate
with the original confirmation and inline-code scope preserved. Formal ledger
writes still require the existing review boundary.

This candidate remains local. Passing tests do not establish external-host
adoption or authorize commit, merge, release, or installation.
The mapped runtime has been fast-forwarded to `73902fc` and verified with
`189 passed`, a passing smoke test, and `flg doctor --strict`. External-host
adoption and release/tag status remain unverified.

## Current Goal

Expand All @@ -73,9 +72,8 @@ Complete the v0.4 core loop:

## Immediate Priorities

1. Review and integrate the isolated reliability candidate without overwriting
either protected dirty worktree.
2. Make the repository `ITERATION_LOG.md` the canonical product feedback source;
1. Validate the merged reliability behavior in continued real-project use.
2. Use the repository `ITERATION_LOG.md` as the canonical product feedback source;
preserve the Vault log as a legacy archive instead of continuing dual writes.
3. Validate automatic session capture across Codex, ZCode, Hermes, and other supported hosts.
4. Run isolated comparisons between no state, raw history, and FlowGrid Context Pack.
Expand Down
Loading
Loading