fcop 3.2.0__tar.gz → 3.2.2__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.
Files changed (133) hide show
  1. {fcop-3.2.0 → fcop-3.2.2}/PKG-INFO +1 -1
  2. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_version.py +1 -1
  3. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/project.py +34 -19
  4. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/agent-bringup-prompt.zh.md +24 -17
  5. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/letter-to-admin.en.md +20 -12
  6. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/letter-to-admin.zh.md +15 -8
  7. {fcop-3.2.0 → fcop-3.2.2}/.gitignore +0 -0
  8. {fcop-3.2.0 → fcop-3.2.2}/CHANGELOG.md +0 -0
  9. {fcop-3.2.0 → fcop-3.2.2}/LICENSE +0 -0
  10. {fcop-3.2.0 → fcop-3.2.2}/README.md +0 -0
  11. {fcop-3.2.0 → fcop-3.2.2}/README.zh.md +0 -0
  12. {fcop-3.2.0 → fcop-3.2.2}/adr/README.md +0 -0
  13. {fcop-3.2.0 → fcop-3.2.2}/essays/README.md +0 -0
  14. {fcop-3.2.0 → fcop-3.2.2}/fcop-README.pypi.md +0 -0
  15. {fcop-3.2.0 → fcop-3.2.2}/pyproject.toml +0 -0
  16. {fcop-3.2.0 → fcop-3.2.2}/spec/README.md +0 -0
  17. {fcop-3.2.0 → fcop-3.2.2}/spec/archived/README.md +0 -0
  18. {fcop-3.2.0 → fcop-3.2.2}/spec/schemas/README.md +0 -0
  19. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/__init__.py +0 -0
  20. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_compat_cli.py +0 -0
  21. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/agent.schema.json +0 -0
  22. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/boundary.schema.json +0 -0
  23. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/encoding.schema.json +0 -0
  24. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/event.schema.json +0 -0
  25. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/failure.schema.json +0 -0
  26. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/ipc-envelope.schema.json +0 -0
  27. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/review.schema.json +0 -0
  28. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/_data/schemas/skill.schema.json +0 -0
  29. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/cli/__init__.py +0 -0
  30. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/cli/_main.py +0 -0
  31. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/cli/migrate_v3.py +0 -0
  32. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/cli/migrate_workspace.py +0 -0
  33. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/__init__.py +0 -0
  34. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/boundary.py +0 -0
  35. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/config.py +0 -0
  36. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/events.py +0 -0
  37. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/filename.py +0 -0
  38. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/frontmatter.py +0 -0
  39. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/jsonschema_validator.py +0 -0
  40. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/recovery.py +0 -0
  41. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/core/schema.py +0 -0
  42. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/errors.py +0 -0
  43. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/inspection.py +0 -0
  44. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/__init__.py +0 -0
  45. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/atomic.py +0 -0
  46. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/detect.py +0 -0
  47. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/events.py +0 -0
  48. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/migrate.py +0 -0
  49. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/state.py +0 -0
  50. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/lifecycle/transitions.py +0 -0
  51. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/models.py +0 -0
  52. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/py.typed +0 -0
  53. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/__init__.py +0 -0
  54. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/agent-bringup-prompt.en.md +0 -0
  55. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/agent-install-prompt.en.md +0 -0
  56. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/agent-install-prompt.zh.md +0 -0
  57. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/fcop-protocol.mdc +0 -0
  58. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/fcop-rules.mdc +0 -0
  59. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/fcop-spec-v1.0.en.md +0 -0
  60. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/fcop-spec-v1.0.zh.md +0 -0
  61. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/fcop-spec-v1.1.en.md +0 -0
  62. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/fcop-spec-v1.1.zh.md +0 -0
  63. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/internal-readme.en.md +0 -0
  64. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/rules/_data/internal-readme.zh.md +0 -0
  65. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/__init__.py +0 -0
  66. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/README.en.md +0 -0
  67. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/README.md +0 -0
  68. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/README.en.md +0 -0
  69. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/README.md +0 -0
  70. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/TEAM-OPERATING-RULES.en.md +0 -0
  71. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/TEAM-OPERATING-RULES.md +0 -0
  72. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/TEAM-ROLES.en.md +0 -0
  73. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/TEAM-ROLES.md +0 -0
  74. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/DEV.en.md +0 -0
  75. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/DEV.md +0 -0
  76. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/OPS.en.md +0 -0
  77. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/OPS.md +0 -0
  78. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/PM.en.md +0 -0
  79. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/PM.md +0 -0
  80. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/QA.en.md +0 -0
  81. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/dev-team/roles/QA.md +0 -0
  82. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/index.json +0 -0
  83. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/README.en.md +0 -0
  84. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/README.md +0 -0
  85. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/TEAM-OPERATING-RULES.en.md +0 -0
  86. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/TEAM-OPERATING-RULES.md +0 -0
  87. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/TEAM-ROLES.en.md +0 -0
  88. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/TEAM-ROLES.md +0 -0
  89. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/COLLECTOR.en.md +0 -0
  90. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/COLLECTOR.md +0 -0
  91. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/EDITOR.en.md +0 -0
  92. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/EDITOR.md +0 -0
  93. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/PUBLISHER.en.md +0 -0
  94. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/PUBLISHER.md +0 -0
  95. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/WRITER.en.md +0 -0
  96. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/media-team/roles/WRITER.md +0 -0
  97. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/README.en.md +0 -0
  98. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/README.md +0 -0
  99. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/TEAM-OPERATING-RULES.en.md +0 -0
  100. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/TEAM-OPERATING-RULES.md +0 -0
  101. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/TEAM-ROLES.en.md +0 -0
  102. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/TEAM-ROLES.md +0 -0
  103. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/BUILDER.en.md +0 -0
  104. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/BUILDER.md +0 -0
  105. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/DESIGNER.en.md +0 -0
  106. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/DESIGNER.md +0 -0
  107. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/MARKETER.en.md +0 -0
  108. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/MARKETER.md +0 -0
  109. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/RESEARCHER.en.md +0 -0
  110. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/mvp-team/roles/RESEARCHER.md +0 -0
  111. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/README.en.md +0 -0
  112. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/README.md +0 -0
  113. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/TEAM-OPERATING-RULES.en.md +0 -0
  114. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/TEAM-OPERATING-RULES.md +0 -0
  115. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/TEAM-ROLES.en.md +0 -0
  116. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/TEAM-ROLES.md +0 -0
  117. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/AUTO-TESTER.en.md +0 -0
  118. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/AUTO-TESTER.md +0 -0
  119. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/LEAD-QA.en.md +0 -0
  120. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/LEAD-QA.md +0 -0
  121. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/PERF-TESTER.en.md +0 -0
  122. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/PERF-TESTER.md +0 -0
  123. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/TESTER.en.md +0 -0
  124. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/qa-team/roles/TESTER.md +0 -0
  125. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/README.en.md +0 -0
  126. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/README.md +0 -0
  127. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/TEAM-OPERATING-RULES.en.md +0 -0
  128. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/TEAM-OPERATING-RULES.md +0 -0
  129. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/TEAM-ROLES.en.md +0 -0
  130. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/TEAM-ROLES.md +0 -0
  131. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/roles/ME.en.md +0 -0
  132. {fcop-3.2.0 → fcop-3.2.2}/src/fcop/teams/_data/solo/roles/ME.md +0 -0
  133. {fcop-3.2.0 → fcop-3.2.2}/workspace/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fcop
