dic-workflow-kit 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.codex-plugin/plugin.json +14 -10
  2. package/CHANGELOG.md +124 -1
  3. package/INSTRUCTION.md +232 -10
  4. package/README.md +376 -113
  5. package/README.zh-CN.md +342 -130
  6. package/adapters/bdd/README.md +21 -0
  7. package/adapters/bitfun/README.md +12 -2
  8. package/agents/adversarial-challenger.md +23 -0
  9. package/agents/code-repairer.md +8 -1
  10. package/agents/contract-oracle.md +4 -1
  11. package/agents/evidence-auditor.md +23 -0
  12. package/agents/final-reviewer.md +26 -2
  13. package/agents/flow-auditor.md +1 -1
  14. package/agents/impact-analyst.md +21 -0
  15. package/agents/impl-inspector.md +7 -1
  16. package/agents/profile-builder.md +7 -3
  17. package/agents/repair-planner.md +10 -1
  18. package/agents/semantic-conflict-auditor.md +21 -0
  19. package/agents/spec-reader.md +4 -1
  20. package/agents/validation-runner.md +11 -1
  21. package/dist/dic-workflow-kit.mjs +18 -7
  22. package/package.json +5 -2
  23. package/schemas/final-result.schema.json +35 -2
  24. package/schemas/harness-plan.schema.json +143 -0
  25. package/schemas/harness-run.schema.json +75 -0
  26. package/schemas/ontology-action-record.schema.json +62 -0
  27. package/schemas/ontology-action.schema.json +118 -0
  28. package/schemas/ontology-attestation.schema.json +187 -0
  29. package/schemas/ontology-patch.schema.json +48 -0
  30. package/schemas/ontology-snapshot.schema.json +326 -0
  31. package/schemas/project-profile.schema.json +44 -0
  32. package/skills/knowledge-bdd/SKILL.md +14 -2
  33. package/skills/knowledge-change-impact/SKILL.md +43 -0
  34. package/skills/knowledge-change-impact/agents/openai.yaml +4 -0
  35. package/skills/knowledge-openspec/SKILL.md +2 -1
  36. package/skills/knowledge-repair-distill/SKILL.md +2 -1
  37. package/skills/quality-adversarial-challenge/SKILL.md +42 -0
  38. package/skills/quality-adversarial-challenge/agents/openai.yaml +4 -0
  39. package/skills/quality-ci-gate/SKILL.md +45 -0
  40. package/skills/quality-ci-gate/agents/openai.yaml +4 -0
  41. package/skills/quality-ci-gate/references/ci-gate.md +22 -0
  42. package/skills/quality-code-review/SKILL.md +32 -0
  43. package/skills/quality-code-review/agents/openai.yaml +4 -0
  44. package/skills/quality-code-review/references/code-review.md +13 -0
  45. package/skills/quality-cross-spec-consistency/SKILL.md +45 -0
  46. package/skills/quality-cross-spec-consistency/agents/openai.yaml +4 -0
  47. package/skills/quality-dt-review/SKILL.md +32 -0
  48. package/skills/quality-dt-review/agents/openai.yaml +4 -0
  49. package/skills/quality-dt-review/references/dt-review.md +14 -0
  50. package/skills/quality-evidence-audit/SKILL.md +41 -0
  51. package/skills/quality-evidence-audit/agents/openai.yaml +4 -0
  52. package/skills/quality-repository-gate/SKILL.md +38 -0
  53. package/skills/quality-repository-gate/agents/openai.yaml +4 -0
  54. package/skills/quality-repository-gate/references/repository-gate.md +13 -0
  55. package/skills/quality-review-orchestrator/SKILL.md +100 -0
  56. package/skills/quality-review-orchestrator/agents/openai.yaml +4 -0
  57. package/skills/quality-review-orchestrator/references/quality-model.md +73 -0
  58. package/skills/quality-spec-review/SKILL.md +40 -0
  59. package/skills/quality-spec-review/agents/openai.yaml +4 -0
  60. package/skills/quality-spec-review/references/spec-review.md +14 -0
  61. package/skills/quality-sr-ar-review/SKILL.md +32 -0
  62. package/skills/quality-sr-ar-review/agents/openai.yaml +4 -0
  63. package/skills/quality-sr-ar-review/references/sr-ar-review.md +14 -0
  64. package/skills/workflow-core/SKILL.md +109 -1
  65. package/skills/workflow-harness/SKILL.md +73 -0
  66. package/skills/workflow-harness/agents/openai.yaml +4 -0
  67. package/skills/workflow-intake/SKILL.md +9 -2
  68. package/skills/workflow-profile/SKILL.md +17 -1
  69. package/skills/workflow-repair/SKILL.md +8 -4
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dicworkflowkit.local/schemas/ontology-action-record.schema.json",
4
+ "title": "DIC Ontology Action Ledger Record",
5
+ "description": "One immutable entry in reports/ontology-actions.jsonl.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/legacyRecord" },
8
+ { "$ref": "#/$defs/chainedRecord" }
9
+ ],
10
+ "$defs": {
11
+ "legacyRecord": {
12
+ "type": "object",
13
+ "required": ["schema", "recordedAt", "sha256", "action"],
14
+ "properties": {
15
+ "schema": { "const": "dic.ontology-action-record.v1" },
16
+ "recordedAt": { "type": "string", "format": "date-time" },
17
+ "sha256": {
18
+ "type": "string",
19
+ "pattern": "^[a-f0-9]{64}$"
20
+ },
21
+ "action": { "$ref": "ontology-action.schema.json" }
22
+ },
23
+ "additionalProperties": false
24
+ },
25
+ "chainedRecord": {
26
+ "type": "object",
27
+ "required": [
28
+ "schema",
29
+ "sequence",
30
+ "recordedAt",
31
+ "previousHash",
32
+ "baseSnapshotRevision",
33
+ "actionHash",
34
+ "recordHash",
35
+ "action"
36
+ ],
37
+ "properties": {
38
+ "schema": { "const": "dic.ontology-action-record.v2" },
39
+ "sequence": { "type": "integer", "minimum": 1 },
40
+ "recordedAt": { "type": "string", "format": "date-time" },
41
+ "previousHash": {
42
+ "type": "string",
43
+ "pattern": "^[a-f0-9]{64}$"
44
+ },
45
+ "baseSnapshotRevision": {
46
+ "type": "string",
47
+ "pattern": "^[a-f0-9]{64}$"
48
+ },
49
+ "actionHash": {
50
+ "type": "string",
51
+ "pattern": "^[a-f0-9]{64}$"
52
+ },
53
+ "recordHash": {
54
+ "type": "string",
55
+ "pattern": "^[a-f0-9]{64}$"
56
+ },
57
+ "action": { "$ref": "ontology-action.schema.json" }
58
+ },
59
+ "additionalProperties": false
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,118 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dicworkflowkit.local/schemas/ontology-action.schema.json",
4
+ "title": "DIC Ontology Action",
5
+ "description": "Auditable request to change ontology or repository state.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema",
9
+ "id",
10
+ "type",
11
+ "actor",
12
+ "status",
13
+ "targets",
14
+ "preconditions",
15
+ "postconditions",
16
+ "evidence"
17
+ ],
18
+ "properties": {
19
+ "schema": { "const": "dic.ontology-action.v1" },
20
+ "id": {
21
+ "type": "string",
22
+ "pattern": "^act-[a-zA-Z0-9._:-]+$"
23
+ },
24
+ "type": {
25
+ "enum": [
26
+ "IntakeDesignSource",
27
+ "ConfirmObligation",
28
+ "ObserveImplementation",
29
+ "OpenGap",
30
+ "ProposeRepair",
31
+ "ApproveRepair",
32
+ "ApplyRepair",
33
+ "RunValidation",
34
+ "AttachEvidence",
35
+ "CloseGap",
36
+ "MarkBlocked",
37
+ "SupersedeSource",
38
+ "RegisterCandidate",
39
+ "RecordGateRun",
40
+ "AssertClaim",
41
+ "ChallengeClaim",
42
+ "RecordCounterexample",
43
+ "RecordDecision",
44
+ "RecordWaiver",
45
+ "RegisterPolicy"
46
+ ]
47
+ },
48
+ "actor": { "type": "string", "minLength": 1 },
49
+ "expectedSnapshotRevision": {
50
+ "type": "string",
51
+ "pattern": "^[a-f0-9]{64}$",
52
+ "description": "Optional optimistic-concurrency precondition for authored actions."
53
+ },
54
+ "status": {
55
+ "enum": [
56
+ "proposed",
57
+ "approved",
58
+ "in_progress",
59
+ "completed",
60
+ "rejected",
61
+ "blocked",
62
+ "rolled_back"
63
+ ]
64
+ },
65
+ "targets": {
66
+ "type": "array",
67
+ "items": { "type": "string" },
68
+ "minItems": 1,
69
+ "uniqueItems": true
70
+ },
71
+ "parameters": {
72
+ "type": "object",
73
+ "properties": {
74
+ "ontologyPatch": {
75
+ "$ref": "ontology-patch.schema.json"
76
+ }
77
+ },
78
+ "additionalProperties": true
79
+ },
80
+ "preconditions": {
81
+ "type": "array",
82
+ "items": { "$ref": "#/$defs/condition" }
83
+ },
84
+ "postconditions": {
85
+ "type": "array",
86
+ "items": { "$ref": "#/$defs/condition" }
87
+ },
88
+ "allowedPaths": {
89
+ "type": "array",
90
+ "items": { "type": "string" },
91
+ "uniqueItems": true
92
+ },
93
+ "evidence": {
94
+ "type": "array",
95
+ "items": { "type": "string" },
96
+ "uniqueItems": true
97
+ },
98
+ "rollback": {
99
+ "type": ["string", "null"]
100
+ }
101
+ },
102
+ "$defs": {
103
+ "condition": {
104
+ "type": "object",
105
+ "required": ["description", "status"],
106
+ "properties": {
107
+ "description": { "type": "string", "minLength": 1 },
108
+ "status": { "enum": ["PENDING", "PASS", "FAIL"] },
109
+ "evidence": {
110
+ "type": "array",
111
+ "items": { "type": "string" }
112
+ }
113
+ },
114
+ "additionalProperties": false
115
+ }
116
+ },
117
+ "additionalProperties": false
118
+ }
@@ -0,0 +1,187 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dicworkflowkit.local/schemas/ontology-attestation.schema.json",
4
+ "title": "DIC Ontology Attestation",
5
+ "description": "Content-addressed final decision bound to ontology, ledger, sources, and invariants.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema",
9
+ "attestationId",
10
+ "contentHash",
11
+ "version",
12
+ "status",
13
+ "final",
14
+ "summary",
15
+ "createdAt",
16
+ "snapshot",
17
+ "ledger",
18
+ "sources",
19
+ "evidence",
20
+ "implementations",
21
+ "validationCausality",
22
+ "invariants"
23
+ ],
24
+ "properties": {
25
+ "schema": { "const": "dic.ontology-attestation.v1" },
26
+ "attestationId": {
27
+ "type": "string",
28
+ "pattern": "^att-[a-f0-9]{16}$"
29
+ },
30
+ "contentHash": {
31
+ "type": "string",
32
+ "pattern": "^[a-f0-9]{64}$"
33
+ },
34
+ "version": { "type": "string" },
35
+ "status": { "enum": ["PASS", "PARTIAL", "BLOCKED", "FAIL"] },
36
+ "final": { "const": true },
37
+ "summary": { "type": "string", "minLength": 1 },
38
+ "createdAt": { "type": "string", "format": "date-time" },
39
+ "snapshot": {
40
+ "type": "object",
41
+ "required": ["snapshotId", "snapshotRevision"],
42
+ "properties": {
43
+ "snapshotId": { "type": "string" },
44
+ "snapshotRevision": {
45
+ "type": "string",
46
+ "pattern": "^[a-f0-9]{64}$"
47
+ }
48
+ },
49
+ "additionalProperties": false
50
+ },
51
+ "ledger": {
52
+ "type": "object",
53
+ "required": ["sha256", "actionCount", "headHash"],
54
+ "properties": {
55
+ "sha256": {
56
+ "type": "string",
57
+ "pattern": "^[a-f0-9]{64}$"
58
+ },
59
+ "actionCount": { "type": "integer", "minimum": 0 },
60
+ "headHash": {
61
+ "type": "string",
62
+ "pattern": "^[a-f0-9]{64}$"
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ },
67
+ "sources": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "required": ["id", "path", "status", "contentHash"],
72
+ "properties": {
73
+ "id": { "type": "string" },
74
+ "path": { "type": "string" },
75
+ "status": {
76
+ "enum": [
77
+ "UNCHANGED",
78
+ "CHANGED",
79
+ "MISSING",
80
+ "UNTRACKED",
81
+ "OUTSIDE_PROJECT",
82
+ "INVALID"
83
+ ]
84
+ },
85
+ "contentHash": { "type": "string" }
86
+ },
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "evidence": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "required": ["id", "path", "status", "contentHash"],
95
+ "properties": {
96
+ "id": { "type": "string" },
97
+ "path": { "type": "string" },
98
+ "status": {
99
+ "enum": [
100
+ "UNCHANGED",
101
+ "CHANGED",
102
+ "MISSING",
103
+ "UNTRACKED",
104
+ "OUTSIDE_PROJECT",
105
+ "INACTIVE",
106
+ "INVALID"
107
+ ]
108
+ },
109
+ "contentHash": { "type": "string" }
110
+ },
111
+ "additionalProperties": false
112
+ }
113
+ },
114
+ "implementations": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "object",
118
+ "required": ["id", "path", "status", "contentHash"],
119
+ "properties": {
120
+ "id": { "type": "string" },
121
+ "path": { "type": "string" },
122
+ "status": {
123
+ "enum": [
124
+ "UNCHANGED",
125
+ "CHANGED",
126
+ "MISSING",
127
+ "UNTRACKED",
128
+ "OUTSIDE_PROJECT",
129
+ "INACTIVE",
130
+ "INVALID"
131
+ ]
132
+ },
133
+ "contentHash": { "type": "string" }
134
+ },
135
+ "additionalProperties": false
136
+ }
137
+ },
138
+ "validationCausality": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "object",
142
+ "required": [
143
+ "id",
144
+ "status",
145
+ "targetIds",
146
+ "requiredInputIds",
147
+ "missingInputIds",
148
+ "staleInputIds"
149
+ ],
150
+ "properties": {
151
+ "id": { "type": "string" },
152
+ "status": {
153
+ "enum": ["CURRENT", "INCOMPLETE", "STALE", "INVALID"]
154
+ },
155
+ "targetIds": {
156
+ "type": "array",
157
+ "items": { "type": "string" },
158
+ "uniqueItems": true
159
+ },
160
+ "requiredInputIds": {
161
+ "type": "array",
162
+ "items": { "type": "string" },
163
+ "uniqueItems": true
164
+ },
165
+ "missingInputIds": {
166
+ "type": "array",
167
+ "items": { "type": "string" },
168
+ "uniqueItems": true
169
+ },
170
+ "staleInputIds": {
171
+ "type": "array",
172
+ "items": { "type": "string" },
173
+ "uniqueItems": true
174
+ }
175
+ },
176
+ "additionalProperties": false
177
+ }
178
+ },
179
+ "invariants": {
180
+ "type": "array",
181
+ "items": {
182
+ "$ref": "ontology-snapshot.schema.json#/$defs/invariantResult"
183
+ }
184
+ }
185
+ },
186
+ "additionalProperties": false
187
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dicworkflowkit.local/schemas/ontology-patch.schema.json",
4
+ "title": "DIC Ontology Patch",
5
+ "description": "Declarative semantic effects produced by one authorized ontology action.",
6
+ "type": "object",
7
+ "properties": {
8
+ "addObjects": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "ontology-snapshot.schema.json#/$defs/object"
12
+ }
13
+ },
14
+ "addLinks": {
15
+ "type": "array",
16
+ "items": {
17
+ "$ref": "ontology-snapshot.schema.json#/$defs/link"
18
+ }
19
+ },
20
+ "lifecycleTransitions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": ["objectId", "to"],
25
+ "properties": {
26
+ "objectId": { "type": "string" },
27
+ "to": {
28
+ "enum": [
29
+ "draft",
30
+ "confirmed",
31
+ "active",
32
+ "deprecated",
33
+ "superseded",
34
+ "rejected",
35
+ "open",
36
+ "approved",
37
+ "in_progress",
38
+ "resolved",
39
+ "blocked"
40
+ ]
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ }