@diff-review-system/drs 4.1.0 → 5.0.0-rc.1

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 (145) hide show
  1. package/.pi/agents/task/okf-wiki-maintainer.md +72 -0
  2. package/.pi/workflows/github-pr-fix-review-issues-stacked.yaml +2 -0
  3. package/.pi/workflows/github-pr-review-post.yaml +29 -19
  4. package/.pi/workflows/github-pr-review.yaml +23 -0
  5. package/.pi/workflows/github-pr-update-agents-md-stacked.yaml +2 -0
  6. package/.pi/workflows/gitlab-mr-fix-review-issues-stacked.yaml +2 -0
  7. package/.pi/workflows/gitlab-mr-review.yaml +6 -0
  8. package/.pi/workflows/gitlab-mr-update-agents-md-stacked.yaml +2 -0
  9. package/.pi/workflows/release-changelog-finalize.yaml +10 -0
  10. package/.pi/workflows/repository-wiki-check.yaml +40 -0
  11. package/.pi/workflows/repository-wiki-sync.yaml +187 -0
  12. package/.wiki-site/.vitepress/config.mts +452 -0
  13. package/.wiki-site/.vitepress/theme/PageLead.vue +122 -0
  14. package/.wiki-site/.vitepress/theme/index.ts +12 -0
  15. package/.wiki-site/.vitepress/theme/style.css +270 -0
  16. package/README.md +38 -4
  17. package/dist/cli/index.js +3 -127
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/cli/init.d.ts.map +1 -1
  20. package/dist/cli/init.js +0 -3
  21. package/dist/cli/init.js.map +1 -1
  22. package/dist/cli/run-agent.d.ts +3 -0
  23. package/dist/cli/run-agent.d.ts.map +1 -1
  24. package/dist/cli/run-agent.js +56 -5
  25. package/dist/cli/run-agent.js.map +1 -1
  26. package/dist/cli/wiki.d.ts +3 -0
  27. package/dist/cli/wiki.d.ts.map +1 -0
  28. package/dist/cli/wiki.js +174 -0
  29. package/dist/cli/wiki.js.map +1 -0
  30. package/dist/cli/workflow.d.ts +2 -0
  31. package/dist/cli/workflow.d.ts.map +1 -1
  32. package/dist/cli/workflow.js +344 -31
  33. package/dist/cli/workflow.js.map +1 -1
  34. package/dist/github/client.d.ts.map +1 -1
  35. package/dist/github/client.js +2 -2
  36. package/dist/github/client.js.map +1 -1
  37. package/dist/github/platform-adapter.d.ts.map +1 -1
  38. package/dist/github/platform-adapter.js +15 -1
  39. package/dist/github/platform-adapter.js.map +1 -1
  40. package/dist/gitlab/client.d.ts +4 -0
  41. package/dist/gitlab/client.d.ts.map +1 -1
  42. package/dist/gitlab/client.js +17 -1
  43. package/dist/gitlab/client.js.map +1 -1
  44. package/dist/gitlab/platform-adapter.d.ts.map +1 -1
  45. package/dist/gitlab/platform-adapter.js +17 -1
  46. package/dist/gitlab/platform-adapter.js.map +1 -1
  47. package/dist/lib/agent-permissions.d.ts +44 -0
  48. package/dist/lib/agent-permissions.d.ts.map +1 -0
  49. package/dist/lib/agent-permissions.js +358 -0
  50. package/dist/lib/agent-permissions.js.map +1 -0
  51. package/dist/lib/agent-result.d.ts +2 -0
  52. package/dist/lib/agent-result.d.ts.map +1 -1
  53. package/dist/lib/comment-poster.d.ts +1 -1
  54. package/dist/lib/comment-poster.d.ts.map +1 -1
  55. package/dist/lib/comment-poster.js +38 -16
  56. package/dist/lib/comment-poster.js.map +1 -1
  57. package/dist/lib/config.d.ts +6 -1
  58. package/dist/lib/config.d.ts.map +1 -1
  59. package/dist/lib/config.js +17 -0
  60. package/dist/lib/config.js.map +1 -1
  61. package/dist/lib/error-comment-poster.d.ts +1 -1
  62. package/dist/lib/error-comment-poster.d.ts.map +1 -1
  63. package/dist/lib/error-comment-poster.js +15 -7
  64. package/dist/lib/error-comment-poster.js.map +1 -1
  65. package/dist/lib/okf-wiki.d.ts +65 -0
  66. package/dist/lib/okf-wiki.d.ts.map +1 -0
  67. package/dist/lib/okf-wiki.js +647 -0
  68. package/dist/lib/okf-wiki.js.map +1 -0
  69. package/dist/lib/platform-client.d.ts +2 -0
  70. package/dist/lib/platform-client.d.ts.map +1 -1
  71. package/dist/lib/project-setup.d.ts +0 -3
  72. package/dist/lib/project-setup.d.ts.map +1 -1
  73. package/dist/lib/project-setup.js +1 -15
  74. package/dist/lib/project-setup.js.map +1 -1
  75. package/dist/lib/review-artifact.d.ts +11 -1
  76. package/dist/lib/review-artifact.d.ts.map +1 -1
  77. package/dist/lib/review-artifact.js +202 -0
  78. package/dist/lib/review-artifact.js.map +1 -1
  79. package/dist/lib/review-orchestrator.d.ts +6 -1
  80. package/dist/lib/review-orchestrator.d.ts.map +1 -1
  81. package/dist/lib/review-orchestrator.js +3 -1
  82. package/dist/lib/review-orchestrator.js.map +1 -1
  83. package/dist/lib/wiki-delta.d.ts +71 -0
  84. package/dist/lib/wiki-delta.d.ts.map +1 -0
  85. package/dist/lib/wiki-delta.js +524 -0
  86. package/dist/lib/wiki-delta.js.map +1 -0
  87. package/dist/lib/wiki-run-summary.d.ts +45 -0
  88. package/dist/lib/wiki-run-summary.d.ts.map +1 -0
  89. package/dist/lib/wiki-run-summary.js +168 -0
  90. package/dist/lib/wiki-run-summary.js.map +1 -0
  91. package/dist/lib/wiki-search.d.ts +24 -0
  92. package/dist/lib/wiki-search.d.ts.map +1 -0
  93. package/dist/lib/wiki-search.js +200 -0
  94. package/dist/lib/wiki-search.js.map +1 -0
  95. package/dist/lib/wiki-site-graph.d.ts +33 -0
  96. package/dist/lib/wiki-site-graph.d.ts.map +1 -0
  97. package/dist/lib/wiki-site-graph.js +446 -0
  98. package/dist/lib/wiki-site-graph.js.map +1 -0
  99. package/dist/lib/wiki-site-safety.d.ts +6 -0
  100. package/dist/lib/wiki-site-safety.d.ts.map +1 -0
  101. package/dist/lib/wiki-site-safety.js +83 -0
  102. package/dist/lib/wiki-site-safety.js.map +1 -0
  103. package/dist/lib/wiki-site-smoke.d.ts +16 -0
  104. package/dist/lib/wiki-site-smoke.d.ts.map +1 -0
  105. package/dist/lib/wiki-site-smoke.js +270 -0
  106. package/dist/lib/wiki-site-smoke.js.map +1 -0
  107. package/dist/lib/wiki-site.d.ts +26 -0
  108. package/dist/lib/wiki-site.d.ts.map +1 -0
  109. package/dist/lib/wiki-site.js +221 -0
  110. package/dist/lib/wiki-site.js.map +1 -0
  111. package/dist/lib/workflow/planning.d.ts +1 -0
  112. package/dist/lib/workflow/planning.d.ts.map +1 -1
  113. package/dist/lib/workflow/planning.js +53 -2
  114. package/dist/lib/workflow/planning.js.map +1 -1
  115. package/dist/lib/workflow/types.d.ts +5 -0
  116. package/dist/lib/workflow/types.d.ts.map +1 -1
  117. package/dist/lib/workflow-artifacts.d.ts.map +1 -1
  118. package/dist/lib/workflow-artifacts.js +23 -1
  119. package/dist/lib/workflow-artifacts.js.map +1 -1
  120. package/dist/pi/sdk.d.ts.map +1 -1
  121. package/dist/pi/sdk.js +270 -17
  122. package/dist/pi/sdk.js.map +1 -1
  123. package/dist/runtime/built-in-paths.d.ts +0 -1
  124. package/dist/runtime/built-in-paths.d.ts.map +1 -1
  125. package/dist/runtime/built-in-paths.js +0 -7
  126. package/dist/runtime/built-in-paths.js.map +1 -1
  127. package/dist/runtime/client.d.ts +3 -0
  128. package/dist/runtime/client.d.ts.map +1 -1
  129. package/dist/runtime/client.js +4 -0
  130. package/dist/runtime/client.js.map +1 -1
  131. package/dist/temporal/executor.d.ts.map +1 -1
  132. package/dist/temporal/executor.js +9 -2
  133. package/dist/temporal/executor.js.map +1 -1
  134. package/dist/temporal/retry-policy.d.ts +1 -1
  135. package/dist/temporal/retry-policy.d.ts.map +1 -1
  136. package/dist/temporal/retry-policy.js +6 -1
  137. package/dist/temporal/retry-policy.js.map +1 -1
  138. package/dist/temporal/workflows.d.ts.map +1 -1
  139. package/dist/temporal/workflows.js +16 -3
  140. package/dist/temporal/workflows.js.map +1 -1
  141. package/package.json +23 -13
  142. package/dist/lib/skills.d.ts +0 -16
  143. package/dist/lib/skills.d.ts.map +0 -1
  144. package/dist/lib/skills.js +0 -140
  145. package/dist/lib/skills.js.map +0 -1
