soloforge 1.1.46 → 1.1.48
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.
- package/README.md +23 -7
- package/dist/cli/adapter_writers.d.ts +5 -0
- package/dist/cli/adapter_writers.d.ts.map +1 -1
- package/dist/cli/adapter_writers.js +25 -0
- package/dist/cli/adapter_writers.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +3 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/scope_check.d.ts +4 -0
- package/dist/cli/scope_check.d.ts.map +1 -0
- package/dist/cli/scope_check.js +41 -0
- package/dist/cli/scope_check.js.map +1 -0
- package/dist/context/adapters/claude_code/hooks.d.ts +5 -7
- package/dist/context/adapters/claude_code/hooks.d.ts.map +1 -1
- package/dist/context/adapters/claude_code/hooks.js +11 -9
- package/dist/context/adapters/claude_code/hooks.js.map +1 -1
- package/dist/context/adapters/shared/integration_guide.js +18 -6
- package/dist/context/adapters/shared/integration_guide.js.map +1 -1
- package/dist/context/adapters/shared/workflow_template.js +1 -1
- package/dist/context/config/intent_schema.d.ts +793 -6
- package/dist/context/config/intent_schema.d.ts.map +1 -1
- package/dist/context/config/intent_schema.js +9 -0
- package/dist/context/config/intent_schema.js.map +1 -1
- package/dist/context/config/resolver.d.ts +9 -0
- package/dist/context/config/resolver.d.ts.map +1 -1
- package/dist/context/config/resolver.js +5 -0
- package/dist/context/config/resolver.js.map +1 -1
- package/dist/core/adversarial_review_store.d.ts +133 -0
- package/dist/core/adversarial_review_store.d.ts.map +1 -0
- package/dist/core/adversarial_review_store.js +161 -0
- package/dist/core/adversarial_review_store.js.map +1 -0
- package/dist/core/domain_transition.d.ts.map +1 -1
- package/dist/core/domain_transition.js +3 -0
- package/dist/core/domain_transition.js.map +1 -1
- package/dist/core/gate_record_store.d.ts +13 -7
- package/dist/core/gate_record_store.d.ts.map +1 -1
- package/dist/core/gate_record_store.js +39 -17
- package/dist/core/gate_record_store.js.map +1 -1
- package/dist/core/git_utils.d.ts +1 -1
- package/dist/core/git_utils.js +1 -1
- package/dist/core/observer.d.ts.map +1 -1
- package/dist/core/observer.js +33 -6
- package/dist/core/observer.js.map +1 -1
- package/dist/core/task_context/constants.js +1 -1
- package/dist/core/task_context/constants.js.map +1 -1
- package/dist/core/task_context/manager.d.ts +4 -0
- package/dist/core/task_context/manager.d.ts.map +1 -1
- package/dist/core/task_context/manager.js +48 -30
- package/dist/core/task_context/manager.js.map +1 -1
- package/dist/core/task_context/manager_setters.d.ts +2 -0
- package/dist/core/task_context/manager_setters.d.ts.map +1 -1
- package/dist/core/task_context/manager_setters.js +10 -0
- package/dist/core/task_context/manager_setters.js.map +1 -1
- package/dist/core/types.d.ts +19 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/domain/asset_registry/derived_registry.d.ts.map +1 -1
- package/dist/domain/asset_registry/derived_registry.js +20 -5
- package/dist/domain/asset_registry/derived_registry.js.map +1 -1
- package/dist/domain/asset_registry/derived_types.d.ts +22 -1
- package/dist/domain/asset_registry/derived_types.d.ts.map +1 -1
- package/dist/domain/build/contract.d.ts.map +1 -1
- package/dist/domain/build/contract.js +3 -8
- package/dist/domain/build/contract.js.map +1 -1
- package/dist/domain/build/engine.d.ts +4 -2
- package/dist/domain/build/engine.d.ts.map +1 -1
- package/dist/domain/build/engine.js +38 -5
- package/dist/domain/build/engine.js.map +1 -1
- package/dist/domain/contracts/design_lifecycle_contract.d.ts.map +1 -1
- package/dist/domain/contracts/design_lifecycle_contract.js +11 -4
- package/dist/domain/contracts/design_lifecycle_contract.js.map +1 -1
- package/dist/domain/design/contract.d.ts.map +1 -1
- package/dist/domain/design/contract.js +13 -31
- package/dist/domain/design/contract.js.map +1 -1
- package/dist/domain/design/engine.d.ts +4 -2
- package/dist/domain/design/engine.d.ts.map +1 -1
- package/dist/domain/design/engine.js +39 -4
- package/dist/domain/design/engine.js.map +1 -1
- package/dist/domain/engine_helpers.d.ts +55 -2
- package/dist/domain/engine_helpers.d.ts.map +1 -1
- package/dist/domain/engine_helpers.js +173 -8
- package/dist/domain/engine_helpers.js.map +1 -1
- package/dist/domain/operate/contract.js +1 -1
- package/dist/domain/operate/contract.js.map +1 -1
- package/dist/domain/operate/engine.d.ts +4 -2
- package/dist/domain/operate/engine.d.ts.map +1 -1
- package/dist/domain/operate/engine.js +23 -3
- package/dist/domain/operate/engine.js.map +1 -1
- package/dist/domain/types.d.ts +6 -0
- package/dist/domain/types.d.ts.map +1 -1
- package/dist/domain/types.js.map +1 -1
- package/dist/domain/verify/engine.d.ts +4 -2
- package/dist/domain/verify/engine.d.ts.map +1 -1
- package/dist/domain/verify/engine.js +22 -2
- package/dist/domain/verify/engine.js.map +1 -1
- package/dist/gate/contracts/tool_actions.d.ts +2 -2
- package/dist/gate/contracts/tool_actions.d.ts.map +1 -1
- package/dist/gate/contracts/tool_actions.js +2 -2
- package/dist/gate/contracts/tool_actions.js.map +1 -1
- package/dist/gate/contracts/tool_invocation_contract_registry.js +1 -1
- package/dist/gate/contracts/tool_invocation_contract_registry.js.map +1 -1
- package/dist/gate/executors/executors_artifact.d.ts +19 -0
- package/dist/gate/executors/executors_artifact.d.ts.map +1 -1
- package/dist/gate/executors/executors_artifact.js +108 -8
- package/dist/gate/executors/executors_artifact.js.map +1 -1
- package/dist/gate/executors/executors_build.d.ts.map +1 -1
- package/dist/gate/executors/executors_build.js +17 -15
- package/dist/gate/executors/executors_build.js.map +1 -1
- package/dist/gate/executors/executors_external_command.d.ts.map +1 -1
- package/dist/gate/executors/executors_external_command.js +32 -0
- package/dist/gate/executors/executors_external_command.js.map +1 -1
- package/dist/gate/executors/executors_field_mapping.d.ts +7 -0
- package/dist/gate/executors/executors_field_mapping.d.ts.map +1 -0
- package/dist/gate/executors/executors_field_mapping.js +179 -0
- package/dist/gate/executors/executors_field_mapping.js.map +1 -0
- package/dist/gate/executors/executors_prerequisite.d.ts.map +1 -1
- package/dist/gate/executors/executors_prerequisite.js +27 -7
- package/dist/gate/executors/executors_prerequisite.js.map +1 -1
- package/dist/gate/executors/executors_regex_scan.d.ts.map +1 -1
- package/dist/gate/executors/executors_regex_scan.js +36 -15
- package/dist/gate/executors/executors_regex_scan.js.map +1 -1
- package/dist/gate/executors/executors_scope.js +4 -4
- package/dist/gate/executors/executors_scope.js.map +1 -1
- package/dist/gate/executors/executors_trace.d.ts +5 -0
- package/dist/gate/executors/executors_trace.d.ts.map +1 -1
- package/dist/gate/executors/executors_trace.js +186 -3
- package/dist/gate/executors/executors_trace.js.map +1 -1
- package/dist/gate/executors/index.d.ts.map +1 -1
- package/dist/gate/executors/index.js +2 -0
- package/dist/gate/executors/index.js.map +1 -1
- package/dist/gate/gate_engine.d.ts +9 -0
- package/dist/gate/gate_engine.d.ts.map +1 -1
- package/dist/gate/gate_engine.js +15 -0
- package/dist/gate/gate_engine.js.map +1 -1
- package/dist/gate/gate_registry_bridge.d.ts +9 -8
- package/dist/gate/gate_registry_bridge.d.ts.map +1 -1
- package/dist/gate/gate_registry_bridge.js +57 -16
- package/dist/gate/gate_registry_bridge.js.map +1 -1
- package/dist/gate/middleware_gates.js +1 -1
- package/dist/gate/middleware_gates.js.map +1 -1
- package/dist/gate/scope_resolver.d.ts +7 -0
- package/dist/gate/scope_resolver.d.ts.map +1 -1
- package/dist/gate/scope_resolver.js +1 -1
- package/dist/gate/scope_resolver.js.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/server/tools/sf_doctor.d.ts +2 -0
- package/dist/server/tools/sf_doctor.d.ts.map +1 -1
- package/dist/server/tools/sf_doctor.js +35 -1
- package/dist/server/tools/sf_doctor.js.map +1 -1
- package/dist/server/tools/sf_gate.d.ts +1 -1
- package/dist/server/tools/sf_gate.js +2 -2
- package/dist/server/tools/sf_gate.js.map +1 -1
- package/dist/server/tools/sf_task.d.ts +83 -0
- package/dist/server/tools/sf_task.d.ts.map +1 -1
- package/dist/server/tools/sf_task.js +121 -4
- package/dist/server/tools/sf_task.js.map +1 -1
- package/dist/server/tools/sf_work.d.ts +203 -0
- package/dist/server/tools/sf_work.d.ts.map +1 -1
- package/dist/server/tools/sf_work.js +549 -46
- package/dist/server/tools/sf_work.js.map +1 -1
- package/dist/shared/traceability_id_utils.js +3 -3
- package/dist/shared/traceability_id_utils.js.map +1 -1
- package/dist/verify/contracts/decision_workshop.d.ts.map +1 -1
- package/dist/verify/contracts/decision_workshop.js +4 -3
- package/dist/verify/contracts/decision_workshop.js.map +1 -1
- package/package.json +2 -1
- package/templates/build/enforced.md +299 -39
- package/templates/build//344/270/223/351/241/271/345/256/236/347/216/260.md +75 -0
- package/templates/build//345/256/211/345/205/250/345/212/240/345/233/272.md +75 -0
- package/templates/build//346/263/250/351/207/212/347/272/252/345/276/213.md +48 -0
- package/templates/build//346/265/213/350/257/225/344/274/230/345/205/210/347/274/226/347/240/201.md +50 -79
- package/templates/build//346/265/213/350/257/225/350/256/241/345/210/222.md +31 -24
- package/templates/build//347/274/226/347/240/201/347/272/252/345/276/213.md +101 -0
- package/templates/build//350/260/203/350/257/225/346/216/222/346/237/245.md +44 -75
- package/templates/build//351/207/215/346/236/204/346/226/271/346/263/225.md +68 -0
- package/templates/design/API/346/216/245/345/217/243/350/247/204/346/240/274/346/226/207/346/241/243.md +38 -28
- package/templates/design/enforced.md +234 -74
- package/templates/design//345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201/345/257/274/350/210/252.md +5 -2
- package/templates/design//345/205/274/345/256/271/346/200/247/344/270/216/350/277/201/347/247/273/350/257/204/344/274/260.md +71 -0
- package/templates/design//345/206/263/347/255/226/344/270/216/351/200/211/345/236/213.md +70 -0
- package/templates/design//345/210/207/347/211/207/350/247/204/345/210/222.md +51 -55
- package/templates/design//345/274/200/345/217/221/345/210/207/347/211/207/350/256/241/345/210/222.md +75 -0
- package/templates/design//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/346/226/207/346/241/243.md +35 -47
- package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241.md +63 -81
- package/templates/design//350/256/276/350/256/241/345/206/263/347/255/226/347/272/252/345/276/213.md +58 -0
- package/templates/design//350/256/276/350/256/241/350/264/250/351/207/217/350/246/201/347/202/271.md +58 -0
- package/templates/design//351/234/200/346/261/202/345/210/206/346/236/220.md +49 -53
- package/templates/operate/UI/350/247/206/350/247/211/351/252/214/346/224/266/347/272/252/345/276/213.md +74 -0
- package/templates/operate/enforced.md +52 -5
- package/templates/operate//344/270/212/347/272/277/350/247/202/345/257/237.md +53 -32
- package/templates/operate//345/217/221/345/270/203/350/257/264/346/230/216.md +22 -1
- package/templates/operate//351/203/250/347/275/262/351/205/215/347/275/256.md +93 -0
- package/templates/shared/enforced.md +83 -5
- package/templates/shared//345/217/215/351/246/210/344/277/256/345/244/215/351/227/255/347/216/257.md +86 -0
- package/templates/shared//345/267/245/344/275/234/346/265/201/345/257/274/350/210/252/345/245/221/347/272/246.md +1 -1
- package/templates/shared//345/267/245/347/250/213/346/211/247/350/241/214/346/200/273/347/272/262.md +148 -0
- package/templates/shared//345/267/245/347/250/213/347/272/252/345/276/213.md +71 -0
- package/templates/shared//345/274/200/345/217/221/350/200/205/345/256/252/346/263/225.md +48 -43
- package/templates/shared//346/234/272/345/210/266/350/257/264/346/230/216.md +67 -0
- package/templates/shared//347/240/224/350/256/250/350/256/260/345/275/225.md +54 -0
- package/templates/shared//350/257/201/346/215/256/351/251/261/345/212/250/344/270/216/345/217/215/345/271/273/350/247/211.md +27 -17
- package/templates/shared//350/264/241/347/214/256/350/247/204/350/214/203.md +78 -0
- package/templates/verify/enforced.md +87 -263
- package/templates/verify//344/272/244/344/273/230/345/256/214/345/244/207/346/200/247/345/256/241/346/237/245.md +46 -87
- package/templates/verify//344/273/243/347/240/201/345/256/241/346/237/245/346/212/245/345/221/212.md +17 -0
- package/templates/verify//345/256/241/346/237/245/346/270/205/345/215/225.md +79 -0
- package/templates/verify//346/236/266/346/236/204/350/257/255/344/271/211/347/272/242/347/272/277.md +60 -0
- package/templates/verify//351/252/214/350/257/201/346/226/271/346/263/225.md +72 -0
- package/dist/core/scope_checker.d.ts +0 -29
- package/dist/core/scope_checker.d.ts.map +0 -1
- package/dist/core/scope_checker.js +0 -53
- package/dist/core/scope_checker.js.map +0 -1
- package/templates/build/Bug/345/210/206/346/236/220.md +0 -59
- package/templates/build/Git/346/223/215/344/275/234.md +0 -48
- package/templates/build/OOD/350/256/276/350/256/241/346/221/230/350/246/201.md +0 -46
- package/templates/build/React/346/216/245/345/217/243/351/233/206/346/210/220.md +0 -42
- package/templates/build/Schema/345/217/230/346/233/264/346/265/201/346/260/264/347/272/277.md +0 -52
- package/templates/build/TS/350/264/250/351/207/217/345/256/241/346/237/245.md +0 -78
- package/templates/build//344/270/212/346/270/270/344/272/244/345/217/211/351/252/214/350/257/201.md +0 -68
- package/templates/build//344/270/273/351/223/276/350/267/257/346/216/245/345/205/245/351/252/214/350/257/201.md +0 -56
- package/templates/build//344/273/243/347/240/201/351/227/250/347/246/201.md +0 -58
- package/templates/build//345/205/250/346/240/210/346/265/201/347/250/213/344/277/256/345/244/215.md +0 -48
- package/templates/build//345/210/207/347/211/207/346/211/247/350/241/214/347/272/252/345/276/213.md +0 -108
- package/templates/build//345/210/207/347/211/207/347/253/257/345/210/260/347/253/257/351/252/214/350/257/201.md +0 -221
- package/templates/build//345/212/237/350/203/275/345/274/200/345/217/221.md +0 -66
- package/templates/build//345/220/216/347/253/257/345/256/236/347/216/260.md +0 -39
- package/templates/build//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213.md +0 -33
- package/templates/build//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/345/256/241/346/237/245.md +0 -70
- package/templates/build//345/220/216/347/253/257/346/216/245/345/217/243/345/256/236/347/216/260.md +0 -43
- package/templates/build//345/233/275/351/231/205/345/214/226.md +0 -45
- package/templates/build//345/256/211/345/205/250/345/212/240/345/233/272/346/265/201/346/260/264/347/272/277.md +0 -68
- package/templates/build//345/256/211/345/205/250/345/256/241/346/237/245.md +0 -154
- package/templates/build//345/256/211/345/205/250/345/256/241/350/256/241.md +0 -47
- package/templates/build//345/267/245/347/250/213/347/272/252/345/276/213.md +0 -56
- package/templates/build//346/200/247/350/203/275/345/210/206/346/236/220.md +0 -59
- package/templates/build//346/200/247/350/203/275/346/265/201/346/260/264/347/272/277.md +0 -53
- package/templates/build//346/216/245/345/217/243/351/233/206/346/210/220/346/265/201/346/260/264/347/272/277.md +0 -76
- package/templates/build//346/225/260/346/215/256/345/272/223/350/277/201/347/247/273.md +0 -63
- package/templates/build//346/226/260/350/200/201/351/200/273/350/276/221/346/257/224/345/257/271/346/227/245/345/277/227.md +0 -39
- package/templates/build//346/235/203/351/231/220/350/256/244/350/257/201.md +0 -49
- package/templates/build//346/265/213/350/257/225/350/264/250/351/207/217.md +0 -45
- package/templates/build//347/206/224/346/226/255/351/231/215/347/272/247.md +0 -49
- package/templates/build//347/212/266/346/200/201/346/265/201/350/275/254.md +0 -43
- package/templates/build//347/213/254/347/253/213/345/256/241/346/237/245.md +0 -45
- package/templates/build//347/272/246/346/235/237/345/256/236/347/216/260.md +0 -47
- package/templates/build//347/274/226/347/240/201/345/260/261/347/273/252/345/256/241/346/237/245.md +0 -60
- package/templates/build//347/274/226/347/240/201/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -22
- package/templates/build//347/274/226/347/240/201/350/264/250/351/207/217.md +0 -46
- package/templates/build//347/274/226/347/240/201/351/230/266/346/256/265/346/211/247/350/241/214.md +0 -105
- package/templates/build//347/274/272/351/231/267/347/256/241/347/220/206.md +0 -47
- package/templates/build//350/200/246/345/220/210/346/243/200/346/265/213.md +0 -86
- package/templates/build//350/246/206/347/233/226/347/216/207/346/240/207/345/207/206.md +0 -40
- package/templates/build//350/264/250/351/207/217/345/256/241/346/237/245.md +0 -111
- package/templates/build//350/277/201/347/247/273/346/265/201/346/260/264/347/272/277.md +0 -52
- package/templates/build//351/200/232/347/224/250/350/264/250/351/207/217.md +0 -176
- package/templates/build//351/207/215/346/236/204/346/226/271/346/241/210.md +0 -61
- package/templates/build//351/207/215/346/236/204/346/265/201/346/260/264/347/272/277.md +0 -53
- package/templates/build//351/230/262/345/276/241/346/200/247/347/274/226/347/240/201.md +0 -94
- package/templates/build//351/233/206/346/210/220/351/252/214/350/257/201.md +0 -67
- package/templates/build//351/233/267/345/214/272/345/217/215/346/250/241/345/274/217.md +0 -135
- package/templates/build//351/252/214/346/224/266/346/240/207/345/207/206/345/256/241/346/237/245.md +0 -64
- package/templates/build//351/252/214/346/224/266/346/265/213/350/257/225/350/247/204/345/210/222.md +0 -75
- package/templates/design/API/350/256/276/350/256/241.md +0 -47
- package/templates/design/N/345/212/2401/346/237/245/350/257/242.md +0 -48
- package/templates/design/OOD/350/256/276/350/256/241.md +0 -72
- package/templates/design//344/270/200/350/207/264/346/200/247/346/240/241/351/252/214.md +0 -109
- package/templates/design//344/270/215/347/241/256/345/256/232/346/227/266/345/244/264/350/204/221/351/243/216/346/232/264.md +0 -105
- package/templates/design//344/273/273/345/212/241/346/213/206/350/247/243.md +0 -61
- package/templates/design//344/273/273/345/212/241/350/247/204/345/210/222.md +0 -84
- package/templates/design//344/274/232/350/257/235/346/201/242/345/244/215-procedures.md +0 -78
- package/templates/design//345/205/274/345/256/271/346/200/247/346/243/200/346/237/245.md +0 -89
- package/templates/design//345/210/207/347/211/207/350/256/241/345/210/222.md +0 -149
- package/templates/design//345/211/215/347/253/257/346/200/247/350/203/275.md +0 -49
- package/templates/design//345/216/206/345/217/262/351/201/227/347/225/231/351/233/267/345/214/272/346/270/205/345/215/225.md +0 -50
- package/templates/design//345/216/237/345/236/213/346/272/220/347/240/201/346/217/220/345/217/226.md +0 -78
- package/templates/design//345/216/237/345/236/213/350/257/264/346/230/216.md +0 -200
- package/templates/design//345/216/237/345/236/213/350/257/264/346/230/216/345/256/241/346/237/245.md +0 -81
- package/templates/design//345/220/221/345/220/216/345/205/274/345/256/271/346/200/247/345/220/210/350/247/204/346/212/245/345/221/212.md +0 -52
- package/templates/design//345/221/275/344/273/244/346/211/247/350/241/214-procedures.md +0 -45
- package/templates/design//345/221/275/344/273/244/350/267/257/347/224/261-procedures.md +0 -46
- package/templates/design//345/221/275/345/220/215.md +0 -49
- package/templates/design//345/242/236/351/207/217/350/276/271/347/225/214/347/225/214/345/256/232/346/226/207/346/241/243.md +0 -48
- package/templates/design//345/267/245/345/205/267/350/260/203/347/224/250-procedures.md +0 -41
- package/templates/design//345/271/266/345/217/221/346/216/247/345/210/266.md +0 -50
- package/templates/design//346/212/200/346/234/257/351/200/211/345/236/213.md +0 -33
- package/templates/design//346/216/245/345/217/243/345/257/271/346/216/245/346/226/271/346/241/210.md +0 -97
- package/templates/design//346/224/271/351/200/240/345/275/261/345/223/215/350/214/203/345/233/264/350/257/204/344/274/260.md +0 -56
- package/templates/design//346/225/260/346/215/256/345/272/223/345/217/230/346/233/264/346/226/271/346/241/210.md +0 -75
- package/templates/design//346/225/260/346/215/256/350/241/200/347/274/230/345/233/276.md +0 -49
- package/templates/design//346/227/240/351/232/234/347/242/215.md +0 -49
- package/templates/design//346/236/266/346/236/204/345/206/263/347/255/226/350/256/260/345/275/225.md +0 -53
- package/templates/design//346/236/266/346/236/204/345/256/241/346/237/245.md +0 -256
- package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241-constraints.md +0 -177
- package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241-procedures.md +0 -130
- package/templates/design//346/246/202/345/277/265/351/252/214/350/257/201/346/265/201/346/260/264/347/272/277.md +0 -47
- package/templates/design//346/272/220/347/240/201/345/216/237/345/236/213/344/272/244/344/273/230.md +0 -58
- package/templates/design//347/216/260/346/234/211/347/263/273/347/273/237/345/267/256/350/267/235/345/210/206/346/236/220.md +0 -114
- package/templates/design//347/237/245/350/257/206/347/273/264/346/212/244/346/265/201/346/260/264/347/272/277.md +0 -64
- package/templates/design//347/254/254/344/270/200/346/200/247/345/216/237/347/220/206/346/216/250/347/220/206.md +0 -182
- package/templates/design//347/264/247/346/200/245/345/233/236/346/273/232/346/211/213/345/206/214.md +0 -77
- package/templates/design//347/274/226/347/240/201/345/211/215/346/276/204/346/270/205.md +0 -85
- package/templates/design//350/200/201/347/263/273/347/273/237/345/210/207/347/211/207/350/247/204/345/210/222.md +0 -48
- package/templates/design//350/207/252/344/270/273/351/200/211/345/236/213.md +0 -57
- package/templates/design//350/256/276/350/256/241/344/270/200/350/207/264/346/200/247/351/252/214/346/224/266/346/212/245/345/221/212.md +0 -34
- package/templates/design//350/256/276/350/256/241/344/272/247/347/211/251/347/224/237/346/210/220/344/270/216/345/244/215/351/252/214.md +0 -60
- package/templates/design//350/256/276/350/256/241/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -21
- package/templates/design//350/257/246/347/273/206/350/256/276/350/256/241-procedures.md +0 -123
- package/templates/design//350/257/246/347/273/206/350/256/276/350/256/241.md +0 -109
- package/templates/design//350/257/246/347/273/206/350/256/276/350/256/241/345/256/241/346/237/245.md +0 -88
- package/templates/design//350/260/203/350/257/225/346/226/271/346/263/225/350/256/272.md +0 -43
- package/templates/design//350/277/201/347/247/273/350/257/204/344/274/260.md +0 -67
- package/templates/design//351/232/224/347/246/273/351/200/202/351/205/215/345/231/250/346/226/271/346/241/210.md +0 -44
- package/templates/design//351/234/200/346/261/202/346/276/204/346/270/205.md +0 -65
- package/templates/design//351/234/200/346/261/202/350/264/250/351/207/217/345/256/241/346/237/245.md +0 -88
- package/templates/design//351/242/206/345/237/237/351/251/261/345/212/250/350/256/276/350/256/241.md +0 -43
- package/templates/operate//345/217/221/345/270/203/350/257/264/346/230/216/345/256/241/346/237/245.md +0 -60
- package/templates/operate//350/277/220/347/273/264/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -22
- package/templates/operate//351/203/250/347/275/262/351/205/215/347/275/256/345/256/241/346/237/245.md +0 -59
- package/templates/shared/Diff/345/275/222/345/261/236/350/277/275/350/270/252.md +0 -55
- package/templates/shared/Java/350/264/250/351/207/217/351/227/250/347/246/201.md +0 -54
- package/templates/shared/OOD/344/270/216SOLID/350/256/276/350/256/241.md +0 -48
- package/templates/shared//344/272/247/347/211/251Schema/346/263/250/345/206/214/344/270/255/345/277/203.md +0 -57
- package/templates/shared//344/272/247/347/211/251/345/245/221/347/272/246.md +0 -44
- package/templates/shared//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/345/245/221/347/272/246.md +0 -116
- package/templates/shared//344/273/273/345/212/241/344/270/212/344/270/213/346/226/207/347/224/237/345/221/275/345/221/250/346/234/237.md +0 -45
- package/templates/shared//344/273/273/345/212/241/347/212/266/346/200/201/346/234/272.md +0 -55
- package/templates/shared//344/273/273/345/212/241/347/256/241/347/220/206/345/231/250.md +0 -55
- package/templates/shared//344/274/230/351/233/205/345/201/234/346/234/272.md +0 -43
- package/templates/shared//344/275/234/347/224/250/345/237/237/344/270/216/345/257/206/351/222/245/346/213/246/346/210/252.md +0 -54
- package/templates/shared//344/275/234/347/224/250/345/237/237/347/247/237/347/272/246.md +0 -55
- package/templates/shared//345/206/262/347/252/201/351/227/250/347/246/201.md +0 -55
- package/templates/shared//345/206/263/347/255/226/347/275/221/345/205/263.md +0 -47
- package/templates/shared//345/210/207/347/211/207/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -72
- package/templates/shared//345/217/230/345/274/202/345/256/241/350/256/241.md +0 -58
- package/templates/shared//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/345/245/221/347/272/246.md +0 -40
- package/templates/shared//345/221/275/344/273/244/346/211/247/350/241/214.md +0 -48
- package/templates/shared//345/221/275/344/273/244/350/267/257/347/224/261.md +0 -45
- package/templates/shared//345/233/236/345/275/222/347/237/251/351/230/265.md +0 -54
- package/templates/shared//345/244/232/347/247/237/346/210/267.md +0 -49
- package/templates/shared//345/256/241/350/256/241/346/227/245/345/277/227.md +0 -46
- package/templates/shared//345/257/274/345/205/245/345/257/274/345/207/272.md +0 -51
- package/templates/shared//345/267/245/344/275/234/345/214/272/344/272/222/346/226/245/351/224/201.md +0 -52
- package/templates/shared//345/267/245/344/275/234/345/214/272/345/224/244/351/206/222.md +0 -54
- package/templates/shared//345/267/245/344/275/234/346/265/201/345/245/221/347/272/246.md +0 -42
- package/templates/shared//345/267/245/344/275/234/346/265/201/345/274/225/346/223/216.md +0 -50
- package/templates/shared//345/267/245/344/275/234/346/265/201/346/250/241/347/211/210/345/214/205.md +0 -34
- package/templates/shared//345/267/245/345/205/267/350/260/203/347/224/250.md +0 -48
- package/templates/shared//345/271/266/345/217/221/351/224/201.md +0 -57
- package/templates/shared//346/211/247/350/241/214/345/256/210/345/215/253/350/257/204/344/274/260.md +0 -47
- package/templates/shared//346/211/251/345/261/225/347/224/237/345/221/275/345/221/250/346/234/237.md +0 -34
- package/templates/shared//346/212/200/346/234/257/345/206/263/347/255/226/344/270/273/346/235/203.md +0 -50
- package/templates/shared//346/212/245/350/241/250/347/273/237/350/256/241.md +0 -50
- package/templates/shared//346/224/257/344/273/230.md +0 -51
- package/templates/shared//346/225/217/346/204/237/344/277/241/346/201/257/345/244/204/347/220/206.md +0 -77
- package/templates/shared//346/225/217/346/204/237/344/277/241/346/201/257/346/211/253/346/217/217.md +0 -53
- package/templates/shared//346/225/260/346/215/256/346/235/203/351/231/220.md +0 -47
- package/templates/shared//346/226/275/345/267/245/346/214/207/344/273/244/345/245/221/347/272/246.md +0 -69
- package/templates/shared//346/227/245/345/277/227/346/262/273/347/220/206.md +0 -31
- package/templates/shared//346/234/272/345/210/266/350/207/252/346/262/273/347/220/206.md +0 -31
- package/templates/shared//346/240/207/345/207/206/350/265/204/344/272/247/350/246/206/347/233/226.md +0 -50
- package/templates/shared//346/240/270/345/277/203/344/275/223/351/252/214/345/216/237/345/210/231.md +0 -38
- package/templates/shared//346/240/270/345/277/203/345/267/245/347/250/213/346/211/247/350/241/214/345/216/237/345/210/231.md +0 -154
- package/templates/shared//346/250/241/347/211/210Frontmatter.md +0 -125
- package/templates/shared//346/250/241/347/211/210/350/264/241/347/214/256/346/214/207/345/215/227.md +0 -282
- package/templates/shared//346/250/241/347/211/210/350/265/204/344/272/247/345/217/257/350/247/201/346/200/247.md +0 -48
- package/templates/shared//346/262/273/347/220/206/350/277/220/350/241/214/346/227/266/345/276/252/347/216/257.md +0 -56
- package/templates/shared//346/263/250/345/206/214/350/241/250/345/237/272/347/241/200/350/256/276/346/226/275.md +0 -49
- package/templates/shared//346/274/224/350/277/233/345/233/236/345/275/222/351/227/250/346/216/247.md +0 -50
- package/templates/shared//347/224/250/346/210/267/345/217/215/351/246/210/345/245/221/347/272/246.md +0 -86
- package/templates/shared//347/237/245/350/257/206/344/270/273/346/235/203.md +0 -66
- package/templates/shared//347/237/245/350/257/206/346/262/273/347/220/206.md +0 -31
- package/templates/shared//347/237/245/350/257/206/346/263/250/345/205/245/350/276/271/347/225/214.md +0 -47
- package/templates/shared//347/273/206/350/212/202/347/272/252/345/276/213.md +0 -54
- package/templates/shared//350/204/221/346/232/264/344/270/216/346/226/271/346/241/210/346/216/242/347/264/242.md +0 -51
- package/templates/shared//350/256/241/345/210/222/345/211/215/347/275/256/351/227/250.md +0 -47
- package/templates/shared//350/256/276/350/256/241/344/272/247/347/211/251/345/214/205.md +0 -58
- package/templates/shared//350/257/255/344/271/211/350/257/201/346/215/256.md +0 -55
- package/templates/shared//350/267/250/345/271/263/345/217/260/350/267/257/345/276/204/345/256/211/345/205/250.md +0 -41
- package/templates/shared//350/276/223/345/205/245/346/235/220/346/226/231/345/245/221/347/272/246.md +0 -50
- package/templates/shared//350/277/220/350/241/214/345/256/211/345/205/250/345/214/205.md +0 -58
- package/templates/shared//351/200/232/347/224/250/345/206/263/347/255/226/347/240/224/350/256/250.md +0 -62
- package/templates/shared//351/200/232/347/224/250/346/234/272/346/242/260/346/235/241/346/254/276.md +0 -47
- package/templates/shared//351/200/232/347/237/245.md +0 -50
- package/templates/shared//351/203/250/347/275/262/351/205/215/347/275/256.md +0 -14
- package/templates/shared//351/205/215/347/275/256/344/274/230/345/205/210/347/272/247.md +0 -67
- package/templates/shared//351/205/215/347/275/256/350/220/275/347/233/230/350/276/271/347/225/214.md +0 -32
- package/templates/shared//351/230/262/345/255/244/345/262/233/345/256/236/347/216/260.md +0 -51
- package/templates/shared//351/233/266/351/205/215/347/275/256/345/210/235/345/247/213/345/214/226.md +0 -57
- package/templates/shared//351/252/214/346/224/266/346/250/241/347/211/210/350/276/223/345/207/272/345/245/221/347/272/246.md +0 -71
- package/templates/shared//351/252/214/350/257/201/345/221/275/344/273/244/347/224/237/346/210/220.md +0 -55
- package/templates/shared//351/252/214/350/257/201/345/245/221/347/272/246.md +0 -48
- package/templates/verify/Docker/351/203/250/347/275/262.md +0 -46
- package/templates/verify/POC/347/273/223/350/256/272.md +0 -53
- package/templates/verify/React/345/210/227/350/241/250/350/241/250/346/240/274.md +0 -43
- package/templates/verify/React/347/212/266/346/200/201/347/256/241/347/220/206.md +0 -42
- package/templates/verify/React/347/273/204/344/273/266.md +0 -42
- package/templates/verify/React/350/241/250/345/215/225.md +0 -43
- package/templates/verify/React/350/267/257/347/224/261.md +0 -43
- package/templates/verify/SOLID/344/273/243/347/240/201/345/256/241/346/237/245.md +0 -74
- package/templates/verify/SOLID/350/256/276/350/256/241.md +0 -31
- package/templates/verify/Schema/345/205/274/345/256/271.md +0 -42
- package/templates/verify/Vue/347/212/266/346/200/201/347/256/241/347/220/206.md +0 -42
- package/templates/verify/Vue/347/273/204/344/273/266.md +0 -42
- package/templates/verify/Vue/350/267/257/347/224/261.md +0 -43
- package/templates/verify//344/270/212/346/270/270/350/256/276/350/256/241/344/272/244/345/217/211/351/252/214/350/257/201/345/256/241/346/237/245.md +0 -76
- package/templates/verify//344/270/273/351/223/276/350/267/257/346/216/245/345/205/245.md +0 -38
- package/templates/verify//344/272/213/344/273/266/351/251/261/345/212/250.md +0 -46
- package/templates/verify//344/272/213/345/212/241/346/250/241/345/274/217.md +0 -42
- package/templates/verify//344/273/243/347/240/201/345/217/257/347/273/264/346/212/244/346/200/247/344/270/216/345/217/257/350/247/202/346/265/213/346/200/247/345/256/241/346/237/245.md +0 -92
- package/templates/verify//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/351/252/214/346/224/266.md +0 -64
- package/templates/verify//344/274/232/350/257/235/346/201/242/345/244/215.md +0 -46
- package/templates/verify//345/206/263/347/255/226/345/256/214/346/225/264/346/200/247/345/256/241/346/237/245.md +0 -71
- package/templates/verify//345/210/206/351/241/265/346/237/245/350/257/242.md +0 -41
- package/templates/verify//345/211/215/347/253/257/351/241/265/351/235/242.md +0 -40
- package/templates/verify//345/216/206/345/217/262/346/225/260/346/215/256/346/270/205/346/264/227/350/204/232/346/234/254.md +0 -55
- package/templates/verify//345/217/221/345/270/203/345/220/216/345/256/241/346/237/245.md +0 -73
- package/templates/verify//345/220/216/347/253/257API.md +0 -39
- package/templates/verify//345/242/236/345/210/240/346/224/271/346/237/245.md +0 -45
- package/templates/verify//345/244/226/351/203/250/344/276/235/350/265/226.md +0 -43
- package/templates/verify//345/245/221/347/272/246/345/205/274/345/256/271.md +0 -42
- package/templates/verify//345/256/232/346/227/266/344/273/273/345/212/241.md +0 -39
- package/templates/verify//345/256/236/346/227/266/346/216/250/351/200/201.md +0 -48
- package/templates/verify//345/256/241/346/237/245/346/221/230/350/246/201.md +0 -58
- package/templates/verify//345/267/245/344/275/234/346/265/201.md +0 -38
- package/templates/verify//345/271/266/345/217/221/345/256/241/346/237/245.md +0 -132
- package/templates/verify//345/274/202/346/255/245/345/257/274/345/207/272.md +0 -41
- package/templates/verify//346/200/247/350/203/275/345/256/241/346/237/245.md +0 -110
- package/templates/verify//346/216/245/345/217/243/345/245/221/347/272/246.md +0 -44
- package/templates/verify//346/216/245/345/217/243/345/245/221/347/272/246/345/256/241/346/237/245.md +0 -131
- package/templates/verify//346/220/234/347/264/242/346/250/241/345/274/217.md +0 -47
- package/templates/verify//346/225/205/351/232/234/345/244/215/347/233/230.md +0 -67
- package/templates/verify//346/225/260/346/215/256/345/272/223/345/217/230/346/233/264.md +0 -37
- package/templates/verify//346/225/260/346/215/256/351/232/220/347/247/201.md +0 -46
- package/templates/verify//346/226/207/344/273/266/344/270/212/344/274/240.md +0 -45
- package/templates/verify//346/227/245/345/277/227.md +0 -45
- package/templates/verify//346/234/254/345/234/260/346/265/217/350/247/210/345/231/250/351/252/214/346/224/266.md +0 -94
- package/templates/verify//346/240/270/345/277/203/345/267/245/347/250/213/346/211/247/350/241/214.md +0 -65
- package/templates/verify//347/237/245/350/257/206/346/263/250/345/205/245.md +0 -38
- package/templates/verify//347/264/247/346/200/245/344/277/256/345/244/215/346/265/201/346/260/264/347/272/277.md +0 -76
- package/templates/verify//347/274/223/345/255/230/347/255/226/347/225/245.md +0 -45
- package/templates/verify//350/201/224/350/260/203/350/256/276/350/256/241/347/274/272/351/231/267/345/210/244/345/256/232.md +0 -67
- package/templates/verify//350/201/224/350/260/203/351/252/214/350/257/201.md +0 -87
- package/templates/verify//350/256/276/350/256/241/345/256/241/350/256/241.md +0 -184
- package/templates/verify//350/257/225/350/277/220/350/241/214/347/206/224/346/226/255.md +0 -74
- package/templates/verify//350/276/223/345/205/245/346/240/241/351/252/214.md +0 -44
- package/templates/verify//351/203/250/347/275/262/345/217/221/345/270/203.md +0 -101
- package/templates/verify//351/224/231/350/257/257/345/244/204/347/220/206.md +0 -46
- package/templates/verify//351/224/231/350/257/257/350/276/271/347/225/214.md +0 -38
- package/templates/verify//351/232/220/347/247/201/345/256/241/346/237/245.md +0 -37
- package/templates/verify//351/252/214/350/257/201.md +0 -38
- package/templates/verify//351/252/214/350/257/201/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -22
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-hard-rule-配置优先级规则
|
|
3
|
-
kind: guidance
|
|
4
|
-
title: 配置优先级
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
triggers:
|
|
8
|
-
- 配置优先级规则
|
|
9
|
-
extra:
|
|
10
|
-
name: configuration-priority
|
|
11
|
-
scope:
|
|
12
|
-
- '*'
|
|
13
|
-
products:
|
|
14
|
-
- '*'
|
|
15
|
-
lifecycle_status: active
|
|
16
|
-
version: 2.0.0
|
|
17
|
-
last_reviewed: '2026-06-03'
|
|
18
|
-
type: constraint
|
|
19
|
-
verification_layer: L2
|
|
20
|
-
stage: _global
|
|
21
|
-
owner_mechanism: mc-config-precedence
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
# 配置优先级规则
|
|
25
|
-
|
|
26
|
-
## 核心约束
|
|
27
|
-
|
|
28
|
-
1. 配置解析采用三层合并(`resolveConfig`),优先级从高到低:
|
|
29
|
-
- **探测层**:从项目文件(`package.json`、`pom.xml`、`go.mod` 等)实时推导
|
|
30
|
-
- **intent 层**:用户在 `.soloforge/intent.yaml` 中显式声明的偏好
|
|
31
|
-
- **框架约定层**:框架 profile 中的默认值(scope、build_commands 等)
|
|
32
|
-
- **全局默认层**:`unknown` / 空字符串 / 空数组
|
|
33
|
-
|
|
34
|
-
2. 可探测字段优先级链(`??` nullish coalescing):
|
|
35
|
-
- `tech_stack`:`fingerprint.backend` ?? `intent.tech_stack.backend` ?? `{ lang: "unknown", framework: "unknown" }`
|
|
36
|
-
- `build_commands`:项目 `scripts` > 框架约定 > `intent.overrides.build_commands` > 空
|
|
37
|
-
- `scope`:`intent.overrides.scope` > 框架约定 `defaultScope` > `["src/"]`
|
|
38
|
-
|
|
39
|
-
3. 不可探测字段优先级链:
|
|
40
|
-
- `product_profile`:`intent.product_profile` ?? `"default"`
|
|
41
|
-
- `delivery`:`intent.delivery` ?? `{ auto_push: false, auto_pr: false }`
|
|
42
|
-
|
|
43
|
-
4. 字段缺失 ≠ 空值:intent.yaml 不存在时 `loadIntent` 返回 `{}`,resolver 用 `??` 填充默认值。
|
|
44
|
-
|
|
45
|
-
5. 探测结果与 intent 声明冲突时,探测胜出。冲突通过 `detectConflicts()` 标记,建议用户移除冗余声明或使用 `overrides` 确认覆盖。
|
|
46
|
-
|
|
47
|
-
## 阻断行为
|
|
48
|
-
|
|
49
|
-
- `tech_stack` 全 `unknown` → 阻断(missing: tech_stack)
|
|
50
|
-
- `build_commands` 全空 → 阻断(missing: build_commands)
|
|
51
|
-
- `scope = []` → 不阻断(blacklist mode)
|
|
52
|
-
- `product_profile = "default"` → 不阻断
|
|
53
|
-
- `delivery` 全 `false` → 不阻断
|
|
54
|
-
|
|
55
|
-
## 适用场景
|
|
56
|
-
|
|
57
|
-
- 项目初始化(`soloforge init`)
|
|
58
|
-
- 配置查看(`sf_doctor check_type=full`)
|
|
59
|
-
- 配置写入(编辑 `intent.yaml`)
|
|
60
|
-
- 配置检查(`sf_doctor check_type=full`)
|
|
61
|
-
- 运行时配置读取(`resolveProjectConfig`)
|
|
62
|
-
|
|
63
|
-
## 违规处理
|
|
64
|
-
|
|
65
|
-
- intent.yaml 声明与探测结果冲突 → warning,建议移除冗余声明或使用 overrides
|
|
66
|
-
- 可探测字段在 intent.yaml 中直接声明 → 允许(标记为过渡性,脚手架完成后可删除)
|
|
67
|
-
- 写入非法字段(`_` 前缀内部字段)→ hard_fail,阻断写入
|
package/templates/shared//351/205/215/347/275/256/350/220/275/347/233/230/350/276/271/347/225/214.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-hard-rule-配置落盘边界规则
|
|
3
|
-
kind: guidance
|
|
4
|
-
title: 配置落盘边界
|
|
5
|
-
owner_mechanism: mc-config-write-boundary
|
|
6
|
-
sync_policy: internal
|
|
7
|
-
status: active
|
|
8
|
-
extra:
|
|
9
|
-
name: configuration-persist-boundary
|
|
10
|
-
scope:
|
|
11
|
-
- '*'
|
|
12
|
-
products:
|
|
13
|
-
- '*'
|
|
14
|
-
type: constraint
|
|
15
|
-
lifecycle_status: active
|
|
16
|
-
version: 1.1.0
|
|
17
|
-
last_reviewed: '2026-06-01'
|
|
18
|
-
verification_layer: L2
|
|
19
|
-
stage: _global
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# 配置落盘边界规则
|
|
23
|
-
|
|
24
|
-
运行时推断、已有项目探测和空项目蓝图必须区分处理。配置解析采用三层合并(探测 > intent.yaml > 框架约定 > 默认),只有用户显式声明的不可探测偏好才写入 intent.yaml。
|
|
25
|
-
|
|
26
|
-
## 硬规则
|
|
27
|
-
|
|
28
|
-
- 运行时推断结果(探测的技术栈、构建命令等)不得自动写入 intent.yaml。
|
|
29
|
-
- intent.yaml 只存储用户显式写入的配置字段,不存储自动探测结果。
|
|
30
|
-
- 已有项目写入 `.soloforge/`、`.mcp.json`、`CLAUDE.md` 或 adapter 配置时必须有用户确认。
|
|
31
|
-
- 空项目初始化可以创建 SoloForge 管理文件。
|
|
32
|
-
- 同步模版不得覆盖用户已修改资产。
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-hard-rule-防孤岛实现规则
|
|
3
|
-
kind: guidance
|
|
4
|
-
title: 防孤岛实现
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
triggers:
|
|
8
|
-
- 防孤岛
|
|
9
|
-
- 主链路
|
|
10
|
-
- 集成接入
|
|
11
|
-
- 模块集成
|
|
12
|
-
- 孤岛模块
|
|
13
|
-
extra:
|
|
14
|
-
name: anti-silo-implementation
|
|
15
|
-
scope:
|
|
16
|
-
- '*'
|
|
17
|
-
products:
|
|
18
|
-
- '*'
|
|
19
|
-
lifecycle_status: active
|
|
20
|
-
version: 1.1.0
|
|
21
|
-
last_reviewed: '2026-06-01'
|
|
22
|
-
type: constraint
|
|
23
|
-
verification_layer: L2
|
|
24
|
-
stage: _global
|
|
25
|
-
owner_mechanism: mc-main-path-integration
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
# 防孤岛实现规则
|
|
29
|
-
|
|
30
|
-
## 核心原则
|
|
31
|
-
|
|
32
|
-
新增生产代码不能只证明"文件存在、单测通过",必须证明它已经进入真实主链路。
|
|
33
|
-
|
|
34
|
-
## 完成定义
|
|
35
|
-
|
|
36
|
-
Done = implemented + wired + reachable + observable + verified
|
|
37
|
-
|
|
38
|
-
## 规则
|
|
39
|
-
|
|
40
|
-
1. 新增 src/ 代码只被测试导入 → hard_fail
|
|
41
|
-
2. enforced 能力无入口链路 → hard_fail
|
|
42
|
-
3. 只有 registry/index export 引用不得标记为 integrated
|
|
43
|
-
4. 已接入模块必须有集成测试证明真实入口能触发
|
|
44
|
-
5. diagnostic_code 必须能由真实路径产出
|
|
45
|
-
|
|
46
|
-
## 验收标准
|
|
47
|
-
|
|
48
|
-
- [ ] 新增模块有 production_imports
|
|
49
|
-
- [ ] entry_traces 包含完整调用链
|
|
50
|
-
- [ ] integration_tests 覆盖真实入口触发
|
|
51
|
-
- [ ] observability_refs 包含可观测证据
|
package/templates/shared//351/233/266/351/205/215/347/275/256/345/210/235/345/247/213/345/214/226.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-hard-rule-项目配置解析规则
|
|
3
|
-
kind: guidance
|
|
4
|
-
title: 零配置初始化
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
triggers:
|
|
8
|
-
- 项目配置解析规则
|
|
9
|
-
extra:
|
|
10
|
-
name: project-config-resolution
|
|
11
|
-
scope:
|
|
12
|
-
- '*'
|
|
13
|
-
products:
|
|
14
|
-
- '*'
|
|
15
|
-
lifecycle_status: active
|
|
16
|
-
version: 2.0.0
|
|
17
|
-
last_reviewed: '2026-06-03'
|
|
18
|
-
type: constraint
|
|
19
|
-
verification_layer: L2
|
|
20
|
-
stage: _global
|
|
21
|
-
owner_mechanism: mc-zero-config-init
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
# 项目配置解析规则
|
|
25
|
-
|
|
26
|
-
## 核心约束
|
|
27
|
-
|
|
28
|
-
1. **三层配置解析**: `resolveConfig` 合并三个配置层:
|
|
29
|
-
- **探测层**(`detectFingerprint`):从项目文件实时推导技术栈、构建命令、scope
|
|
30
|
-
- **intent 层**(`loadIntent`):用户在 `.soloforge/intent.yaml` 中的显式声明
|
|
31
|
-
- **框架约定层**:框架 profile 提供的默认值
|
|
32
|
-
- 探测层优先于 intent 层(探测 > intent > 约定 > 默认)
|
|
33
|
-
|
|
34
|
-
2. **禁止自动落盘**: `resolveConfig` 的结果不自动写入 intent.yaml
|
|
35
|
-
- 技术栈、构建命令等可探测字段由项目文件推导,无需存储
|
|
36
|
-
- 只有用户显式写入的字段才存储到 intent.yaml;自动探测结果(技术栈、构建命令)不写入
|
|
37
|
-
- `--dry-run` 模式始终可用
|
|
38
|
-
|
|
39
|
-
3. **配置来源**:
|
|
40
|
-
- 已有 `.soloforge/intent.yaml` → 合并 intent 声明 + 项目文件探测
|
|
41
|
-
- 仅有 `config.yaml`(旧格式)→ 自动迁移为 intent.yaml(`migrateFromV1`)
|
|
42
|
-
- 两者都不存在 → 纯探测模式(从项目文件推导全部配置)
|
|
43
|
-
|
|
44
|
-
4. **字段缺失语义**: intent.yaml 中缺失的字段 = "未声明",使用探测或默认值填充
|
|
45
|
-
- 不缺失 ≠ 空值,`loadIntent` 不存在时返回 `{}`,resolver 用 `??` 处理
|
|
46
|
-
|
|
47
|
-
5. **配置完整性检查**: `checkConfigReadiness` 阻断场景:
|
|
48
|
-
- `tech_stack` 全 `unknown` → 阻断
|
|
49
|
-
- `build_commands` 全空 → 阻断
|
|
50
|
-
- `scope` / `product_profile` / `delivery` / `repos` → 不阻断
|
|
51
|
-
|
|
52
|
-
## 验证要点
|
|
53
|
-
|
|
54
|
-
- `init` 不创建用户未确认的配置文件
|
|
55
|
-
- 探测结果与实际项目类型一致(内容验证,非文件存在性检查)
|
|
56
|
-
- 空项目使用纯探测模式而非猜测配置
|
|
57
|
-
- 配置冲突(intent 与探测矛盾)通过 `detectConflicts` 正确标记
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-hard-rule-验收模版输出契约规则
|
|
3
|
-
kind: guidance
|
|
4
|
-
title: 验收模版输出契约
|
|
5
|
-
owner_mechanism: mc-standard-asset-contract
|
|
6
|
-
sync_policy: internal
|
|
7
|
-
status: active
|
|
8
|
-
extra:
|
|
9
|
-
name: acceptance-template-output-contract
|
|
10
|
-
scope:
|
|
11
|
-
- '*'
|
|
12
|
-
products:
|
|
13
|
-
- '*'
|
|
14
|
-
type: constraint
|
|
15
|
-
lifecycle_status: active
|
|
16
|
-
version: 1.1.0
|
|
17
|
-
last_reviewed: '2026-06-01'
|
|
18
|
-
verification_layer: L2
|
|
19
|
-
stage: _global
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# 验收模版输出契约规则
|
|
23
|
-
|
|
24
|
-
## 触发条件
|
|
25
|
-
|
|
26
|
-
当任务产出正式设计文档、架构设计、数据库设计、API 接口规格、原型说明或验收报告时,必须按标准资产契约验收。
|
|
27
|
-
|
|
28
|
-
## 适用范围
|
|
29
|
-
|
|
30
|
-
- 架构设计文档(01-架构设计文档.md)
|
|
31
|
-
- 数据库设计文档(design/01-数据库设计文档.md)
|
|
32
|
-
- API 接口规格(design/02-API接口规格文档.md)
|
|
33
|
-
- 设计一致性验收报告(audits/01-设计一致性验收报告.md)
|
|
34
|
-
- 原型说明文档
|
|
35
|
-
|
|
36
|
-
## 契约要求
|
|
37
|
-
|
|
38
|
-
每个 P0 模版输出必须满足:
|
|
39
|
-
|
|
40
|
-
1. **章节检查**: 必填章节存在、顺序合理、不得只有空标题。
|
|
41
|
-
2. **表格检查**: 必填表格存在、表头正确、行内容覆盖必要对象。
|
|
42
|
-
3. **字段检查**: API/数据/追踪字段具备类型、必填、来源、说明、示例、校验规则、错误语义。
|
|
43
|
-
4. **权威资产检查**: 必须引用并对齐 OpenAPI、SQL/migration 等机器权威资产。
|
|
44
|
-
5. **语义检查**: Mermaid 图、字段、实体与当前业务相关,不得用无关内容凑数。
|
|
45
|
-
|
|
46
|
-
## API 字段表最小列
|
|
47
|
-
|
|
48
|
-
字段名 / 类型 / 必填 / 来源 / 说明 / 示例 / 校验规则 / 错误语义
|
|
49
|
-
|
|
50
|
-
## Mermaid 检查规则
|
|
51
|
-
|
|
52
|
-
- fence 语法合法。
|
|
53
|
-
- 图类型符合模版要求(sequenceDiagram、flowchart 等)。
|
|
54
|
-
- 图内容与当前业务相关。
|
|
55
|
-
|
|
56
|
-
## 修复闭环
|
|
57
|
-
|
|
58
|
-
模版契约验收失败必须进入修复重验:
|
|
59
|
-
|
|
60
|
-
1. sf_gate 报告缺口和诊断码。
|
|
61
|
-
2. 修复后重新 sf_gate。
|
|
62
|
-
3. 仍然失败则继续循环或请求用户确认。
|
|
63
|
-
4. 修复期间交付被阻断。
|
|
64
|
-
|
|
65
|
-
## 草稿状态
|
|
66
|
-
|
|
67
|
-
草稿必须显式标记 `draft`、`not_for_implementation` 或 `needs_template_verification`。草稿不进入编码消费。
|
|
68
|
-
|
|
69
|
-
## 低风险跳过
|
|
70
|
-
|
|
71
|
-
普通 bugfix、样式修复、只读解释和小范围改动不触发模版契约验收。
|
package/templates/shared//351/252/214/350/257/201/345/221/275/344/273/244/347/224/237/346/210/220.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-pattern-verify_command_generation
|
|
3
|
-
kind: knowledge
|
|
4
|
-
title: 验证命令生成
|
|
5
|
-
sync_policy: internal
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: verify_command_generation
|
|
9
|
-
scope:
|
|
10
|
-
- '*'
|
|
11
|
-
products:
|
|
12
|
-
- '*'
|
|
13
|
-
lifecycle_status: active
|
|
14
|
-
version: 1.1.0
|
|
15
|
-
last_reviewed: '2026-06-01'
|
|
16
|
-
type: knowledge
|
|
17
|
-
verification_layer: L2
|
|
18
|
-
stage: _global
|
|
19
|
-
owner_mechanism: mc-engine-runtime
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 决策规则
|
|
23
|
-
|
|
24
|
-
- generateVerifyCommands 根据项目类型生成编译和测试命令
|
|
25
|
-
- 三个分支: config(有 intent.yaml)、doc-only(无代码项目)、repo(标准项目)
|
|
26
|
-
- repo 分支通过 resolveConfig 推导技术栈和构建命令
|
|
27
|
-
- config 分支使用 intent.yaml 中的 overrides.build_commands 覆盖框架约定
|
|
28
|
-
- 生成的命令必须可执行,且覆盖编译 + 测试两个阶段
|
|
29
|
-
- 边界项目(无 package.json)必须有 fallback 处理
|
|
30
|
-
|
|
31
|
-
## 验收项
|
|
32
|
-
|
|
33
|
-
- [AC-01] config/doc-only/repo 三分支覆盖
|
|
34
|
-
- [AC-02] 生成的命令格式正确
|
|
35
|
-
- [AC-03] 边界项目有 fallback
|
|
36
|
-
- [AC-04] 自定义命令模版覆盖默认命令
|
|
37
|
-
|
|
38
|
-
## 何时使用
|
|
39
|
-
|
|
40
|
-
编译和测试命令是质量门禁的基础
|
|
41
|
-
|
|
42
|
-
## 是否 hard block
|
|
43
|
-
|
|
44
|
-
是。此能力为 enforced 状态,违规即 hard fail 阻断流程。
|
|
45
|
-
|
|
46
|
-
## 证据要求
|
|
47
|
-
|
|
48
|
-
- config/doc-only/repo 三分支测试通过
|
|
49
|
-
- 边界项目(无 package.json)验证通过
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
## 人工确认/降级边界
|
|
53
|
-
|
|
54
|
-
- enforced 能力不可跳过,违反即阻断
|
|
55
|
-
- 降级需经 治理运行时 + 人工确认,提供 escape report 证据
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-hard-rule-验证契约规则
|
|
3
|
-
kind: guidance
|
|
4
|
-
title: 验证契约
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
triggers:
|
|
8
|
-
- 验证契约规则
|
|
9
|
-
extra:
|
|
10
|
-
name: verification-contract
|
|
11
|
-
scope:
|
|
12
|
-
- '*'
|
|
13
|
-
products:
|
|
14
|
-
- '*'
|
|
15
|
-
lifecycle_status: active
|
|
16
|
-
version: 1.1.0
|
|
17
|
-
last_reviewed: '2026-06-01'
|
|
18
|
-
type: constraint
|
|
19
|
-
verification_layer: L2
|
|
20
|
-
stage: _global
|
|
21
|
-
owner_mechanism: mc-verifier
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
# 验证契约规则
|
|
25
|
-
|
|
26
|
-
## 核心原则
|
|
27
|
-
|
|
28
|
-
验证策略由 execution_shape 决定,不同执行形态使用不同验证强度。
|
|
29
|
-
|
|
30
|
-
## 验证策略
|
|
31
|
-
|
|
32
|
-
1. **code_execution**: 完整 build + test
|
|
33
|
-
2. **single_artifact/source_extraction**: 轻量检查
|
|
34
|
-
3. **direct_answer**: 无需验证
|
|
35
|
-
|
|
36
|
-
## 规则
|
|
37
|
-
|
|
38
|
-
1. 验证结果必须保存到 task_context 才能标记 done/learning
|
|
39
|
-
2. evidence level 必须达到 E1 以上
|
|
40
|
-
3. 验证命令必须覆盖所有 changed_files
|
|
41
|
-
4. 验证失败时进入 repair_reverify 循环
|
|
42
|
-
|
|
43
|
-
## 验收标准
|
|
44
|
-
|
|
45
|
-
- [ ] generateVerifyCommands 根据 execution_shape 选择策略
|
|
46
|
-
- [ ] VerifyResult 包含 evidence 和 coverage
|
|
47
|
-
- [ ] 验证结果保存到 task_context
|
|
48
|
-
- [ ] repair_reverify 循环有 max_attempts 限制
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-pattern-docker-deployment
|
|
3
|
-
kind: knowledge
|
|
4
|
-
title: Docker部署
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: docker-deployment
|
|
9
|
-
scope:
|
|
10
|
-
- backend
|
|
11
|
-
- frontend
|
|
12
|
-
products:
|
|
13
|
-
- '*'
|
|
14
|
-
lifecycle_status: active
|
|
15
|
-
version: 1.1.0
|
|
16
|
-
last_reviewed: '2026-06-01'
|
|
17
|
-
type: knowledge
|
|
18
|
-
domain: verify
|
|
19
|
-
verification_layer: L2
|
|
20
|
-
stage: verify
|
|
21
|
-
owner_mechanism: mc-general-pattern
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## 决策规则
|
|
25
|
-
- 每次部署必须从源码全新构建镜像,禁止 docker commit、容器内文件编辑、docker exec 安装依赖
|
|
26
|
-
- Bug 修复后必须重新构建镜像并重新部署后再验证,禁止在旧容器中验证修复
|
|
27
|
-
- 前端禁止复制预构建的 dist/ 目录,必须在 Dockerfile 内完成构建
|
|
28
|
-
- docker compose up 必须能一键启动所有服务并通过健康检查
|
|
29
|
-
- 若浏览器验证发现容器未运行当前代码,必须自动重建并重新部署
|
|
30
|
-
- Dockerfile 必须使用多阶段构建(build → runtime),禁止在最终镜像中包含构建工具和源码
|
|
31
|
-
- 容器必须配置 HEALTHCHECK 指令,编排工具(K8s/Docker Compose)依赖健康检查做流量管理
|
|
32
|
-
- 容器必须设置资源限制(memory limit、CPU limit),防止单个容器耗尽主机资源
|
|
33
|
-
- 镜像版本禁止使用 :latest 标签部署,必须指定明确版本号(如 :1.2.3)
|
|
34
|
-
- 敏感配置(密码、密钥)禁止写入 Dockerfile 或镜像,必须通过环境变量或 Secret 注入
|
|
35
|
-
- 容器必须以非 root 用户运行(USER app),禁止默认 root 运行
|
|
36
|
-
|
|
37
|
-
## 验收项
|
|
38
|
-
- [AC-01] 镜像从源码全新构建
|
|
39
|
-
- [AC-02] 无 docker commit 或热补丁
|
|
40
|
-
- [AC-03] docker compose 一键启动通过健康检查
|
|
41
|
-
- [AC-04] 修复后重建镜像再验证
|
|
42
|
-
- [AC-05] 多阶段构建
|
|
43
|
-
- [AC-06] 有 HEALTHCHECK 配置
|
|
44
|
-
- [AC-07] 镜像指定版本号(非 latest)
|
|
45
|
-
- [AC-08] 敏感配置通过环境变量/Secret 注入
|
|
46
|
-
- [AC-09] 非 root 用户运行
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-artifact_template-POC结论模版
|
|
3
|
-
kind: artifact
|
|
4
|
-
title: POC结论
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: poc-conclusion
|
|
9
|
-
scope:
|
|
10
|
-
- backend
|
|
11
|
-
- frontend
|
|
12
|
-
products:
|
|
13
|
-
- '*'
|
|
14
|
-
lifecycle_status: active
|
|
15
|
-
version: 1.1.0
|
|
16
|
-
last_reviewed: '2026-06-01'
|
|
17
|
-
type: artifact
|
|
18
|
-
domain: verify
|
|
19
|
-
stage: verify
|
|
20
|
-
owner_mechanism: mc-generic-artifact
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
# POC 结论报告
|
|
24
|
-
|
|
25
|
-
## 1. 验证目标
|
|
26
|
-
- 核心验证问题:
|
|
27
|
-
- 成功标准:
|
|
28
|
-
|
|
29
|
-
## 2. 候选方案
|
|
30
|
-
| 方案 | 版本 | 许可证 | 社区活跃度 |
|
|
31
|
-
|------|------|--------|-----------|
|
|
32
|
-
| A | | | |
|
|
33
|
-
| B | | | |
|
|
34
|
-
|
|
35
|
-
## 3. 评估维度
|
|
36
|
-
| 维度 | 权重 | 方案A评分 | 方案B评分 | 说明 |
|
|
37
|
-
|------|------|----------|----------|------|
|
|
38
|
-
| 性能 | | | | |
|
|
39
|
-
| 易用性 | | | | |
|
|
40
|
-
| 生态兼容 | | | | |
|
|
41
|
-
| 学习成本 | | | | |
|
|
42
|
-
| 维护成本 | | | | |
|
|
43
|
-
|
|
44
|
-
## 4. 关键发现
|
|
45
|
-
- 发现的技术限制:
|
|
46
|
-
- 遇到的坑和解决方案:
|
|
47
|
-
- 性能基准数据:
|
|
48
|
-
|
|
49
|
-
## 5. 结论
|
|
50
|
-
- **推荐方案**:
|
|
51
|
-
- **推荐理由**:
|
|
52
|
-
- **遗留风险**:
|
|
53
|
-
- **后续关注点**:
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-pattern-react-list-table
|
|
3
|
-
kind: knowledge
|
|
4
|
-
title: React列表表格
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: react-list-table
|
|
9
|
-
scope:
|
|
10
|
-
- frontend
|
|
11
|
-
products:
|
|
12
|
-
- '*'
|
|
13
|
-
lifecycle_status: active
|
|
14
|
-
version: 1.1.0
|
|
15
|
-
last_reviewed: '2026-06-01'
|
|
16
|
-
type: knowledge
|
|
17
|
-
domain: verify
|
|
18
|
-
verification_layer: L2
|
|
19
|
-
stage: verify
|
|
20
|
-
owner_mechanism: mc-frontend-pattern
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 决策规则
|
|
24
|
-
- 必须使用后端分页,禁止前端对全量数据做分页
|
|
25
|
-
- 列定义必须独立于页面组件(columns.tsx 或配置对象)
|
|
26
|
-
- 删除操作必须有二次确认弹窗
|
|
27
|
-
- 搜索触发后必须自动重置到第一页
|
|
28
|
-
- 工具栏操作(批量删除、导出)必须有 loading 状态
|
|
29
|
-
- 表格数据加载必须使用服务端分页和排序,禁止全量加载前端分页
|
|
30
|
-
- 表格必须有 loading 骨架屏和空状态提示,不能只显示空白
|
|
31
|
-
- 表格操作列按钮必须有二次确认(删除等危险操作)
|
|
32
|
-
- 表格列定义必须抽取为独立配置(columns 数组),禁止写在 JSX 模版中
|
|
33
|
-
- 表格行选择和批量操作必须有明确的已选计数和清空功能
|
|
34
|
-
|
|
35
|
-
## 验收项
|
|
36
|
-
- [AC-01] 使用后端分页,前端不缓存全量数据
|
|
37
|
-
- [AC-02] 列定义独立于页面组件
|
|
38
|
-
- [AC-03] 删除操作有确认弹窗
|
|
39
|
-
- [AC-04] 搜索触发后重置到第一页
|
|
40
|
-
- [AC-05] 服务端分页排序
|
|
41
|
-
- [AC-06] loading/空状态处理
|
|
42
|
-
- [AC-07] 危险操作二次确认
|
|
43
|
-
- [AC-08] 批量操作有已选计数
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-pattern-react-state-management
|
|
3
|
-
kind: knowledge
|
|
4
|
-
title: React状态管理
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: react-state-management
|
|
9
|
-
scope:
|
|
10
|
-
- frontend
|
|
11
|
-
products:
|
|
12
|
-
- '*'
|
|
13
|
-
lifecycle_status: active
|
|
14
|
-
version: 1.1.0
|
|
15
|
-
last_reviewed: '2026-06-01'
|
|
16
|
-
type: knowledge
|
|
17
|
-
domain: verify
|
|
18
|
-
verification_layer: L2
|
|
19
|
-
stage: verify
|
|
20
|
-
owner_mechanism: mc-frontend-pattern
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 决策规则
|
|
24
|
-
- 组件内状态用 useState,禁止滥用全局 Context
|
|
25
|
-
- 跨组件共享状态用 Context + useReducer,禁止 props 层层传递超过 3 层
|
|
26
|
-
- 全局持久化状态(用户、权限)通过 Context + localStorage 提供
|
|
27
|
-
- API 数据必须在 custom hook 中局部管理,禁止存入全局 store
|
|
28
|
-
- 禁止引入 Redux/Zustand 除非项目已有约定
|
|
29
|
-
- 全局状态必须使用状态管理库(Zustand/Redux/Jotai),禁止通过 props drilling 传递超过 2 层
|
|
30
|
-
- 服务端状态必须使用 TanStack Query/SWR 管理,禁止手动 useState + useEffect 获取数据
|
|
31
|
-
- 状态更新必须使用不可变方式(immer/spread),禁止直接 mutate state
|
|
32
|
-
- 全局状态必须按领域分片(slice/store),禁止单个巨大 store 包含所有数据
|
|
33
|
-
- 持久化状态(如用户偏好)必须序列化到 localStorage,应用启动时恢复
|
|
34
|
-
|
|
35
|
-
## 验收项
|
|
36
|
-
- [AC-01] 组件内状态用 useState,未滥用 Context
|
|
37
|
-
- [AC-02] 全局状态通过 Context 提供
|
|
38
|
-
- [AC-03] API 数据在 custom hook 中管理
|
|
39
|
-
- [AC-04] 无 useEffect 依赖项导致的无限循环
|
|
40
|
-
- [AC-05] 全局状态使用状态管理库
|
|
41
|
-
- [AC-06] 服务端状态使用 TanStack Query
|
|
42
|
-
- [AC-07] 状态更新不可变方式
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-pattern-react-component
|
|
3
|
-
kind: knowledge
|
|
4
|
-
title: React组件
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: react-component
|
|
9
|
-
scope:
|
|
10
|
-
- frontend
|
|
11
|
-
products:
|
|
12
|
-
- '*'
|
|
13
|
-
lifecycle_status: active
|
|
14
|
-
version: 1.1.0
|
|
15
|
-
last_reviewed: '2026-06-01'
|
|
16
|
-
type: knowledge
|
|
17
|
-
domain: verify
|
|
18
|
-
verification_layer: L2
|
|
19
|
-
stage: verify
|
|
20
|
-
owner_mechanism: mc-frontend-pattern
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 决策规则
|
|
24
|
-
- 必须使用函数组件 + TypeScript,禁止 class 组件
|
|
25
|
-
- 组件超过 200 行必须拆分为子组件或提取自定义 Hook
|
|
26
|
-
- Props 必须定义 interface,禁止使用 any
|
|
27
|
-
- 副作用逻辑必须封装在自定义 Hook 中,组件内只保留渲染和事件处理
|
|
28
|
-
- 禁止在组件中直接调用 axios/fetch,必须通过 service 层
|
|
29
|
-
- 组件必须使用函数式组件 + Hooks,禁止新写 class 组件
|
|
30
|
-
- 组件 Props 必须使用 TypeScript interface 定义,禁止使用 any 或省略类型
|
|
31
|
-
- 自定义 Hook 必须以 use 前缀命名(如 useAuth、useForm),且内部必须调用其他 Hook
|
|
32
|
-
- 组件必须有 displayName 或文件名可推断用途,禁止 Default、Index 等无意义命名
|
|
33
|
-
- 复杂组件必须拆分为 Container + Presentational 模式,逻辑与渲染分离
|
|
34
|
-
|
|
35
|
-
## 验收项
|
|
36
|
-
- [AC-01] 组件为函数式 + TypeScript
|
|
37
|
-
- [AC-02] Props 有 interface 类型定义
|
|
38
|
-
- [AC-03] 组件不超过 200 行
|
|
39
|
-
- [AC-04] 数据请求通过 service 层或 Hook
|
|
40
|
-
- [AC-05] 使用函数式组件
|
|
41
|
-
- [AC-06] Props 有 TypeScript 类型定义
|
|
42
|
-
- [AC-07] 自定义 Hook 以 use 前缀命名
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ka-pattern-react-form-handling
|
|
3
|
-
kind: knowledge
|
|
4
|
-
title: React表单
|
|
5
|
-
sync_policy: copy_to_project
|
|
6
|
-
status: active
|
|
7
|
-
extra:
|
|
8
|
-
name: react-form-handling
|
|
9
|
-
scope:
|
|
10
|
-
- frontend
|
|
11
|
-
products:
|
|
12
|
-
- '*'
|
|
13
|
-
lifecycle_status: active
|
|
14
|
-
version: 1.1.0
|
|
15
|
-
last_reviewed: '2026-06-01'
|
|
16
|
-
type: knowledge
|
|
17
|
-
domain: verify
|
|
18
|
-
verification_layer: L2
|
|
19
|
-
stage: verify
|
|
20
|
-
owner_mechanism: mc-frontend-pattern
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 决策规则
|
|
24
|
-
- 必须使用 Ant Design Form 组件,禁止手动管理每个字段的 value/onChange
|
|
25
|
-
- 校验规则必须写在 Form.Item rules 中,禁止散落在 submit 逻辑里
|
|
26
|
-
- 提交按钮必须有 loading 状态防止重复提交
|
|
27
|
-
- 新建和编辑必须共用同一表单组件,通过 initialValues 区分
|
|
28
|
-
- 必填字段必须有 rules + message 提示
|
|
29
|
-
- 复杂表单必须使用表单库(React Hook Form / Formik),禁止手动管理每个字段状态
|
|
30
|
-
- 表单校验必须使用 schema 校验(Zod / Yup),禁止分散的 if-else 校验
|
|
31
|
-
- 表单提交必须处理 loading/success/error 三态,禁止只处理成功
|
|
32
|
-
- 表单必须支持编辑回填(传入 initial values),新增和编辑共用同一组件
|
|
33
|
-
- 长表单必须分步骤(Step Form),每步校验通过后才进入下一步
|
|
34
|
-
|
|
35
|
-
## 验收项
|
|
36
|
-
- [AC-01] 表单使用 Ant Design Form 组件
|
|
37
|
-
- [AC-02] 必填字段有校验规则和提示信息
|
|
38
|
-
- [AC-03] 提交按钮有 loading 防重复
|
|
39
|
-
- [AC-04] 新建和编辑共用同一组件
|
|
40
|
-
- [AC-05] 使用表单库管理
|
|
41
|
-
- [AC-06] Schema 校验
|
|
42
|
-
- [AC-07] 提交处理三态
|
|
43
|
-
- [AC-08] 新增/编辑共用组件
|