soloforge 1.1.46 → 1.1.47
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 +12 -0
- package/dist/context/adapters/shared/integration_guide.js +3 -1
- package/dist/context/adapters/shared/integration_guide.js.map +1 -1
- package/dist/core/gate_record_store.d.ts +11 -7
- package/dist/core/gate_record_store.d.ts.map +1 -1
- package/dist/core/gate_record_store.js +31 -17
- package/dist/core/gate_record_store.js.map +1 -1
- package/dist/core/observer.d.ts.map +1 -1
- package/dist/core/observer.js +7 -4
- package/dist/core/observer.js.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 +5 -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 +3 -2
- package/dist/domain/build/engine.d.ts.map +1 -1
- package/dist/domain/build/engine.js +5 -2
- package/dist/domain/build/engine.js.map +1 -1
- package/dist/domain/design/contract.d.ts.map +1 -1
- package/dist/domain/design/contract.js +2 -31
- package/dist/domain/design/contract.js.map +1 -1
- package/dist/domain/design/engine.d.ts +3 -2
- package/dist/domain/design/engine.d.ts.map +1 -1
- package/dist/domain/design/engine.js +5 -2
- package/dist/domain/design/engine.js.map +1 -1
- package/dist/domain/engine_helpers.d.ts +18 -2
- package/dist/domain/engine_helpers.d.ts.map +1 -1
- package/dist/domain/engine_helpers.js +87 -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 +3 -2
- package/dist/domain/operate/engine.d.ts.map +1 -1
- package/dist/domain/operate/engine.js +5 -2
- package/dist/domain/operate/engine.js.map +1 -1
- package/dist/domain/verify/engine.d.ts +3 -2
- package/dist/domain/verify/engine.d.ts.map +1 -1
- package/dist/domain/verify/engine.js +5 -2
- package/dist/domain/verify/engine.js.map +1 -1
- package/dist/gate/executors/executors_artifact.d.ts.map +1 -1
- package/dist/gate/executors/executors_artifact.js +8 -5
- package/dist/gate/executors/executors_artifact.js.map +1 -1
- package/dist/gate/executors/executors_prerequisite.d.ts.map +1 -1
- package/dist/gate/executors/executors_prerequisite.js +26 -6
- package/dist/gate/executors/executors_prerequisite.js.map +1 -1
- package/dist/gate/executors/executors_regex_scan.js +2 -2
- package/dist/gate/executors/executors_regex_scan.js.map +1 -1
- package/dist/gate/executors/executors_trace.d.ts.map +1 -1
- package/dist/gate/executors/executors_trace.js +2 -0
- package/dist/gate/executors/executors_trace.js.map +1 -1
- package/dist/gate/gate_registry_bridge.d.ts +7 -6
- package/dist/gate/gate_registry_bridge.d.ts.map +1 -1
- package/dist/gate/gate_registry_bridge.js +51 -13
- package/dist/gate/gate_registry_bridge.js.map +1 -1
- package/dist/server/tools/sf_doctor.d.ts +1 -0
- package/dist/server/tools/sf_doctor.d.ts.map +1 -1
- package/dist/server/tools/sf_doctor.js +15 -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_work.d.ts.map +1 -1
- package/dist/server/tools/sf_work.js +18 -6
- package/dist/server/tools/sf_work.js.map +1 -1
- package/package.json +2 -1
- package/templates/build/enforced.md +73 -0
- 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/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 +26 -24
- package/templates/build//347/274/226/347/240/201/347/272/252/345/276/213.md +75 -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 +31 -28
- package/templates/design/enforced.md +47 -77
- 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 +1 -0
- 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 +49 -55
- 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 +33 -47
- package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241.md +41 -83
- package/templates/design//351/234/200/346/261/202/345/210/206/346/236/220.md +31 -59
- package/templates/operate/enforced.md +11 -0
- 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 +3 -0
- package/templates/operate//351/203/250/347/275/262/351/205/215/347/275/256.md +83 -0
- package/templates/shared/enforced.md +46 -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/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//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 +3 -0
- 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 +45 -87
- package/templates/verify//344/273/243/347/240/201/345/256/241/346/237/245/346/212/245/345/221/212.md +7 -0
- package/templates/verify//345/256/241/346/237/245/346/270/205/345/215/225.md +79 -0
- package/templates/verify//351/252/214/350/257/201/346/226/271/346/263/225.md +72 -0
- 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
|
@@ -5,6 +5,8 @@ gate: build-gate
|
|
|
5
5
|
title: build阶段强制检查清单
|
|
6
6
|
sync_policy: engine_only
|
|
7
7
|
status: active
|
|
8
|
+
extra:
|
|
9
|
+
owner_mechanism: mc-stage-gate-engine
|
|
8
10
|
checks:
|
|
9
11
|
- id: TS-Q01
|
|
10
12
|
executor: regex_pattern_scan
|
|
@@ -166,6 +168,77 @@ checks:
|
|
|
166
168
|
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无未校验 JWT 命中)"]
|
|
167
169
|
gate: build-gate
|
|
168
170
|
target: "self"
|
|
171
|
+
# —— 代码架构检查(从 design-gate 迁入,代码实现阶段归属)——
|
|
172
|
+
- id: ARC-01
|
|
173
|
+
executor: regex_pattern_scan
|
|
174
|
+
rule: "Controller 禁止包含业务逻辑(计算/校验等应下沉 Service)"
|
|
175
|
+
severity: error
|
|
176
|
+
check_type: deterministic
|
|
177
|
+
pattern: '/\bclass\s+\w*Controller\b[\s\S]{0,500}\b(if|for|while|calculate|compute)\s*\(/'
|
|
178
|
+
languages: [java]
|
|
179
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无 Controller 含业务逻辑命中)"]
|
|
180
|
+
gate: build-gate
|
|
181
|
+
target: "self"
|
|
182
|
+
- id: ARC-02
|
|
183
|
+
executor: regex_pattern_scan
|
|
184
|
+
rule: "禁止 Entity 直接暴露给外部接口,必须用 DTO"
|
|
185
|
+
severity: error
|
|
186
|
+
check_type: deterministic
|
|
187
|
+
pattern: '/\bpublic\s+\w*Entity\b\s+\w+\s*\(/'
|
|
188
|
+
languages: [java]
|
|
189
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无 Entity 直接暴露命中)"]
|
|
190
|
+
gate: build-gate
|
|
191
|
+
target: "self"
|
|
192
|
+
- id: ARC-03
|
|
193
|
+
executor: regex_pattern_scan
|
|
194
|
+
rule: "写操作(save/create/update/delete)必须有 @Transactional"
|
|
195
|
+
severity: error
|
|
196
|
+
check_type: deterministic
|
|
197
|
+
pattern: '/\.(save|insert|update|delete|remove|create)\s*\(/'
|
|
198
|
+
languages: [java]
|
|
199
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无写操作缺事务命中)"]
|
|
200
|
+
gate: build-gate
|
|
201
|
+
target: "self"
|
|
202
|
+
- id: ARC-04
|
|
203
|
+
executor: regex_pattern_scan
|
|
204
|
+
rule: "禁止直接 new Service/Repository/Mapper/Manager,必须依赖注入"
|
|
205
|
+
severity: error
|
|
206
|
+
check_type: deterministic
|
|
207
|
+
pattern: '/\bnew\s+\w*(Service|Repository|Repo|Dao|Mapper|Manager)\s*\(/'
|
|
208
|
+
languages: [java]
|
|
209
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无直接 new 服务对象命中)"]
|
|
210
|
+
gate: build-gate
|
|
211
|
+
target: "self"
|
|
212
|
+
- id: ARC-06
|
|
213
|
+
executor: regex_pattern_scan
|
|
214
|
+
rule: "前端 API 调用必须封装到 service 层,禁止组件内直接 fetch/axios"
|
|
215
|
+
severity: error
|
|
216
|
+
check_type: deterministic
|
|
217
|
+
pattern: '/\b(fetch|axios)\s*\(/'
|
|
218
|
+
languages: [ts]
|
|
219
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无组件直接 API 调用命中)"]
|
|
220
|
+
gate: build-gate
|
|
221
|
+
target: "self"
|
|
222
|
+
- id: ARC-07
|
|
223
|
+
executor: regex_pattern_scan
|
|
224
|
+
rule: "禁止 @Autowired + @Lazy 循环依赖"
|
|
225
|
+
severity: error
|
|
226
|
+
check_type: deterministic
|
|
227
|
+
pattern: '/@Autowired[\s\S]{0,50}@Lazy|@Lazy[\s\S]{0,50}@Autowired/'
|
|
228
|
+
languages: [java]
|
|
229
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无循环依赖命中)"]
|
|
230
|
+
gate: build-gate
|
|
231
|
+
target: "self"
|
|
232
|
+
- id: ARC-08
|
|
233
|
+
executor: regex_pattern_scan
|
|
234
|
+
rule: "Service 层禁止直接操作 HttpServletRequest/Response"
|
|
235
|
+
severity: error
|
|
236
|
+
check_type: deterministic
|
|
237
|
+
pattern: '/\bHttpServletRequest\b|\bHttpServletResponse\b/'
|
|
238
|
+
languages: [java]
|
|
239
|
+
evidence_required: ["regex_pattern_scan 扫描结果(git diff 变更文件无 Service 操作 HttpServlet 命中)"]
|
|
240
|
+
gate: build-gate
|
|
241
|
+
target: "self"
|
|
169
242
|
- id: BLD-G01
|
|
170
243
|
executor: upstream_gate_check
|
|
171
244
|
rule: "design-gate 已通过,所有前置设计产物完备"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ka-guidance-专项实现
|
|
3
|
+
kind: guidance
|
|
4
|
+
title: 专项实现
|
|
5
|
+
sync_policy: copy_to_project
|
|
6
|
+
status: active
|
|
7
|
+
triggers:
|
|
8
|
+
- 数据库迁移
|
|
9
|
+
- 接口集成
|
|
10
|
+
- 性能优化
|
|
11
|
+
- 性能分析
|
|
12
|
+
- 异步
|
|
13
|
+
- 缓存
|
|
14
|
+
- 定时任务
|
|
15
|
+
- 文件上传
|
|
16
|
+
extra:
|
|
17
|
+
name: specialized-implementation
|
|
18
|
+
scope:
|
|
19
|
+
- '*'
|
|
20
|
+
products:
|
|
21
|
+
- '*'
|
|
22
|
+
type: procedure
|
|
23
|
+
lifecycle_status: active
|
|
24
|
+
version: 1.0.0
|
|
25
|
+
last_reviewed: '2026-06-17'
|
|
26
|
+
verification_layer: L2
|
|
27
|
+
stage: build
|
|
28
|
+
domain: build
|
|
29
|
+
owner_mechanism: mc-backend-pattern
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# 专项实现:特定场景怎么做
|
|
33
|
+
|
|
34
|
+
> 吸收旧的「数据库迁移」「接口集成流水线」「性能分析」「性能流水线」「缓存策略」「异步导出」等。
|
|
35
|
+
> 按需注入,不强制全套。
|
|
36
|
+
|
|
37
|
+
## 数据库迁移
|
|
38
|
+
|
|
39
|
+
- migration 脚本成对(up + down),可回滚
|
|
40
|
+
- 大表变更评估锁表影响,分批/在线 DDL
|
|
41
|
+
- 数据迁移新老比对,回滚后一致性验证
|
|
42
|
+
- 详见 [[兼容性与迁移评估]]
|
|
43
|
+
|
|
44
|
+
## 接口集成
|
|
45
|
+
|
|
46
|
+
- 接口契约先行(OpenAPI),契约评审后再实现
|
|
47
|
+
- 字段映射精确到 表.字段
|
|
48
|
+
- 对接外部系统考虑超时/重试/幂等/签名
|
|
49
|
+
- 异常路径明确(对方不可用怎么办)
|
|
50
|
+
|
|
51
|
+
## 性能优化
|
|
52
|
+
|
|
53
|
+
- 先测量后优化(性能分析数据为证据,不靠猜)
|
|
54
|
+
- 优化目标量化(如 P99 < 200ms)
|
|
55
|
+
- 关注 N+1 查询、大循环、不必要序列化
|
|
56
|
+
- 缓存考虑一致性/失效/穿透/雪崩
|
|
57
|
+
|
|
58
|
+
## 异步与定时
|
|
59
|
+
|
|
60
|
+
- 异步任务幂等(可重试不重复执行)
|
|
61
|
+
- 定时任务考虑并发执行/分布式锁
|
|
62
|
+
- 长任务可中断、可观测进度
|
|
63
|
+
|
|
64
|
+
## 文件上传/导出
|
|
65
|
+
|
|
66
|
+
- 限制类型/大小,校验内容(防恶意文件)
|
|
67
|
+
- 大文件流式处理/分片,不一次性进内存
|
|
68
|
+
- 导出异步化,提供进度查询
|
|
69
|
+
|
|
70
|
+
## 禁止
|
|
71
|
+
|
|
72
|
+
- 迁移脚本无回滚(违规)
|
|
73
|
+
- 接口集成不定义契约(违规)
|
|
74
|
+
- 性能优化无测量证据(违规,[[证据驱动与反幻觉]])
|
|
75
|
+
- 异步任务不幂等(违规)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ka-guidance-安全加固
|
|
3
|
+
kind: guidance
|
|
4
|
+
title: 安全加固
|
|
5
|
+
sync_policy: copy_to_project
|
|
6
|
+
status: active
|
|
7
|
+
triggers:
|
|
8
|
+
- 安全
|
|
9
|
+
- 权限
|
|
10
|
+
- 认证
|
|
11
|
+
- 授权
|
|
12
|
+
- 加固
|
|
13
|
+
- 鉴权
|
|
14
|
+
- 熔断
|
|
15
|
+
- 限流
|
|
16
|
+
extra:
|
|
17
|
+
name: security-hardening
|
|
18
|
+
scope:
|
|
19
|
+
- '*'
|
|
20
|
+
products:
|
|
21
|
+
- '*'
|
|
22
|
+
type: procedure
|
|
23
|
+
lifecycle_status: active
|
|
24
|
+
version: 1.0.0
|
|
25
|
+
last_reviewed: '2026-06-17'
|
|
26
|
+
verification_layer: L2
|
|
27
|
+
stage: build
|
|
28
|
+
domain: build
|
|
29
|
+
owner_mechanism: mc-privacy-boundary
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# 安全加固:编码时怎么堵漏洞
|
|
33
|
+
|
|
34
|
+
> 吸收旧的「安全加固」「安全审查」「安全审计」「权限认证」「熔断降级」。
|
|
35
|
+
> build-gate 的 SEC-01~12 是硬门禁(确定性正则),本 guidance 是方法指导。
|
|
36
|
+
|
|
37
|
+
## 输入校验(第一道防线)
|
|
38
|
+
|
|
39
|
+
- 所有外部输入校验:类型、范围、格式、长度
|
|
40
|
+
- SQL 用参数化查询,禁字符串拼接(SEC-01)
|
|
41
|
+
- 禁 innerHTML 直接赋值,用安全 DOM API/转义(SEC-02,防 XSS)
|
|
42
|
+
- 禁 eval/Function 动态执行(SEC-03)
|
|
43
|
+
|
|
44
|
+
## 认证与授权
|
|
45
|
+
|
|
46
|
+
- 每个接口明确权限要求
|
|
47
|
+
- 写操作必须鉴权
|
|
48
|
+
- JWT 校验签名算法,禁未校验 decode(SEC-12)
|
|
49
|
+
- Cookie 设 secure/httpOnly(SEC-11)
|
|
50
|
+
|
|
51
|
+
## 敏感信息
|
|
52
|
+
|
|
53
|
+
- 密钥走环境变量/密钥管理,禁硬编码(SEC-04,shared-gate SEC-02)
|
|
54
|
+
- 日志禁打印密码/token/身份证(SEC-05)
|
|
55
|
+
- 路径参数防遍历(SEC-07)
|
|
56
|
+
|
|
57
|
+
## 外部交互
|
|
58
|
+
|
|
59
|
+
- 重定向校验目标(SEC-06,防开放重定向)
|
|
60
|
+
- 外部请求校验目标(SEC-09,防 SSRF)
|
|
61
|
+
- 反序列化白名单(SEC-08)
|
|
62
|
+
- CORS 收紧 allowedOrigins,禁 `*`(SEC-10)
|
|
63
|
+
|
|
64
|
+
## 稳定性(熔断降级)
|
|
65
|
+
|
|
66
|
+
- 跨系统调用设超时/重试/熔断
|
|
67
|
+
- 限流保护核心接口
|
|
68
|
+
- 降级策略:依赖不可用时系统的行为
|
|
69
|
+
|
|
70
|
+
## 禁止
|
|
71
|
+
|
|
72
|
+
- 信任客户端输入不校验(违规)
|
|
73
|
+
- 拼接 SQL(违规)
|
|
74
|
+
- 打印敏感信息到日志(违规)
|
|
75
|
+
- 写接口不鉴权(违规)
|
package/templates/build//346/265/213/350/257/225/344/274/230/345/205/210/347/274/226/347/240/201.md
CHANGED
|
@@ -1,99 +1,70 @@
|
|
|
1
1
|
---
|
|
2
|
-
id: ka-
|
|
2
|
+
id: ka-guidance-测试优先编码
|
|
3
3
|
kind: guidance
|
|
4
4
|
title: 测试优先编码
|
|
5
5
|
sync_policy: copy_to_project
|
|
6
6
|
status: active
|
|
7
7
|
triggers:
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- coding
|
|
13
|
-
- test first
|
|
14
|
-
- 测试优先
|
|
8
|
+
- 测试
|
|
9
|
+
- TDD
|
|
10
|
+
- 覆盖率
|
|
11
|
+
- 单元测试
|
|
15
12
|
- 先写测试
|
|
13
|
+
- 测试优先
|
|
14
|
+
- test first
|
|
15
|
+
- 测试驱动
|
|
16
|
+
- 写测试
|
|
16
17
|
extra:
|
|
17
|
-
name: test-first-coding
|
|
18
|
-
type: procedure
|
|
18
|
+
name: test-first-coding
|
|
19
19
|
scope:
|
|
20
|
-
-
|
|
21
|
-
- frontend
|
|
20
|
+
- '*'
|
|
22
21
|
products:
|
|
23
22
|
- '*'
|
|
24
|
-
|
|
25
|
-
- coding_readiness_contract_entry
|
|
26
|
-
- existing_system_analysis_contract_entry
|
|
27
|
-
- architecture_design_contract_entry
|
|
28
|
-
- detail_discipline_contract
|
|
29
|
-
- first_principles_contract
|
|
30
|
-
required_sections:
|
|
31
|
-
- 编码准备门
|
|
32
|
-
- 测试优先计划
|
|
33
|
-
- 约束消费报告
|
|
34
|
-
- 主线消费检查
|
|
35
|
-
- 编码完成审查
|
|
36
|
-
hard_rules:
|
|
37
|
-
- coding workflow 不得直接进入实现
|
|
38
|
-
- 必须先生成 CodingReadinessGate
|
|
39
|
-
- 必须先生成 TestFirstPlan 或合法 not_applicable_with_reason
|
|
40
|
-
- 有测试框架且行为可断言时,必须先写失败测试或回归测试
|
|
41
|
-
- readiness_status=blocked/manual_required 时不得写实现代码
|
|
42
|
-
- 现有项目新需求必须消费 ExistingSystemAnalysis 和 RequirementGapAnalysis
|
|
43
|
-
- 根据架构设计编码时必须消费 ArchitectureDesignContract
|
|
44
|
-
- 测试失败不得删除测试、降低断言、skip 后声称通过
|
|
45
|
-
- 每个切片至少覆盖 ≥9 个测试场景(≥3 正常路径 + ≥3 边界条件 + ≥3 异常路径)
|
|
46
|
-
- 模式 B 不得用于支付/状态流转/权限/跨系统同步逻辑
|
|
47
|
-
acceptance_checks:
|
|
48
|
-
- CodingReadinessGate status 非 blocked
|
|
49
|
-
- TestFirstPlan 已创建且 status 为 written 或 expected_failure_recorded
|
|
50
|
-
- 约束消费报告无 blocking_missing_constraints
|
|
51
|
-
- 主线消费检查无 orphan_findings
|
|
52
|
-
- 编码完成审查 review.passed 为 true
|
|
23
|
+
type: procedure
|
|
53
24
|
lifecycle_status: active
|
|
54
|
-
version: 1.
|
|
55
|
-
last_reviewed: '2026-06-
|
|
56
|
-
domain: build
|
|
25
|
+
version: 1.0.0
|
|
26
|
+
last_reviewed: '2026-06-17'
|
|
57
27
|
verification_layer: L2
|
|
58
28
|
stage: build
|
|
29
|
+
domain: build
|
|
59
30
|
owner_mechanism: mc-coding-readiness
|
|
60
31
|
---
|
|
61
32
|
|
|
62
|
-
|
|
63
|
-
|
|
33
|
+
# 测试优先编码:怎么让代码可验证
|
|
34
|
+
|
|
35
|
+
> 吸收旧的「测试优先编码」「覆盖率标准」「测试质量」。
|
|
36
|
+
> [[工程执行总纲]] 目标驱动:先定可验证目标,未执行验证不算完成。
|
|
37
|
+
|
|
38
|
+
## 何时必须先写测试
|
|
39
|
+
|
|
40
|
+
- 有测试框架且行为可断言时,先写失败测试(red)再实现(green)
|
|
41
|
+
- 修 bug 时先写复现测试(回归测试)
|
|
42
|
+
|
|
43
|
+
## TDD 循环
|
|
44
|
+
|
|
45
|
+
red(失败测试)→ green(最小实现通过)→ refactor(重构保持绿)
|
|
46
|
+
|
|
47
|
+
- 每一步都可验证,不积累"最后再测"
|
|
48
|
+
- 测试描述行为,不测实现细节(实现变了测试不该挂)
|
|
49
|
+
|
|
50
|
+
## 覆盖率标准
|
|
51
|
+
|
|
52
|
+
- 增量代码行覆盖率 ≥ 80%(build-gate BLD-G05 守护)
|
|
53
|
+
- 覆盖率是下限不是目标——覆盖关键路径比追数字重要
|
|
54
|
+
- 重点覆盖:正常路径 / 错误路径 / 边界 / 权限 / 并发
|
|
55
|
+
|
|
56
|
+
## 测试质量(禁止伪满足)
|
|
57
|
+
|
|
58
|
+
- 禁止"测试自己证明自己"(断言恒真、mock 掉被测逻辑)
|
|
59
|
+
- 禁止为过门禁删断言/加无关 mock/降低覆盖率([[工程执行总纲]] 精准修改硬失败)
|
|
60
|
+
- 测试要有意义:能抓到真实回归
|
|
61
|
+
|
|
62
|
+
## 不适用场景
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
1. **编码准备门**:
|
|
67
|
-
- 检查是否有验证计划 (verification_plan_ref)
|
|
68
|
-
- 检查前置条件(现有项目需差距分析,架构设计需 ArchitectureDesignContract)
|
|
69
|
-
- 检查约束消费
|
|
70
|
-
2. **测试优先计划**:
|
|
71
|
-
- 有测试框架且行为可断言 → test_first(先写失败测试)
|
|
72
|
-
- 不能自动测试 → verification_case_first 或 manual_acceptance_first
|
|
73
|
-
- TestFirstPlan 绑定需求、主链路入口和验收标准
|
|
74
|
-
2a. **头脑风暴触发**:若实现方案选择存在不确定性(模式 A/B 不确定、模块间依赖不清晰、反复修复同一逻辑):
|
|
75
|
-
→ 进入「不确定时头脑风暴流程」(templates/procedures/不确定时头脑风暴.md)
|
|
76
|
-
→ 若 fundamental_need 为空 → 先触发 FP-01
|
|
77
|
-
3. **编码实现**: 按 TestFirstPlan 选择模式:
|
|
78
|
-
- **模式 A**:严格测试先行(red→green→refactor)——推荐核心逻辑
|
|
79
|
-
1. 编写失败测试(red)
|
|
80
|
-
2. 编写最小实现使测试通过(green)
|
|
81
|
-
3. 重构优化(refactor)
|
|
82
|
-
- **模式 B**:红绿合并(同时编写测试和实现)——适用简单逻辑/CRUD
|
|
83
|
-
- 约束:不降低覆盖率(≥9 场景);不适用于支付/状态流转/权限/跨系统同步
|
|
84
|
-
- **模式 B 约束**:不降低覆盖率(≥9 场景);禁止用于支付/状态流转/权限/跨系统同步逻辑
|
|
85
|
-
4. **主线消费检查**: 新增文件、组件、API、service 被真实消费
|
|
86
|
-
5. **编码完成审查**: reviewCodingCompletion 验证所有硬规则
|
|
64
|
+
- 纯 UI 布局/配置/无行为逻辑的代码:标注 `not_applicable_with_reason`,不强行写无意义测试
|
|
87
65
|
|
|
88
|
-
##
|
|
89
|
-
- [ ] CodingReadinessGate allowed
|
|
90
|
-
- [ ] TestFirstPlan status 为 written
|
|
91
|
-
- [ ] 约束消费无 blocking_missing
|
|
92
|
-
- [ ] 主线消费无 orphan
|
|
93
|
-
- [ ] 编码完成审查 passed
|
|
66
|
+
## 验证
|
|
94
67
|
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
- 测试失败不得删测试或降断言
|
|
99
|
-
- 未消费前置条件不得编码
|
|
68
|
+
- 测试全绿(BLD-G05)
|
|
69
|
+
- 覆盖率达标
|
|
70
|
+
- 关键路径有断言,不是空壳测试
|
|
@@ -12,8 +12,8 @@ extra:
|
|
|
12
12
|
products:
|
|
13
13
|
- '*'
|
|
14
14
|
lifecycle_status: active
|
|
15
|
-
version:
|
|
16
|
-
last_reviewed: '2026-06-
|
|
15
|
+
version: 2.0.0
|
|
16
|
+
last_reviewed: '2026-06-17'
|
|
17
17
|
type: artifact
|
|
18
18
|
domain: build
|
|
19
19
|
stage: build
|
|
@@ -22,25 +22,28 @@ extra:
|
|
|
22
22
|
|
|
23
23
|
# 测试计划
|
|
24
24
|
|
|
25
|
+
> **产物定位**:build 阶段必出。定义"测什么、怎么测、什么证据算通过"。
|
|
26
|
+
> **核心纪律**:禁止假验证——E0(无运行时证据)不可接受([[证据驱动与反幻觉]] 第 5/10 条)。覆盖正常/异常/边界/权限/并发,不只 happy path。
|
|
27
|
+
|
|
25
28
|
## 1. 测试范围
|
|
26
|
-
-
|
|
29
|
+
- 关联任务/需求:
|
|
27
30
|
- 测试目标(验证哪些功能点):
|
|
28
|
-
-
|
|
31
|
+
- 不在范围内的事项:
|
|
29
32
|
|
|
30
33
|
## 2. 测试条目
|
|
31
|
-
| 编号 | 功能点 | 测试类型 | 覆盖策略 |
|
|
32
|
-
|
|
33
|
-
| T-01 | 正常流程 | 集成测试 | 正常路径 | REQ-NNN | SLC-
|
|
34
|
-
| T-02 | 参数缺失 | 单元测试 | 错误路径 | REQ-NNN | SLC-
|
|
35
|
-
| T-03 | 权限不足 | 集成测试 | 错误路径 | REQ-NNN | SLC-
|
|
36
|
-
| T-04 | 边界值 | 单元测试 | 边界场景 | REQ-NNN | SLC-
|
|
34
|
+
| 编号 | 功能点 | 测试类型 | 覆盖策略 | 关联需求 | 关联切片 | test_phase | 优先级 | Evidence 级别 |
|
|
35
|
+
|------|--------|---------|---------|---------|-----------|-----------|--------|--------------|
|
|
36
|
+
| T-01 | 正常流程 | 集成测试 | 正常路径 | REQ-NNN | SLC-x | red→green | P0 | E1 |
|
|
37
|
+
| T-02 | 参数缺失 | 单元测试 | 错误路径 | REQ-NNN | SLC-x | red→green | P0 | E1 |
|
|
38
|
+
| T-03 | 权限不足 | 集成测试 | 错误路径 | REQ-NNN | SLC-x | red→green | P0 | E2 |
|
|
39
|
+
| T-04 | 边界值 | 单元测试 | 边界场景 | REQ-NNN | SLC-x | combined | P1 | E1 |
|
|
37
40
|
|
|
38
|
-
>
|
|
41
|
+
> 覆盖策略必含:正常路径 / 错误路径 / 边界 / 权限 / 并发(适用时)。缺一类须说明理由。
|
|
39
42
|
|
|
40
43
|
## 3. 环境与数据
|
|
41
44
|
- 测试环境:
|
|
42
|
-
- 数据准备方式(业务API/页面操作/SQL
|
|
43
|
-
- 前置依赖(DDL
|
|
45
|
+
- 数据准备方式(业务API/页面操作/SQL脚本):
|
|
46
|
+
- 前置依赖(DDL迁移/配置/Mock):
|
|
44
47
|
|
|
45
48
|
## 4. 执行顺序
|
|
46
49
|
1. DDL 迁移验证
|
|
@@ -51,19 +54,18 @@ extra:
|
|
|
51
54
|
## 5. 验收标准
|
|
52
55
|
- [ ] 所有 P0 测试条目通过
|
|
53
56
|
- [ ] 所有 P1 测试条目通过
|
|
54
|
-
- [ ]
|
|
57
|
+
- [ ] 高风险变更有运行时验证(非静态分析)
|
|
55
58
|
- [ ] DDL 变更有回滚验证
|
|
56
59
|
|
|
57
|
-
##
|
|
60
|
+
## Evidence 级别
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
| AT-02 | 规划循环收敛性 | 超时检测 | Agent 在 max_steps 内收敛 | 步骤计数 |
|
|
63
|
-
| AT-03 | 错误恢复路径 | 异常注入 | Agent 遇到错误后能重试或降级 | 恢复日志 |
|
|
62
|
+
- **E0**:无运行时证据(仅静态分析/AI 摘要)— **不可接受**
|
|
63
|
+
- **E1**:运行时证据(测试输出/截图/API 响应日志)— 最低要求
|
|
64
|
+
- **E2**:完整运行时 + 端到端浏览器验证 — 推荐用于 P0 项
|
|
64
65
|
|
|
65
|
-
##
|
|
66
|
+
## 完成判定
|
|
66
67
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
68
|
+
- [ ] 测试条目覆盖正常/错误/边界/权限四类(适用时含并发)
|
|
69
|
+
- [ ] 每条标注 Evidence 级别,无 E0
|
|
70
|
+
- [ ] P0 项有验收标准且执行通过
|
|
71
|
+
- [ ] 失败用例有修复或明确说明
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ka-guidance-编码纪律
|
|
3
|
+
kind: guidance
|
|
4
|
+
title: 编码纪律
|
|
5
|
+
sync_policy: copy_to_project
|
|
6
|
+
status: active
|
|
7
|
+
triggers:
|
|
8
|
+
- 实现
|
|
9
|
+
- 编码
|
|
10
|
+
- 写代码
|
|
11
|
+
- 开发
|
|
12
|
+
- 编码阶段
|
|
13
|
+
- 切片执行
|
|
14
|
+
- 后端实现
|
|
15
|
+
- 前端实现
|
|
16
|
+
extra:
|
|
17
|
+
name: coding-discipline
|
|
18
|
+
scope:
|
|
19
|
+
- '*'
|
|
20
|
+
products:
|
|
21
|
+
- '*'
|
|
22
|
+
type: procedure
|
|
23
|
+
lifecycle_status: active
|
|
24
|
+
version: 1.0.0
|
|
25
|
+
last_reviewed: '2026-06-17'
|
|
26
|
+
verification_layer: L2
|
|
27
|
+
stage: build
|
|
28
|
+
domain: build
|
|
29
|
+
owner_mechanism: mc-coding-readiness
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# 编码纪律:怎么把代码写对
|
|
33
|
+
|
|
34
|
+
> 吸收旧的「编码阶段执行」「编码就绪审查」「编码质量」「切片执行纪律」「防御性编码」。
|
|
35
|
+
> 基本功(命名/注释/单一职责/错误处理)见 [[工程纪律]],不重复。
|
|
36
|
+
|
|
37
|
+
## 实现前:先列改动清单(精准修改)
|
|
38
|
+
|
|
39
|
+
动手前明确([[工程执行总纲]] 精准修改):
|
|
40
|
+
- 要改哪些文件、改什么行为
|
|
41
|
+
- 主链路入口在哪、必须接入(不接入=孤岛)
|
|
42
|
+
- 类型/schema 变化的必要联动调用方
|
|
43
|
+
- 不改什么(范围外文件不动)
|
|
44
|
+
|
|
45
|
+
## 实现中:不写半成品
|
|
46
|
+
|
|
47
|
+
- 不留空函数体、空 catch、TODO 占位(build-gate BLD-G02 守护)
|
|
48
|
+
- 关键业务行有中文注释,业务日志用中文事件名(BLD-G03)
|
|
49
|
+
- 错误处理:禁止静默吞异常,错误信息说清哪步失败+原因+下一步
|
|
50
|
+
- 边界:空数据、null、超长、并发、重复提交都要处理
|
|
51
|
+
|
|
52
|
+
## 类型安全(TS)
|
|
53
|
+
|
|
54
|
+
- 禁 `as any` 绕类型(TS-Q01),禁 `@ts-ignore/@ts-nocheck`(TS-Q02)
|
|
55
|
+
- 禁 `==`/`!=`,用 `===`/`!==`(TS-Q03)
|
|
56
|
+
- 禁 `var`,用 `let`/`const`(TS-Q04)
|
|
57
|
+
|
|
58
|
+
## 接口契约先行
|
|
59
|
+
|
|
60
|
+
- 接口契约先于实现(避免前端等后端)
|
|
61
|
+
- 后端接口有 OpenAPI 文档
|
|
62
|
+
- 每完成一个子模块及时联调,不要全做完才联调
|
|
63
|
+
|
|
64
|
+
## 防御性编码
|
|
65
|
+
|
|
66
|
+
- 外部输入一律校验(类型/范围/权限)
|
|
67
|
+
- 写操作考虑幂等
|
|
68
|
+
- 跨系统调用考虑超时/重试/熔断([[安全加固]])
|
|
69
|
+
|
|
70
|
+
## 反规避
|
|
71
|
+
|
|
72
|
+
- 空函数体/TODO 占位 = 半成品(违规)
|
|
73
|
+
- 不接入主链路 = 孤岛(违规)
|
|
74
|
+
- 静默 catch = 吞异常(违规)
|
|
75
|
+
- 为了过测试删断言/降覆盖率(违规,[[工程执行总纲]] 精准修改硬失败)
|