@@ -0,0 +1,72 @@
1
+ ---
2
+ description: Generates and maintains an OKF v0.1 repository wiki
3
+ color: "#0f766e"
4
+ hidden: false
5
+ tools:
6
+ Read: true
7
+ Glob: true
8
+ Grep: true
9
+ Bash: false
10
+ Edit: true
11
+ Write: true
12
+ write_json_output: false
13
+ delete_file: true
14
+ git_diff: true
15
+ ---
16
+
17
+ You generate and maintain one repository wiki as an Open Knowledge Format (OKF) v0.1 bundle.
18
+
19
+ Inspect the repository and existing bundle, edit concept documents in place, then return a concise summary. Never commit or push.
20
+
21
+ ## Scope
22
+
23
+ - Filesystem permissions enforce writes below the bundle root supplied by the workflow. You may read the rest of the repository.
24
+ - Treat tracked files as the primary source of truth. Inspect relevant working changes, tests, existing documentation, agent guidance, and recent git history when useful.
25
+ - Do not document ignored files, secrets, dependency caches, build output, DRS artifacts, or unrelated untracked files.
26
+ - Do not create or edit `index.md`; DRS generates directory indexes deterministically after you finish.
27
+ - Do not create DRS state or metadata inside the bundle.
28
+ - Never create or edit the workflow-provided state path. The deterministic `record-wiki-state` action owns that file after validation.
29
+
30
+ ## OKF v0.1
31
+
32
+ Every Markdown file other than the reserved `index.md` and `log.md` is a concept and must begin with parseable YAML frontmatter:
33
+
34
+ ```yaml
35
+ ---
36
+ type: Architecture
37
+ title: Review workflow runtime
38
+ description: How DRS plans and executes repository review workflows.
39
+ tags: [workflow, runtime]
40
+ ---
41
+ ```
42
+
43
+ - `type` is the only required field and must be a non-empty string.
44
+ - `title`, `description`, `resource`, `tags`, and `timestamp` are optional standard fields.
45
+ - Declare the repository evidence behind every concept with the producer-defined `drs_sources` field: a list of repository-relative paths with optional `symbols`, for example `drs_sources: [{path: src/lib/wiki-delta.ts, symbols: [planWikiUpdate]}]`. Keep citations current when you edit a concept, cite new concepts you create, and remove citations to files that no longer exist.
46
+ - Preserve unknown producer-defined frontmatter fields. OKF explicitly permits extensions.
47
+ - Use `resource` only for a canonical URI. Cite repository source paths in the Markdown body using backticks.
48
+ - `index.md` and `log.md` are reserved and are not concepts. `log.md`, when present, has no frontmatter and groups entries under `## YYYY-MM-DD` headings.
49
+ - Standard Markdown links between concepts are directed relationships. State the relationship in surrounding prose rather than adding links solely for navigation.
50
+ - Prefer bundle-root links such as `/architecture/runtime.md` when they improve stability. Verify links before finishing.
51
+ - Every substantive concept must participate in the concept graph through at least one evidence-backed Markdown relationship link outside generated indexes. Do not leave the bundle as disconnected pages.
52
+
53
+ ## Content
54
+
55
+ - Create `quickstart.md` as the entrypoint when initializing a bundle.
56
+ - Use actual Markdown links from `quickstart.md` to every major concept; code-formatted paths are not navigation links.
57
+ - Document architecture, major workflows, domain concepts, integrations, operations, tests, and extension points at the appropriate level rather than inventorying every source file.
58
+ - Keep each concept in one canonical document and link to it from related concepts.
59
+ - Explain why important behavior exists, where it is implemented, and what checks matter when changing it.
60
+ - Keep pages concise and evidence-based. Do not invent behavior, ownership, or product intent.
61
+ - Avoid thin pages and one-file directories. Start with no more than eight concept pages unless the repository is clearly tiny.
62
+
63
+ ## Maintenance
64
+
65
+ - Read the current bundle before editing it.
66
+ - Treat the workflow's deterministic delta plan as authoritative. In update mode, start from `candidateConcepts` (concepts whose cited `drs_sources` changed) and `changedPaths`, and map each source change to affected concepts before editing. Changed paths without provenance may need new or updated citations.
67
+ - Treat the workflow-provided repository wiki brief (persistent `.drs/wiki-instructions.md` plus any one-run addition) as authoritative for scope, priorities, exclusions, terminology, and audience.
68
+ - Preserve accurate content, stable concept paths, human-authored material, and extension frontmatter.
69
+ - Build a source-change-to-document impact plan before editing. Make surgical updates and allow a no-op when the bundle is current.
70
+ - Remove obsolete claims and concepts only when repository evidence clearly shows they are no longer valid.
71
+ - Use `delete_file` for obsolete concept files; generated indexes remain owned by DRS.
72
+ - Do not make formatting-only changes or rewrite unaffected pages.
@@ -16,6 +16,7 @@ inputs:
16
16
  branchPrefix: 'drs-fix/pr-'
