@plures/praxis 1.2.13 → 1.3.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.
Files changed (93) hide show
  1. package/README.md +44 -0
  2. package/dist/browser/chunk-MJK3IYTJ.js +384 -0
  3. package/dist/browser/{chunk-K377RW4V.js → chunk-N63K4KWS.js} +1 -1
  4. package/dist/browser/{engine-YJZV4SLD.js → engine-YIEGSX7U.js} +1 -1
  5. package/dist/browser/index.d.ts +104 -2
  6. package/dist/browser/index.js +188 -7
  7. package/dist/browser/integrations/svelte.d.ts +2 -2
  8. package/dist/browser/integrations/svelte.js +2 -2
  9. package/dist/browser/{reactive-engine.svelte-9aS0kTa8.d.ts → reactive-engine.svelte-DjynI82A.d.ts} +139 -5
  10. package/dist/node/{chunk-PRPQO6R5.js → chunk-5JQJZADT.js} +1 -1
  11. package/dist/node/chunk-KMJWAFZV.js +389 -0
  12. package/dist/node/{chunk-5RH7UAQC.js → chunk-PTH6MD6P.js} +1 -0
  13. package/dist/node/cli/index.cjs +1553 -839
  14. package/dist/node/cli/index.js +39 -2
  15. package/dist/node/cloud/index.d.cts +1 -1
  16. package/dist/node/cloud/index.d.ts +1 -1
  17. package/dist/node/components/index.d.cts +2 -2
  18. package/dist/node/components/index.d.ts +2 -2
  19. package/dist/node/conversations-KQBXTP3N.js +596 -0
  20. package/dist/node/{engine-2DQBKBJC.js → engine-FEN5IYZ5.js} +1 -1
  21. package/dist/node/index.cjs +911 -43
  22. package/dist/node/index.d.cts +574 -7
  23. package/dist/node/index.d.ts +574 -7
  24. package/dist/node/index.js +672 -26
  25. package/dist/node/integrations/svelte.cjs +190 -3
  26. package/dist/node/integrations/svelte.d.cts +3 -3
  27. package/dist/node/integrations/svelte.d.ts +3 -3
  28. package/dist/node/integrations/svelte.js +2 -2
  29. package/dist/node/{protocol-Qek7ebBl.d.ts → protocol-DcyGMmWY.d.cts} +8 -1
  30. package/dist/node/{protocol-Qek7ebBl.d.cts → protocol-DcyGMmWY.d.ts} +8 -1
  31. package/dist/node/{reactive-engine.svelte-CRNqHlbv.d.ts → reactive-engine.svelte-Cg0Yc2Hs.d.cts} +145 -6
  32. package/dist/node/{reactive-engine.svelte-BFIZfawz.d.cts → reactive-engine.svelte-DekxqFu0.d.ts} +145 -6
  33. package/dist/node/{terminal-adapter-B-UK_Vdz.d.ts → terminal-adapter-CvIvgTo4.d.ts} +1 -1
  34. package/dist/node/{terminal-adapter-BQSIF5bf.d.cts → terminal-adapter-Db-snPJ3.d.cts} +1 -1
  35. package/dist/node/{validate-CNHUULQE.js → validate-EN3M4FUR.js} +1 -1
  36. package/dist/node/{verify-KLJRXVJS.js → verify-7VZRP2WS.js} +2 -2
  37. package/docs/BOT_UPDATE_POLICY.md +125 -0
  38. package/docs/DOGFOODING_CHECKLIST.md +254 -0
  39. package/docs/DOGFOODING_INDEX.md +169 -0
  40. package/docs/DOGFOODING_QUICK_START.md +140 -0
  41. package/docs/KNO_ENG_EXTRACTION_PLAN.md +577 -0
  42. package/docs/PLURES_TOOLS_INVENTORY.md +170 -0
  43. package/docs/README.md +12 -0
  44. package/docs/TESTING_BOT_WORKFLOWS.md +154 -0
  45. package/docs/conversations/INTEGRATION_POINTS.md +719 -0
  46. package/docs/conversations/README.md +168 -0
  47. package/docs/core/extending-praxis-core.md +604 -0
  48. package/docs/core/praxis-core-api.md +385 -0
  49. package/docs/decision-ledger/contract-index.json +2 -2
  50. package/docs/decision-ledger/decisions/2026-02-01-monorepo-organization.md +130 -0
  51. package/docs/examples/DOGFOODING_WORKFLOW_EXAMPLE.md +295 -0
  52. package/docs/examples/README.md +41 -0
  53. package/docs/workflows/pr-overlap-guard.md +50 -0
  54. package/package.json +8 -3
  55. package/src/__tests__/chronicle.test.ts +512 -0
  56. package/src/__tests__/conversations.test.ts +312 -0
  57. package/src/__tests__/edge-cases.test.ts +1 -1
  58. package/src/__tests__/engine-dx.test.ts +355 -0
  59. package/src/__tests__/engine-v2.test.ts +532 -0
  60. package/src/cli/commands/conversations.ts +252 -0
  61. package/src/cli/index.ts +73 -0
  62. package/src/conversations/README.md +230 -0
  63. package/src/conversations/candidate.schema.json +123 -0
  64. package/src/conversations/candidates.ts +114 -0
  65. package/src/conversations/capture.ts +56 -0
  66. package/src/conversations/classify.ts +110 -0
  67. package/src/conversations/conversation.schema.json +106 -0
  68. package/src/conversations/emitters/fs.ts +65 -0
  69. package/src/conversations/emitters/github.ts +115 -0
  70. package/src/conversations/gate.ts +102 -0
  71. package/src/conversations/index.ts +28 -0
  72. package/src/conversations/normalize.ts +51 -0
  73. package/src/conversations/redact.ts +57 -0
  74. package/src/conversations/types.ts +96 -0
  75. package/src/core/chronicle/chronicle.ts +227 -0
  76. package/src/core/chronicle/context.ts +80 -0
  77. package/src/core/chronicle/index.ts +53 -0
  78. package/src/core/chronicle/mcp.ts +135 -0
  79. package/src/core/chronicle/types.ts +61 -0
  80. package/src/core/completeness.ts +274 -0
  81. package/src/core/engine.ts +143 -3
  82. package/src/core/pluresdb/index.ts +22 -0
  83. package/src/core/pluresdb/store.ts +171 -8
  84. package/src/core/protocol.ts +7 -0
  85. package/src/core/rule-result.ts +130 -0
  86. package/src/core/rules.ts +24 -5
  87. package/src/core/ui-rules.ts +340 -0
  88. package/src/dsl/index.ts +6 -0
  89. package/src/index.ts +45 -0
  90. package/src/integrations/pluresdb.ts +22 -0
  91. package/src/vite/completeness-plugin.ts +72 -0
  92. package/dist/browser/chunk-VOMLVI6V.js +0 -197
  93. package/dist/node/chunk-VOMLVI6V.js +0 -197
