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,55 @@
1
+ # pr-submitter: PR 提交前清单
2
+ # 参考 Superpowers: requesting-code-review skill
3
+ # 适用: 提交 PR 前的自检流程
4
+
5
+ version: "0.1.0"
6
+ id: template_pr_submitter
7
+ name: PR Submitter Checklist
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ pre_review_checklist:
16
+ description: Complete checklist before requesting review
17
+ codons:
18
+ - type: attract
19
+ target: self_review_first
20
+ - type: attract
21
+ target: tests_passing
22
+ - type: attract
23
+ target: documentation_updated
24
+ - type: repel
25
+ target: submit_without_self_review
26
+ - type: threshold
27
+ condition: "pr_without_tests == false"
28
+ action: block
29
+
30
+ clear_description:
31
+ description: PR must have clear description of what and why
32
+ codons:
33
+ - type: attract
34
+ target: change_summary
35
+ - type: attract
36
+ target: test_plan
37
+ - type: repel
38
+ target: empty_pr_description
39
+ - type: sense
40
+ signal: ambiguous_requirement
41
+ response: escalate_to_human
42
+
43
+ small_diffs:
44
+ description: Keep PRs focused and reviewable
45
+ codons:
46
+ - type: attract
47
+ target: single_concern_pr
48
+ - type: repel
49
+ target: mixed_concerns
50
+ - type: weight
51
+ a: granularity
52
+ b: speed
53
+ ratio: 0.7
54
+
55
+ contexts: {}
@@ -0,0 +1,65 @@
1
+ # safe-refactoring: 安全重构
2
+ # 参考 Superpowers: test-driven-development (refactor phase of RED-GREEN-REFACTOR)
3
+ # 参考 Superpowers: verification-before-completion
4
+ # 适用: 大规模重构需要步步为营
5
+
6
+ version: "0.1.0"
7
+ id: template_safe_refactoring
8
+ name: Safe Refactoring
9
+ type: project
10
+
11
+ cascade:
12
+ inherits: ["species:default"]
13
+ priority: 100
14
+
15
+ genes:
16
+ test_coverage_first:
17
+ description: Ensure existing behavior is tested before refactoring
18
+ codons:
19
+ - type: attract
20
+ target: characterization_tests
21
+ - type: attract
22
+ target: existing_test_green
23
+ - type: repel
24
+ target: refactor_without_tests
25
+ - type: threshold
26
+ condition: "refactor_untested_code == false"
27
+ action: escalate
28
+
29
+ small_steps:
30
+ description: Refactor in small, verifiable steps
31
+ codons:
32
+ - type: attract
33
+ target: incremental_changes
34
+ - type: attract
35
+ target: run_tests_between_steps
36
+ - type: repel
37
+ target: big_bang_refactor
38
+ - type: weight
39
+ a: safety
40
+ b: speed
41
+ ratio: 0.8
42
+
43
+ behavior_preservation:
44
+ description: Refactoring must not change external behavior
45
+ codons:
46
+ - type: attract
47
+ target: same_inputs_same_outputs
48
+ - type: repel
49
+ target: sneaky_behavior_changes
50
+ - type: threshold
51
+ condition: "test_regression == false"
52
+ action: block
53
+ - type: sense
54
+ signal: uncertain_information
55
+ response: verify_before_share
56
+
57
+ no_mixed_commits:
58
+ description: Separate refactoring commits from feature commits
59
+ codons:
60
+ - type: attract
61
+ target: pure_refactoring_commits
62
+ - type: repel
63
+ target: mixed_refactor_and_feature
64
+
65
+ contexts: {}
@@ -0,0 +1,90 @@
1
+ # secure-dev: 安全开发基线
2
+ # 参考 Superpowers: TDD, code-review, systematic-debugging
3
+ # 适用: 任何开发团队的安全 + 质量基线
4
+
5
+ version: "0.1.0"
6
+ id: template_secure_dev
7
+ name: Secure Development Baseline
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ code_quality:
16
+ description: Enforce code quality standards
17
+ codons:
18
+ - type: attract
19
+ target: tested_code
20
+ - type: attract
21
+ target: type_safety
22
+ - type: repel
23
+ target: untested_changes
24
+ - type: threshold
25
+ condition: "test_coverage >= 80%"
26
+ action: warn
27
+
28
+ security:
29
+ description: Security-first development
30
+ codons:
31
+ - type: repel
32
+ target: hardcoded_secrets
33
+ - type: repel
34
+ target: sql_injection
35
+ - type: repel
36
+ target: xss_vulnerabilities
37
+ - type: threshold
38
+ condition: "personal_data_exposure == false"
39
+ action: block
40
+ - type: threshold
41
+ condition: "production_delete == false"
42
+ action: block
43
+
44
+ safe_operations:
45
+ description: Prevent destructive operations
46
+ codons:
47
+ - type: repel
48
+ target: force_push
49
+ - type: repel
50
+ target: drop_database
51
+ - type: threshold
52
+ condition: "irreversible_action_without_confirmation == false"
53
+ action: escalate
54
+
55
+ roles:
56
+ reviewer:
57
+ description: Code reviewer — read only, outputs review report
58
+ tool_permissions:
59
+ allow: [Read, Grep, Glob, Bash]
60
+ deny: [Edit, Write, NotebookEdit]
61
+ scope:
62
+ read: ["**/*"]
63
+ write: []
64
+ instructions:
65
+ - Review code for correctness, security, and style
66
+ - Never modify source code — you are read-only
67
+ - Output a clear verdict (PASS or FAIL) with specific line references
68
+
69
+ implementer:
70
+ description: Feature implementer — writes code within scope
71
+ tool_permissions:
72
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
73
+ scope:
74
+ read: ["**/*"]
75
+ write: ["src/**", "test/**"]
76
+ instructions:
77
+ - Write tests before or alongside implementation
78
+ - Run tests after every change
79
+ - Stay within the defined scope — do not modify CI/CD or config files
80
+
81
+ contexts:
82
+ hotfix:
83
+ description: Emergency production fix
84
+ modifiers:
85
+ - gene: safe_operations
86
+ action: suppress
87
+ factor: 0.5
88
+ - gene: code_quality
89
+ action: amplify
90
+ factor: 1.5
@@ -0,0 +1,98 @@
1
+ # subagent-parallel: 多 Agent 并行 + 两阶段审查
2
+ # 参考 Superpowers: subagent-driven-development + dispatching-parallel-agents
3
+ # 参考 Cline KanBan: worktree isolation + dependency chain
4
+ # 适用: 大型任务需要并行拆分执行
5
+
6
+ version: "0.1.0"
7
+ id: template_subagent_parallel
8
+ name: Subagent Parallel Development
9
+ type: project
10
+
11
+ cascade:
12
+ inherits: ["species:default"]
13
+ priority: 100
14
+
15
+ genes:
16
+ task_isolation:
17
+ description: Each subtask runs in isolated context
18
+ codons:
19
+ - type: attract
20
+ target: isolated_execution
21
+ - type: attract
22
+ target: worktree_per_task
23
+ - type: repel
24
+ target: shared_state_mutation
25
+ - type: threshold
26
+ condition: "cross_task_file_conflict == false"
27
+ action: block
28
+
29
+ two_phase_review:
30
+ description: Every subtask reviewed for spec compliance then code quality
31
+ codons:
32
+ - type: attract
33
+ target: spec_compliance_check
34
+ - type: attract
35
+ target: code_quality_check
36
+ - type: threshold
37
+ condition: "merge_without_review == false"
38
+ action: block
39
+
40
+ parallel_safety:
41
+ description: Limit concurrent agents and cost
42
+ codons:
43
+ - type: threshold
44
+ condition: "concurrent_agents <= 5"
45
+ action: escalate
46
+ - type: threshold
47
+ condition: "daily_spend <= 100"
48
+ action: warn
49
+ - type: weight
50
+ a: parallelism
51
+ b: cost
52
+ ratio: 0.6
53
+
54
+ contexts: {}
55
+
56
+ roles:
57
+ architect:
58
+ description: Decomposes tasks and reviews results
59
+ tool_permissions:
60
+ allow: [Read, Grep, Glob, Bash]
61
+ deny: [Edit, Write, NotebookEdit]
62
+ scope:
63
+ read: ["**/*"]
64
+ write: []
65
+ instructions:
66
+ - Break the task into independent subtasks that can run in parallel
67
+ - Define clear inputs and outputs for each subtask
68
+ - Review each subtask result for spec compliance first, then code quality
69
+ - Reject and re-dispatch any subtask that fails review
70
+
71
+ worker:
72
+ description: Executes a single subtask in isolation
73
+ tool_permissions:
74
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
75
+ scope:
76
+ read: ["**/*"]
77
+ write: ["src/**", "test/**"]
78
+ instructions:
79
+ - Execute only the assigned subtask, nothing more
80
+ - Write tests for your changes
81
+ - Do not modify files outside your assigned scope
82
+ - Report completion with a summary of changes
83
+
84
+ workflows:
85
+ parallel-dev:
86
+ name: Parallel Development
87
+ steps:
88
+ - id: plan
89
+ role: architect
90
+ description: Decompose task into parallel subtasks
91
+ - id: execute
92
+ role: worker
93
+ depends_on: [plan]
94
+ description: Execute assigned subtask
95
+ - id: review
96
+ role: architect
97
+ depends_on: [execute]
98
+ description: Two-phase review (spec + quality)
@@ -0,0 +1,55 @@
1
+ # systematic-debugging: 系统化调试流程
2
+ # 参考 Superpowers: systematic-debugging skill
3
+ # 适用: 需要结构化调试纪律的团队
4
+
5
+ version: "0.1.0"
6
+ id: template_systematic_debugging
7
+ name: Systematic Debugging
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ debug_discipline:
16
+ description: Follow systematic debugging process
17
+ codons:
18
+ - type: attract
19
+ target: reproduce_first
20
+ - type: attract
21
+ target: read_error_messages
22
+ - type: attract
23
+ target: check_recent_changes
24
+ - type: repel
25
+ target: random_changes
26
+ - type: repel
27
+ target: shotgun_debugging
28
+ - type: threshold
29
+ condition: "fix_without_understanding == false"
30
+ action: warn
31
+
32
+ root_cause:
33
+ description: Find root cause before fixing
34
+ codons:
35
+ - type: attract
36
+ target: bisect_the_problem
37
+ - type: attract
38
+ target: minimal_reproduction
39
+ - type: repel
40
+ target: symptom_treatment
41
+ - type: weight
42
+ a: thoroughness
43
+ b: speed
44
+ ratio: 0.7
45
+
46
+ regression_prevention:
47
+ description: Prevent the same bug from recurring
48
+ codons:
49
+ - type: attract
50
+ target: regression_test
51
+ - type: threshold
52
+ condition: "bugfix_without_test == false"
53
+ action: block
54
+
55
+ contexts: {}
@@ -0,0 +1,69 @@
1
+ # tdd-strict: 严格测试驱动开发
2
+ # 参考 Superpowers: test-driven-development skill
3
+ # 适用: 需要严格 TDD 纪律的团队
4
+
5
+ version: "0.1.0"
6
+ id: template_tdd_strict
7
+ name: Strict Test-Driven Development
8
+ type: project
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ test_first:
16
+ description: Tests must be written before implementation
17
+ codons:
18
+ - type: attract
19
+ target: test_before_code
20
+ - type: attract
21
+ target: red_green_refactor
22
+ - type: repel
23
+ target: implementation_without_tests
24
+ - type: threshold
25
+ condition: "untested_code == false"
26
+ action: block
27
+
28
+ test_quality:
29
+ description: Tests must be meaningful
30
+ codons:
31
+ - type: attract
32
+ target: behavior_verification
33
+ - type: attract
34
+ target: edge_case_coverage
35
+ - type: repel
36
+ target: trivial_assertions
37
+ - type: weight
38
+ a: coverage
39
+ b: speed
40
+ ratio: 0.8
41
+
42
+ continuous_verification:
43
+ description: Run tests after every change
44
+ codons:
45
+ - type: attract
46
+ target: run_tests_after_edit
47
+ - type: threshold
48
+ condition: "commit_without_green_tests == false"
49
+ action: block
50
+
51
+ contexts: {}
52
+
53
+ roles:
54
+ implementer:
55
+ description: TDD implementer — writes tests first, then code
56
+ tool_permissions:
57
+ allow: [Read, Edit, Write, Grep, Glob, Bash]
58
+ scope:
59
+ read: ["**/*"]
60
+ write: ["src/**", "test/**"]
61
+ instructions:
62
+ - Always write the failing test FIRST
63
+ - Run the test to confirm it fails (red)
64
+ - Write the minimum code to make it pass (green)
65
+ - Refactor if needed, keeping tests green
66
+ - Never commit with failing tests
67
+ post_checks:
68
+ - vitest_run
69
+ - tsc_no_errors
@@ -0,0 +1,53 @@
1
+ # verification-loop: 完成前确认修复
2
+ # 参考 Superpowers: verification-before-completion skill
3
+ # 参考 systematic-debugging: "confirm the fix actually works"
4
+ # 适用: 任何 bug 修复或功能完成前需要验证的场景
5
+
6
+ version: "0.1.0"
7
+ id: template_verification_loop
8
+ name: Verification Before Completion
9
+ type: project
10
+
11
+ cascade:
12
+ inherits: ["species:default"]
13
+ priority: 100
14
+
15
+ genes:
16
+ verify_before_done:
17
+ description: Never mark a task done without verifying the fix
18
+ codons:
19
+ - type: attract
20
+ target: verification_step
21
+ - type: attract
22
+ target: regression_check
23
+ - type: repel
24
+ target: assumed_fix
25
+ - type: threshold
26
+ condition: "completion_without_verification == false"
27
+ action: block
28
+
29
+ evidence_based:
30
+ description: Provide evidence that the fix works
31
+ codons:
32
+ - type: attract
33
+ target: test_output_evidence
34
+ - type: attract
35
+ target: before_after_comparison
36
+ - type: repel
37
+ target: claims_without_proof
38
+ - type: sense
39
+ signal: incomplete_result
40
+ response: retry_with_more_depth
41
+
42
+ no_partial_fixes:
43
+ description: Fix completely or escalate, never ship half-fixes
44
+ codons:
45
+ - type: repel
46
+ target: partial_fix
47
+ - type: repel
48
+ target: workaround_without_root_cause
49
+ - type: sense
50
+ signal: uncertain_information
51
+ response: escalate_to_human
52
+
53
+ contexts: {}
@@ -0,0 +1,56 @@
1
+ # yolo-with-guardrails: YOLO 模式 + 安全护栏
2
+ # 参考: YOLO mode 趋势 + Carnegie Mellon 研究
3
+ # 适用: 个人开发者想要全自主但不想翻车
4
+
5
+ version: "0.1.0"
6
+ id: template_yolo_guardrails
7
+ name: YOLO with Guardrails
8
+ type: personal
9
+
10
+ cascade:
11
+ inherits: ["species:default"]
12
+ priority: 100
13
+
14
+ genes:
15
+ autonomy:
16
+ description: Maximum autonomy within safety boundaries
17
+ codons:
18
+ - type: attract
19
+ target: autonomous_execution
20
+ - type: attract
21
+ target: minimal_interruption
22
+ - type: weight
23
+ a: autonomy
24
+ b: safety
25
+ ratio: 0.7
26
+
27
+ safety_net:
28
+ description: Hard limits even in YOLO mode
29
+ codons:
30
+ - type: threshold
31
+ condition: "production_delete == false"
32
+ action: block
33
+ - type: threshold
34
+ condition: "env_file_delete == false"
35
+ action: block
36
+ - type: threshold
37
+ condition: "force_push_main == false"
38
+ action: block
39
+ - type: threshold
40
+ condition: "files_deleted_per_session <= 10"
41
+ action: escalate
42
+ - type: threshold
43
+ condition: "git_reset_hard == false"
44
+ action: escalate
45
+
46
+ cost_control:
47
+ description: Prevent runaway API costs
48
+ codons:
49
+ - type: threshold
50
+ condition: "daily_spend <= 50"
51
+ action: warn
52
+ - type: threshold
53
+ condition: "daily_spend <= 200"
54
+ action: block
55
+
56
+ contexts: {}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "intentdna",
3
+ "version": "1.0.0",
4
+ "description": "Intent DNA — Declarative policy layer for AI agent behavior",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "dna": "dist/cli/index.js"
10
+ },
11
+ "scripts": {
12
+ "build": "tsc && mkdir -p dist/species dist/templates && cp src/species/*.json dist/species/ && cp src/templates/*.yaml dist/templates/",
13
+ "dev": "tsc --watch",
14
+ "test": "node --experimental-vm-modules node_modules/.bin/vitest run",
15
+ "test:watch": "node --experimental-vm-modules node_modules/.bin/vitest"
16
+ },
17
+ "author": "Samuel",
18
+ "license": "Apache-2.0",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/lushan1314/intentdna.git"
22
+ },
23
+ "keywords": [
24
+ "ai",
25
+ "agent",
26
+ "guardrails",
27
+ "policy",
28
+ "claude",
29
+ "cursor",
30
+ "dna",
31
+ "harness"
32
+ ],
33
+ "files": [
34
+ "dist",
35
+ "README.md",
36
+ "LICENSE"
37
+ ],
38
+ "devDependencies": {
39
+ "@types/node": "^25.3.3",
40
+ "typescript": "^5.9.3",
41
+ "vitest": "^4.0.18"
42
+ }
43
+ }