17
17
  allowStackedSource: 'false'
18
18
  draft: 'false'
19
+ useChangeRequestAuthor: 'true'
19
20
  output: changeRequest
20
21
  nodes:
21
22
  change:
@@ -100,6 +101,7 @@ nodes:
100
101
  with:
101
102
  message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
102
103
  paths: '.'
104
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
103
105
  output: commit
104
106
 
105
107
  push:
@@ -1,10 +1,26 @@
1
1
  name: github-pr-review-post
2
- description: Describe and review a GitHub pull request, posting the description and DRS comments
2
+ description: Validate and post a canonical DRS review artifact to a GitHub pull request
3
+ metadata:
4
+ kind: review-post
5
+ tags: [review, github, pull-request, artifact]
3
6
  inputs:
4
- owner: ''
5
- repo: ''
6
- pr: ''
7
- output: review
7
+ owner:
8
+ type: string
9
+ required: true
10
+ description: GitHub repository owner
11
+ repo:
12
+ type: string
13
+ required: true
14
+ description: GitHub repository name
15
+ pr:
16
+ type: number
17
+ required: true
18
+ description: Pull request number
19
+ expectedHeadSha:
20
+ type: string
21
+ required: true
22
+ description: Pull request head SHA reviewed by the producing job
23
+ output: postedReview
8
24
  nodes:
