intentdna 1.0.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 (184) hide show
  1. package/LICENSE +69 -0
  2. package/README.md +251 -0
  3. package/dist/audit/index.d.ts +109 -0
  4. package/dist/audit/index.d.ts.map +1 -0
  5. package/dist/audit/index.js +144 -0
  6. package/dist/audit/index.js.map +1 -0
  7. package/dist/cli/commands/compile.d.ts +14 -0
  8. package/dist/cli/commands/compile.d.ts.map +1 -0
  9. package/dist/cli/commands/compile.js +89 -0
  10. package/dist/cli/commands/compile.js.map +1 -0
  11. package/dist/cli/commands/epigenetic.d.ts +20 -0
  12. package/dist/cli/commands/epigenetic.d.ts.map +1 -0
  13. package/dist/cli/commands/epigenetic.js +112 -0
  14. package/dist/cli/commands/epigenetic.js.map +1 -0
  15. package/dist/cli/commands/evolve.d.ts +12 -0
  16. package/dist/cli/commands/evolve.d.ts.map +1 -0
  17. package/dist/cli/commands/evolve.js +52 -0
  18. package/dist/cli/commands/evolve.js.map +1 -0
  19. package/dist/cli/commands/guard.d.ts +22 -0
  20. package/dist/cli/commands/guard.d.ts.map +1 -0
  21. package/dist/cli/commands/guard.js +257 -0
  22. package/dist/cli/commands/guard.js.map +1 -0
  23. package/dist/cli/commands/import.d.ts +71 -0
  24. package/dist/cli/commands/import.d.ts.map +1 -0
  25. package/dist/cli/commands/import.js +428 -0
  26. package/dist/cli/commands/import.js.map +1 -0
  27. package/dist/cli/commands/init.d.ts +13 -0
  28. package/dist/cli/commands/init.d.ts.map +1 -0
  29. package/dist/cli/commands/init.js +171 -0
  30. package/dist/cli/commands/init.js.map +1 -0
  31. package/dist/cli/commands/run.d.ts +59 -0
  32. package/dist/cli/commands/run.d.ts.map +1 -0
  33. package/dist/cli/commands/run.js +350 -0
  34. package/dist/cli/commands/run.js.map +1 -0
  35. package/dist/cli/commands/show.d.ts +12 -0
  36. package/dist/cli/commands/show.d.ts.map +1 -0
  37. package/dist/cli/commands/show.js +78 -0
  38. package/dist/cli/commands/show.js.map +1 -0
  39. package/dist/cli/commands/sync.d.ts +31 -0
  40. package/dist/cli/commands/sync.d.ts.map +1 -0
  41. package/dist/cli/commands/sync.js +307 -0
  42. package/dist/cli/commands/sync.js.map +1 -0
  43. package/dist/cli/commands/validate.d.ts +11 -0
  44. package/dist/cli/commands/validate.d.ts.map +1 -0
  45. package/dist/cli/commands/validate.js +30 -0
  46. package/dist/cli/commands/validate.js.map +1 -0
  47. package/dist/cli/commands/verify.d.ts +33 -0
  48. package/dist/cli/commands/verify.d.ts.map +1 -0
  49. package/dist/cli/commands/verify.js +102 -0
  50. package/dist/cli/commands/verify.js.map +1 -0
  51. package/dist/cli/index.d.ts +15 -0
  52. package/dist/cli/index.d.ts.map +1 -0
  53. package/dist/cli/index.js +358 -0
  54. package/dist/cli/index.js.map +1 -0
  55. package/dist/cli/util/format.d.ts +24 -0
  56. package/dist/cli/util/format.d.ts.map +1 -0
  57. package/dist/cli/util/format.js +67 -0
  58. package/dist/cli/util/format.js.map +1 -0
  59. package/dist/cli/util/prompt.d.ts +11 -0
  60. package/dist/cli/util/prompt.d.ts.map +1 -0
  61. package/dist/cli/util/prompt.js +51 -0
  62. package/dist/cli/util/prompt.js.map +1 -0
  63. package/dist/compiler/activate.d.ts +29 -0
  64. package/dist/compiler/activate.d.ts.map +1 -0
  65. package/dist/compiler/activate.js +141 -0
  66. package/dist/compiler/activate.js.map +1 -0
  67. package/dist/compiler/cascade.d.ts +27 -0
  68. package/dist/compiler/cascade.d.ts.map +1 -0
  69. package/dist/compiler/cascade.js +124 -0
  70. package/dist/compiler/cascade.js.map +1 -0
  71. package/dist/compiler/compile.d.ts +17 -0
  72. package/dist/compiler/compile.d.ts.map +1 -0
  73. package/dist/compiler/compile.js +219 -0
  74. package/dist/compiler/compile.js.map +1 -0
  75. package/dist/compiler/index.d.ts +28 -0
  76. package/dist/compiler/index.d.ts.map +1 -0
  77. package/dist/compiler/index.js +51 -0
  78. package/dist/compiler/index.js.map +1 -0
  79. package/dist/compiler/workflow.d.ts +37 -0
  80. package/dist/compiler/workflow.d.ts.map +1 -0
  81. package/dist/compiler/workflow.js +274 -0
  82. package/dist/compiler/workflow.js.map +1 -0
  83. package/dist/evolution/collector.d.ts +52 -0
  84. package/dist/evolution/collector.d.ts.map +1 -0
  85. package/dist/evolution/collector.js +72 -0
  86. package/dist/evolution/collector.js.map +1 -0
  87. package/dist/evolution/fitness.d.ts +33 -0
  88. package/dist/evolution/fitness.d.ts.map +1 -0
  89. package/dist/evolution/fitness.js +96 -0
  90. package/dist/evolution/fitness.js.map +1 -0
  91. package/dist/evolution/index.d.ts +53 -0
  92. package/dist/evolution/index.d.ts.map +1 -0
  93. package/dist/evolution/index.js +69 -0
  94. package/dist/evolution/index.js.map +1 -0
  95. package/dist/evolution/marker-gen.d.ts +31 -0
  96. package/dist/evolution/marker-gen.d.ts.map +1 -0
  97. package/dist/evolution/marker-gen.js +141 -0
  98. package/dist/evolution/marker-gen.js.map +1 -0
  99. package/dist/evolution/store.d.ts +24 -0
  100. package/dist/evolution/store.d.ts.map +1 -0
  101. package/dist/evolution/store.js +78 -0
  102. package/dist/evolution/store.js.map +1 -0
  103. package/dist/evolution/types.d.ts +73 -0
  104. package/dist/evolution/types.d.ts.map +1 -0
  105. package/dist/evolution/types.js +14 -0
  106. package/dist/evolution/types.js.map +1 -0
  107. package/dist/index.d.ts +4 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +4 -0
  110. package/dist/index.js.map +1 -0
  111. package/dist/log/logger.d.ts +15 -0
  112. package/dist/log/logger.d.ts.map +1 -0
  113. package/dist/log/logger.js +36 -0
  114. package/dist/log/logger.js.map +1 -0
  115. package/dist/runtime/agent-md.d.ts +56 -0
  116. package/dist/runtime/agent-md.d.ts.map +1 -0
  117. package/dist/runtime/agent-md.js +257 -0
  118. package/dist/runtime/agent-md.js.map +1 -0
  119. package/dist/runtime/claude-sdk.d.ts +51 -0
  120. package/dist/runtime/claude-sdk.d.ts.map +1 -0
  121. package/dist/runtime/claude-sdk.js +78 -0
  122. package/dist/runtime/claude-sdk.js.map +1 -0
  123. package/dist/runtime/hooks.d.ts +67 -0
  124. package/dist/runtime/hooks.d.ts.map +1 -0
  125. package/dist/runtime/hooks.js +645 -0
  126. package/dist/runtime/hooks.js.map +1 -0
  127. package/dist/runtime/index.d.ts +9 -0
  128. package/dist/runtime/index.d.ts.map +1 -0
  129. package/dist/runtime/index.js +5 -0
  130. package/dist/runtime/index.js.map +1 -0
  131. package/dist/runtime/markdown.d.ts +36 -0
  132. package/dist/runtime/markdown.d.ts.map +1 -0
  133. package/dist/runtime/markdown.js +214 -0
  134. package/dist/runtime/markdown.js.map +1 -0
  135. package/dist/runtime/settings-adapter.d.ts +33 -0
  136. package/dist/runtime/settings-adapter.d.ts.map +1 -0
  137. package/dist/runtime/settings-adapter.js +78 -0
  138. package/dist/runtime/settings-adapter.js.map +1 -0
  139. package/dist/runtime/skill-adapter.d.ts +22 -0
  140. package/dist/runtime/skill-adapter.d.ts.map +1 -0
  141. package/dist/runtime/skill-adapter.js +170 -0
  142. package/dist/runtime/skill-adapter.js.map +1 -0
  143. package/dist/runtime/workflow-runner.d.ts +53 -0
  144. package/dist/runtime/workflow-runner.d.ts.map +1 -0
  145. package/dist/runtime/workflow-runner.js +420 -0
  146. package/dist/runtime/workflow-runner.js.map +1 -0
  147. package/dist/schema/index.d.ts +2 -0
  148. package/dist/schema/index.d.ts.map +1 -0
  149. package/dist/schema/index.js +2 -0
  150. package/dist/schema/index.js.map +1 -0
  151. package/dist/schema/types.d.ts +275 -0
  152. package/dist/schema/types.d.ts.map +1 -0
  153. package/dist/schema/types.js +11 -0
  154. package/dist/schema/types.js.map +1 -0
  155. package/dist/schema/validate.d.ts +20 -0
  156. package/dist/schema/validate.d.ts.map +1 -0
  157. package/dist/schema/validate.js +379 -0
  158. package/dist/schema/validate.js.map +1 -0
  159. package/dist/schema/yaml-parser.d.ts +12 -0
  160. package/dist/schema/yaml-parser.d.ts.map +1 -0
  161. package/dist/schema/yaml-parser.js +298 -0
  162. package/dist/schema/yaml-parser.js.map +1 -0
  163. package/dist/species/default.dna.json +62 -0
  164. package/dist/templates/api-backend.dna.yaml +77 -0
  165. package/dist/templates/brainstorming-first.dna.yaml +71 -0
  166. package/dist/templates/branch-finishing.dna.yaml +54 -0
  167. package/dist/templates/code-review-pipeline.dna.yaml +91 -0
  168. package/dist/templates/devops-cicd.dna.yaml +67 -0
  169. package/dist/templates/documentation-writer.dna.yaml +71 -0
  170. package/dist/templates/enterprise-baseline.dna.yaml +66 -0
  171. package/dist/templates/frontend-quality.dna.yaml +88 -0
  172. package/dist/templates/full-pipeline.dna.yaml +129 -0
  173. package/dist/templates/mobile-dev.dna.yaml +68 -0
  174. package/dist/templates/monorepo-governance.dna.yaml +60 -0
  175. package/dist/templates/multi-perspective-review.dna.yaml +109 -0
  176. package/dist/templates/pr-submitter.dna.yaml +55 -0
  177. package/dist/templates/safe-refactoring.dna.yaml +65 -0
  178. package/dist/templates/secure-dev.dna.yaml +90 -0
  179. package/dist/templates/subagent-parallel.dna.yaml +98 -0
  180. package/dist/templates/systematic-debugging.dna.yaml +55 -0
  181. package/dist/templates/tdd-strict.dna.yaml +69 -0
  182. package/dist/templates/verification-loop.dna.yaml +53 -0
  183. package/dist/templates/yolo-with-guardrails.dna.yaml +56 -0
  184. package/package.json +43 -0
