@contentrain/rules 0.3.1 → 0.3.2
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/README.md +9 -0
- package/essential/contentrain-essentials.md +28 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
# `@contentrain/rules`
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@contentrain/rules)
|
|
4
|
+
[](https://agentskills.io)
|
|
4
5
|
[](https://github.com/Contentrain/ai/tree/main/packages/rules)
|
|
6
|
+
[](https://ai.contentrain.io/packages/rules)
|
|
5
7
|
|
|
6
8
|
Shared AI-agent rules for Contentrain.
|
|
7
9
|
|
|
10
|
+
Start here:
|
|
11
|
+
|
|
12
|
+
- [2-minute product demo](https://ai.contentrain.io/demo)
|
|
13
|
+
- [Rules & skills docs](https://ai.contentrain.io/packages/rules)
|
|
14
|
+
|
|
8
15
|
This package is the policy layer of the Contentrain ecosystem. It defines how agents should behave when they work with:
|
|
9
16
|
|
|
10
17
|
- Contentrain MCP tools
|
|
@@ -89,6 +96,8 @@ Rule of thumb:
|
|
|
89
96
|
- `rules` = essential guardrails (always loaded, ~86 lines)
|
|
90
97
|
- `skills` = detailed procedures and reference docs (on-demand)
|
|
91
98
|
|
|
99
|
+
See [`AGENTS.md`](../../AGENTS.md) at the repo root for agent-level project guidance.
|
|
100
|
+
|
|
92
101
|
## Build
|
|
93
102
|
|
|
94
103
|
From the monorepo root:
|
|
@@ -52,6 +52,7 @@ MCP is **deterministic infrastructure**. The agent (you) is the **intelligence l
|
|
|
52
52
|
| `contentrain_apply` | Apply normalize (extract/reuse) |
|
|
53
53
|
| `contentrain_validate` | Validate content against schemas |
|
|
54
54
|
| `contentrain_submit` | Push branches to remote |
|
|
55
|
+
| `contentrain_merge` | Merge a review-mode branch into contentrain locally |
|
|
55
56
|
| `contentrain_bulk` | Batch operations (copy_locale/update_status/delete_entries) |
|
|
56
57
|
|
|
57
58
|
## Mandatory Protocols
|
|
@@ -77,6 +78,33 @@ MCP is **deterministic infrastructure**. The agent (you) is the **intelligence l
|
|
|
77
78
|
- Never create branches manually, never commit directly to main or the `contentrain` branch
|
|
78
79
|
- 50+ active branches = warning, 80+ = blocked
|
|
79
80
|
|
|
81
|
+
## CLI Serve — Review & Approval
|
|
82
|
+
|
|
83
|
+
Normalize and review workflows often need browser-based approval:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
contentrain serve # starts http://localhost:3333
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Key pages: `/normalize` (extraction approval), `/branches` (merge/delete), `/validate` (error review), `/content` (browse).
|
|
90
|
+
|
|
91
|
+
Agent should start or ensure serve is running when:
|
|
92
|
+
- Normalize extraction needs user approval
|
|
93
|
+
- Multiple branches await review
|
|
94
|
+
- Validation errors need visual inspection
|
|
95
|
+
|
|
96
|
+
Branch merge options: CLI serve UI (localhost:3333/branches), `contentrain_merge` MCP tool, or git platform PR.
|
|
97
|
+
|
|
98
|
+
## SDK Regeneration
|
|
99
|
+
|
|
100
|
+
After model/content changes or normalize reuse, run:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx contentrain generate
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This regenerates `.contentrain/client/` — required for `#contentrain` imports to work.
|
|
107
|
+
|
|
80
108
|
## Localization
|
|
81
109
|
|
|
82
110
|
- All supported locales must have entries for every content item
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentrain/rules",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "AI agent rules for Contentrain — quality standards, architecture conventions, IDE integration",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/Contentrain/ai.git",
|
|
10
10
|
"directory": "packages/rules"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://
|
|
12
|
+
"homepage": "https://ai.contentrain.io/packages/rules",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/Contentrain/ai/issues"
|
|
15
15
|
},
|
|
@@ -17,11 +17,15 @@
|
|
|
17
17
|
"contentrain",
|
|
18
18
|
"ai",
|
|
19
19
|
"rules",
|
|
20
|
+
"agent-skills",
|
|
21
|
+
"agent-rules",
|
|
20
22
|
"mcp",
|
|
21
23
|
"prompt-engineering",
|
|
22
24
|
"claude-code",
|
|
23
25
|
"cursor",
|
|
24
|
-
"windsurf"
|
|
26
|
+
"windsurf",
|
|
27
|
+
"copilot",
|
|
28
|
+
"codex"
|
|
25
29
|
],
|
|
26
30
|
"sideEffects": false,
|
|
27
31
|
"publishConfig": {
|