9
25
  change:
10
26
  action: change-source
@@ -13,30 +29,24 @@ nodes:
13
29
  owner: '{{inputs.owner}}'
14
30
  repo: '{{inputs.repo}}'
15
31
  pr: '{{inputs.pr}}'
32
+ requireCompleteDiff: true
16
33
  output: change
17
34
 
18
- describe:
19
- action: describe
35
+ load-review:
36
+ action: load-artifact
20
37
  needs:
21
38
  - change
22
39
  with:
40
+ kind: review
23
41
  source: change
24
- post: true
25
- output: description
26
-
27
- review:
28
- action: review
29
- needs:
30
- - describe
31
- with:
32
- source: change
33
- output: review
42
+ output: reviewArtifact
34
43
 
35
44
  post-comments:
36
45
  action: post-review-comments
37
46
  needs:
38
- - review
47
+ - load-review
39
48
  with:
40
49
  source: change
41
- review: review
50
+ review: reviewArtifact
51
+ expectedHeadSha: '{{inputs.expectedHeadSha}}'
42
52
  output: postedReview
@@ -28,6 +28,10 @@ inputs:
28
28
  type: boolean
29
29
  default: false
30
30
  description: Post DRS review comments to the PR
31
+ requireCompleteDiff:
32
+ type: boolean
33
+ default: false
34
+ description: Fail when GitHub cannot provide a stable, complete file and patch snapshot
31
35
  visual:
