@javierfrancoleal/constitution 0.0.0-stage → 1.0.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.
- package/assets/constitution.md +24 -0
- package/icon.svg +1 -0
- package/lib/index.js +45 -0
- package/locale/ar.json +1 -0
- package/locale/de.json +1 -0
- package/locale/en.json +1 -0
- package/locale/es.json +1 -0
- package/locale/fr.json +1 -0
- package/locale/it.json +1 -0
- package/locale/ja.json +1 -0
- package/locale/ko.json +1 -0
- package/locale/pt.json +1 -0
- package/locale/zh.json +1 -0
- package/package.json +16 -4
- package/README.md +0 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Constitution — the co-created law of the house
|
|
2
|
+
|
|
3
|
+
The constitution is the client's law inside Fanal. It lives in the
|
|
4
|
+
client's silo (`constitution.json`), it is versioned (every save bumps
|
|
5
|
+
the version with a timestamp), it is exportable
|
|
6
|
+
(`/api/constitution/export`), and it grows with the client.
|
|
7
|
+
|
|
8
|
+
## The contract
|
|
9
|
+
|
|
10
|
+
1. **Consult before proposing.** The Répondant, the Studio and the
|
|
11
|
+
Secrétaire read the constitution before every proposal: the tone,
|
|
12
|
+
the policies, the discount rules, the minimum operational price and
|
|
13
|
+
the escalations shape the draft.
|
|
14
|
+
2. **Cite what you followed.** Every record says which rule the action
|
|
15
|
+
followed; the accountability report quotes it.
|
|
16
|
+
3. **The minimum price is the LAST option.** Fanal may propose it to
|
|
17
|
+
the HUMAN only when the configured extreme conditions are met; only
|
|
18
|
+
the human offers it to the final client. The signature stays in the
|
|
19
|
+
record.
|
|
20
|
+
4. **Skin follows the signature.** The machine executes what carries
|
|
21
|
+
no consequences; the human signs what does. Every actor keeps their
|
|
22
|
+
skin and incentives exactly where their signature is worth.
|
|
23
|
+
5. **Never invent a rule.** If the constitution is silent, the action
|
|
24
|
+
is a RED question to the human — never a guess.
|
package/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="#4D6BFE"/><path d="M32 12l16 8v14c0 8-6 14-16 18-10-4-16-10-16-18V20l16-8z" fill="none" stroke="#fff" stroke-width="4" stroke-linejoin="round"/><path d="M26 32l4 4 8-9" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// @javierfrancoleal/constitution — the co-created law of the house.
|
|
2
|
+
// Created by J.Franco. Registers a bundled skill provider on the host skill
|
|
3
|
+
// registry, following the @deepseek-ai/dsh-skill-badge provider pattern.
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { BUNDLED_SKILL_RANK } from "@deepseek-ai/dsh-skill";
|
|
7
|
+
|
|
8
|
+
const PROVIDER_NAME = "jfranco-constitution";
|
|
9
|
+
const SKILL_BODY_URL = new URL("../assets/constitution.md", import.meta.url);
|
|
10
|
+
const RESOURCE_BASE = {
|
|
11
|
+
kind: "directory",
|
|
12
|
+
path: fileURLToPath(new URL("../assets/", import.meta.url)),
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const CANDIDATE = {
|
|
16
|
+
name: "constitution",
|
|
17
|
+
description: "The institutional organ of the J.Franco agentic workflow: the client's co-created constitution — philosophy, tone, policies, discount rules, the minimum operational price, the extreme conditions and the escalations. Every proposal must consult it first; every record must cite which rule it followed. The minimum price is the LAST option and offering it always requires the human. The constitution is versioned, exportable, and lives in the client's silo.",
|
|
18
|
+
invocation: {
|
|
19
|
+
modelInvocable: true,
|
|
20
|
+
userInvocable: true,
|
|
21
|
+
},
|
|
22
|
+
provider: PROVIDER_NAME,
|
|
23
|
+
source: "bundled",
|
|
24
|
+
resourceBase: RESOURCE_BASE,
|
|
25
|
+
rank: BUNDLED_SKILL_RANK,
|
|
26
|
+
locator: SKILL_BODY_URL,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const provider = {
|
|
30
|
+
name: PROVIDER_NAME,
|
|
31
|
+
async list() {
|
|
32
|
+
return [CANDIDATE];
|
|
33
|
+
},
|
|
34
|
+
async get() {
|
|
35
|
+
return await readFile(SKILL_BODY_URL, "utf8");
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export function apply(ctx) {
|
|
40
|
+
ctx.on("skills", (skills) => {
|
|
41
|
+
skills.register(PROVIDER_NAME, provider);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default apply;
|
package/locale/ar.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/de.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/en.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/es.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/fr.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/it.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/ja.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/ko.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/pt.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/locale/zh.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"constitution.name":"Constitution","constitution.description":"The client's co-created law of the house: consulted before every proposal, cited by every record."}
|
package/package.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@javierfrancoleal/constitution",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "The institutional organ of the J.Franco agentic workflow: the client's co-created constitution (philosophy, tone, policies, minimum price, extreme conditions, escalations) that every proposal must consult and every record must cite.",
|
|
5
|
+
"author": "J.Franco",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "lib/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./lib/index.js",
|
|
11
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
"./locale/*.json": "./locale/*.json"
|
|
14
|
+
},
|
|
15
|
+
"icon": "./icon.svg",
|
|
16
|
+
"files": ["icon.svg", "locale/*.json", "lib/index.js", "assets"],
|
|
17
|
+
"peerDependencies": { "@deepseek-ai/dsh-skill": ">=0.1.0" }
|
|
18
|
+
}
|
package/README.md
DELETED