sinapse-ai 7.7.2 → 7.7.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 (56) hide show
  1. package/.claude/hooks/enforce-git-push-authority.sh +34 -2
  2. package/.claude/rules/safe-collaboration.md +12 -1
  3. package/.codex/catalog.json +157 -0
  4. package/.codex/command-registry.json +441 -0
  5. package/.codex/scripts/generate-codex-greeting.js +101 -0
  6. package/.codex/scripts/resolve-codex-command.js +147 -0
  7. package/.codex/skills/sinapse-analyst/SKILL.md +5 -4
  8. package/.codex/skills/sinapse-architect/SKILL.md +5 -4
  9. package/.codex/skills/sinapse-data-engineer/SKILL.md +5 -4
  10. package/.codex/skills/sinapse-dev/SKILL.md +5 -4
  11. package/.codex/skills/sinapse-devops/SKILL.md +5 -4
  12. package/.codex/skills/sinapse-orqx/SKILL.md +10 -15
  13. package/.codex/skills/sinapse-pm/SKILL.md +5 -4
  14. package/.codex/skills/sinapse-po/SKILL.md +4 -3
  15. package/.codex/skills/sinapse-qa/SKILL.md +12 -11
  16. package/.codex/skills/sinapse-sm/SKILL.md +5 -4
  17. package/.codex/skills/sinapse-squad-creator/SKILL.md +5 -4
  18. package/.codex/skills/sinapse-ux-design-expert/SKILL.md +5 -4
  19. package/.codex/tasks/convene-sinapse-council.md +28 -0
  20. package/.codex/tasks/create-sinapse-strategic-brief.md +29 -0
  21. package/.codex/tasks/onboard-sinapse-codex.md +34 -0
  22. package/.codex/tasks/plan-sinapse-initiative.md +33 -0
  23. package/.codex/tasks/resolve-sinapse-conflict.md +28 -0
  24. package/.codex/tasks/route-sinapse-request.md +33 -0
  25. package/.codex/tasks/status-sinapse-capabilities.md +28 -0
  26. package/.sinapse-ai/core-config.yaml +1 -1
  27. package/.sinapse-ai/data/entity-registry.yaml +903 -805
  28. package/.sinapse-ai/data/registry-update-log.jsonl +10 -0
  29. package/.sinapse-ai/infrastructure/scripts/codex-parity/catalog.js +123 -0
  30. package/.sinapse-ai/infrastructure/scripts/codex-skills-sync/index.js +60 -11
  31. package/.sinapse-ai/infrastructure/scripts/codex-skills-sync/validate.js +44 -16
  32. package/.sinapse-ai/infrastructure/scripts/sync-codex-local-first.js +156 -0
  33. package/.sinapse-ai/infrastructure/scripts/validate-codex-command-registry.js +264 -0
  34. package/.sinapse-ai/infrastructure/scripts/validate-codex-integration.js +15 -6
  35. package/.sinapse-ai/infrastructure/scripts/validate-codex-sync.js +156 -0
  36. package/.sinapse-ai/infrastructure/scripts/validate-parity.js +3 -1
  37. package/.sinapse-ai/infrastructure/scripts/validate-paths.js +8 -10
  38. package/.sinapse-ai/infrastructure/templates/safe-collab/README.md +52 -17
  39. package/.sinapse-ai/infrastructure/templates/safe-collab/apply.sh +85 -0
  40. package/.sinapse-ai/infrastructure/templates/safe-collab/safe-collaboration-rule.md +11 -0
  41. package/.sinapse-ai/install-manifest.yaml +41 -21
  42. package/.sinapse-ai/project-config.yaml +1 -1
  43. package/bin/utils/collab-start.js +267 -0
  44. package/bin/utils/git-branch-guard.js +76 -0
  45. package/bin/utils/pre-push-safety.js +110 -0
  46. package/bin/utils/staged-secret-scan.js +108 -0
  47. package/docs/ORQX-PLAN.md +3 -2
  48. package/docs/codex-parity-program.md +670 -0
  49. package/docs/codex-total-parity-orchestration-plan.md +301 -0
  50. package/docs/codex-workflow-task-parity.md +87 -0
  51. package/docs/collaboration-autonomy-plan.md +243 -0
  52. package/docs/guides/framework-contributor-mode.md +310 -0
  53. package/docs/guides/parallel-collaboration-source-of-truth.md +481 -0
  54. package/package.json +11 -3
  55. package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +2 -2
  56. package/scripts/ensure-manifest.js +9 -0