32
36
  type: boolean
33
37
  default: false
@@ -62,6 +66,10 @@ inputs:
62
66
  allowStackedSource:
63
67
  type: boolean
64
68
  default: false
69
+ useChangeRequestAuthor:
70
+ type: boolean
71
+ default: true
72
+ description: Attribute generated fix commits to the pull request creator
65
73
  fixDraft:
66
74
  type: boolean
67
75
  default: false
@@ -77,6 +85,7 @@ nodes:
77
85
  owner: '{{inputs.owner}}'
78
86
  repo: '{{inputs.repo}}'
79
87
  pr: '{{inputs.pr}}'
88
+ requireCompleteDiff: '{{inputs.requireCompleteDiff}}'
80
89
  output: change
81
90
 
82
91
  describe:
@@ -95,6 +104,12 @@ nodes:
95
104
  - change
96
105
  with:
97
106
  source: change
107
+ permissions:
108
+ filesystem:
109
+ read:
110
+ roots: ['.']
111
+ allow: ['**']
112
+ shell: false
98
113
  output: review
99
114
 
100
115
  visual:
@@ -221,6 +236,12 @@ nodes:
221
236
  source: verificationChange
222
237
  reviewArtifact: reviewArtifact
223
238
  severity: '{{inputs.fixSeverity}}'
239
+ permissions:
240
+ filesystem:
241
+ read:
242
+ roots: ['.']
243
+ allow: ['**']
244
+ shell: false
224
245
  output: reReview
225
246
 
226
247
  verify-fix:
@@ -273,6 +294,7 @@ nodes:
273
294
  with:
274
295
  message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
275
296
  paths: '.'
297
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
276
298
  output: internalFixCommit
277
299
 
278
300
  push-internal-fix:
@@ -300,6 +322,7 @@ nodes:
300
322
  with:
301
323
  message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
302
324
  paths: '.'
325
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
303
326
  output: fixCommit
304
327
 
