@miniidealab/openlogos 0.7.3 → 0.8.0

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 (52) hide show
  1. package/codex-plugin-template/plugin.json +10 -0
  2. package/codex-plugin-template/session-start.sh +125 -0
  3. package/dist/commands/change.d.ts.map +1 -1
  4. package/dist/commands/change.js +21 -3
  5. package/dist/commands/change.js.map +1 -1
  6. package/dist/commands/init.d.ts +9 -1
  7. package/dist/commands/init.d.ts.map +1 -1
  8. package/dist/commands/init.js +173 -34
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/module.d.ts +5 -0
  11. package/dist/commands/module.d.ts.map +1 -0
  12. package/dist/commands/module.js +233 -0
  13. package/dist/commands/module.js.map +1 -0
  14. package/dist/commands/next.d.ts +10 -0
  15. package/dist/commands/next.d.ts.map +1 -0
  16. package/dist/commands/next.js +125 -0
  17. package/dist/commands/next.js.map +1 -0
  18. package/dist/commands/status.d.ts +12 -0
  19. package/dist/commands/status.d.ts.map +1 -1
  20. package/dist/commands/status.js +116 -1
  21. package/dist/commands/status.js.map +1 -1
  22. package/dist/commands/sync.d.ts.map +1 -1
  23. package/dist/commands/sync.js +13 -1
  24. package/dist/commands/sync.js.map +1 -1
  25. package/dist/commands/verify.js +2 -2
  26. package/dist/commands/verify.js.map +1 -1
  27. package/dist/i18n.d.ts.map +1 -1
  28. package/dist/i18n.js +68 -8
  29. package/dist/i18n.js.map +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +30 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/lib/sync-resource-index.js +5 -5
  34. package/dist/lib/sync-resource-index.js.map +1 -1
  35. package/package.json +8 -4
  36. package/skills/architecture-designer/SKILL.en.md +1 -1
  37. package/skills/architecture-designer/SKILL.md +1 -1
  38. package/skills/prd-writer/SKILL.en.md +1 -1
  39. package/skills/prd-writer/SKILL.md +1 -1
  40. package/skills/product-designer/SKILL.en.md +1 -1
  41. package/skills/product-designer/SKILL.md +1 -1
  42. package/skills/scenario-architect/SKILL.en.md +2 -2
  43. package/skills/scenario-architect/SKILL.md +5 -5
  44. package/skills/test-writer/SKILL.en.md +1 -1
  45. package/skills/test-writer/SKILL.md +2 -2
  46. package/spec/change-management.md +5 -0
  47. package/spec/cli-json-output.md +20 -1
  48. package/spec/codex-plugin.md +138 -0
  49. package/spec/directory-convention.md +4 -2
  50. package/spec/logos-project.md +41 -5
  51. package/spec/module-naming-convention.md +74 -0
  52. package/spec/workflow.md +1 -1
@@ -0,0 +1,74 @@
1
+ # 模块前缀命名规范
2
+
3
+ > 版本:1.0.0
4
+ >
5
+ > 本文档定义 OpenLogos 多模块项目的文件命名规范。所有 Skill 生成文件时必须遵循此规范。
6
+
7
+ ## 核心原则:文件名即命名空间
8
+
9
+ 所有设计文档文件名统一遵循格式:
10
+
11
+ ```
12
+ <module>-<序号或语义名>-<类型>.md
13
+ ```
14
+
15
+ - **module**:模块标识符,小写字母 + 连字符,如 `core`、`user`、`payment`
16
+ - 初始项目的默认模块统一使用 `core-` 前缀
17
+ - 新模块开发时,直接在同一目录下创建带新模块前缀的文件,无需新建子目录
18
+
19
+ ## 各类文件命名规则
20
+
21
+ | 文件类型 | 格式 | 示例 |
22
+ |---------|------|------|
23
+ | 需求文档 | `<module>-{序号}-{英文名}.md` | `core-01-requirements.md` |
24
+ | 功能规格 | `<module>-{序号}-{英文名}.md` | `core-00-information-architecture.md` |
25
+ | 页面设计 | `<module>-{序号}-{英文名}.md` | `core-01-cli-terminal.md` |
26
+ | 架构文档 | `<module>-{序号}-{英文名}.md` | `core-01-architecture-overview.md`(全局唯一,始终在此文件上更新) |
27
+ | 场景概览 | `<module>-00-scenario-overview.md` | `core-00-scenario-overview.md` |
28
+ | 场景实现 | `<module>-SXX-{英文名}.md` | `core-S01-cli-init.md` |
29
+ | 测试用例 | `<module>-SXX-test-cases.md` | `core-S01-test-cases.md` |
30
+
31
+ ## 场景编号全局唯一
32
+
33
+ 所有模块的场景编号共享一个全局递增序列(`S01`、`S02`...),由 `logos-project.yaml` 中的 `scenario_counter.next_id` 字段维护。
34
+
35
+ **AI 行为约束**:
36
+ 1. 生成新场景前,必须读取 `logos-project.yaml` 的 `scenario_counter.next_id` 取号
37
+ 2. 生成后立即将 `next_id` 加 1 并写回
38
+ 3. 严禁不同模块从 S01 重新开始编号
39
+
40
+ ## 模块注册表
41
+
42
+ 模块统一在 `logos-project.yaml` 的 `modules[]` 中维护,不另建 `modules.yaml`。
43
+
44
+ ```yaml
45
+ scenario_counter:
46
+ next_id: 19
47
+
48
+ modules:
49
+ - id: core
50
+ name: 核心功能
51
+ status: stable
52
+ loop_phase: null
53
+ - id: payment
54
+ name: 支付模块
55
+ status: in-progress
56
+ loop_phase: api-design
57
+ ```
58
+
59
+ ## 多模块共存示例
60
+
61
+ 同一目录下,不同模块的文件自然共存,通过前缀区分:
62
+
63
+ ```
64
+ logos/resources/prd/3-technical-plan/2-scenario-implementation/
65
+ ├── core-00-scenario-overview.md
66
+ ├── core-S01-cli-init.md
67
+ ├── core-S02-prd-writer.md
68
+ ├── payment-00-scenario-overview.md
69
+ └── payment-S19-checkout.md # 场景编号全局连续,不从 S01 重新开始
70
+ ```
71
+
72
+ ## 部署说明
73
+
74
+ 本文件(`spec/module-naming-convention.md`)是源码规范,由 `openlogos init` / `openlogos sync` 通过 `deploySpecs()` 自动部署到用户项目的 `logos/spec/` 目录。请勿直接修改 `logos/spec/` 下的副本。
package/spec/workflow.md CHANGED
@@ -206,7 +206,7 @@ Phase 2 在 Phase 1 场景的基础上增加交互细节:
206
206
  - 来源:时序图 Step 序列(主路径)、EX 异常用例(异常路径)、Phase 1/2 验收条件
207
207
  - 关注:跨模块调用链的正确性、数据在 Step 间的传递、异常发生时的补偿/回滚逻辑
208
208
 
209
- **产出物**:测试用例规格文档(Markdown),存放在 `logos/resources/test/`,按场景分文件(如 `S01-test-cases.md`)。
209
+ **产出物**:测试用例规格文档(Markdown),存放在 `logos/resources/test/`,按场景分文件(命名格式:`<module>-{场景编号}-test-cases.md`,如 `core-S01-test-cases.md`)。
210
210
 
211
211
  **Gate 3.3a**:核心场景的单元测试和场景测试用例已设计,覆盖所有 P0 场景的正常路径 + 核心 EX 异常路径。
212
212