@@ -0,0 +1,170 @@
1
+ # Plures Tools Inventory
2
+
3
+ This document tracks the adoption and usage of Plures ecosystem tools in the Praxis repository.
4
+
5
+ ## Available Plures Tools
6
+
7
+ ### 1. **Praxis CLI** ✅ Adopted
8
+ **Status:** Actively used
9
+ **Package:** `@plures/praxis`
10
+ **Purpose:** Command-line interface for scaffolding, code generation, and project management
11
+
12
+ **Current Usage:**
13
+ - Project scaffolding: `npx praxis create app <name>`
14
+ - Component generation: `npx praxis generate --schema <file>`
15
+ - Canvas export: `npx praxis canvas <schema>`
16
+ - Contract validation: `npm run validate:contracts`
17
+ - Rule scanning: `npm run scan:rules`
18
+
19
+ **Adoption Opportunities:**
20
+ - Use in CI/CD pipelines for validation
21
+ - Integrate into pre-commit hooks for contract validation
22
+ - Create custom commands for common workflows
23
+
24
+ ---
25
+
26
+ ### 2. **PluresDB** ✅ Adopted
27
+ **Status:** Actively integrated
28
+ **Package:** `@plures/pluresdb` (peer dependency)
29
+ **Purpose:** Local-first, P2P-capable database with CRDT conflict resolution
30
+
31
+ **Current Usage:**
32
+ - Available via `createPluresDB()` adapter
33
+ - Used in examples (offline-chat, cloud-sync, distributed-node)
34
+ - Documented in README and integration guides
35
+
36
+ **Adoption Opportunities:**
37
+ - Use PluresDB for test fixtures and example data
38
+ - Integrate into development server for live data persistence
39
+ - Create PluresDB-backed test utilities
40
+
41
+ ---
42
+
43
+ ### 3. **Unum** ✅ Partially Adopted
44
+ **Status:** Integrated, limited usage
45
+ **Package:** `@plures/unum` (future peer dependency)
46
+ **Purpose:** Distributed communication and P2P networking
47
+
48
+ **Current Usage:**
49
+ - Available via `createUnumAdapter()`
50
+ - Used in distributed examples
51
+ - Documented in README
52
+
53
+ **Adoption Opportunities:**
54
+ - Use Unum for development collaboration (live code sync)
55
+ - Integrate into CI for distributed testing
56
+ - Create Unum-based development tools
57
+
58
+ ---
59
+
60
+ ### 4. **State-Docs** ✅ Partially Adopted
61
+ **Status:** Generator available, limited usage
62
+ **Package:** Built-in to Praxis
63
+ **Purpose:** Automated documentation generation from schemas and logic
64
+
65
+ **Current Usage:**
66
+ - `createStateDocsGenerator()` available
67
+ - Basic usage documented in README
68
+
69
+ **Adoption Opportunities:**
70
+ - Generate documentation as part of build process
71
+ - Auto-generate API docs from schemas
72
+ - Create visual state machine diagrams
73
+ - Generate contract documentation automatically
74
+
75
+ ---
76
+
77
+ ### 5. **CodeCanvas** ⚠️ Available, Not Adopted
78
+ **Status:** API available but not actively used
79
+ **Package:** Built-in to Praxis
80
+ **Purpose:** Visual schema editing and diagram generation
81
+
82
+ **Current Usage:**
83
+ - `schemaToCanvas()` function available
84
+ - Mentioned in README
85
+ - Not actively used in development
86
+
87
+ **Adoption Opportunities:**
88
+ - **HIGH PRIORITY**: Use for visualizing complex schemas
89
+ - Generate architecture diagrams from code
90
+ - Create visual onboarding guides
91
+ - Export to Mermaid/PlantUML for documentation
92
+
93
+ ---
94
+
95
+ ### 6. **OpenClaw** ❌ Not Adopted
96
+ **Status:** Not yet integrated
97
+ **Purpose:** AI-powered code analysis and refactoring tool
98
+
99
+ **Current Usage:**
100
+ - Not currently used
101
+
102
+ **Adoption Opportunities:**
103
+ - **INVESTIGATE**: Determine if OpenClaw exists as standalone tool
104
+ - Evaluate for automated code review
105
+ - Consider for migration assistance
106
+ - Explore for pattern detection in codebase
107
+
108
+ ---
109
+
110
+ ### 7. **Decision Ledger** ✅ Actively Dogfooding
111
+ **Status:** Fully adopted and enforced
112
+ **Package:** Built-in to Praxis
113
+ **Purpose:** Behavior contracts for rules and constraints
114
+
115
+ **Current Usage:**
116
+ - Contract definitions via `defineContract()`
117
+ - Validation via `npm run validate:contracts`
118
+ - Scanning via `npm run scan:rules`
119
+ - Full workflow documented in `docs/decision-ledger/DOGFOODING.md`
120
+
121
+ **Adoption Status:**
122
+ - ✅ Contracts for core rules
123
+ - ✅ CI validation pipeline
124
+ - ✅ Developer guidelines in CONTRIBUTING.md
125
+
126
+ ---
127
+
128
+ ## Adoption Priority Matrix
129
+
130
+ ### Immediate (This Week)
131
+ 1. **CodeCanvas** - Start visualizing key schemas and architecture
132
+ 2. **State-Docs** - Integrate into build process for auto-docs
133
+ 3. **Praxis CLI** - Add to pre-commit hooks for validation
134
+
135
+ ### Short-term (This Month)
136
+ 1. **PluresDB** - Use for test fixtures and development data
137
+ 2. **Unum** - Explore for development collaboration
138
+ 3. **OpenClaw** - Research availability and capabilities
139
+
140
+ ### Ongoing
141
+ 1. **Decision Ledger** - Continue expanding contract coverage
142
+ 2. **Praxis CLI** - Discover and document new use cases
143
+
144
+ ---
145
+
146
+ ## Integration Status Summary
147
+
148
+ | Tool | Status | Usage Level | Priority |
149
+ |------|--------|-------------|----------|
150
+ | Praxis CLI | ✅ Adopted | High | Maintain |
151
+ | PluresDB | ✅ Adopted | Medium | Expand |
152
+ | Decision Ledger | ✅ Adopted | High | Maintain |
153
+ | Unum | ⚠️ Partial | Low | Expand |
154
+ | State-Docs | ⚠️ Partial | Low | **High** |
155
+ | CodeCanvas | ⚠️ Available | None | **High** |
156
+ | OpenClaw | ❌ Not Adopted | None | Research |
157
+
158
+ ---
159
+
160
+ ## Resources
161
+
162
+ - [Praxis CLI Documentation](../README.md#cli-npx-friendly)
163
+ - [PluresDB Integration](../README.md#pluresdb-integration)
164
+ - [Decision Ledger Dogfooding](./decision-ledger/DOGFOODING.md)
165
+ - [Contributing Guidelines](../CONTRIBUTING.md)
166
+
167
+ ---
168
+
169
+ Last Updated: 2026-02-01
170
+ Maintainer: Praxis Core Team
package/docs/README.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Welcome to the official Praxis documentation! Praxis is the full-stack application framework for the Plures ecosystem, providing a complete solution for building modern, local-first, distributed applications.
4
4
 
5
+ ## 🐕 Dogfooding Plures Tools
6
+
7
+ **Start here for dogfooding:** [Dogfooding Index](./DOGFOODING_INDEX.md)
8
+
9
+ We actively dogfood all Plures tools during development. Key resources:
10
+ - [Quick Start Guide](./DOGFOODING_QUICK_START.md) - Get started in 5 minutes
11
+ - [Dogfooding Checklist](./DOGFOODING_CHECKLIST.md) - Daily/weekly/monthly workflows
12
+ - [Plures Tools Inventory](./PLURES_TOOLS_INVENTORY.md) - All available tools
13
+ - [Workflow Examples](./examples/DOGFOODING_WORKFLOW_EXAMPLE.md) - See it in action
14
+
5
15
  ## Quick Start
6
16
 
7
17
  ```bash
@@ -24,6 +34,8 @@ npm run dev
24
34
  | Document | Description |
25
35
  | ------------------------------------------------------ | -------------------------------------------- |
26
36
  | [What is Praxis](./core/what-is-praxis.md) | Overview of Praxis and its core philosophy |
37
+ | [Praxis-Core API](./core/praxis-core-api.md) | Stable API surface and guarantees |
38
+ | [Extending Praxis-Core](./core/extending-praxis-core.md) | Extension guidelines without breaking changes |
27
39
  | [Schema Model](./core/schema-model.md) | Understanding the Praxis Schema Format (PSF) |
28
40
  | [Logic Engine](./core/logic-engine.md) | Facts, events, rules, and constraints |
29
41
  | [UI Generation](./core/ui-generation.md) | Automatic component generation from schemas |
@@ -0,0 +1,154 @@
1
+ # Testing Bot Update Workflows
2
+
3
+ This guide explains how to test the new batched bot update workflows.
4
+
5
+ ## Prerequisites
6
+
7
+ - GitHub CLI (`gh`) installed and authenticated
8
+ - Appropriate repository permissions (write access)
9
+
10
+ ## Testing Individual Workflows
11
+
12
+ ### 1. Test Weekly Activity Log
13
+
14
+ ```bash
15
+ # Trigger manually via GitHub Actions UI
16
+ # Go to: Actions → Weekly Bot Activity Log → Run workflow
17
+
18
+ # Or via GitHub CLI:
19
+ gh workflow run bot-weekly-log.yml
20
+
21
+ # Check the run:
22
+ gh run list --workflow=bot-weekly-log.yml
23
+
24
+ # View the output:
25
+ gh run view --log
26
+ ```
27
+
28
+ **Expected Result:**
29
+ - A new markdown file created in `.github/bot-logs/` with format `YYYY-Wxx.md`
30
+ - The INDEX.md file updated with a link to the new log
31
+ - Commit pushed to main branch with message: `chore: update bot activity log for week YYYY-Wxx`
32
+
33
+ ### 2. Test Batch Pin Bumps
34
+
35
+ ```bash
36
+ # Trigger manually via GitHub Actions UI with force_update option
37
+ # Go to: Actions → Batch Pin Bumps (Weekly) → Run workflow → Set force_update to 'true'
38
+
39
+ # Or via GitHub CLI:
40
+ gh workflow run batch-pin-bumps.yml -f force_update=true
41
+
42
+ # Check the run:
43
+ gh run list --workflow=batch-pin-bumps.yml
44
+
45
+ # Check for created PR:
46
+ gh pr list --label bot-update
47
+ ```
48
+
49
+ **Expected Result:**
50
+ - A new branch created: `bot/weekly-pins-YYYY-Wxx`
51
+ - A PR opened with title: `chore(deps): weekly pin bumps - YYYY-Wxx`
52
+ - PR uses the BOT_PR_TEMPLATE.md format
53
+ - PR labeled with: `dependencies`, `bot-update`, `automated-pins`
54
+
55
+ ### 3. Test Dependabot Grouping
56
+
57
+ Dependabot runs automatically on schedule, but you can verify configuration:
58
+
59
+ ```bash
60
+ # Check dependabot configuration
61
+ cat .github/dependabot.yml
62
+
63
+ # View existing dependabot PRs
64
+ gh pr list --author "dependabot[bot]"
65
+
66
+ # Check for grouped PRs (should see fewer, larger PRs)
67
+ gh pr list --author "dependabot[bot]" --label dependencies
68
+ ```
69
+
70
+ **Expected Result:**
71
+ - Dependabot creates grouped PRs like:
72
+ - "Bump the npm-production group with X updates"
73
+ - "Bump the npm-dev-tools group with Y updates"
74
+ - "Bump the github-actions group with Z updates"
75
+
76
+ ## Integration Testing
77
+
78
+ ### Weekly Workflow Sequence
79
+
80
+ The workflows run in this order:
81
+ 1. **08:00 UTC Monday**: `batch-pin-bumps.yml` (creates PR)
82
+ 2. **09:00 UTC Monday**: Dependabot runs (creates grouped PRs)
83
+ 3. **10:00 UTC Monday**: `bot-weekly-log.yml` (logs previous week's activity)
84
+
85
+ To test the full sequence:
86
+
87
+ 1. Manually trigger batch-pin-bumps on a Monday
88
+ 2. Review and merge the created PR
89
+ 3. Let dependabot run naturally or configure it to run more frequently for testing
90
+ 4. Manually trigger bot-weekly-log
91
+ 5. Check `.github/bot-logs/` for the generated log
92
+
93
+ ## Validation Checklist
94
+
95
+ After implementing the bot update approach, verify:
96
+
97
+ - [ ] Dependabot creates grouped PRs (not individual dependency PRs)
98
+ - [ ] Bot PRs use the standard template format
99
+ - [ ] Weekly logs are generated in `.github/bot-logs/`
100
+ - [ ] INDEX.md is updated automatically
101
+ - [ ] All bot PRs have `bot-update` label
102
+ - [ ] Commit messages follow pattern: `chore(deps): ...`
103
+ - [ ] No direct commits to main (all updates via PR)
104
+
105
+ ## Troubleshooting
106
+
107
+ ### Workflow Fails with Permission Error
108
+
109
+ Ensure the workflow has appropriate permissions in `.github/workflows/*.yml`:
110
+ ```yaml
111
+ permissions:
112
+ contents: write
113
+ pull-requests: write
114
+ ```
115
+
116
+ ### Bot Logs Not Committing
117
+
118
+ Check that:
119
+ - Git user is configured in the workflow
120
+ - GITHUB_TOKEN has write access to the repository
121
+ - Branch protection rules allow bot commits
122
+
123
+ ### No PRs Created
124
+
125
+ Verify:
126
+ - Changes were actually detected (check step output)
127
+ - Branch doesn't already exist
128
+ - PR limit not reached (dependabot config: open-pull-requests-limit)
129
+
130
+ ### Dependabot Not Grouping
131
+
132
+ Ensure:
133
+ - Using Dependabot v2 configuration format
134
+ - `groups:` section is properly configured
135
+ - Updates match the group patterns
136
+
137
+ ## Manual Rollback
138
+
139
+ If you need to revert the bot update approach:
140
+
141
+ 1. Restore original `.github/dependabot.yml`
142
+ 2. Disable or delete the new workflows:
143
+ - `.github/workflows/bot-weekly-log.yml`
144
+ - `.github/workflows/batch-pin-bumps.yml`
145
+ 3. Remove `.github/bot-logs/` directory
146
+ 4. Remove `.github/BOT_PR_TEMPLATE.md`
147
+
148
+ ## Next Steps
149
+
150
+ Once testing is complete:
151
+ 1. Monitor for one full week to ensure all workflows run correctly
152
+ 2. Review the generated logs for completeness
153
+ 3. Adjust schedules or grouping as needed
154
+ 4. Share the approach with other Plures repositories