305
328
  fix-push:
@@ -8,6 +8,7 @@ inputs:
8
8
  branchPrefix: 'drs-guidance/pr-'
9
9
  allowStackedSource: 'false'
10
10
  draft: 'false'
11
+ useChangeRequestAuthor: 'true'
11
12
  output: changeRequest
12
13
  nodes:
13
14
  change:
@@ -70,6 +71,7 @@ nodes:
70
71
  with:
71
72
  message: 'docs: update agent guidance for PR #{{inputs.pr}}'
72
73
  paths: '{{inputs.paths}}'
74
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
73
75
  output: commit
74
76
 
75
77
  push:
@@ -15,6 +15,7 @@ inputs:
15
15
  branchPrefix: 'drs-fix/mr-'
16
16
  allowStackedSource: 'false'
17
17
  draft: 'false'
18
+ useChangeRequestAuthor: 'true'
18
19
  output: changeRequest
19
20
  nodes:
20
21
  change:
@@ -98,6 +99,7 @@ nodes:
98
99
  with:
99
100
  message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
100
101
  paths: '.'
102
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
101
103
  output: commit
102
104
 
103
105
  push:
@@ -51,6 +51,10 @@ inputs:
51
51
  allowStackedSource:
52
52
  type: boolean
53
53
  default: false
54
+ useChangeRequestAuthor:
55
+ type: boolean
56
+ default: true
57
+ description: Attribute generated fix commits to the merge request creator
54
58
  fixDraft:
55
59
  type: boolean
56
60
  default: false
@@ -276,6 +280,7 @@ nodes:
276
280
  with:
277
281
  message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
278
282
  paths: '.'
283
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
279
284
  output: internalFixCommit
280
285
 
281
286
  push-internal-fix:
@@ -303,6 +308,7 @@ nodes:
303
308
  with:
304
309
  message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
305
310
  paths: '.'
311
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
306
312
  output: fixCommit
307
313
 
308
314
  fix-push:
@@ -7,6 +7,7 @@ inputs:
7
7
  branchPrefix: 'drs-guidance/mr-'
8
8
  allowStackedSource: 'false'
9
9
  draft: 'false'
10
+ useChangeRequestAuthor: 'true'
10
11
  output: changeRequest
11
12
  nodes:
12
13
  change:
@@ -68,6 +69,7 @@ nodes:
68
69
  with:
69
70
  message: 'docs: update agent guidance for MR !{{inputs.mr}}'
70
71
  paths: '{{inputs.paths}}'
72
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
71
73
  output: commit
72
74
 
73
75
  push:
@@ -31,6 +31,15 @@ nodes:
31
31
  agent: task/changelog-updater
32
32
  needs:
33
33
  - release-change
34
+ permissions:
35
+ filesystem:
36
+ read:
37
+ roots: ['.']
38
+ allow: [CHANGELOG.md]
39
+ write:
40
+ roots: ['.']
41
+ allow: [CHANGELOG.md]
42
+ shell: false
34
43
  input: |
35
44
  Finalize CHANGELOG.md for release {{inputs.version}} dated {{inputs.date}}.
36
45
 
@@ -41,6 +50,7 @@ nodes:
41
50
  - Ensure the file starts with `# Changelog` followed by the standard introduction.
42
51
  - Move release-worthy `## Unreleased` entries into `## {{inputs.version}} - {{inputs.date}}`.
43
52
  - Create `## {{inputs.version}} - {{inputs.date}}` directly above the previous released version if it does not exist.
53
+ - Consolidate any earlier prerelease sections for the same major.minor.patch version into this release section. A final release must not retain separate RC, beta, or alpha sections for that version.
44
54
  - Keep `## Unreleased` above the release section only if there are remaining unreleased entries; otherwise remove empty duplicate/unneeded headings.
45
55
  - Preserve existing older release sections.
46
56
  - Do not create git tags, publish packages, or edit files other than CHANGELOG.md.