3
- Version: 3.2.0
3
+ Version: 3.2.2
4
4
  Summary: FCoP protocol: official Python library — Project API, task/report/issue files, filename parsing, bundled rules. PyYAML only; not an MCP server.
5
5
  Project-URL: Homepage, https://github.com/joinwell52-AI/FCoP
6
6
  Project-URL: Repository, https://github.com/joinwell52-AI/FCoP
@@ -13,4 +13,4 @@ The ``dev0`` / ``rc1`` / ``a1`` / ``b1`` suffixes are allowed during
13
13
  development per PEP 440.
14
14
  """
15
15
 
16
- __version__ = "3.2.0"
16
+ __version__ = "3.2.2"
@@ -968,6 +968,7 @@ class Project:
968
968
  self.reports_dir,
969
969
  self.issues_dir,
970
970
  self.shared_dir,
971
+ self.history_dir,
971
972
  ):
972
973
  directory.mkdir(parents=True, exist_ok=True)
973
974
 
@@ -2913,26 +2914,40 @@ class Project:
2913
2914
  target_task = target_dir / source.name
2914
2915
  source.replace(target_task)
2915
2916
 
2916
- # ── 5. Move matching reports from reports/ ─────────────────────
2917
- # Derive the canonical task_id from the filename we just moved.
2917
+ # ── 5. Move matching reports ────────────────────────────────────
2918
+ # Scan both reports/ and _lifecycle/archive/ so that manually
2919
+ # pre-archived reports are picked up even if they haven't gone
2920
+ # through the standard reports/ → history/ path.
2918
2921
  parsed = parse_task_filename(source.name)
2919
- if parsed is not None and self.reports_dir.is_dir():
2920
- task_id = parsed.task_id
2921
- for entry in self.reports_dir.iterdir():
2922
- if not entry.is_file():
2923
- continue
2924
- if entry.suffix.lower() not in _FCOP_SUFFIXES:
2925
- continue
2926
- if not REPORT_FILENAME_RE.match(entry.name):
2927
- continue
2928
- try:
2929
- text = entry.read_text(encoding="utf-8")
2930
- fm, _ = parse_task_frontmatter(text)
2931
- except Exception:
2932
- continue
2933
- if task_id not in fm.references:
2934
- continue
2935
- entry.replace(target_dir / entry.name)
2922
+ if parsed is not None:
2923
+ task_id_key = parsed.task_id
2924
+ search_dirs = [
2925
+ d for d in (self.reports_dir, self.archive_dir) if d.is_dir()
2926
+ ]
2927
+ for search_dir in search_dirs:
2928
+ for entry in search_dir.iterdir():
2929
+ if not entry.is_file():
2930
+ continue
2931
+ if entry.suffix.lower() not in _FCOP_SUFFIXES:
2932
+ continue
2933
+ if not REPORT_FILENAME_RE.match(entry.name):
2934
+ continue
2935
+ # Try matching by frontmatter references first,
2936
+ # then fall back to task-id substring in filename.
2937
+ matched = False
2938
+ try:
2939
+ text = entry.read_text(encoding="utf-8")
2940
+ fm, _ = parse_task_frontmatter(text)
2941
+ matched = task_id_key in fm.references
2942
+ except Exception:
2943
+ pass
2944
+ if not matched:
2945
+ # Heuristic: report filename contains the task date+seq
2946
+ matched = task_id_key in entry.stem
2947
+ if matched:
2948
+ dest = target_dir / entry.name
2949
+ if not dest.exists():
2950
+ entry.replace(dest)
2936
2951
 
2937
2952
  return target_dir
2938
2953
 
@@ -234,6 +234,9 @@ init_* 工具返回 "ok" **不等于** 文件真的生成了。3.0.0 / 3.0.1 那
234
234
  │ ├── review/
235
235
  │ ├── done/
236
236
  │ └── archive/
237
+ ├── history/ ← 深度历史归档(日期分片,v3 新增)
238
+ │ └── YYYY-MM-DD/
239
+ │ └── TASK-XXX/ ← 一对任务+报告存一个子目录
237
240
  ├── shared/
238
241
  │ ├── TEAM-README.md
239
242
  │ ├── TEAM-ROLES.md
@@ -295,30 +298,34 @@ init_* 工具返回 "ok" **不等于** 文件真的生成了。3.0.0 / 3.0.1 那
295
298
 
296
299
  MCP 工具对应表:
297
300
 
298
- create_task 创建任务 → _lifecycle/inbox/
299
- claim_task Agent 认领任务 inbox → active
300
- submit_task Agent 提交审查 active → review
301
- finish_task Agent 直接完成 active → done(跳过审查)
302
- approve_task ADMIN 批准 review → done
303
- reject_task ADMIN 退回(撤回) review → active(重做)
304
- archive_task 归档已完成 done → archive
301
+ create_task 创建任务 → _lifecycle/inbox/
302
+ claim_task Agent 认领任务 inbox → active
303
+ submit_task Agent 提交审查 active → review
304
+ finish_task Agent 直接完成 active → done(跳过审查)
305
+ approve_task ADMIN 批准 review → done
306
+ reject_task ADMIN 退回(撤回) review → active(重做)
307
+ archive_task 归档已完成 done → _lifecycle/archive/
308
+ archive_to_history 推入历史归档(单条)_lifecycle/archive/ → history/YYYY-MM-DD/TASK-XXX/
309
+ bulk_archive_to_history 批量推入历史归档 清空 _lifecycle/archive/,全部移入 history/ 日期分片
305
310
 
306
311
  典型 Agent 工作流(有审查):
307
312
 
308
- 1. ADMIN 调 write_task → _lifecycle/inbox/ 落盘
309
- 2. Agent 调 claim_task → 移到 active/,开始工作
310
- 3. Agent 调 submit_task → 移到 review/,等审查
311
- 4. ADMIN 调 approve_task → 移到 done/
312
- 5. 任一方调 archive_task → 移到 archive/,归档完毕
313
+ 1. ADMIN 调 write_task → _lifecycle/inbox/ 落盘
314
+ 2. Agent 调 claim_task → 移到 active/,开始工作
315
+ 3. Agent 调 submit_task → 移到 review/,等审查
316
+ 4. ADMIN 调 approve_task → 移到 done/
317
+ 5. 任一方调 archive_task → 移到 _lifecycle/archive/,归档完毕
318
+ 6. (可选)archive_to_history → 推入 history/ 日期分片,长期保存
313
319
 
314
320
  快速工作流(无需审查,Agent 直接完成):
315
321
 
316
- 1. ADMIN 调 write_task → inbox/
317
- 2. Agent 调 claim_task → active/
318
- 3. Agent 调 finish_task → done/(跳过 review)
319
- 4. archive_task → archive/
322
+ 1. ADMIN 调 write_task → inbox/
323
+ 2. Agent 调 claim_task → active/
324
+ 3. Agent 调 finish_task → done/(跳过 review)
325
+ 4. archive_task → _lifecycle/archive/
326
+ 5. (可选)bulk_archive_to_history → 批量推入 history/
320
327
 
321
- 所有工具均已在 fcop-mcp 3.1.0 可用。不要自己 mkdir 或 mv
328
+ 所有工具均已在 fcop-mcp 3.2.2 可用。不要自己 mkdir 或 mv
322
329
  ——只用 MCP 工具操作,否则 fcop_audit 会报 P0 违规。
323
330
  ```
324
331
 
@@ -6,7 +6,7 @@ I'm **FCoP** (File-based Coordination Protocol) — a protocol that lets
6
6
  you and an AI team collaborate through **files**. Your one job:
7
7
  **tell me how many people this project has and how they split the work.**
8
8
 
9
- > **v3.0.2 summary** (current, 2026-05-22; covers v2.0.0 philosophical era + 3.0.2 init topology fix):
9
+ > **v3.2.2 summary** (current, 2026-05-23; covers deep archiving / v3 lifecycle + v2.0.0 philosophical era):
10
10
  > - **"Two-diagram era"**: `2.0.0` is a *philosophical* major release.
11
11
  > All v1.x public APIs keep working (per ADR-0003 additive expansion);
12
12
  > the major bump records that FCoP now formally acknowledges **two**
@@ -61,18 +61,24 @@ you and an AI team collaborate through **files**. Your one job:
61
61
  > `TASK-20260512-025-PM-to-OPS-phase-a-fix.md`). The slug is not part
62
62
  > of routing — it's a human-readable label. Pre-1.6 filenames remain
63
63
  > valid.
64
- > - **MCP tool count**: 35 (unchanged since v1.5.0). Full list:
65
- > `docs/mcp-tools.md`.
64
+ > - **MCP tool count**: 45 (v3.2.2). Full list: `docs/mcp-tools.md`.
65
+ > - **Deep archiving (3.2.x new)**: `archive_to_history(task_id)` /
66
+ > `bulk_archive_to_history()` move completed task-report pairs into
67
+ > `history/YYYY-MM-DD/TASK-XXX/` (date-sharded).
68
+ > `list_history` / `read_history_task` provide index and retrieval.
69
+ > - **v3 lifecycle tools (3.2.x new)**: `create_task` → `claim_task` →
70
+ > `submit_task` → `approve_task` / `reject_task` → `finish_task`;
71
+ > files flow through `_lifecycle/inbox/` → `active/` → `review/` →
72
+ > `done/`.
66
73
  > - **Rule versions**: `fcop-rules.mdc 3.0.0` / `fcop-protocol.mdc 3.0.0`.
67
74
  > Run `redeploy_rules()` after upgrading to refresh the four local rule
68
75
  > files.
69
76
  > - **v3 topology (3.0.2 fix)**: fresh init now creates
70
- > `_lifecycle/{inbox,active,review,done,archive}/` immediately
71
- > (per spec §1.1). Fresh inits on 3.0.0 / 3.0.1 missed this layer
72
- > — run `python -m fcop migrate --to-v3` on those projects to
73
- > upgrade; new projects on 3.0.2+ are v3-native from day one.
77
+ > `_lifecycle/{inbox,active,review,done,archive}/` and `history/`
78
+ > immediately (per spec §1.1). Run `python -m fcop migrate --to-v3`
79
+ > on older projects to upgrade.
74
80
  >
75
- > _(Earlier summaries: v1.3 / v1.4 / v1.5 and older — see `CHANGELOG.md`)_
81
+ > _(Earlier summaries: v1.3 / v1.4 / v1.5 / v3.0.x / v3.1.x and older — see `CHANGELOG.md`)_
76
82
 
77
83
  ---
78
84
 
@@ -526,7 +532,7 @@ Output shows each slug's title and creation time.
526
532
 
527
533
  ## How you actually use FCoP: just talk
528
534
 
529
- **First, the important part**: FCoP ships 32 tools — **all of them are
535
+ **First, the important part**: FCoP ships 45 tools — **all of them are
530
536
  for the agent, not for you**. You talk in plain language from start to
531
537
  finish; the agent translates your intent into the right tool call.
532
538
 
@@ -559,10 +565,12 @@ agent forgets what to do, you can spot it and nudge it back.
559
565
  | "assign a task to CODER" / "ask X to do Y" | `write_task(recipient="CODER", body="...")` | Drops a `TASK-*-to-CODER.md` |
560
566
  | "what's the state of the project" | `get_team_status()` | Task / report / issue / workspace counts + recent activity |
561
567
  | "how many workspaces do we have?" | `list_workspaces()` | Lists every `workspace/<slug>/` with create time |
562
- | "what tasks are still pending?" | `list_tasks()` | Lists unarchived `tasks/` |
568
+ | "what tasks are still pending?" | `list_tasks()` | Lists pending tasks (v3: `_lifecycle/inbox/active/review/`) |
563
569
  | "what does task X say?" | `read_task("TASK-...")` | Reads body |
564
570
  | "any open issues?" | `list_issues()` | Lists `issues/` |
565
- | "archive X, it's done" | `archive_task("TASK-...")` | Moves to `log/` |
571
+ | "archive X, it's done" | `archive_task("TASK-...")` | Moves to `_lifecycle/archive/` (v3) |
572
+ | "push this archive file to history" | `archive_to_history("TASK-...")` | Single: `_lifecycle/archive/` → `history/YYYY-MM-DD/TASK-XXX/` |
573
+ | "bulk-push all archives to history" | `bulk_archive_to_history()` | Bulk: drains `_lifecycle/archive/`, moves all into date-sharded `history/` |
566
574
  | "show me the completion reports" | `list_reports()` / `read_report(...)` | Reads `reports/` |
567
575
 
568
576
  ### Rescue / edge cases
@@ -640,7 +648,7 @@ correction takes one line.
640
648
 
641
649
  ### ⚠️ Cursor's "click-to-grey-out" switches: 2 you must never grey
642
650
 
643
- Cursor's MCP panel shows these 32 tools as buttons. Click → greyed =
651
+ Cursor's MCP panel shows these 45 tools as buttons. Click → greyed =
644
652
  disabled. **Greying these two will hurt you**:
645
653
 
646
654
  - `fcop_report` — greyed out, Rule 0 breaks; agents can't take
@@ -6,7 +6,7 @@
6
6
  通过**文件**协作的协议。你唯一要做的事:**告诉我你这个项目是几个人、
7
7
  怎么分工。**
8
8
 
9
- > **v3.0.2 摘要**(当前版本,2026-05-22;含 v2.0.0 哲学纪元 + 3.0.2 init 拓扑修复):
9
+ > **v3.2.2 摘要**(当前版本,2026-05-23;含深度归档/v3 生命周期 + v2.0.0 哲学纪元):
10
10
  > - **"两图对偶"纪元**:`2.0.0` 是 *philosophical* major release。1.x
11
11
  > 的全部 API 继续工作(per ADR-0003 附加性扩展),主版本号跨越的
12
12
  > 原因是协议哲学的固化——FCoP 现在同时承认**两张图**:
@@ -48,15 +48,20 @@
48
48
  > `ISSUE` 三种 envelope 在路由字段尾部可追加一个**可选**的
49
49
  > `-{slug}` 段(如 `TASK-20260512-025-PM-to-OPS-phase-a-fix.md`)。
50
50
  > slug 不参与路由,只是人类可读标签;旧文件名继续合法。
51
- > - **MCP 工具总数**:35 个(v1.5.0 起未变)。完整清单见 `docs/mcp-tools.md`。
51
+ > - **MCP 工具总数**:45 个(v3.2.2)。完整清单见 `docs/mcp-tools.md`。
52
+ > - **深度归档(3.2.x 新增)**:`archive_to_history(task_id)` / `bulk_archive_to_history()`
53
+ > 把已完成任务-回执对推入 `history/YYYY-MM-DD/TASK-XXX/`,按日期分片,
54
+ > `list_history` / `read_history_task` 提供索引和读取。
55
+ > - **v3 生命周期工具(3.2.x 新增)**:`create_task` → `claim_task` → `submit_task`
56
+ > → `approve_task` / `reject_task` → `finish_task`,文件状态在
57
+ > `_lifecycle/inbox/` → `active/` → `review/` → `done/` 流转。
52
58
  > - **规则版本**:`fcop-rules.mdc 3.0.0` / `fcop-protocol.mdc 3.0.0`。
53
59
  > 升级后跑 `redeploy_rules()` 刷新本地四件套规则文件。
54
60
  > - **v3 拓扑(3.0.2 修复)**:fresh init 立即创建 `_lifecycle/{inbox,active,
55
- > review,done,archive}/`(per spec §1.1)。3.0.0 / 3.0.1 的 fresh init 漏建
56
- > 了这一层,磁盘上仍是 v2 形态——已落项目跑 `python -m fcop migrate --to-v3`
57
- > 升到 v3,新项目 3.0.2 起直接产 v3。
61
+ > review,done,archive}/` 及 `history/`(per spec §1.1)。已落项目跑
62
+ > `python -m fcop migrate --to-v3` 升到 v3。
58
63
  >
59
- > _(历史摘要:v1.3 / v1.4 / v1.5 及更早版本的变更见 `CHANGELOG.md`)_
64
+ > _(历史摘要:v1.3 / v1.4 / v1.5 / v3.0.x / v3.1.x 及更早版本的变更见 `CHANGELOG.md`)_
60
65
 
61
66
  ---
62
67
 
@@ -498,10 +503,12 @@ list_workspaces()
498
503
  | "派个任务给 CODER" / "让 XXX 做 YYY" | `write_task(recipient="CODER", body="...")` | 落一份 `TASK-*-to-CODER.md` |
499
504
  | "看看现在项目什么状态" | `get_team_status()` | 任务/回执/问题/工作区数量 + 最近活跃 |
500
505
  | "有几个工作区?" / "做过几个东西了?" | `list_workspaces()` | 列所有 `workspace/<slug>/` 和创建时间 |
501
- | "还有哪些任务没做?" | `list_tasks()` | 列 `tasks/` 下未归档任务 |
506
+ | "还有哪些任务没做?" | `list_tasks()` | 列未完成任务(v3: `_lifecycle/inbox/active/review/`)|
502
507
  | "xxx 任务说了什么?" | `read_task("TASK-...")` | 读正文 |
503
508
  | "问题单有啥" | `list_issues()` | 列 `issues/` |
504
- | "xxx 任务做完了归档吧" | `archive_task("TASK-...")` | 移到 `log/` |
509
+ | "xxx 任务做完了归档吧" | `archive_task("TASK-...")` | 移到 `_lifecycle/archive/`(v3)|
510
+ | "把归档文件推进历史存档" | `archive_to_history("TASK-...")` | 单条:`_lifecycle/archive/` → `history/YYYY-MM-DD/TASK-XXX/` |
511
+ | "把所有归档文件批量推进历史" | `bulk_archive_to_history()` | 批量:清空 `_lifecycle/archive/`,全部移入 `history/` 日期分片 |
505
512
  | "看看完成回执" | `list_reports()` / `read_report(...)` | 查 `reports/` |
506
513
 
507
514
  ### 救场 / 特殊情况
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes