guarantee-based-coding 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/MANIFEST.in +1 -0
- {guarantee_based_coding-0.3.0/guarantee_based_coding.egg-info → guarantee_based_coding-0.4.0}/PKG-INFO +7 -3
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/README.md +90 -86
- guarantee_based_coding-0.4.0/docs/development/0.4.0-validation.md +61 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/en/concepts.md +227 -223
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/en/onboarding-agent.md +114 -108
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/en/quick-start.md +146 -145
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/en/reference.md +202 -201
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/en/workflow.md +276 -207
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/zh/concepts.md +198 -194
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/zh/onboarding-agent.md +99 -94
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/zh/quick-start.md +136 -135
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/zh/reference.md +190 -189
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/docs/zh/workflow.md +227 -175
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/__init__.py +1 -1
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/intent/cli.py +124 -124
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/interface/mcp.py +672 -672
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/i18n/texts/rules.en.md +71 -64
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/i18n/texts/rules.zh.md +47 -42
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/i18n/texts/setup.en.md +102 -100
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/i18n/texts/setup.zh.md +81 -80
- guarantee_based_coding-0.4.0/gbc/assets/skills/README.md +24 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/skills/gbc-cli/SKILL.md +145 -141
- guarantee_based_coding-0.4.0/gbc/assets/skills/gbc-workflow/SKILL.md +24 -0
- guarantee_based_coding-0.4.0/gbc/assets/skills/gbc-workflow/references/guarantees.md +32 -0
- guarantee_based_coding-0.4.0/gbc/assets/skills/gbc-workflow/references/intent.md +21 -0
- guarantee_based_coding-0.4.0/gbc/assets/skills/gbc-workflow/references/vocabulary.md +11 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/entry.py +165 -165
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0/guarantee_based_coding.egg-info}/PKG-INFO +7 -3
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/guarantee_based_coding.egg-info/SOURCES.txt +5 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_assets.py +24 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_cli_commands.py +697 -697
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_mcp_doc_tools.py +1 -1
- guarantee_based_coding-0.3.0/gbc/assets/skills/README.md +0 -16
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/LICENSE +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/build_support.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/assets.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/config/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/config/backups.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/config/base.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/config/executor.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/config/project.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/core/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/core/env.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/core/executor.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/core/guarantee.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/documentation/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/documentation/base.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/documentation/cli.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/i18n/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/i18n/lang.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/i18n/translate.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/intent/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/intent/base.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/intent/editor.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/interface/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/interface/base.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/interface/cli.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/models/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/models/errors.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/models/meta.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/models/verify.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/utils/__init__.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/utils/file_utils.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/utils/gbc_md.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/utils/json_model_operator.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/app/utils/safe_file_writer.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/app.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/css/foundation.css +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/css/review.css +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/css/workspace.css +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/i18n.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/index.html +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/actions.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/api.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/diff.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/dom.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/editor-view.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/review-view.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/semantic.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/state.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/editor/js/tree-view.js +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/i18n/catalog/en.json +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/gbc/assets/i18n/catalog/zh.json +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/guarantee_based_coding.egg-info/dependency_links.txt +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/guarantee_based_coding.egg-info/entry_points.txt +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/guarantee_based_coding.egg-info/requires.txt +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/guarantee_based_coding.egg-info/top_level.txt +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/pyproject.toml +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/setup.cfg +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_config_project.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_core_executor.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_documentation.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_env_actions.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_errors_i18n.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_executor_externalized.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_gbc_md.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_guarantee_crud.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_guarantee_deps.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_guarantee_verify.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_i18n.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_intent_base.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_intent_editor_api.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_intent_flat.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_interface_base_crud.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_interface_base_deps.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_interface_base_query.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_interface_base_refactor.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_json_model_and_file_utils.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_manual_packaging.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_safe_file_writer.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_tree_interfaces.py +0 -0
- {guarantee_based_coding-0.3.0 → guarantee_based_coding-0.4.0}/tests/test_tree_views.py +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
include build_support.py
|
|
2
2
|
include docs/en/quick-start.md docs/en/concepts.md docs/en/workflow.md docs/en/reference.md docs/en/onboarding-agent.md
|
|
3
3
|
include docs/zh/quick-start.md docs/zh/concepts.md docs/zh/workflow.md docs/zh/reference.md docs/zh/onboarding-agent.md
|
|
4
|
+
include docs/development/0.4.0-validation.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: guarantee-based-coding
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Make code safely modifiable even when not fully understood — turn implicit inter-module dependencies into explicit, executable, verifiable guarantees.
|
|
5
5
|
Author: Jesse-x86
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -64,10 +64,14 @@ English docs: [docs/en/](./docs/en/)。
|
|
|
64
64
|
安装后也能离线查询同版本手册:`gbc doc list --lang zh`、`gbc doc read quick-start --lang zh`、
|
|
65
65
|
`gbc doc search "保证" --lang zh`。`--help` 仍用于查简短命令语法。
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
**0.4.0** 在 0.3.0 的命令职责与离线手册基础上,完善意图起草、保证测试和术语 / 决策复用工作流。
|
|
68
68
|
0.3.0 中项目架构意图入口由 `gbc doc` 改为 `gbc intent`,MCP 的八个意图工具由 `doc_*`
|
|
69
69
|
改为 `intent_*`,不保留旧别名。此后的 `gbc doc` 专门查询 GBC 手册。
|
|
70
70
|
|
|
71
|
+
0.4.0 增加可配合 MCP 或 CLI 使用的 **gbc-workflow** skill:先查证据再起草意图、保护消费者
|
|
72
|
+
行为的保证测试,以及术语与决策理由复用。**gbc-cli** 保留为命令适配器;用 `gbc setup` 查询
|
|
73
|
+
随包路径,按客户端需要在项目内接入,不自动全局安装。详见[工作流](./docs/zh/workflow.md)。
|
|
74
|
+
|
|
71
75
|
---
|
|
72
76
|
|
|
73
77
|
## 核心想法
|
|
@@ -96,7 +100,7 @@ GBC 目前是一个可用的 Python 分发包(`pipx install guarantee-based-co
|
|
|
96
100
|
- ✅ 多语言 executor 配置
|
|
97
101
|
- ✅ CLI + MCP 双接口(含意图文档 `gbc intent` 全进 MCP)
|
|
98
102
|
- ✅ 意图文档子系统(`gbc intent` / web 编辑器)
|
|
99
|
-
- ✅
|
|
103
|
+
- ✅ 随包接线指南(`gbc setup`)、通用于 MCP / CLI 的工作流 skill 与 CLI 命令适配 skill
|
|
100
104
|
- ✅ 原子文件写入 + 备份
|
|
101
105
|
|
|
102
106
|
|
|
@@ -1,94 +1,98 @@
|
|
|
1
|
-
# Guarantee-Based Coding (GBC)
|
|
2
|
-
|
|
3
|
-
**与其指望 AI 更聪明,不如让再笨的 agent 也改不坏你的代码。**
|
|
4
|
-
|
|
5
|
-
**English version: [docs/en/README.md](docs/en/README.md)**
|
|
6
|
-
|
|
7
|
-
GBC 把「这次改动会不会悄悄碰坏别处」从一种担心,变成可以当场验证的事实:你在意的行为被登记成
|
|
8
|
-
一条条带测试的**保证(guarantee)**,每次改完一跑——全绿就安心,有红就精确告诉你碰坏了谁、谁在
|
|
9
|
-
依赖它。
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## 🚀 快速开始
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pipx install guarantee-based-coding
|
|
17
|
-
gbc setup # 打印本地化接线指南:怎么把 MCP / skills 接入你的 agent
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
装好后 `gbc` 命令即在 PATH 上。完整上手(安装 → 接入 agent → 冒烟验证)见
|
|
21
|
-
**[docs/zh/quick-start.md](./docs/zh/quick-start.md)**。
|
|
22
|
-
|
|
23
|
-
想让 agent 替你接入?把 **[docs/zh/onboarding-agent.md](./docs/zh/onboarding-agent.md)** 交给它。
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
> 🚧 **交互式 demo 施工中**:旧的演示套件已废弃,新的交互式演示正在筹备。目前请直接读文档上手。
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 📚 文档
|
|
32
|
-
|
|
33
|
-
| 你想 | 看这里 |
|
|
34
|
-
|------|--------|
|
|
35
|
-
| 装好并跑起来 | [快速开始](./docs/zh/quick-start.md) |
|
|
36
|
-
| 懂 GBC 在保护什么 | [核心概念](./docs/zh/concepts.md) |
|
|
37
|
-
| 在 GBC 下安全改代码 | [工作流](./docs/zh/workflow.md) |
|
|
38
|
-
| 查命令 / 工具 / executor | [参考手册](./docs/zh/reference.md) |
|
|
39
|
-
| 你是 agent,被要求接入 GBC | [Agent 上手](./docs/zh/onboarding-agent.md) |
|
|
40
|
-
|
|
1
|
+
# Guarantee-Based Coding (GBC)
|
|
2
|
+
|
|
3
|
+
**与其指望 AI 更聪明,不如让再笨的 agent 也改不坏你的代码。**
|
|
4
|
+
|
|
5
|
+
**English version: [docs/en/README.md](docs/en/README.md)**
|
|
6
|
+
|
|
7
|
+
GBC 把「这次改动会不会悄悄碰坏别处」从一种担心,变成可以当场验证的事实:你在意的行为被登记成
|
|
8
|
+
一条条带测试的**保证(guarantee)**,每次改完一跑——全绿就安心,有红就精确告诉你碰坏了谁、谁在
|
|
9
|
+
依赖它。
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🚀 快速开始
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pipx install guarantee-based-coding
|
|
17
|
+
gbc setup # 打印本地化接线指南:怎么把 MCP / skills 接入你的 agent
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
装好后 `gbc` 命令即在 PATH 上。完整上手(安装 → 接入 agent → 冒烟验证)见
|
|
21
|
+
**[docs/zh/quick-start.md](./docs/zh/quick-start.md)**。
|
|
22
|
+
|
|
23
|
+
想让 agent 替你接入?把 **[docs/zh/onboarding-agent.md](./docs/zh/onboarding-agent.md)** 交给它。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
> 🚧 **交互式 demo 施工中**:旧的演示套件已废弃,新的交互式演示正在筹备。目前请直接读文档上手。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 📚 文档
|
|
32
|
+
|
|
33
|
+
| 你想 | 看这里 |
|
|
34
|
+
|------|--------|
|
|
35
|
+
| 装好并跑起来 | [快速开始](./docs/zh/quick-start.md) |
|
|
36
|
+
| 懂 GBC 在保护什么 | [核心概念](./docs/zh/concepts.md) |
|
|
37
|
+
| 在 GBC 下安全改代码 | [工作流](./docs/zh/workflow.md) |
|
|
38
|
+
| 查命令 / 工具 / executor | [参考手册](./docs/zh/reference.md) |
|
|
39
|
+
| 你是 agent,被要求接入 GBC | [Agent 上手](./docs/zh/onboarding-agent.md) |
|
|
40
|
+
|
|
41
41
|
English docs: [docs/en/](./docs/en/)。
|
|
42
42
|
|
|
43
43
|
安装后也能离线查询同版本手册:`gbc doc list --lang zh`、`gbc doc read quick-start --lang zh`、
|
|
44
44
|
`gbc doc search "保证" --lang zh`。`--help` 仍用于查简短命令语法。
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
**0.4.0** 在 0.3.0 的命令职责与离线手册基础上,完善意图起草、保证测试和术语 / 决策复用工作流。
|
|
47
47
|
0.3.0 中项目架构意图入口由 `gbc doc` 改为 `gbc intent`,MCP 的八个意图工具由 `doc_*`
|
|
48
48
|
改为 `intent_*`,不保留旧别名。此后的 `gbc doc` 专门查询 GBC 手册。
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- ✅
|
|
79
|
-
- ✅
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
##
|
|
93
|
-
|
|
94
|
-
|
|
50
|
+
0.4.0 增加可配合 MCP 或 CLI 使用的 **gbc-workflow** skill:先查证据再起草意图、保护消费者
|
|
51
|
+
行为的保证测试,以及术语与决策理由复用。**gbc-cli** 保留为命令适配器;用 `gbc setup` 查询
|
|
52
|
+
随包路径,按客户端需要在项目内接入,不自动全局安装。详见[工作流](./docs/zh/workflow.md)。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 核心想法
|
|
57
|
+
|
|
58
|
+
代码之间的依赖本质上是一组**保证**。模块 A 依赖模块 B,不是依赖它的实现细节,而是依赖它的某些
|
|
59
|
+
行为承诺——返回值的类型、格式、语义。把这些保证从隐含变成**显式、可执行、可验证**,正确性的判定
|
|
60
|
+
就从「AI 觉得自己改对了」变成「所有被依赖的保证仍通过」——一个可机械验证的布尔条件。
|
|
61
|
+
|
|
62
|
+

|
|
63
|
+
|
|
64
|
+
GBC **不是**另一个要挑战 Cursor / Aider 的 AI 编程助手,而是填补它们在大型项目里缺的一环:
|
|
65
|
+
**机器可判定的变更边界**。它与那些 agent 配合——改前查依赖树,改后必须跑通所有相关保证;也区别
|
|
66
|
+
于 CI——CI 是事后的,GBC 是准入制的门禁,错误在落地前就被拦在 agent 的上下文里。
|
|
67
|
+
|
|
68
|
+
完整概念、架构图、与已有概念(Design by Contract / 测试)的区别,见
|
|
69
|
+
[核心概念](./docs/zh/concepts.md)。
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 当前状态
|
|
74
|
+
|
|
75
|
+
GBC 目前是一个可用的 Python 分发包(`pipx install guarantee-based-coding`),自身用 GBC 管理自己的
|
|
76
|
+
`.gbc/`(dogfooding):
|
|
77
|
+
|
|
78
|
+
- ✅ 核心保证机制(具名 id、多对一、出生即绿、退休保护、反查)
|
|
79
|
+
- ✅ 多语言 executor 配置
|
|
80
|
+
- ✅ CLI + MCP 双接口(含意图文档 `gbc intent` 全进 MCP)
|
|
81
|
+
- ✅ 意图文档子系统(`gbc intent` / web 编辑器)
|
|
82
|
+
- ✅ 随包接线指南(`gbc setup`)、通用于 MCP / CLI 的工作流 skill 与 CLI 命令适配 skill
|
|
83
|
+
- ✅ 原子文件写入 + 备份
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
**诚实的局限**:保护能力上限 = 测试质量(测试只走 happy path 就是虚假安全感);依赖需主动登记,
|
|
87
|
+
覆盖率随项目增长需持续投入;每次验证真实跑测试,有一定延迟。详见
|
|
88
|
+
[核心概念 · 局限性](./docs/zh/concepts.md#局限性诚实地说)。
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 许可
|
|
93
|
+
|
|
94
|
+
本项目采用 [Apache-2.0](./LICENSE) 许可证。
|
|
95
|
+
|
|
96
|
+
## 联系
|
|
97
|
+
|
|
98
|
+
如果你对这个方向感兴趣,欢迎 star、issue 或者直接联系我。
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# 0.4.0 workflow validation
|
|
2
|
+
|
|
3
|
+
Date: 2026-09-23. This record distinguishes source inspection, observed test results, and remaining validation. Publication status is tracked in `TODO.md`; a completed local check is not an upload receipt.
|
|
4
|
+
|
|
5
|
+
## Scope and design basis
|
|
6
|
+
|
|
7
|
+
The authorized change covers three workflow improvements: evidence-first intent drafting with consequential questions; tests that protect consumer behavior; and reuse of vocabulary and material decision reasons. It adds the transport-neutral `gbc-workflow` skill and updates guidance. It does not change the engine, command names, fixed manual topics, guarantee schema, born-green, or the project's existing approval authority. `gbc-cli` remains the CLI adapter.
|
|
8
|
+
|
|
9
|
+
Source inspection found concrete weaknesses in the previous guidance:
|
|
10
|
+
|
|
11
|
+
- `docs/en/workflow.md` and its Chinese counterpart favored non-null/type checks over exact assertions without asking which values consumers actually require.
|
|
12
|
+
- `gbc/assets/i18n/texts/rules.*.md` encouraged reporting every step and asking whenever unsure, without first distinguishing discoverable facts from consequential choices.
|
|
13
|
+
- The workflow's bad-fixture advice could be satisfied by a mock that bypasses the behavior under protection. Passing such an assertion does not demonstrate target-defect sensitivity.
|
|
14
|
+
- Existing guidance already required defined terms and current-state intent. The change adds reuse of existing vocabulary and decision reasons rather than a mandatory new document convention.
|
|
15
|
+
|
|
16
|
+
Existing project evidence supplied the examples: `.gbc/gbc/app/core/gbc.md` requires reverse dependency preservation until the final relevant symbol dependency is removed; `tests/test_guarantee_deps.py` checks the resulting retirement protection. `.gbc/gbc/app/intent/gbc.editor.py.json` distinguishes HTTP 400 for invalid paths from HTTP 200 with `meta: null` for missing metadata. The latter is contract inspection, not a new editor test run. The intent subsystem's existing `base` IO boundary supplies the vocabulary/decision example.
|
|
17
|
+
|
|
18
|
+
Selective design inspiration comes from Matt Pocock's [grilling](https://github.com/mattpocock/skills/blob/main/skills/productivity/grilling/SKILL.md), [tdd](https://github.com/mattpocock/skills/blob/main/skills/engineering/tdd/SKILL.md), and [domain-modeling](https://github.com/mattpocock/skills/blob/main/skills/engineering/domain-modeling/SKILL.md). GBC adopts fact investigation, meaningful behavior boundaries, and vocabulary/scenario/reason reuse within its own existing contracts. It does not require the source skills, exhaustive interviews, per-test-boundary approval, universal red-first, or a new CONTEXT/ADR document.
|
|
19
|
+
|
|
20
|
+
## Historical defect replay: observed
|
|
21
|
+
|
|
22
|
+
The isolated replay ran the unchanged existing `test_shared_guarantee_keeps_retirement_guard_until_last_symbol_removed` through GBC, covering both single-guarantee removal and whole-symbol removal. Its detailed local record is `.cache/workflow-eval-0.4.0/dependency-replay/REPORT.md`.
|
|
23
|
+
|
|
24
|
+
| Stage | GBC CLI exit | Observed result |
|
|
25
|
+
| --- | ---: | --- |
|
|
26
|
+
| Born-green creation against current implementation | 0 | Registration accepted |
|
|
27
|
+
| Explicit current implementation verification | 0 | 2 passed |
|
|
28
|
+
| Exact historical module substituted | 1 | 2 failed at the target behavioral assertion |
|
|
29
|
+
| Exact current module restored | 0 | 2 passed |
|
|
30
|
+
|
|
31
|
+
The historical source was Git blob `aaaa8521bf3d193d29e5f9ca833a86e6ef5e7090^:gbc/app/core/guarantee.py`. Both failures occurred at test line 165: the consumer disappeared from `dependents_of` after only the first symbol dependency was removed. The failures were behavioral, not import, fixture, or temporary-directory failures. **The historical run stopped before the later retirement assertion; retirement itself was not executed in RED.** A separate final restored verification also returned 2 passed.
|
|
32
|
+
|
|
33
|
+
The test file remained byte-identical. An observation-only `conftest.py` recorded the module path and hash from inside each actual test subprocess. Current/restored SHA-256 was `1f70804b46859927954b8a1f58cdf2350b83ab1dc5f298cdc268d71c8ba3b44e`; historical SHA-256 was `843a25b543d095e357331c807f1d771beb5cb532c604ff637ff11646306fecac`. The sandbox used a fresh executor, the dedicated Windows interpreter, explicit cwd/PYTHONPATH, controlled basetemp, disabled pytest cache and third-party plugin autoload. Tests ran only through GBC. Explicit verification logs contained no skipped, xfail, or warning entries.
|
|
34
|
+
|
|
35
|
+
This establishes sensitivity of **one existing test** to its historical defect. It is a historical module inside the current package/environment, not a full historical-release execution. It does not establish universal workflow efficacy or the quality of newly authored tests. Raw logs, hashes, exact subprocess arguments, and the restoration procedure are in the local replay directory; that cache is supplementary evidence rather than a shipped artifact.
|
|
36
|
+
|
|
37
|
+
## Forward workflow evaluation: observed, qualitative
|
|
38
|
+
|
|
39
|
+
An independent evaluator read the new skill and handled three realistic requests without changing code or metadata, running tests, or actually questioning the user. The detailed local record is `.cache/workflow-eval-0.4.0/forward-evaluation.md`. The following preserves the substantive outcomes and durable evidence rather than relying only on that local cache:
|
|
40
|
+
|
|
41
|
+
| Request | Observed judgment | Durable evidence examined by the evaluator |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Simplify file-meta responses to HTTP 200/null | Rejected flattening invalid paths and non-directory roots into the empty state; traced the frontend's error/empty distinction, reused existing guarantees, and proposed precise HTTP and view assertions. | `gbc/app/intent/editor.py` file-meta handler; `gbc/app/intent/base.py:file_meta_view`; `gbc/assets/editor/js/api.js`, `actions.js`, `editor-view.js`; `tests/test_intent_editor_api.py` |
|
|
44
|
+
| Preserve concurrent editor changes and allow explicit conflict overwrite | Discovered existing field-level three-way merge and force handling; preserved the base IO / HTTP surface boundary and reused selective-write, preservation, and conflict guarantees. Identified UI detail, concurrent writes, and changes occurring after the conflict prompt as distinct possible follow-ups. | `.gbc/gbc/app/intent/gbc.md`; `gbc/app/intent/base.py:save_flat`; `gbc/assets/editor/js/actions.js`; `tests/test_intent_flat.py`; registered base/editor guarantees |
|
|
45
|
+
| Rename heavy as timeout and describe GREEN as every test passing | Rejected both semantic changes using existing definitions and implementation. Proposed clearer wording in existing docs, retaining skipped counts and distinguishing cost rank, timeout, gate result, and execution coverage; did not require a new ADR/CONTEXT file. | `.gbc/gbc.md`; `docs/en/concepts.md`, `docs/zh/concepts.md`; `gbc/app/models/meta.py`; `gbc/app/models/verify.py:VerifySummary.green`; `gbc/app/core/guarantee.py`; `tests/test_cli_commands.py` |
|
|
46
|
+
|
|
47
|
+
The file-meta inspection also found an important boundary: current `meta: null` means no displayable view, including existing handling of damaged/unreadable metadata, not exclusively an unregistered file. A future change must not silently narrow that compatibility behavior. Existing null-versus-error examples in the manual illustrate the missing-metadata case without claiming it is the only null case.
|
|
48
|
+
|
|
49
|
+
For the save request, the evaluator's suggested UI/conflict-version/concurrency refinements are **unapproved proposals outside 0.4.0**, not new implementation commitments. This evaluation did not authorize expanding the release. Test plans described in the responses were not executed, and the inspected editor paths were not retested by these dry-runs.
|
|
50
|
+
|
|
51
|
+
The outputs show evidence-first judgment, consumer-oriented assertions, reuse of terminology/contracts, and awareness of approval boundaries in these three cases. There was no before/after control, productivity measurement, or runtime implementation assessment. The evaluator used the new guidance, so this is limited qualitative forward evidence, not a universal efficacy claim or proof of future agent compliance.
|
|
52
|
+
|
|
53
|
+
## Packaging and final acceptance
|
|
54
|
+
|
|
55
|
+
Top-level verification through GBC covered seven affected providers and twelve guarantees: **12 passed, 0 failed, 0 skipped**. The providers were assets, documentation base/CLI, translation, interface CLI/MCP, and the entry point. Both graph and intent consistency checks passed. This is affected-scope acceptance, not a claim that every repository test was executed. Exact source-gate results are preserved locally in `.cache/release-receipts-0.4.0/source-gates.json`.
|
|
56
|
+
|
|
57
|
+
Two temporary GBC guarantees ran the official skill-creator `quick_validate` against `gbc-workflow` and `gbc-cli`; both passed. Earlier bounded asset self-verification reported 9 passed. The sdist build, wheel build from that sdist, `twine check --strict`, and installed-environment `pip check` all passed.
|
|
58
|
+
|
|
59
|
+
The built 0.4.0 wheel was installed into a separate virtual environment. The observed `gbc.__file__` resolved to that environment's `site-packages`, and `__version__` was 0.4.0. This environment reused existing system dependencies; the GBC package itself came from its own wheel, not the editable source checkout. A registered GBC guarantee ran **13 installed smoke checks and passed**, including real module/console entry points, CLI migration behavior, all ten English/Chinese manual documents across five fixed topics, localized setup/rules, packaged editor/i18n/skill resources, all four workflow skill files with resolved local reference links, a persistent intent round trip, consistency exit codes, and a real MCP stdio session listing 30 tools. The raw installed gate output is `.cache/release-receipts-0.4.0/installed-gate.log`.
|
|
60
|
+
|
|
61
|
+
The source distribution includes this validation report through an explicit manifest entry. The observations above concern the verified wheel payload; a rebuild that only adds source-distribution documentation requires a payload identity check before those results are reused. Publication status is tracked separately in `TODO.md`; local validation results are not publication receipts.
|