@starci/skills 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INDEX.md +74 -0
- package/INDEX.vi.md +75 -0
- package/README.md +44 -0
- package/README.vi.md +43 -0
- package/SKILL.md +135 -0
- package/SKILL.vi.md +128 -0
- package/alias/INDEX.md +104 -0
- package/alias/INDEX.vi.md +104 -0
- package/alias/alias.json +297 -0
- package/bin/starci-skills.mjs +219 -0
- package/knowledge/INDEX.md +22 -0
- package/knowledge/INDEX.vi.md +22 -0
- package/knowledge/grammars/starci/DNA.md +146 -0
- package/knowledge/grammars/starci/DNA.vi.md +146 -0
- package/knowledge/grammars/starci/INDEX.md +25 -0
- package/knowledge/grammars/starci/INDEX.vi.md +25 -0
- package/knowledge/grammars/starci/family.md +50 -0
- package/knowledge/grammars/starci/family.vi.md +50 -0
- package/knowledge/grammars/starci/idioms.md +120 -0
- package/knowledge/grammars/starci/idioms.vi.md +121 -0
- package/knowledge/grammars/starci/playbook.md +36 -0
- package/knowledge/grammars/starci/playbook.vi.md +35 -0
- package/knowledge/patterns/be/INDEX.md +29 -0
- package/knowledge/patterns/be/INDEX.vi.md +29 -0
- package/knowledge/patterns/be/comment.md +80 -0
- package/knowledge/patterns/be/comment.vi.md +80 -0
- package/knowledge/patterns/be/error.md +86 -0
- package/knowledge/patterns/be/error.vi.md +86 -0
- package/knowledge/patterns/be/folder.md +87 -0
- package/knowledge/patterns/be/folder.vi.md +86 -0
- package/knowledge/patterns/be/function.md +80 -0
- package/knowledge/patterns/be/function.vi.md +80 -0
- package/knowledge/patterns/be/imports.md +79 -0
- package/knowledge/patterns/be/imports.vi.md +79 -0
- package/knowledge/patterns/be/naming.md +87 -0
- package/knowledge/patterns/be/naming.vi.md +87 -0
- package/knowledge/patterns/be/test.md +79 -0
- package/knowledge/patterns/be/test.vi.md +79 -0
- package/knowledge/patterns/be/typing.md +73 -0
- package/knowledge/patterns/be/typing.vi.md +73 -0
- package/knowledge/patterns/fe/INDEX.md +29 -0
- package/knowledge/patterns/fe/INDEX.vi.md +29 -0
- package/knowledge/patterns/fe/comment.md +70 -0
- package/knowledge/patterns/fe/comment.vi.md +70 -0
- package/knowledge/patterns/fe/error.md +61 -0
- package/knowledge/patterns/fe/error.vi.md +61 -0
- package/knowledge/patterns/fe/folder.md +98 -0
- package/knowledge/patterns/fe/folder.vi.md +95 -0
- package/knowledge/patterns/fe/function.md +70 -0
- package/knowledge/patterns/fe/function.vi.md +70 -0
- package/knowledge/patterns/fe/imports.md +87 -0
- package/knowledge/patterns/fe/imports.vi.md +87 -0
- package/knowledge/patterns/fe/naming.md +77 -0
- package/knowledge/patterns/fe/naming.vi.md +77 -0
- package/knowledge/patterns/fe/test.md +73 -0
- package/knowledge/patterns/fe/test.vi.md +73 -0
- package/knowledge/patterns/fe/typing.md +67 -0
- package/knowledge/patterns/fe/typing.vi.md +67 -0
- package/knowledge/ui/INDEX.md +101 -0
- package/knowledge/ui/INDEX.vi.md +101 -0
- package/knowledge/ui/composition/INDEX.md +60 -0
- package/knowledge/ui/composition/INDEX.vi.md +63 -0
- package/knowledge/ui/composition/accent.md +73 -0
- package/knowledge/ui/composition/accent.vi.md +74 -0
- package/knowledge/ui/composition/action.md +55 -0
- package/knowledge/ui/composition/action.vi.md +56 -0
- package/knowledge/ui/composition/coverage.md +37 -0
- package/knowledge/ui/composition/coverage.vi.md +37 -0
- package/knowledge/ui/composition/cta.md +79 -0
- package/knowledge/ui/composition/cta.vi.md +79 -0
- package/knowledge/ui/composition/feedback.md +55 -0
- package/knowledge/ui/composition/feedback.vi.md +56 -0
- package/knowledge/ui/composition/hierarchy.md +83 -0
- package/knowledge/ui/composition/hierarchy.vi.md +82 -0
- package/knowledge/ui/composition/layout.md +91 -0
- package/knowledge/ui/composition/layout.vi.md +93 -0
- package/knowledge/ui/composition/responsive.md +67 -0
- package/knowledge/ui/composition/responsive.vi.md +67 -0
- package/knowledge/ui/composition/state.md +105 -0
- package/knowledge/ui/composition/state.vi.md +106 -0
- package/knowledge/ui/presentation/INDEX.md +94 -0
- package/knowledge/ui/presentation/INDEX.vi.md +69 -0
- package/knowledge/ui/presentation/boundary.md +170 -0
- package/knowledge/ui/presentation/boundary.vi.md +169 -0
- package/knowledge/ui/presentation/font.md +155 -0
- package/knowledge/ui/presentation/font.vi.md +156 -0
- package/knowledge/ui/presentation/gap.md +181 -0
- package/knowledge/ui/presentation/gap.vi.md +181 -0
- package/knowledge/ui/presentation/margin.md +168 -0
- package/knowledge/ui/presentation/margin.vi.md +171 -0
- package/knowledge/ui/presentation/measure.md +174 -0
- package/knowledge/ui/presentation/measure.vi.md +178 -0
- package/knowledge/ui/presentation/overflow.md +142 -0
- package/knowledge/ui/presentation/overflow.vi.md +142 -0
- package/knowledge/ui/presentation/padding.md +293 -0
- package/knowledge/ui/presentation/padding.vi.md +292 -0
- package/knowledge/ui/presentation/surface.md +166 -0
- package/knowledge/ui/presentation/surface.vi.md +166 -0
- package/knowledge/ui/presentation/text-flow.md +123 -0
- package/knowledge/ui/presentation/text-flow.vi.md +123 -0
- package/knowledge/ui/presentation/tone.md +114 -0
- package/knowledge/ui/presentation/tone.vi.md +113 -0
- package/knowledge/ui/proof/INDEX.md +55 -0
- package/knowledge/ui/proof/INDEX.vi.md +55 -0
- package/knowledge/ui/proof/accessibility.md +67 -0
- package/knowledge/ui/proof/accessibility.vi.md +68 -0
- package/knowledge/ui/proof/contrast.md +58 -0
- package/knowledge/ui/proof/contrast.vi.md +57 -0
- package/knowledge/ui/proof/focus.md +76 -0
- package/knowledge/ui/proof/focus.vi.md +76 -0
- package/knowledge/ui/proof/motion.md +63 -0
- package/knowledge/ui/proof/motion.vi.md +64 -0
- package/knowledge/ui/proof/render-truth.md +63 -0
- package/knowledge/ui/proof/render-truth.vi.md +63 -0
- package/operators/INDEX.md +199 -0
- package/operators/INDEX.vi.md +199 -0
- package/operators/architecture-decide/errors.json +115 -0
- package/operators/architecture-decide/operator.json +20 -0
- package/operators/architecture-decide/operator.md +133 -0
- package/operators/architecture-decide/operator.vi.md +130 -0
- package/operators/architecture-decide/self-test.mjs +221 -0
- package/operators/architecture-decide/validate.mjs +112 -0
- package/operators/backend-source-apply/errors.json +66 -0
- package/operators/backend-source-apply/operator.json +20 -0
- package/operators/backend-source-apply/operator.md +189 -0
- package/operators/backend-source-apply/operator.vi.md +185 -0
- package/operators/backend-source-apply/self-test.mjs +257 -0
- package/operators/backend-source-apply/validate.mjs +240 -0
- package/operators/business-decide/errors.json +78 -0
- package/operators/business-decide/operator.json +20 -0
- package/operators/business-decide/operator.md +176 -0
- package/operators/business-decide/operator.vi.md +174 -0
- package/operators/business-decide/self-test.mjs +225 -0
- package/operators/business-decide/validate.mjs +277 -0
- package/operators/content-generate/errors.json +106 -0
- package/operators/content-generate/operator.json +21 -0
- package/operators/content-generate/operator.md +155 -0
- package/operators/content-generate/operator.vi.md +155 -0
- package/operators/content-generate/self-test.mjs +288 -0
- package/operators/content-generate/validate.mjs +196 -0
- package/operators/errors.json +178 -0
- package/operators/frontend-direction-decide/errors.json +135 -0
- package/operators/frontend-direction-decide/operator.json +21 -0
- package/operators/frontend-direction-decide/operator.md +167 -0
- package/operators/frontend-direction-decide/operator.vi.md +167 -0
- package/operators/frontend-direction-decide/self-test.mjs +226 -0
- package/operators/frontend-direction-decide/validate.mjs +146 -0
- package/operators/frontend-presentation-resolve/errors.json +42 -0
- package/operators/frontend-presentation-resolve/operator.json +19 -0
- package/operators/frontend-presentation-resolve/operator.md +142 -0
- package/operators/frontend-presentation-resolve/operator.vi.md +140 -0
- package/operators/frontend-presentation-resolve/self-test.mjs +163 -0
- package/operators/frontend-presentation-resolve/validate.mjs +143 -0
- package/operators/frontend-source-apply/errors.json +30 -0
- package/operators/frontend-source-apply/operator.json +20 -0
- package/operators/frontend-source-apply/operator.md +127 -0
- package/operators/frontend-source-apply/operator.vi.md +126 -0
- package/operators/frontend-source-apply/self-test.mjs +214 -0
- package/operators/frontend-source-apply/validate.mjs +133 -0
- package/operators/frontend-surface-audit/errors.json +5 -0
- package/operators/frontend-surface-audit/operator.json +22 -0
- package/operators/frontend-surface-audit/operator.md +121 -0
- package/operators/frontend-surface-audit/operator.vi.md +121 -0
- package/operators/frontend-surface-audit/self-test.mjs +185 -0
- package/operators/frontend-surface-audit/validate.mjs +127 -0
- package/operators/git-publish/errors.json +54 -0
- package/operators/git-publish/operator.json +20 -0
- package/operators/git-publish/operator.md +180 -0
- package/operators/git-publish/operator.vi.md +178 -0
- package/operators/git-publish/self-test.mjs +177 -0
- package/operators/git-publish/validate.mjs +106 -0
- package/operators/platform-operate/errors.json +90 -0
- package/operators/platform-operate/operator.json +22 -0
- package/operators/platform-operate/operator.md +162 -0
- package/operators/platform-operate/operator.vi.md +160 -0
- package/operators/platform-operate/self-test.mjs +202 -0
- package/operators/platform-operate/validate.mjs +193 -0
- package/operators/quality-verify/errors.json +54 -0
- package/operators/quality-verify/operator.json +20 -0
- package/operators/quality-verify/operator.md +185 -0
- package/operators/quality-verify/operator.vi.md +177 -0
- package/operators/quality-verify/self-test.mjs +210 -0
- package/operators/quality-verify/validate.mjs +197 -0
- package/operators/release-deploy/errors.json +158 -0
- package/operators/release-deploy/operator.json +23 -0
- package/operators/release-deploy/operator.md +183 -0
- package/operators/release-deploy/operator.vi.md +181 -0
- package/operators/release-deploy/self-test.mjs +235 -0
- package/operators/release-deploy/validate.mjs +129 -0
- package/operators/uat-verify/errors.json +78 -0
- package/operators/uat-verify/operator.json +25 -0
- package/operators/uat-verify/operator.md +162 -0
- package/operators/uat-verify/operator.vi.md +161 -0
- package/operators/uat-verify/self-test.mjs +270 -0
- package/operators/uat-verify/validate.mjs +202 -0
- package/operators/workspace-bind/errors.json +90 -0
- package/operators/workspace-bind/operator.json +21 -0
- package/operators/workspace-bind/operator.md +148 -0
- package/operators/workspace-bind/operator.vi.md +148 -0
- package/operators/workspace-bind/self-test.mjs +205 -0
- package/operators/workspace-bind/validate.mjs +152 -0
- package/package.json +50 -0
- package/readiness/initialization/workspaces/commit-policy.json +91 -0
- package/readiness/initialization/workspaces/config.schema.json +35 -0
- package/readiness/initialization/workspaces/device-state.schema.json +54 -0
- package/readiness/initialization/workspaces/local-route.schema.json +206 -0
- package/readiness/initialization/workspaces/portable-route.schema.json +200 -0
- package/resources/INDEX.md +96 -0
- package/resources/INDEX.vi.md +99 -0
- package/resources/agents/profiles/claude.json +131 -0
- package/resources/agents/profiles/openai.json +131 -0
- package/resources/orchestrator.json +71 -0
- package/resources/tools.json +85 -0
- package/routing.json +272 -0
- package/scripts/alias-registry.mjs +31 -0
- package/scripts/device-state.mjs +497 -0
- package/scripts/device-state.spec.mjs +18 -0
- package/scripts/errors-registry.mjs +68 -0
- package/scripts/generate-alias-doc.mjs +66 -0
- package/scripts/generate-grammar-dna.mjs +387 -0
- package/scripts/generate-operators-index.mjs +95 -0
- package/scripts/generate-presentation-owned.mjs +681 -0
- package/scripts/install-cli.spec.mjs +74 -0
- package/scripts/json-schema.mjs +94 -0
- package/scripts/operator-md.mjs +96 -0
- package/scripts/run-operator-self-tests.mjs +36 -0
- package/scripts/validate-alias.mjs +165 -0
- package/scripts/validate-defaults.mjs +72 -0
- package/scripts/validate-knowledge-citations.mjs +90 -0
- package/scripts/validate-operator.mjs +125 -0
- package/scripts/validate-request.mjs +80 -0
- package/scripts/validate-resources.mjs +117 -0
- package/scripts/validate-response.mjs +141 -0
- package/scripts/validate-routing.mjs +91 -0
- package/scripts/validate-step.mjs +50 -0
- package/scripts/validate-templates.mjs +226 -0
- package/scripts/validate-templates.spec.mjs +144 -0
- package/scripts/validate-workflows.mjs +106 -0
- package/scripts/workspace-portable.mjs +389 -0
- package/scripts/workspace-portable.spec.mjs +246 -0
- package/templates/README.md +47 -0
- package/templates/README.vi.md +45 -0
- package/templates/changes.example.md +27 -0
- package/templates/grammars.template.md +34 -0
- package/templates/kinds/architecture-decision.contract.json +14 -0
- package/templates/kinds/architecture-decision.skeleton.md +52 -0
- package/templates/kinds/backend-source-application.contract.json +10 -0
- package/templates/kinds/backend-source-application.skeleton.md +34 -0
- package/templates/kinds/business-promise-authority.contract.json +13 -0
- package/templates/kinds/business-promise-authority.skeleton.md +67 -0
- package/templates/kinds/capture.schema.json +33 -0
- package/templates/kinds/changes.contract.json +10 -0
- package/templates/kinds/changes.skeleton.md +26 -0
- package/templates/kinds/checks.schema.json +44 -0
- package/templates/kinds/claims.schema.json +165 -0
- package/templates/kinds/conformance.schema.json +15 -0
- package/templates/kinds/content-brief.contract.json +12 -0
- package/templates/kinds/content-brief.skeleton.md +45 -0
- package/templates/kinds/content-generation-receipt.contract.json +11 -0
- package/templates/kinds/content-generation-receipt.skeleton.md +40 -0
- package/templates/kinds/content-review.contract.json +11 -0
- package/templates/kinds/content-review.skeleton.md +45 -0
- package/templates/kinds/contract.schema.json +28 -0
- package/templates/kinds/coverage-matrix.schema.json +86 -0
- package/templates/kinds/coverage.schema.json +62 -0
- package/templates/kinds/current-state.schema.json +40 -0
- package/templates/kinds/delta.schema.json +95 -0
- package/templates/kinds/e2e.schema.json +63 -0
- package/templates/kinds/frontend-direction-decision.contract.json +93 -0
- package/templates/kinds/frontend-direction-decision.skeleton.md +68 -0
- package/templates/kinds/frontend-presentation-resolution.contract.json +11 -0
- package/templates/kinds/frontend-presentation-resolution.skeleton.md +32 -0
- package/templates/kinds/frontend-source-application.contract.json +10 -0
- package/templates/kinds/frontend-source-application.skeleton.md +30 -0
- package/templates/kinds/frontend-surface-audit.contract.json +52 -0
- package/templates/kinds/frontend-surface-audit.skeleton.md +32 -0
- package/templates/kinds/gate-result.schema.json +64 -0
- package/templates/kinds/git-publication.contract.json +82 -0
- package/templates/kinds/git-publication.skeleton.md +61 -0
- package/templates/kinds/independent-critique.contract.json +9 -0
- package/templates/kinds/independent-critique.skeleton.md +28 -0
- package/templates/kinds/inventory.schema.json +35 -0
- package/templates/kinds/model.schema.json +99 -0
- package/templates/kinds/mutations.schema.json +65 -0
- package/templates/kinds/platform-operation-receipt.contract.json +76 -0
- package/templates/kinds/platform-operation-receipt.skeleton.md +54 -0
- package/templates/kinds/probes.schema.json +130 -0
- package/templates/kinds/proof.schema.json +17 -0
- package/templates/kinds/quality-verification.contract.json +87 -0
- package/templates/kinds/quality-verification.skeleton.md +58 -0
- package/templates/kinds/release-deployment.contract.json +85 -0
- package/templates/kinds/release-deployment.skeleton.md +67 -0
- package/templates/kinds/route.schema.json +293 -0
- package/templates/kinds/stack-model.schema.json +90 -0
- package/templates/kinds/uat-capture.schema.json +35 -0
- package/templates/kinds/uat-flow-verification.contract.json +11 -0
- package/templates/kinds/uat-flow-verification.skeleton.md +47 -0
- package/templates/kinds/uat-snapshot.schema.json +96 -0
- package/templates/kinds/uat-verdicts.schema.json +41 -0
- package/templates/kinds/ui-coverage.schema.json +77 -0
- package/templates/kinds/verdicts.schema.json +39 -0
- package/templates/kinds/workspace-route-binding.contract.json +12 -0
- package/templates/kinds/workspace-route-binding.skeleton.md +60 -0
- package/templates/kinds/writes.schema.json +37 -0
- package/templates/operator.template.md +73 -0
- package/templates/patterns.template.md +31 -0
- package/templates/step/request.schema.json +42 -0
- package/templates/step/response.schema.json +144 -0
- package/templates/ui-composition.template.md +36 -0
- package/templates/ui-presentation.template.md +57 -0
- package/templates/ui-proof.template.md +34 -0
- package/workflows/README.md +37 -0
- package/workflows/README.vi.md +37 -0
- package/workflows/backend-feature.json +59 -0
- package/workflows/content-unit.json +19 -0
- package/workflows/frontend-new-surface.json +81 -0
- package/workflows/frontend-reconstruct.json +67 -0
- package/workflows/frontend-refine.json +67 -0
- package/workflows/frontend-with-uat.json +78 -0
- package/workflows/full-feature.json +104 -0
- package/workflows/release.json +29 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 9,
|
|
3
|
+
"note": "Stop codes only backend.source.apply emits. Same entry shape as operators/errors.json, scope implicit. Shared codes (INVALID_INPUT, SOURCE_DRIFT, NO_PROGRESS) come from operators/errors.json, and OWNER_CONFLICT is not defined here because frontend.presentation.resolve emits it too: a code two operators emit belongs in operators/errors.json with both ids in scope. Every domain below is the one the old package's owningDomain enum published for this operator: backend, business, contract, platform, workspace, caller. `contract` is a routing domain of its own, answered with a person, and it is not spelled caller: the person who reopens a frozen contract is not the person who wrote the request.",
|
|
4
|
+
"codes": {
|
|
5
|
+
"CONTRACT_UNFROZEN": {
|
|
6
|
+
"domain": "contract",
|
|
7
|
+
"disposition": "terminate",
|
|
8
|
+
"meaning": {
|
|
9
|
+
"en": "The mutation contract is not frozen, or its fingerprint is stale.",
|
|
10
|
+
"vi": "Contract mutation chưa đóng băng, hoặc fingerprint của nó đã cũ."
|
|
11
|
+
},
|
|
12
|
+
"resume": {
|
|
13
|
+
"en": "Bring the frozen contract.",
|
|
14
|
+
"vi": "Mang contract đã đóng băng tới."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"CONTRACT_WIDENED": {
|
|
18
|
+
"domain": "contract",
|
|
19
|
+
"disposition": "terminate",
|
|
20
|
+
"meaning": {
|
|
21
|
+
"en": "The outcome cannot be reached without a boundary the contract does not carry.",
|
|
22
|
+
"vi": "Không đạt được kết quả nếu không có một ranh giới mà contract không mang."
|
|
23
|
+
},
|
|
24
|
+
"resume": {
|
|
25
|
+
"en": "The contract owner reopens and refreezes the contract, then the same outcome is implemented again.",
|
|
26
|
+
"vi": "Chủ contract mở lại và đóng băng lại contract, rồi cài đặt lại cùng kết quả đó."
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"BUSINESS_AUTHORITY_MISSING": {
|
|
30
|
+
"domain": "business",
|
|
31
|
+
"disposition": "terminate",
|
|
32
|
+
"meaning": {
|
|
33
|
+
"en": "A business question is open and no approved decision settles it.",
|
|
34
|
+
"vi": "Một câu hỏi nghiệp vụ còn mở và không quyết định đã duyệt nào giải nó."
|
|
35
|
+
},
|
|
36
|
+
"resume": {
|
|
37
|
+
"en": "Publish the decision and rebind the authority fingerprint.",
|
|
38
|
+
"vi": "Publish quyết định và ràng lại fingerprint thẩm quyền."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"PATTERN_UNBOUND": {
|
|
42
|
+
"domain": "backend",
|
|
43
|
+
"disposition": "terminate",
|
|
44
|
+
"meaning": {
|
|
45
|
+
"en": "A touched aspect has no sibling family bound for it.",
|
|
46
|
+
"vi": "Một khía cạnh bị chạm không có họ anh em nào được ràng cho nó."
|
|
47
|
+
},
|
|
48
|
+
"resume": {
|
|
49
|
+
"en": "Bind the missing pattern; guessing the family from memory is refused.",
|
|
50
|
+
"vi": "Ràng pattern còn thiếu; đoán họ từ trí nhớ bị từ chối."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"PROOF_UNAVAILABLE": {
|
|
54
|
+
"domain": "platform",
|
|
55
|
+
"disposition": "terminate",
|
|
56
|
+
"meaning": {
|
|
57
|
+
"en": "A declared proof could not be executed in this environment.",
|
|
58
|
+
"vi": "Một proof đã khai không chạy được trong môi trường này."
|
|
59
|
+
},
|
|
60
|
+
"resume": {
|
|
61
|
+
"en": "Provide a working proof environment; a proof that could not run never becomes a pass.",
|
|
62
|
+
"vi": "Cung cấp môi trường chạy proof; một proof không chạy được không bao giờ thành pass."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 9,
|
|
3
|
+
"id": "backend.source.apply",
|
|
4
|
+
"domain": "backend",
|
|
5
|
+
"job": "Implement one backend outcome inside a frozen mutation contract, following the observed sibling family, and return the measured conformance and proof receipt that shows the boundary was not widened.",
|
|
6
|
+
"package": "operator.md",
|
|
7
|
+
"errors": "errors.json",
|
|
8
|
+
"validator": "validate.mjs",
|
|
9
|
+
"selfTest": "self-test.mjs",
|
|
10
|
+
"resources": {
|
|
11
|
+
"profile": "luna",
|
|
12
|
+
"grammarBound": false,
|
|
13
|
+
"tools": {
|
|
14
|
+
"@tools/fileread": "context-aliases",
|
|
15
|
+
"@tools/sourcewrite": "declared-write-set",
|
|
16
|
+
"@tools/git": "commit-session-branch",
|
|
17
|
+
"@tools/shell": "declared-commands"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# backend.source.apply
|
|
2
|
+
|
|
3
|
+
## Job
|
|
4
|
+
|
|
5
|
+
Implement one backend outcome inside a frozen mutation contract, following the observed sibling
|
|
6
|
+
family, and return the measured conformance and proof receipt that shows the boundary was not widened.
|
|
7
|
+
|
|
8
|
+
## The contract is frozen before the first write
|
|
9
|
+
|
|
10
|
+
The contract arrives as the Input `architecture-decision`, fingerprinted and closed. The operations,
|
|
11
|
+
writers, stores, transaction boundaries, idempotency kinds, and migrations it lists are the complete
|
|
12
|
+
set the implementation may touch, and this operator answers only one question per operation: does the
|
|
13
|
+
code that now exists do exactly what the contract says, and what measurement shows it. The operations
|
|
14
|
+
are not a Requirement, because a person retyping a contract into a request is how the contract and
|
|
15
|
+
the implementation quietly diverge; step 3 reads them from the frozen input and restates them in
|
|
16
|
+
`response/data/mutations.json`. Three prohibitions carry that, and each is enforced rather than
|
|
17
|
+
advised. An operation, writer, store, transaction, migration, or event outside the contract is
|
|
18
|
+
`CONTRACT_WIDENED`, returned to the contract owner before any product write. A file outside the
|
|
19
|
+
mutable ceiling is `OWNER_CONFLICT`, even when the change there would be one line. A convention no
|
|
20
|
+
bound sibling pattern publishes is refused and recorded as `NEW_CONVENTION_REFUSED`, while an aspect
|
|
21
|
+
with no pattern at all is `PATTERN_UNBOUND`. Discovering mid-implementation that the outcome needs a
|
|
22
|
+
wider boundary is the expected way this operator ends, not a failure of nerve: the contract is
|
|
23
|
+
reopened by its owner and the same outcome is implemented again against the new fingerprint. Reaching
|
|
24
|
+
outside the list is not a smaller change than reopening the contract; it is the same change made
|
|
25
|
+
without a record.
|
|
26
|
+
|
|
27
|
+
## The person's branch is never written
|
|
28
|
+
|
|
29
|
+
This operator never writes on the branch a person has checked out. The orchestrator prepares a
|
|
30
|
+
dedicated git worktree of the routed checkout on the session branch `session/<sessionId>`, cut from
|
|
31
|
+
the frozen head, and step 3 writes there and nowhere else, under an exclusive lease on
|
|
32
|
+
`@workspaces/be`. The final step commits the whole declared write set once, records that sha in
|
|
33
|
+
`response.json.commits`, and names the same sha in `response/data/mutations.json` as `commit` beside
|
|
34
|
+
the `base` it started from and the `branch` it lives on; `response/changes.md` states the same move in
|
|
35
|
+
its Binding row, `@workspaces/be` at `<base>` → `<sha>` on `session/<sessionId>`. One commit, because
|
|
36
|
+
a step whose work arrives as several commits cannot be pinned by the next step's request, and an
|
|
37
|
+
uncommitted write cannot be pinned at all. Nothing is pushed and nothing is merged here: `git.publish`
|
|
38
|
+
merges the session branch into the target branch, and it is the only operator that talks to a remote.
|
|
39
|
+
|
|
40
|
+
## Dry mode writes the plan, not the tree
|
|
41
|
+
|
|
42
|
+
`mode` decides whether this run touches the checkout at all. Under `apply` the operator fills the
|
|
43
|
+
contract, commits once, and everything below holds as written. Under `dry` it does the same reading,
|
|
44
|
+
the same binding and the same projection, then stops after the plan: `response/data/mutations.json`
|
|
45
|
+
carries the operations it would fill and the files it would touch with `commit` null and no after
|
|
46
|
+
hash, `response.json` records no commit, and not one byte reaches `@workspaces/be`. The branch still
|
|
47
|
+
ends `done`, because a plan honestly produced is a finished answer to a question about a plan; its
|
|
48
|
+
`changes.md` lists every planned path as `unchanged`, which is what the working tree actually shows,
|
|
49
|
+
and names the change it would have made in `Why`. A dry run measures nothing, so it carries no
|
|
50
|
+
conformance record and no proof record: a facet cannot be measured on code that was never written,
|
|
51
|
+
and a plan that shipped verdicts would be indistinguishable from an implementation. That is also why
|
|
52
|
+
a dry run can never be the run that satisfies the contract — it is a way to read the write set before
|
|
53
|
+
paying for it, not a cheaper way to apply it.
|
|
54
|
+
|
|
55
|
+
## The backend never invents business behaviour
|
|
56
|
+
|
|
57
|
+
Every operation cites the approved decisions it implements. When the code reaches a point where the
|
|
58
|
+
answer depends on a business rule nobody approved, the branch stops with `BUSINESS_AUTHORITY_MISSING`
|
|
59
|
+
and names the open question. It does not pick the lenient reading, mirror what a neighbouring feature
|
|
60
|
+
happens to do, or choose whichever branch makes the test go green. This is the most load-bearing rule
|
|
61
|
+
in the operator, because a guessed business rule that passes its own test is indistinguishable from an
|
|
62
|
+
approved one once it ships. An implemented receipt therefore cannot carry a `BUSINESS_QUESTION_RAISED`
|
|
63
|
+
finding: raising the question and implementing anyway is the exact contradiction the check exists to
|
|
64
|
+
catch.
|
|
65
|
+
|
|
66
|
+
## Sibling patterns are the only source of convention
|
|
67
|
+
|
|
68
|
+
The bound patterns name one family per aspect, and the implementation mirrors the family the codebase
|
|
69
|
+
already publishes rather than the one it remembers: command handlers in the family the mutation layer
|
|
70
|
+
already uses, exceptions derived from the published exception identity, entity access through the
|
|
71
|
+
injected primary entity manager, migrations under the primary datasource. Two families bound for one
|
|
72
|
+
aspect means no family is bound, and guessing the family from memory is how a second house style
|
|
73
|
+
enters a codebase unnoticed.
|
|
74
|
+
|
|
75
|
+
## Conformance is measured, not asserted
|
|
76
|
+
|
|
77
|
+
A conformance record without evidence is a sentence about the code, and a sentence cannot contradict
|
|
78
|
+
the code. Each declared facet of each operation gets its own file,
|
|
79
|
+
`response/data/conformance/<operationId>.<facet>.json`, so a facet nobody measured is a missing file
|
|
80
|
+
rather than a missing line inside a file that still looks complete. The evidence is what a later
|
|
81
|
+
reader uses to disagree with this receipt, so it is required for every facet including the ones that
|
|
82
|
+
passed. The same reasoning makes a proof carry its command, its exit code and its output in
|
|
83
|
+
`response/data/proofs/<operationId>.<kind>.json`: the command says what was run and the result says
|
|
84
|
+
what came back, and either one alone can be written by someone who ran nothing. A proof that could not
|
|
85
|
+
run never becomes an assertion that the behaviour is fine, and a failed proof blocks the receipt
|
|
86
|
+
rather than being reclassified. Each touched file carries one change record with its kind and its
|
|
87
|
+
before and after hashes, because a modified file whose two hashes agree records a mutation that did
|
|
88
|
+
not happen.
|
|
89
|
+
|
|
90
|
+
## Boundary
|
|
91
|
+
|
|
92
|
+
The operator writes product source only inside the mutable file ceiling, only inside the session
|
|
93
|
+
branch worktree of `@workspaces/be`, and writes everything else into `response/` of its own branch:
|
|
94
|
+
`response.md`, `response/changes.md`, `response/data/mutations.json`, one conformance record per
|
|
95
|
+
declared facet, one proof record per declared proof, and `response.json`. It never adds an operation,
|
|
96
|
+
writer, store, transaction, migration, or event the frozen contract does not carry, decides a business
|
|
97
|
+
rule the approved authority does not state, introduces a convention no bound sibling pattern
|
|
98
|
+
publishes, weakens, skips, suppresses, or substitutes a declared proof to make a run go green, edits
|
|
99
|
+
the contract, the business authority, or a file outside the mutable ceiling, commits more than once,
|
|
100
|
+
writes on the person's checked-out branch, pushes, merges, or tags anything, claims conformance
|
|
101
|
+
without naming the evidence that measured it, or records a quality, visual, or UAT verdict; those are
|
|
102
|
+
other jobs with their own gates.
|
|
103
|
+
|
|
104
|
+
## Context
|
|
105
|
+
|
|
106
|
+
| Alias | Bind | Required |
|
|
107
|
+
| --- | --- | --- |
|
|
108
|
+
| `@worktrees/businesses/<featureId>` | the published business head, the only source of business behaviour | yes |
|
|
109
|
+
| `@knowledge/patterns/be` | the sibling families this change mirrors, one per aspect; the only source of valid conventions | yes |
|
|
110
|
+
| `@workspaces/be` | the routed backend checkout at the frozen head, written only on its session branch worktree | yes |
|
|
111
|
+
|
|
112
|
+
## Inputs
|
|
113
|
+
|
|
114
|
+
| Kind | From | Required |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| `architecture-decision` | `architecture.decide`; the frozen mutation contract the implementation fills and may not widen | yes |
|
|
117
|
+
| `backend-source-application` | a prior run of `backend.source.apply` for the same outcome; regression history, absent on the first run | no |
|
|
118
|
+
|
|
119
|
+
## Requirements
|
|
120
|
+
|
|
121
|
+
| Field | Type | Default | Ask |
|
|
122
|
+
| --- | --- | --- | --- |
|
|
123
|
+
| `featureId` | id | — | The feature whose published business head decides this behaviour |
|
|
124
|
+
| `outcome` | prompt | — | The one thing being implemented, in the person's words |
|
|
125
|
+
| `mutableFileRefs` | list | — | The only files product source may be written into |
|
|
126
|
+
| `mode` | choice | apply | `apply` fills the contract and commits, `dry` emits the plan and writes nothing |
|
|
127
|
+
| `resume` | token | null | The blocked branch's token when re-entering after a stop |
|
|
128
|
+
|
|
129
|
+
## Steps
|
|
130
|
+
|
|
131
|
+
| # | Step | Params | Reads | Writes | Stops with |
|
|
132
|
+
| --- | --- | --- | --- | --- | --- |
|
|
133
|
+
| 1 | Validate the gate and resume | `resume`, `mode` | `request/request.json`, input `backend-source-application` when present, @workspaces/be at the frozen head | — | `INVALID_INPUT`, `SOURCE_DRIFT`, `NO_PROGRESS` |
|
|
134
|
+
| 2 | Bind authority, contract and patterns | `featureId` | @worktrees/businesses/<featureId> at its published head, input `architecture-decision` as the frozen contract, @knowledge/patterns/be one pattern per aspect | — | `CONTRACT_UNFROZEN`, `BUSINESS_AUTHORITY_MISSING`, `PATTERN_UNBOUND` |
|
|
135
|
+
| 3 | Fill one contract operation at a time, on the session branch | `mutableFileRefs` | @knowledge/patterns/be for each aspect, @workspaces/be inside the mutable ceiling | @workspaces/be/branch/session inside the mutable ceiling, under an exclusive lease, @tools/sourcewrite | `CONTRACT_WIDENED`, `OWNER_CONFLICT` |
|
|
136
|
+
| 4 | Check every mutation against the frozen contract and record it with its before and after hash | `mode` | @workspaces/be, the touched files and the frozen contract | `response/data/mutations.json` | — |
|
|
137
|
+
| 5 | Revalidate persisted snapshots on read | — | @workspaces/be, the persisted snapshot, @knowledge/patterns/be for the rules that drift after it | — | — |
|
|
138
|
+
| 6 | Prove each declared facet | — | @workspaces/be, the measurement behind each facet | `response/data/conformance/<operationId>.<facet>.json` | — |
|
|
139
|
+
| 7 | Run each declared proof | — | @workspaces/be, the pinned command of each declared proof kind | `response/data/proofs/<operationId>.<proofKind>.json`, @tools/shell | `PROOF_UNAVAILABLE` |
|
|
140
|
+
| 8 | Commit the write set once, write the receipt and emit | `outcome` | everything above | @workspaces/be/branch/session as one commit, `response/changes.md`, `response/response.md`, `response/response.json`, @tools/git | — |
|
|
141
|
+
|
|
142
|
+
Under `mode = dry` step 3 projects the fill onto the declared paths without writing one of them, step
|
|
143
|
+
4 records that projection as the plan with a null commit and no after hash, steps 5 to 7 have nothing
|
|
144
|
+
to measure and produce nothing, and step 8 emits the receipt and the change record without a commit.
|
|
145
|
+
Under `apply` every step runs as written. The routed head is reverified immediately before the first
|
|
146
|
+
product write, so drift found there stops the branch before anything is written. Filling an operation writes the transport, the validation, the
|
|
147
|
+
authorization check, the data access, and the failure paths into the declared writer and the files the
|
|
148
|
+
change genuinely requires; it refuses loudly and early rather than dropping a case silently, raising
|
|
149
|
+
the exception the exception-identity pattern publishes before any row or external checkout is created.
|
|
150
|
+
When the outcome persists a workflow, session, cart, draft, or other snapshot, usability is enforced
|
|
151
|
+
again where it is read, reconciled server side, in stable order, with indexes remapped atomically and
|
|
152
|
+
an explicit terminal state when nothing actionable remains, and recorded as `SNAPSHOT_REVALIDATED`. A
|
|
153
|
+
resume begins again at step 1, reuses only unchanged fingerprinted observations, and consumes the exact
|
|
154
|
+
delta; an approved business decision arrives as a new authority fingerprint, because the same
|
|
155
|
+
fingerprint cannot yield a different answer.
|
|
156
|
+
|
|
157
|
+
## Outputs
|
|
158
|
+
|
|
159
|
+
| Kind | File | Type | Required |
|
|
160
|
+
| --- | --- | --- | --- |
|
|
161
|
+
| `backend-source-application` | `response/response.md` | md | yes |
|
|
162
|
+
| `changes` | `response/changes.md` | md | yes |
|
|
163
|
+
| `mutations` | `response/data/mutations.json` | data | yes |
|
|
164
|
+
| `conformance` | `response/data/conformance/<operationId>.<facet>.json` | data | no |
|
|
165
|
+
| `proof` | `response/data/proofs/<operationId>.<proofKind>.json` | data | no |
|
|
166
|
+
|
|
167
|
+
## Stops
|
|
168
|
+
|
|
169
|
+
| Code | Disposition |
|
|
170
|
+
| --- | --- |
|
|
171
|
+
| `INVALID_INPUT` | terminate |
|
|
172
|
+
| `SOURCE_DRIFT` | terminate |
|
|
173
|
+
| `NO_PROGRESS` | terminate |
|
|
174
|
+
| `CONTRACT_UNFROZEN` | terminate |
|
|
175
|
+
| `CONTRACT_WIDENED` | terminate |
|
|
176
|
+
| `BUSINESS_AUTHORITY_MISSING` | terminate |
|
|
177
|
+
| `OWNER_CONFLICT` | terminate |
|
|
178
|
+
| `PATTERN_UNBOUND` | terminate |
|
|
179
|
+
| `PROOF_UNAVAILABLE` | terminate |
|
|
180
|
+
|
|
181
|
+
## Next
|
|
182
|
+
|
|
183
|
+
| When | Operator |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| the contract is filled and the gates the change record names must run | `quality.verify` |
|
|
186
|
+
| the promise must be reconciled against the source that was delivered | `business.decide` |
|
|
187
|
+
| the contract is filled and a frontend surface must consume it | `frontend.direction.decide` |
|
|
188
|
+
| a file needing mutation lies outside the routed write ceiling | `workspace.bind` |
|
|
189
|
+
| a declared proof cannot be executed in this environment | `platform.operate` |
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# backend.source.apply
|
|
2
|
+
|
|
3
|
+
## Việc
|
|
4
|
+
|
|
5
|
+
Cài đặt một kết quả backend bên trong một contract mutation đã đóng băng, theo đúng họ anh em quan
|
|
6
|
+
sát được, và trả về biên nhận conformance cùng proof đo được cho thấy ranh giới không bị nới ra.
|
|
7
|
+
|
|
8
|
+
## Contract đóng băng trước lần ghi đầu tiên
|
|
9
|
+
|
|
10
|
+
Contract tới dưới dạng Đầu vào `architecture-decision`, có fingerprint và đã đóng. Các operation,
|
|
11
|
+
writer, store, ranh giới giao dịch, kiểu idempotency và migration mà nó liệt kê là tập đầy đủ mà phần
|
|
12
|
+
cài đặt được chạm, và operator này chỉ trả lời một câu hỏi cho mỗi operation: đoạn code đang tồn tại
|
|
13
|
+
có làm đúng điều contract nói không, và phép đo nào cho thấy điều đó. Các operation không phải một
|
|
14
|
+
Yêu cầu, vì việc một người gõ lại contract vào request chính là cách contract và phần cài đặt lặng lẽ
|
|
15
|
+
tách nhau; bước 3 đọc chúng từ đầu vào đã đóng băng và ghi lại vào `response/data/mutations.json`. Ba
|
|
16
|
+
điều cấm gánh phần đó, và mỗi điều được cưỡng chế chứ không phải khuyên. Một operation, writer, store,
|
|
17
|
+
giao dịch, migration hay event nằm ngoài contract là `CONTRACT_WIDENED`, trả về cho chủ contract trước
|
|
18
|
+
mọi lần ghi vào sản phẩm. Một file ngoài trần file được sửa là `OWNER_CONFLICT`, kể cả khi thay đổi ở
|
|
19
|
+
đó chỉ một dòng. Một quy ước mà không pattern anh em nào đã ràng công bố thì bị từ chối và ghi lại là
|
|
20
|
+
`NEW_CONVENTION_REFUSED`, còn một khía cạnh không có pattern nào cả là `PATTERN_UNBOUND`. Phát hiện
|
|
21
|
+
giữa chừng rằng kết quả cần một ranh giới rộng hơn là cách kết thúc dự kiến của operator này, không
|
|
22
|
+
phải sự nhụt chí: chủ contract mở lại và đóng băng lại, rồi cùng kết quả ấy được cài đặt lại theo
|
|
23
|
+
fingerprint mới. Với tay ra ngoài danh sách không phải là thay đổi nhỏ hơn việc mở lại contract; nó là
|
|
24
|
+
cùng một thay đổi nhưng không có dấu vết.
|
|
25
|
+
|
|
26
|
+
## Không bao giờ ghi lên nhánh của người
|
|
27
|
+
|
|
28
|
+
Operator này không bao giờ ghi lên nhánh mà một người đang checkout. Orchestrator chuẩn bị một git
|
|
29
|
+
worktree riêng của checkout được route trên nhánh phiên `session/<sessionId>`, cắt từ head đã đóng
|
|
30
|
+
băng, và bước 3 ghi ở đó chứ không ở đâu khác, dưới một lease độc quyền trên `@workspaces/be`. Bước
|
|
31
|
+
cuối commit toàn bộ tập ghi đã khai đúng một lần, ghi sha ấy vào `response.json.commits`, và nêu cùng
|
|
32
|
+
sha ấy trong `response/data/mutations.json` ở trường `commit`, cạnh `base` nó xuất phát và `branch` nó
|
|
33
|
+
sống trên đó; `response/changes.md` nói đúng bước chuyển ấy ở hàng Binding, `@workspaces/be` tại
|
|
34
|
+
`<base>` → `<sha>` trên `session/<sessionId>`. Một commit, vì một bước mà công việc tới dưới dạng nhiều
|
|
35
|
+
commit thì bước sau không pin được trong request của nó, còn một lần ghi chưa commit thì không pin
|
|
36
|
+
được chút nào. Ở đây không push và không merge gì cả: `git.publish` merge nhánh phiên vào nhánh đích,
|
|
37
|
+
và nó là operator duy nhất nói chuyện với remote.
|
|
38
|
+
|
|
39
|
+
## Chế độ dry ghi bản kế hoạch, không ghi cây
|
|
40
|
+
|
|
41
|
+
`mode` quyết lượt chạy này có chạm vào checkout hay không. Dưới `apply`, operator điền contract,
|
|
42
|
+
commit một lần, và mọi điều bên dưới đúng y như đã viết. Dưới `dry`, nó vẫn đọc, vẫn ràng, vẫn chiếu
|
|
43
|
+
đúng như vậy, rồi dừng ngay sau bản kế hoạch: `response/data/mutations.json` mang những operation nó
|
|
44
|
+
sẽ điền và những file nó sẽ chạm, với `commit` rỗng và không hash sau, `response.json` không ghi
|
|
45
|
+
commit nào, và không một byte nào tới `@workspaces/be`. Nhánh vẫn kết thúc `done`, vì một bản kế
|
|
46
|
+
hoạch làm thật thà là một câu trả lời trọn vẹn cho một câu hỏi về kế hoạch; `changes.md` của nó liệt
|
|
47
|
+
mọi path đã định là `unchanged`, đúng như cây làm việc đang cho thấy, và nêu thay đổi nó sẽ làm ở cột
|
|
48
|
+
`Why`. Một lượt dry không đo gì cả, nên nó không mang bản ghi conformance và không mang bản ghi
|
|
49
|
+
proof: không thể đo một facet trên đoạn code chưa từng được viết, và một bản kế hoạch mà ship kèm
|
|
50
|
+
phán quyết thì không phân biệt nổi với một lần cài đặt thật. Đó cũng là lý do một lượt dry không bao
|
|
51
|
+
giờ là lượt thoả contract — nó là cách đọc trước tập ghi trước khi trả giá cho nó, không phải một
|
|
52
|
+
cách áp dụng rẻ hơn.
|
|
53
|
+
|
|
54
|
+
## Backend không bao giờ bịa hành vi nghiệp vụ
|
|
55
|
+
|
|
56
|
+
Mỗi operation dẫn các quyết định đã duyệt mà nó cài đặt. Khi đoạn code tới chỗ câu trả lời phụ thuộc
|
|
57
|
+
vào một luật nghiệp vụ chưa ai duyệt, nhánh dừng với `BUSINESS_AUTHORITY_MISSING` và nêu tên câu hỏi
|
|
58
|
+
còn mở. Nó không chọn cách đọc dễ dãi, không bắt chước feature bên cạnh tình cờ làm gì, và không chọn
|
|
59
|
+
nhánh nào làm test xanh. Đây là luật gánh nặng nhất của operator, vì một luật nghiệp vụ đoán ra mà qua
|
|
60
|
+
được test của chính nó thì không phân biệt nổi với một luật đã duyệt một khi đã ship. Vì vậy một biên
|
|
61
|
+
nhận đã cài đặt không thể mang finding `BUSINESS_QUESTION_RAISED`: nêu câu hỏi rồi vẫn cài đặt chính
|
|
62
|
+
là mâu thuẫn mà phép kiểm này sinh ra để bắt.
|
|
63
|
+
|
|
64
|
+
## Pattern anh em là nguồn quy ước duy nhất
|
|
65
|
+
|
|
66
|
+
Các pattern đã ràng nêu một họ cho mỗi khía cạnh, và phần cài đặt bắt chước họ mà codebase đang công
|
|
67
|
+
bố chứ không phải họ mà nó nhớ: command handler theo họ mà tầng mutation đang dùng, exception dẫn xuất
|
|
68
|
+
từ định danh exception đã công bố, truy cập entity qua entity manager chính được tiêm, migration dưới
|
|
69
|
+
datasource chính. Hai họ cùng ràng cho một khía cạnh nghĩa là không họ nào được ràng, và đoán họ từ
|
|
70
|
+
trí nhớ chính là cách một kiểu nhà thứ hai lọt vào codebase mà không ai để ý.
|
|
71
|
+
|
|
72
|
+
## Conformance là đo được, không phải khẳng định
|
|
73
|
+
|
|
74
|
+
Một bản ghi conformance không có bằng chứng chỉ là một câu nói về đoạn code, và một câu nói không mâu
|
|
75
|
+
thuẫn nổi với code. Mỗi facet đã khai của mỗi operation có file riêng,
|
|
76
|
+
`response/data/conformance/<operationId>.<facet>.json`, nên một facet không ai đo là một file thiếu
|
|
77
|
+
chứ không phải một dòng thiếu bên trong một file trông vẫn đầy đủ. Bằng chứng là thứ người đọc sau
|
|
78
|
+
dùng để phản đối biên nhận này, nên nó bắt buộc cho mọi facet, kể cả những facet đã qua. Cùng lý lẽ ấy
|
|
79
|
+
khiến một proof phải mang câu lệnh, mã thoát và output trong
|
|
80
|
+
`response/data/proofs/<operationId>.<kind>.json`: câu lệnh nói đã chạy gì và kết quả nói cái gì trả
|
|
81
|
+
về, còn mỗi thứ đứng một mình đều có thể do người chưa chạy gì viết ra. Một proof không chạy được
|
|
82
|
+
không bao giờ trở thành khẳng định rằng hành vi vẫn ổn, và một proof hỏng chặn biên nhận chứ không
|
|
83
|
+
được phân loại lại. Mỗi file bị chạm mang một bản ghi thay đổi kèm loại và hash trước/sau, vì một file
|
|
84
|
+
sửa mà hai hash bằng nhau ghi lại một mutation không hề xảy ra.
|
|
85
|
+
|
|
86
|
+
## Ranh giới
|
|
87
|
+
|
|
88
|
+
Operator chỉ ghi source sản phẩm bên trong trần file được sửa, chỉ bên trong worktree nhánh phiên của
|
|
89
|
+
`@workspaces/be`, và ghi mọi thứ khác vào `response/` của nhánh mình: `response.md`,
|
|
90
|
+
`response/changes.md`, `response/data/mutations.json`, một bản ghi conformance cho mỗi facet đã khai,
|
|
91
|
+
một bản ghi proof cho mỗi proof đã khai, và `response.json`. Nó không bao giờ thêm một operation,
|
|
92
|
+
writer, store, giao dịch, migration hay event mà contract đóng băng không mang, không quyết một luật
|
|
93
|
+
nghiệp vụ mà thẩm quyền đã duyệt không nói, không đưa vào một quy ước mà không pattern anh em nào công
|
|
94
|
+
bố, không làm yếu, bỏ qua, chặn hay thay thế một proof đã khai để một lượt chạy thành xanh, không sửa
|
|
95
|
+
contract, thẩm quyền nghiệp vụ hay một file ngoài trần được sửa, không commit quá một lần, không ghi
|
|
96
|
+
lên nhánh mà người đang checkout, không push, merge hay tag gì, không tuyên bố conformance mà không
|
|
97
|
+
nêu bằng chứng đã đo nó, và không ghi phán quyết chất lượng, thị giác hay UAT; đó là những việc khác
|
|
98
|
+
với cổng riêng của chúng.
|
|
99
|
+
|
|
100
|
+
## Context
|
|
101
|
+
|
|
102
|
+
| Alias | Bind | Bắt buộc |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| `@worktrees/businesses/<featureId>` | head nghiệp vụ đã publish, nguồn duy nhất của hành vi nghiệp vụ | có |
|
|
105
|
+
| `@knowledge/patterns/be` | các họ anh em mà thay đổi này bắt chước, mỗi khía cạnh một họ; nguồn quy ước hợp lệ duy nhất | có |
|
|
106
|
+
| `@workspaces/be` | checkout backend được route ở head đóng băng, chỉ ghi trên worktree nhánh phiên của nó | có |
|
|
107
|
+
|
|
108
|
+
## Đầu vào
|
|
109
|
+
|
|
110
|
+
| Kind | Từ đâu | Bắt buộc |
|
|
111
|
+
| --- | --- | --- |
|
|
112
|
+
| `architecture-decision` | `architecture.decide`; contract mutation đã đóng băng mà phần cài đặt điền vào và không được nới | có |
|
|
113
|
+
| `backend-source-application` | một lượt chạy trước của `backend.source.apply` cho cùng kết quả; lịch sử hồi quy, vắng mặt ở lần đầu | không |
|
|
114
|
+
|
|
115
|
+
## Yêu cầu
|
|
116
|
+
|
|
117
|
+
| Field | Kiểu | Mặc định | Hỏi |
|
|
118
|
+
| --- | --- | --- | --- |
|
|
119
|
+
| `featureId` | id | — | Feature mà head nghiệp vụ đã publish của nó quyết hành vi này |
|
|
120
|
+
| `outcome` | prompt | — | Một thứ duy nhất đang được cài đặt, bằng lời của người dùng |
|
|
121
|
+
| `mutableFileRefs` | list | — | Những file duy nhất mà source sản phẩm được ghi vào |
|
|
122
|
+
| `mode` | choice | apply | `apply` điền contract rồi commit, `dry` chỉ phát bản kế hoạch và không ghi gì |
|
|
123
|
+
| `resume` | token | null | Token của nhánh bị chặn khi vào lại sau một mã dừng |
|
|
124
|
+
|
|
125
|
+
## Các bước
|
|
126
|
+
|
|
127
|
+
| # | Bước | Tham số | Đọc | Ghi | Dừng với |
|
|
128
|
+
| --- | --- | --- | --- | --- | --- |
|
|
129
|
+
| 1 | Kiểm gate và chạy lại | `resume`, `mode` | `request/request.json`, đầu vào `backend-source-application` nếu có, @workspaces/be ở head đóng băng | — | `INVALID_INPUT`, `SOURCE_DRIFT`, `NO_PROGRESS` |
|
|
130
|
+
| 2 | Ràng thẩm quyền, contract và pattern | `featureId` | @worktrees/businesses/<featureId> ở head đã publish, đầu vào `architecture-decision` làm contract đóng băng, @knowledge/patterns/be mỗi khía cạnh một pattern | — | `CONTRACT_UNFROZEN`, `BUSINESS_AUTHORITY_MISSING`, `PATTERN_UNBOUND` |
|
|
131
|
+
| 3 | Điền từng operation của contract, trên nhánh phiên | `mutableFileRefs` | @knowledge/patterns/be cho từng khía cạnh, @workspaces/be trong trần được sửa | @workspaces/be/branch/session trong trần được sửa, dưới một lease độc quyền, @tools/sourcewrite | `CONTRACT_WIDENED`, `OWNER_CONFLICT` |
|
|
132
|
+
| 4 | Đối chiếu mọi mutation với contract đóng băng và ghi nó kèm hash trước và sau | `mode` | @workspaces/be, các file bị chạm và contract đóng băng | `response/data/mutations.json` | — |
|
|
133
|
+
| 5 | Kiểm lại snapshot đã lưu khi đọc | — | @workspaces/be, snapshot đã lưu, @knowledge/patterns/be cho các luật trôi sau nó | — | — |
|
|
134
|
+
| 6 | Chứng minh từng facet đã khai | — | @workspaces/be, phép đo đứng sau mỗi facet | `response/data/conformance/<operationId>.<facet>.json` | — |
|
|
135
|
+
| 7 | Chạy từng proof đã khai | — | @workspaces/be, câu lệnh đã pin của mỗi kiểu proof đã khai | `response/data/proofs/<operationId>.<proofKind>.json`, @tools/shell | `PROOF_UNAVAILABLE` |
|
|
136
|
+
| 8 | Commit tập ghi đúng một lần, viết biên nhận và phát | `outcome` | mọi thứ ở trên | @workspaces/be/branch/session thành một commit, `response/changes.md`, `response/response.md`, `response/response.json`, @tools/git | — |
|
|
137
|
+
|
|
138
|
+
Dưới `mode = dry`, bước 3 chiếu phần điền lên các path đã khai mà không ghi lấy một path nào, bước 4
|
|
139
|
+
ghi bản chiếu ấy thành kế hoạch với commit rỗng và không hash sau, bước 5 tới 7 không có gì để đo nên
|
|
140
|
+
không phát ra gì, và bước 8 phát biên nhận cùng bản ghi thay đổi mà không có commit. Dưới `apply`,
|
|
141
|
+
mọi bước chạy đúng như đã viết. Head được route được kiểm lại ngay trước lần ghi sản phẩm đầu tiên, nên trôi head phát hiện ở đó dừng
|
|
142
|
+
nhánh trước khi có gì được ghi. Điền một operation là viết transport, phần kiểm tra hợp lệ, phần kiểm
|
|
143
|
+
quyền, phần truy cập dữ liệu và các đường lỗi vào writer đã khai cùng những file mà thay đổi thực sự
|
|
144
|
+
đòi; nó từ chối to và sớm chứ không im lặng bỏ rơi một trường hợp, ném ra exception mà pattern định
|
|
145
|
+
danh exception công bố trước khi có dòng nào hay checkout ngoài nào được tạo. Khi kết quả lưu một
|
|
146
|
+
workflow, phiên, giỏ, bản nháp hay snapshot khác, tính dùng được lại được cưỡng chế ở nơi nó được
|
|
147
|
+
đọc, đối chiếu phía server, theo thứ tự ổn định, với chỉ mục ánh xạ lại nguyên tử và một trạng thái
|
|
148
|
+
kết thúc tường minh khi không còn gì để làm, và được ghi là `SNAPSHOT_REVALIDATED`. Chạy lại thì bắt
|
|
149
|
+
đầu lại từ bước 1, chỉ dùng lại quan sát có fingerprint không đổi, và tiêu thụ đúng phần delta; một
|
|
150
|
+
quyết định nghiệp vụ đã duyệt tới dưới dạng một fingerprint thẩm quyền mới, vì cùng một fingerprint
|
|
151
|
+
không thể cho một câu trả lời khác.
|
|
152
|
+
|
|
153
|
+
## Đầu ra
|
|
154
|
+
|
|
155
|
+
| Kind | File | Kiểu | Bắt buộc |
|
|
156
|
+
| --- | --- | --- | --- |
|
|
157
|
+
| `backend-source-application` | `response/response.md` | md | có |
|
|
158
|
+
| `changes` | `response/changes.md` | md | có |
|
|
159
|
+
| `mutations` | `response/data/mutations.json` | data | có |
|
|
160
|
+
| `conformance` | `response/data/conformance/<operationId>.<facet>.json` | data | không |
|
|
161
|
+
| `proof` | `response/data/proofs/<operationId>.<proofKind>.json` | data | không |
|
|
162
|
+
|
|
163
|
+
## Dừng
|
|
164
|
+
|
|
165
|
+
| Code | Xử lý |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| `INVALID_INPUT` | terminate |
|
|
168
|
+
| `SOURCE_DRIFT` | terminate |
|
|
169
|
+
| `NO_PROGRESS` | terminate |
|
|
170
|
+
| `CONTRACT_UNFROZEN` | terminate |
|
|
171
|
+
| `CONTRACT_WIDENED` | terminate |
|
|
172
|
+
| `BUSINESS_AUTHORITY_MISSING` | terminate |
|
|
173
|
+
| `OWNER_CONFLICT` | terminate |
|
|
174
|
+
| `PATTERN_UNBOUND` | terminate |
|
|
175
|
+
| `PROOF_UNAVAILABLE` | terminate |
|
|
176
|
+
|
|
177
|
+
## Kế tiếp
|
|
178
|
+
|
|
179
|
+
| Khi | Operator |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| contract đã điền xong và các cổng mà bản ghi thay đổi nêu tên phải chạy | `quality.verify` |
|
|
182
|
+
| lời hứa phải được đối chiếu với source đã giao | `business.decide` |
|
|
183
|
+
| contract đã điền xong và một bề mặt frontend phải tiêu thụ nó | `frontend.direction.decide` |
|
|
184
|
+
| một file cần sửa nằm ngoài trần ghi được route | `workspace.bind` |
|
|
185
|
+
| một proof đã khai không chạy được trong môi trường này | `platform.operate` |
|