@@ -0,0 +1,310 @@
1
+ # Framework Contributor Mode
2
+
3
+ This guide defines how Caio and Soier should evolve the `sinapse-ai` framework in parallel without stepping on each other and without relying on informal memory.
4
+
5
+ It is optimized for the current repository state and reuses the infrastructure that already exists in SINAPSE.
6
+
7
+ ## Goal
8
+
9
+ Enable a collaborator to add supported framework features safely and autonomously.
10
+
11
+ The main target is simple:
12
+
13
+ - no work starts directly on `main`
14
+ - autonomous framework changes do not depend on Caio explaining the structure
15
+ - coordinated framework changes are explicit before edits begin
16
+
17
+ ## Source Documents
18
+
19
+ **Canonical policy:** [Parallel Collaboration Source Of Truth](./parallel-collaboration-source-of-truth.md)
20
+
21
+ - [Parallel Workflow](./parallel-workflow.md)
22
+ - [Source Tree Standard](../framework/source-tree.md)
23
+ - [Component Creation Guide](../../.sinapse-ai/core/docs/component-creation-guide.md)
24
+ - [Safe Collaboration Rule](../../.claude/rules/safe-collaboration.md)
25
+
26
+ ## Current Repository Reality
27
+
28
+ The repository already has the foundations needed for contributor autonomy:
29
+
30
+ - contributor mode is currently enabled via `boundary.frameworkProtection: false`
31
+ - worktree support exists
32
+ - component creation guidance exists
33
+ - IDE sync and Codex skills sync exist
34
+ - safe collaboration guidance exists
35
+
36
+ What was missing was a short operational model. This document fills that gap.
37
+
38
+ ## Golden Rules
39
+
40
+ 1. Do not start framework work on `main`.
41
+ 2. If the change is in an autonomous lane, proceed without waiting for Caio.
42
+ 3. If the change is in a coordinated lane, align before editing.
43
+ 4. Prefer existing generators, templates, and standard locations over manual invention.
44
+ 5. Every framework change must finish with the correct sync and validation steps.
45
+ 6. Use the maintainer bootstrap command before opening new work.
46
+
47
+ ## Change Lanes
48
+
49
+ ## Autonomous Lane
50
+
51
+ Soier can proceed alone when the change stays within supported framework extension surfaces such as:
52
+
53
+ - `.sinapse-ai/development/agents/`
54
+ - `.sinapse-ai/development/tasks/`
55
+ - `.sinapse-ai/development/workflows/`
56
+ - `.sinapse-ai/product/templates/`
57
+ - `.sinapse-ai/product/checklists/`
58
+ - `docs/framework/`
59
+ - `docs/guides/`
60
+ - squad extensions that follow existing structure
61
+
62
+ Typical examples:
63
+
64
+ - create or update an agent
65
+ - create or update a task
66
+ - create or update a workflow
67
+ - create or update a template/checklist
68
+ - add supporting documentation for a framework capability
69
+
70
+ ## Coordinated Lane
71
+
72
+ These changes require alignment before implementation because they affect framework behavior or collaboration safety:
73
+
74
+ - `.sinapse-ai/core/**`
75
+ - `.sinapse-ai/infrastructure/**`
76
+ - `bin/**`
77
+ - `.sinapse-ai/constitution.md`
78
+ - `package.json`
79
+ - `.husky/**`
80
+ - `.claude/hooks/**`
81
+ - release/versioning mechanics
82
+
83
+ Typical examples:
84
+
85
+ - changing Git enforcement behavior
86
+ - changing manifest generation behavior
87
+ - changing CLI entry points
88
+ - changing framework boundaries or contributor mode rules
89
+
90
+ ## Protected Lane
91
+
92
+ These remain under explicit authority and must not be treated as normal framework edits:
93
+
94
+ - remote push authority
95
+ - PR merge authority
96
+ - release/tag flows
97
+ - destructive Git operations
98
+
99
+ ## Isolation Strategy
100
+
101
+ ## Preferred mode
102
+
103
+ Use a dedicated work area for each unit of work.
104
+
105
+ ### Canonical maintainer bootstrap
106
+
107
+ From a clean `main`, start work with:
108
+
109
+ - `npm run collab:start -- <story-id> <slug>`
110
+
111
+ Examples:
112
+
113
+ - `npm run collab:start -- 7.7.4 codex-collab-hardening`
114
+ - `npm run collab:start -- framework-codex codex-runtime-hardening --type=refactor`
115
+
116
+ Useful audit command:
117
+
118
+ - `npm run collab:check`
119
+
120
+ If you already have uncommitted work on `main` and need to move it to a safe branch without losing anything:
121
+
122
+ - `npm run collab:adopt -- <story-id> <slug>`
123
+
124
+ This bootstrap does four things:
125
+
126
+ - verifies you are on a clean default branch
127
+ - fetches and fast-forwards from `origin/main`
128
+ - detects the maintainer prefix (`caio` or `soier`)
129
+ - creates an isolated worktree with an owner-prefixed branch
130
+
131
+ The `collab:adopt` command is the migration bridge for an already-dirty `main`. It keeps the current files exactly where they are and only moves the work onto a safe owner-prefixed branch.
132
+
133
+ ### If you are using the built-in worktree flow
134
+
135
+ Use the existing worktree tooling and let SINAPSE manage the `auto-claude/{storyId}` branch model.
136
+
137
+ This is the safest option when working in parallel on larger framework changes.
138
+
139
+ ### If you are working manually without the worktree tooling
140
+
141
+ Use a human-readable feature branch:
142
+
143
+ - `caio/{type}/{desc}`
144
+ - `soier/{type}/{desc}`
145
+
146
+ Examples:
147
+
148
+ - `caio/feat/installer-sync`
149
+ - `soier/feat/new-agent-template`
150
+
151
+ ## Important note about branch naming
152
+
153
+ The repository still has two branch models in circulation:
154
+
155
+ - worktree flow: `auto-claude/{storyId}`
156
+ - safe-collab guide: `caio/...` and `soier/...`
157
+
158
+ For maintainer collaboration, the canonical workflow is now:
159
+
160
+ - `npm run collab:start -- <story-id> <slug>`
161
+ - branch format: `{owner}/{type}/{story-and-slug}`
162
+
163
+ Examples:
164
+
165
+ - `caio/feat/7-7-4-codex-collab-hardening`
166
+ - `soier/refactor/framework-codex-runtime-hardening`
167
+
168
+ The older `auto-claude/{storyId}` branches remain valid for the internal ADE worktree flow.
169
+
170
+ Until all internals are migrated, use this rule:
171
+
172
+ - use `auto-claude/{storyId}` when the built-in worktree tooling is driving the work
173
+ - use `npm run collab:start` for human maintainer work
174
+
175
+ Do not mix both styles inside the same change.
176
+
177
+ ## Standard Workflow
178
+
179
+ 1. Start from a story or explicit scoped task.
180
+ 2. Create an isolated work area with `npm run collab:start`.
181
+ 3. Classify the change lane before editing.
182
+ 4. Use the source tree guide to place files correctly.
183
+ 5. Prefer component creation and modification workflows over ad hoc manual structure.
184
+ 6. Run the required sync commands for the changed artifact types.
185
+ 7. Run quality gates.
186
+ 8. Hand off through PR review rather than chat memory.
187
+
188
+ ## Local Safety Net
189
+
190
+ The repository now enforces three local safety rules:
191
+
192
+ - pre-commit blocks commits on `main`
193
+ - pre-commit scans staged files for obvious secrets
194
+ - pre-push blocks direct pushes to `main` and branches that are behind `origin/main`
195
+
196
+ This is intentionally strict. The goal is to make the safe path the default path.
197
+
198
+ ## Self-Service Feature Workflow
199
+
200
+ When Soier wants to add a framework feature inside the Autonomous Lane, this is the expected path:
201
+
202
+ 1. Define the change scope from the story or request.
203
+ 2. Confirm the target location using [Source Tree Standard](../framework/source-tree.md).
204
+ 3. Create or modify the component using the relevant standard flow:
205
+ - agent
206
+ - task
207
+ - workflow
208
+ - template
209
+ - checklist
210
+ - docs
211
+ 4. Run the sync matrix below.
212
+ 5. Run quality gates.
213
+ 6. Open PR for Caio review when the change is ready.
214
+
215
+ This avoids asking Caio where things go unless the change leaves the Autonomous Lane.
216
+
217
+ ## Sync Matrix
218
+
219
+ Run the sync commands that match the kind of change you made.
220
+
221
+ ### Agent definition changes
222
+
223
+ - `npm run sync:ide`
224
+ - `npm run validate:codex-sync`
225
+
226
+ ### Codex skill changes
227
+
228
+ - `npm run sync:skills:codex`
229
+ - `npm run validate:codex-skills`
230
+
231
+ ### Framework file graph or install surface changes
232
+
233
+ - `npm run generate:manifest`
234
+ - `npm run validate:manifest`
235
+
236
+ ### Always after meaningful framework changes
237
+
238
+ - `npm run lint`
239
+ - `npm run typecheck`
240
+ - `npm test`
241
+
242
+ ## When To Stop And Coordinate
243
+
244
+ Pause and align before continuing if any of these is true:
245
+
246
+ - the change touches both an Autonomous Lane file and a Coordinated Lane file
247
+ - the change alters framework behavior, not just framework content
248
+ - the change modifies hooks, installer behavior, CLI entry points, or config contracts
249
+ - the change requires a new policy, authority rule, or repo-wide convention
250
+ - the work started in one lane and now spills into `.sinapse-ai/core/` or `.sinapse-ai/infrastructure/`
251
+
252
+ ## Review Contract Between Caio And Soier
253
+
254
+ Use PR review as the main handoff mechanism.
255
+
256
+ ### Reviewer expectations
257
+
258
+ - reviewer checks lane compliance
259
+ - reviewer checks sync commands were run
260
+ - reviewer checks no unrelated files leaked into the change
261
+ - reviewer checks if docs and manifests stayed aligned
262
+
263
+ ### Escalate instead of guessing
264
+
265
+ If a change affects framework contracts, record the concern in the PR and route it for coordinated review instead of silently deciding.
266
+
267
+ ## Suggested Division Of Responsibility
268
+
269
+ This is a practical default, not a rigid rule.
270
+
271
+ ### Caio default lead
272
+
273
+ - installer
274
+ - CLI surface
275
+ - hooks
276
+ - release/versioning behavior
277
+ - framework-wide policy
278
+
279
+ ### Soier default lead
280
+
281
+ - new framework features within the existing structure
282
+ - agents, tasks, workflows, templates, and supporting docs
283
+ - squad-level expansion that follows current conventions
284
+
285
+ ### Shared with review
286
+
287
+ - infrastructure scripts
288
+ - core behavior
289
+ - repo-wide conventions
290
+
291
+ ## Definition Of Done For Autonomous Changes
292
+
293
+ An autonomous framework change is done when:
294
+
295
+ - it stayed inside the Autonomous Lane
296
+ - file placement followed the source tree standard
297
+ - required sync commands were executed
298
+ - quality gates passed
299
+ - the PR clearly explains what was added and why
300
+
301
+ ## What This Guide Intentionally Does Not Do
302
+
303
+ This guide does not try to productize the reusable `safe-collab` template for every external repository.
304
+
305
+ Its purpose is narrower and more urgent:
306
+
307
+ - make collaboration inside `sinapse-ai` predictable
308
+ - let Soier ship supported framework changes without waiting on Caio for structure
309
+
310
+ That broader template hardening should happen only after this workflow proves itself in real use.