@@ -0,0 +1,40 @@
1
+ name: repository-wiki-check
2
+ description: Verify repository wiki delta state and OKF v0.1 conformance without a model call
3
+ metadata:
4
+ kind: validation
5
+ tags:
6
+ - documentation
7
+ - wiki
8
+ - okf
9
+ - ci
10
+ inputs:
11
+ root:
12
+ type: string
13
+ default: wiki
14
+ description: Repository-relative OKF bundle root
15
+ instructionsPath:
16
+ type: string
17
+ default: .drs/wiki-instructions.md
18
+ description: Repository-relative persistent wiki brief path outside the OKF bundle
19
+ statePath:
20
+ type: string
21
+ default: .drs/wiki-state.json
22
+ description: Repository-relative delta state path outside the OKF bundle
23
+ output: wikiValidation
24
+ nodes:
25
+ check-state:
26
+ action: check-wiki-state
27
+ with:
28
+ root: '{{inputs.root}}'
29
+ statePath: '{{inputs.statePath}}'
30
+ instructionsPath: '{{inputs.instructionsPath}}'
31
+ output: wikiDelta
32
+
33
+ validate-wiki:
34
+ action: validate-okf-wiki
35
+ needs:
36
+ - check-state
37
+ with:
38
+ root: '{{inputs.root}}'
39
+ version: '0.1'
40
+ output: wikiValidation
@@ -0,0 +1,187 @@
1
+ name: repository-wiki-sync
2
+ description: Generate or update one OKF v0.1 repository wiki bundle
3
+ metadata:
4
+ kind: maintenance
5
+ tags:
6
+ - documentation
7
+ - wiki
8
+ - okf
9
+ inputs:
10
+ root:
11
+ type: string
12
+ default: wiki
13
+ description: Repository-relative OKF bundle root
14
+ instructions:
15
+ type: string
16
+ default: ''
17
+ description: One-run addition to the persistent repository wiki brief
18
+ instructionsPath:
19
+ type: string
20
+ default: .drs/wiki-instructions.md
21
+ description: Repository-relative persistent wiki brief path outside the OKF bundle
22
+ statePath:
23
+ type: string
24
+ default: .drs/wiki-state.json
25
+ description: Repository-relative delta state path outside the OKF bundle
26
+ check:
27
+ type: boolean
28
+ default: false
29
+ description: Fail when the workflow produces uncommitted wiki or state changes
30
+ output: wikiResult
31
+ nodes:
32
+ plan-update:
33
+ action: plan-wiki-update
34
+ with:
35
+ root: '{{inputs.root}}'
36
+ statePath: '{{inputs.statePath}}'
37
+ instructionsPath: '{{inputs.instructionsPath}}'
38
+ instructions: '{{inputs.instructions}}'
39
+ output: wikiDelta
40
+
41
+ maintain-wiki:
42
+ agent: task/okf-wiki-maintainer
43
+ needs:
44
+ - plan-update
45
+ if: artifacts.wikiDelta.shouldRun == true
46
+ permissions:
47
+ filesystem:
48
+ read:
49
+ roots:
50
+ - '.'
51
+ allow:
52
+ - '**'
53
+ write:
54
+ roots:
55
+ - '{{inputs.root}}'
56
+ allow:
57
+ - '**/*.md'
58
+ deny:
59
+ - '**/index.md'
60
+ delete:
61
+ roots:
62
+ - '{{inputs.root}}'
63
+ allow:
64
+ - '**/*.md'
65
+ deny:
66
+ - '**/index.md'
67
+ shell: false
68
+ validation:
69
+ afterMutation:
70
+ - name: okf-document
71
+ root: '{{inputs.root}}'
72
+ input: |
73
+ Generate, reconcile, or update the repository wiki as one OKF v0.1 bundle.
74
+
75
+ Bundle root: {{inputs.root}}
76
+
77
+ Deterministic delta plan:
78
+ {{artifacts.wikiDelta}}
79
+
80
+ Repository wiki brief (persistent brief plus any one-run addition):
81
+ {{artifacts.wikiDelta.instructions}}
82
+
83
+ For generate mode, inspect the full repository and create the initial bundle. For update mode, prioritize candidateConcepts (concepts whose cited drs_sources changed) and use changedPaths as the primary scope, editing only directly affected concepts. For reconcile mode, preserve accurate existing content while repairing state or bundle drift and re-apply the repository wiki brief. Declare and maintain drs_sources citations in every concept you create or edit.
84
+
85
+ Edit concept files in place and return a concise summary. Do not edit index.md files; DRS synchronizes them in the next step. Do not commit or push.
86
+ output: wikiSummary
87
+
88
+ sync-indexes:
89
+ action: sync-okf-indexes
90
+ needs:
91
+ - maintain-wiki
92
+ with:
93
+ root: '{{inputs.root}}'
94
+ version: '0.1'
95
+ output: wikiIndexes
96
+
97
+ validate-updated-wiki:
98
+ action: validate-okf-wiki
99
+ needs:
100
+ - sync-indexes
101
+ with:
102
+ root: '{{inputs.root}}'
103
+ version: '0.1'
104
+ output: wikiValidation
105
+
106
+ record-state:
107
+ action: record-wiki-state
108
+ needs:
109
+ - validate-updated-wiki
110
+ with:
111
+ root: '{{inputs.root}}'
112
+ statePath: '{{inputs.statePath}}'
113
+ instructionsPath: '{{inputs.instructionsPath}}'
114
+ instructions: '{{inputs.instructions}}'
115
+ output: wikiState
116
+
117
+ check-updated-wiki:
118
+ action: check-wiki-clean
119
+ needs:
120
+ - record-state
121
+ if: inputs.check == true
122
+ with:
123
+ root: '{{inputs.root}}'
124
+ statePath: '{{inputs.statePath}}'
125
+
126
+ summarize-updated-wiki:
127
+ action: summarize-wiki-run
128
+ needs:
129
+ - record-state
130
+ if: inputs.check == false
131
+ with:
132
+ plan: wikiDelta
133
+ validation: wikiValidation
134
+ agentNode: maintain-wiki
135
+ output: wikiResult
136
+
137
+ summarize-checked-updated-wiki:
138
+ action: summarize-wiki-run
139
+ needs:
140
+ - check-updated-wiki
141
+ if: inputs.check == true
142
+ with:
143
+ plan: wikiDelta
144
+ validation: wikiValidation
145
+ agentNode: maintain-wiki
146
+ output: wikiResult
147
+
148
+ validate-current-wiki:
149
+ action: validate-okf-wiki
150
+ needs:
151
+ - plan-update
152
+ if: artifacts.wikiDelta.shouldRun == false
153
+ with:
154
+ root: '{{inputs.root}}'
155
+ version: '0.1'
156
+ output: wikiValidation
157
+
158
+ check-current-wiki:
159
+ action: check-wiki-clean
160
+ needs:
161
+ - validate-current-wiki
162
+ if: inputs.check == true
163
+ with:
164
+ root: '{{inputs.root}}'
165
+ statePath: '{{inputs.statePath}}'
166
+
167
+ summarize-current-wiki:
168
+ action: summarize-wiki-run
169
+ needs:
170
+ - validate-current-wiki
171
+ if: inputs.check == false
172
+ with:
173
+ plan: wikiDelta
174
+ validation: wikiValidation
175
+ agentNode: maintain-wiki
176
+ output: wikiResult
177
+
178
+ summarize-checked-current-wiki:
179
+ action: summarize-wiki-run
180
+ needs:
181
+ - check-current-wiki
182
+ if: inputs.check == true
183
+ with:
184
+ plan: wikiDelta
185
+ validation: wikiValidation
186
+ agentNode: maintain-wiki
187
+ output: wikiResult