@@ -0,0 +1,67 @@
1
+ # devops-cicd: CI/CD Agent 护栏
2
+ # 参考 五层组织蓝图 L5: CI/CD Agent 流水线
3
+ # 参考 debate consensus: 合规审计入口
4
+ # 适用: CI/CD 中运行的无人值守 Agent
5
+
6
+ version: "0.1.0"
7
+ id: template_devops_cicd
8
+ name: DevOps CI/CD Agent Guardrails
9
+ type: project
10
+
11
+ cascade:
12
+ inherits: ["species:default"]
13
+ priority: 100
14
+
15
+ genes:
16
+ deployment_safety:
17
+ description: Prevent dangerous deployments
18
+ codons:
19
+ - type: threshold
20
+ condition: "deploy_without_tests == false"
21
+ action: block
22
+ - type: threshold
23
+ condition: "deploy_to_production_without_approval == false"
24
+ action: block
25
+ - type: threshold
26
+ condition: "rollback_capability == true"
27
+ - type: sense
28
+ signal: irreversible_action
29
+ response: escalate_to_human
30
+
31
+ infrastructure_protection:
32
+ description: Protect critical infrastructure
33
+ codons:
34
+ - type: threshold
35
+ condition: "delete_production_resources == false"
36
+ action: block
37
+ - type: threshold
38
+ condition: "modify_security_groups == false"
39
+ action: escalate
40
+ - type: repel
41
+ target: hardcoded_credentials
42
+ - type: repel
43
+ target: secrets_in_logs
44
+
45
+ cost_governance:
46
+ description: Prevent runaway infrastructure costs
47
+ codons:
48
+ - type: threshold
49
+ condition: "daily_spend <= 500"
50
+ action: warn
51
+ - type: threshold
52
+ condition: "daily_spend <= 2000"
53
+ action: block
54
+ - type: attract
55
+ target: cost_estimation_before_provision
56
+
57
+ audit_trail:
58
+ description: All actions must be logged and traceable
59
+ codons:
60
+ - type: attract
61
+ target: action_logging
62
+ - type: attract
63
+ target: change_attribution
64
+ - type: repel
65
+ target: untracked_changes
66
+
67
+ contexts: {}
@@ -0,0 +1,71 @@
1
+ # documentation-writer: 技术文档写作
2
+ # 参考 Superpowers: writing-plans skill — structured, verifiable deliverables
3
+ # 适用: Agent 编写技术文档、API 文档、用户指南
4
+
5
+ version: "0.1.0"
6
+ id: template_documentation_writer
7
+ name: Documentation Writer
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ accuracy_first:
16
+ description: Documentation must reflect actual code behavior
17
+ codons:
18
+ - type: attract
19
+ target: code_verified_claims
20
+ - type: attract
21
+ target: working_examples
22
+ - type: repel
23
+ target: outdated_documentation
24
+ - type: repel
25
+ target: unverified_claims
26
+ - type: sense
27
+ signal: uncertain_information
28
+ response: verify_before_share
29
+
30
+ clear_structure:
31
+ description: Documents must be well-organized and scannable
32
+ codons:
33
+ - type: attract
34
+ target: hierarchical_headings
35
+ - type: attract
36
+ target: code_examples
37
+ - type: repel
38
+ target: wall_of_text
39
+ - type: weight
40
+ a: completeness
41
+ b: brevity
42
+ ratio: 0.6
43
+
44
+ audience_awareness:
45
+ description: Write for the target audience
46
+ codons:
47
+ - type: attract
48
+ target: appropriate_detail_level
49
+ - type: attract
50
+ target: prerequisite_links
51
+ - type: repel
52
+ target: jargon_without_explanation
53
+ - type: sense
54
+ signal: ambiguous_requirement
55
+ response: escalate_to_human
56
+
57
+ contexts: {}
58
+
59
+ roles:
60
+ writer:
61
+ description: Technical writer — reads code, writes docs
62
+ tool_permissions:
63
+ allow: [Read, Grep, Glob, Bash, Write]
64
+ scope:
65
+ read: ["**/*"]
66
+ write: ["docs/**", "*.md", "README.md"]
67
+ instructions:
68
+ - Read the actual code before documenting behavior
69
+ - Include working code examples — test them if possible
70
+ - Use headings, lists, and tables for scannability
71
+ - Link to related docs and prerequisites
@@ -0,0 +1,66 @@
1
+ # enterprise-baseline: 企业安全基线
2
+ # 适用: 企业级默认策略,所有项目必须继承
3
+
4
+ version: "0.1.0"
5
+ id: template_enterprise_baseline
6
+ name: Enterprise Security Baseline
7
+ type: enterprise
8
+
9
+ cascade:
10
+ inherits: ["species:default"]
11
+ priority: 50
12
+
13
+ genes:
14
+ data_protection:
15
+ description: Enterprise data protection policy
16
+ codons:
17
+ - type: threshold
18
+ condition: "personal_data_exposure == false"
19
+ action: block
20
+ - type: threshold
21
+ condition: "secret_in_code == false"
22
+ action: block
23
+ - type: threshold
24
+ condition: "env_file_committed == false"
25
+ action: block
26
+ - type: repel
27
+ target: data_sharing_external
28
+
29
+ operational_safety:
30
+ description: Prevent destructive operations
31
+ codons:
32
+ - type: threshold
33
+ condition: "production_delete == false"
34
+ action: block
35
+ - type: threshold
36
+ condition: "force_push_main == false"
37
+ action: block
38
+ - type: threshold
39
+ condition: "drop_database == false"
40
+ action: block
41
+ - type: threshold
42
+ condition: "unauthorized_branch_push == false"
43
+ action: block
44
+
45
+ cost_governance:
46
+ description: Enterprise cost controls
47
+ codons:
48
+ - type: threshold
49
+ condition: "daily_spend <= 500"
50
+ action: block
51
+ - type: threshold
52
+ condition: "single_session_spend <= 50"
53
+ action: warn
54
+
55
+ audit_compliance:
56
+ description: All agent actions must be auditable
57
+ codons:
58
+ - type: attract
59
+ target: action_logging
60
+ - type: attract
61
+ target: decision_traceability
62
+ - type: threshold
63
+ condition: "audit_log_disabled == false"
64
+ action: block
65
+
66
+ contexts: {}
@@ -0,0 +1,88 @@
1
+ # frontend-quality: 前端开发质量标准
2
+ # 参考 Superpowers: frontend, react-best-practices, accessibility, web-design
3
+ # 适用: React/Next.js/Vue 等前端项目
4
+
5
+ version: "0.1.0"
6
+ id: template_frontend_quality
7
+ name: Frontend Quality Standards
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ accessibility:
16
+ description: WCAG 2.1 AA compliance
17
+ codons:
18
+ - type: attract
19
+ target: semantic_html
20
+ - type: attract
21
+ target: aria_labels
22
+ - type: attract
23
+ target: keyboard_navigation
24
+ - type: threshold
25
+ condition: "color_contrast >= 4.5"
26
+ action: warn
27
+ - type: repel
28
+ target: div_soup
29
+
30
+ performance:
31
+ description: Frontend performance standards
32
+ codons:
33
+ - type: attract
34
+ target: code_splitting
35
+ - type: attract
36
+ target: image_optimization
37
+ - type: attract
38
+ target: lazy_loading
39
+ - type: threshold
40
+ condition: "bundle_size_increase <= 50kb"
41
+ action: warn
42
+ - type: repel
43
+ target: unnecessary_dependencies
44
+
45
+ design_fidelity:
46
+ description: Match design specifications
47
+ codons:
48
+ - type: attract
49
+ target: pixel_accurate_layout
50
+ - type: attract
51
+ target: responsive_design
52
+ - type: attract
53
+ target: design_token_usage
54
+ - type: repel
55
+ target: hardcoded_colors
56
+ - type: repel
57
+ target: magic_numbers
58
+
59
+ react_best_practices:
60
+ description: React/Next.js patterns from Vercel Engineering
61
+ codons:
62
+ - type: attract
63
+ target: server_components_first
64
+ - type: attract
65
+ target: proper_key_props
66
+ - type: repel
67
+ target: unnecessary_useEffect
68
+ - type: repel
69
+ target: prop_drilling
70
+ - type: repel
71
+ target: inline_styles
72
+
73
+ contexts: {}
74
+
75
+ roles:
76
+ frontend_dev:
77
+ description: Frontend developer — UI implementation
78
+ tool_permissions:
79
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
80
+ scope:
81
+ read: ["**/*"]
82
+ write: ["src/components/**", "src/pages/**", "src/styles/**", "test/**"]
83
+ instructions:
84
+ - Use semantic HTML elements over generic divs
85
+ - Always add alt text to images
86
+ - Test with keyboard navigation
87
+ - Use design tokens from the theme, not hardcoded values
88
+ - Prefer server components unless client interactivity is needed
@@ -0,0 +1,129 @@
1
+ # full-pipeline: 完整开发流水线 (plan→implement→test→review)
2
+ # 参考 Superpowers: brainstorming, writing-plans, executing-plans, verification
3
+ # 适用: 需要完整 agent 团队协作流水线的项目
4
+
5
+ version: "0.1.0"
6
+ id: template_full_pipeline
7
+ name: Full Development Pipeline
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ design_first:
16
+ description: Design before implementation
17
+ codons:
18
+ - type: attract
19
+ target: design_document
20
+ - type: attract
21
+ target: task_analysis
22
+ - type: repel
23
+ target: code_before_design
24
+
25
+ code_discipline:
26
+ description: Write tests, run tests, then commit
27
+ codons:
28
+ - type: attract
29
+ target: test_after_change
30
+ - type: threshold
31
+ condition: "commit_without_tests == false"
32
+ action: block
33
+
34
+ scope_discipline:
35
+ description: Stay within assigned scope
36
+ codons:
37
+ - type: repel
38
+ target: out_of_scope_changes
39
+ - type: threshold
40
+ condition: "scope_violation == false"
41
+ action: block
42
+
43
+ roles:
44
+ planner:
45
+ description: Reads requirements, explores code, outputs design document
46
+ tool_permissions:
47
+ allow: [Read, Grep, Glob, Bash, Write]
48
+ deny: [Edit]
49
+ scope:
50
+ read: ["**/*"]
51
+ write: ["docs/tasks/**"]
52
+ model: opus
53
+ instructions:
54
+ - Read the task from BOARD.md and analyze all relevant source code
55
+ - Output a design document with implementation steps and test plan
56
+ - Never modify source code — only produce documentation
57
+
58
+ implementer:
59
+ description: Implements features according to design document
60
+ tool_permissions:
61
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
62
+ scope:
63
+ read: ["**/*"]
64
+ write: ["src/**", "test/**"]
65
+ model: opus
66
+ instructions:
67
+ - Follow the design document exactly
68
+ - Write tests for every change
69
+ - Run tests after each modification
70
+
71
+ tester:
72
+ description: Runs tests, analyzes failures, adds missing tests
73
+ tool_permissions:
74
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
75
+ scope:
76
+ read: ["**/*"]
77
+ write: ["test/**"]
78
+ model: opus
79
+ instructions:
80
+ - Run the full test suite
81
+ - Analyze any failures and fix test code
82
+ - Add missing test cases for edge cases
83
+ post_checks:
84
+ - vitest_run
85
+
86
+ reviewer:
87
+ description: Reviews changes, checks design compliance
88
+ tool_permissions:
89
+ allow: [Read, Grep, Glob, Bash, Write]
90
+ deny: [Edit]
91
+ scope:
92
+ read: ["**/*"]
93
+ write: ["docs/reviews/**"]
94
+ model: opus
95
+ instructions:
96
+ - Review all changes against the design document
97
+ - Check code quality, test coverage, and security
98
+ - Output verdict — PASS or FAIL with specific issues
99
+
100
+ contexts: {}
101
+
102
+ workflow:
103
+ name: dev-pipeline
104
+ description: Plan, implement, test, review cycle with retry
105
+ steps:
106
+ - id: plan
107
+ role: planner
108
+ description: Read task and produce design document
109
+ run_if: "round == 1"
110
+ prompt: "Read task {{task_id}} from BOARD.md. Produce a design document."
111
+ - id: implement
112
+ role: implementer
113
+ description: Implement according to design
114
+ prompt: "Implement task {{task_id}} following the design document."
115
+ - id: test
116
+ role: tester
117
+ description: Run tests and fix failures
118
+ prompt: "Run tests. Fix failures. Add missing tests for {{task_id}}."
119
+ - id: review
120
+ role: reviewer
121
+ description: Review and output verdict
122
+ prompt: "Review changes for {{task_id}}. Output PASS or FAIL."
123
+ transitions:
124
+ - from: review
125
+ to: implement
126
+ condition: fail
127
+ retry_policy:
128
+ max_retries: 3
129
+ retry_from: implement
@@ -0,0 +1,68 @@
1
+ # mobile-dev: 移动端开发标准
2
+ # 适用: Flutter/React Native/iOS/Android 项目
3
+
4
+ version: "0.1.0"
5
+ id: template_mobile_dev
6
+ name: Mobile Development Standards
7
+ type: project
8
+
9
+ cascade:
10
+ inherits: ["species:default"]
11
+ priority: 100
12
+
13
+ genes:
14
+ mobile_quality:
15
+ description: Mobile app quality standards
16
+ codons:
17
+ - type: attract
18
+ target: responsive_layout
19
+ - type: attract
20
+ target: offline_support
21
+ - type: attract
22
+ target: accessibility
23
+ - type: repel
24
+ target: hardcoded_dimensions
25
+ - type: repel
26
+ target: platform_specific_hacks
27
+
28
+ mobile_performance:
29
+ description: Mobile performance standards
30
+ codons:
31
+ - type: attract
32
+ target: lazy_loading
33
+ - type: attract
34
+ target: image_compression
35
+ - type: repel
36
+ target: unnecessary_rebuilds
37
+ - type: threshold
38
+ condition: "app_size_increase <= 5mb"
39
+ action: warn
40
+
41
+ mobile_security:
42
+ description: Mobile security
43
+ codons:
44
+ - type: threshold
45
+ condition: "api_key_in_code == false"
46
+ action: block
47
+ - type: repel
48
+ target: insecure_storage
49
+ - type: attract
50
+ target: certificate_pinning
51
+
52
+ contexts: {}
53
+
54
+ roles:
55
+ mobile_dev:
56
+ description: Mobile developer
57
+ tool_permissions:
58
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
59
+ scope:
60
+ read: ["**/*"]
61
+ write: ["lib/**", "src/**", "test/**", "android/**", "ios/**"]
62
+ instructions:
63
+ - Test on both platforms before submitting
64
+ - Use platform-adaptive widgets, not platform checks
65
+ - Keep build times under control — avoid unnecessary dependencies
66
+ post_checks:
67
+ - dart_analyze
68
+ - flutter_test
@@ -0,0 +1,60 @@
1
+ # monorepo-governance: Monorepo 多包治理
2
+ # 参考 AgentsMesh: 控制面/数据面分离 + 多 agent 协作
3
+ # 参考 Cline KanBan: worktree isolation per task
4
+ # 适用: monorepo 项目中多 agent 同时工作不互相干扰
5
+
6
+ version: "0.1.0"
7
+ id: template_monorepo_governance
8
+ name: Monorepo Governance
9
+ type: project
10
+
11
+ cascade:
12
+ inherits: ["species:default"]
13
+ priority: 100
14
+
15
+ genes:
16
+ package_isolation:
17
+ description: Agents must stay within their assigned package
18
+ codons:
19
+ - type: attract
20
+ target: scoped_changes
21
+ - type: repel
22
+ target: cross_package_side_effects
23
+ - type: threshold
24
+ condition: "modify_other_packages == false"
25
+ action: block
26
+
27
+ dependency_awareness:
28
+ description: Respect package dependency graph
29
+ codons:
30
+ - type: attract
31
+ target: dependency_graph_check
32
+ - type: repel
33
+ target: circular_dependencies
34
+ - type: sense
35
+ signal: dependency_conflict
36
+ response: escalate_to_human
37
+
38
+ shared_config_protection:
39
+ description: Root config files need extra scrutiny
40
+ codons:
41
+ - type: threshold
42
+ condition: "modify_root_config_without_review == false"
43
+ action: escalate
44
+ - type: repel
45
+ target: package_json_root_modification
46
+ - type: attract
47
+ target: lockfile_consistency
48
+
49
+ ci_integration:
50
+ description: Changes must pass affected package CI
51
+ codons:
52
+ - type: attract
53
+ target: affected_packages_tested
54
+ - type: repel
55
+ target: skip_ci
56
+ - type: threshold
57
+ condition: "merge_without_ci == false"
58
+ action: block
59
+
60
+ contexts: {}
@@ -0,0 +1,109 @@
1
+ # multi-perspective-review: 多视角审查 (辩论模式)
2
+ # 参考 tradingAgents: Bull/Bear 多角色辩论 + Risk Manager 最终裁决
3
+ # 参考 Superpowers: requesting-code-review + receiving-code-review
4
+ # 适用: 重要架构决策或高风险变更需要多角度审视
5
+
6
+ version: "0.1.0"
7
+ id: template_multi_perspective_review
8
+ name: Multi-Perspective Review
9
+ type: project
10
+
11
+ cascade:
12
+ inherits: ["species:default"]
13
+ priority: 100
14
+
15
+ genes:
16
+ multiple_viewpoints:
17
+ description: Important decisions need opposing perspectives
18
+ codons:
19
+ - type: attract
20
+ target: devil_advocate_review
21
+ - type: attract
22
+ target: risk_assessment
23
+ - type: repel
24
+ target: single_perspective_decision
25
+ - type: weight
26
+ a: thoroughness
27
+ b: speed
28
+ ratio: 0.8
29
+
30
+ constructive_critique:
31
+ description: Reviews must be specific and actionable
32
+ codons:
33
+ - type: attract
34
+ target: specific_feedback
35
+ - type: attract
36
+ target: actionable_suggestions
37
+ - type: repel
38
+ target: vague_approval
39
+ - type: repel
40
+ target: destructive_criticism
41
+
42
+ final_arbitration:
43
+ description: Conflicting reviews need resolution
44
+ codons:
45
+ - type: sense
46
+ signal: conflicting_reviews
47
+ response: escalate_to_human
48
+ - type: attract
49
+ target: documented_decision_rationale
50
+
51
+ contexts: {}
52
+
53
+ roles:
54
+ advocate:
55
+ description: Argues for the proposed change — highlights benefits
56
+ tool_permissions:
57
+ allow: [Read, Grep, Glob, Bash]
58
+ deny: [Edit, Write, NotebookEdit]
59
+ scope:
60
+ read: ["**/*"]
61
+ write: []
62
+ instructions:
63
+ - Analyze the proposed change and argue FOR it
64
+ - Highlight benefits, improvements, and opportunities
65
+ - Acknowledge risks but propose mitigations
66
+ - Be specific with code references
67
+
68
+ critic:
69
+ description: Argues against — highlights risks and alternatives
70
+ tool_permissions:
71
+ allow: [Read, Grep, Glob, Bash]
72
+ deny: [Edit, Write, NotebookEdit]
73
+ scope:
74
+ read: ["**/*"]
75
+ write: []
76
+ instructions:
77
+ - Analyze the proposed change and argue AGAINST it
78
+ - Highlight risks, edge cases, and potential regressions
79
+ - Propose alternative approaches
80
+ - Be specific with code references
81
+
82
+ arbiter:
83
+ description: Final decision maker — weighs both sides
84
+ tool_permissions:
85
+ allow: [Read, Grep, Glob, Bash]
86
+ deny: [Edit, Write, NotebookEdit]
87
+ scope:
88
+ read: ["**/*"]
89
+ write: []
90
+ instructions:
91
+ - Read both advocate and critic perspectives
92
+ - Make a final GO/NO-GO decision with clear rationale
93
+ - Document trade-offs and accepted risks
94
+ - If unclear, escalate to human
95
+
96
+ workflows:
97
+ debate-review:
98
+ name: Debate Review
99
+ steps:
100
+ - id: advocate
101
+ role: advocate
102
+ description: Argue for the proposed change
103
+ - id: critique
104
+ role: critic
105
+ description: Argue against the proposed change
106
+ - id: decide
107
+ role: arbiter
108
+ depends_on: [advocate, critique]
109
+ description: Final decision with rationale