[DTP-Worker] Sprint 4 · Générateur Workspaces ERPNext 5 portails rôle (Frontend Console · roadmap L49)

Livre le dernier volet ouvert de Sprint 4 : Frontend Console « 5 portails
(Ventes/Construction/Achat/Compta/Direction) ». Contrainte #1 (ERPNext natif) :
le portail de landing par rôle EST le DocType Workspace v15 → 5 Workspaces natifs.

Anti-invention (#6) : rôles et DocTypes dérivés du contrat rbac_50_roles.json ;
chaque lien/raccourci vise un DocType présent dans les permissions_cibles du
portail (droit prouvé) ; couverture exhaustive ; flag custom issu du contrat ;
tokens de marque repris verbatim de CLAUDE.md #4. CLI + 12 invariants + 19 tests
(4 négatifs). Régression 260 tests verts. Hand-off VPS #8 documenté.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Code DTP Worker
2026-07-30 07:38:44 +00:00
parent 7117394651
commit c0d2e21ef3
14 changed files with 2891 additions and 1 deletions
@@ -0,0 +1,181 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Bundle Workspaces ERPNext · 5 portails role (OTO DTP Sprint 4)",
"type": "object",
"additionalProperties": false,
"required": ["manifest", "workspace"],
"properties": {
"manifest": { "$ref": "#/definitions/manifest" },
"workspace": {
"type": "array",
"minItems": 5,
"maxItems": 5,
"items": { "$ref": "#/definitions/workspace" }
}
},
"definitions": {
"manifest": {
"type": "object",
"additionalProperties": false,
"required": [
"generated_from", "spec_version", "source_version", "roadmap_ref",
"counts", "brand", "module_note", "doctypes_custom_a_creer", "workspaces"
],
"properties": {
"generated_from": { "type": "string", "minLength": 1 },
"spec_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
"source_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
"roadmap_ref": { "type": "string", "minLength": 1 },
"counts": {
"type": "object",
"additionalProperties": false,
"required": ["workspaces", "roles_couverts", "liens_total", "raccourcis_total"],
"properties": {
"workspaces": { "type": "integer", "minimum": 5, "maximum": 5 },
"roles_couverts": { "type": "integer", "minimum": 1 },
"liens_total": { "type": "integer", "minimum": 1 },
"raccourcis_total": { "type": "integer", "minimum": 1 }
}
},
"brand": { "$ref": "#/definitions/brand" },
"module_note": { "type": "string", "minLength": 1 },
"doctypes_custom_a_creer": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 }
},
"workspaces": {
"type": "array",
"minItems": 5,
"maxItems": 5,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["portail", "workspace", "nb_cartes", "nb_raccourcis", "nb_liens", "nb_roles", "doctypes_custom"],
"properties": {
"portail": { "type": "string", "enum": ["ventes", "construction", "achat", "compta", "direction"] },
"workspace": { "type": "string", "minLength": 1 },
"nb_cartes": { "type": "integer", "minimum": 1 },
"nb_raccourcis": { "type": "integer", "minimum": 1 },
"nb_liens": { "type": "integer", "minimum": 1 },
"nb_roles": { "type": "integer", "minimum": 1 },
"doctypes_custom": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 }
}
}
}
}
}
},
"brand": {
"type": "object",
"additionalProperties": false,
"required": ["note", "fond", "accent", "polices"],
"properties": {
"note": { "type": "string", "minLength": 1 },
"fond": { "$ref": "#/definitions/token" },
"accent": { "$ref": "#/definitions/token" },
"polices": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/token" }
}
}
},
"token": {
"type": "object",
"additionalProperties": false,
"required": ["valeur", "source"],
"properties": {
"valeur": { "type": "string", "minLength": 1 },
"source": { "type": "string", "minLength": 1 }
}
},
"workspace": {
"type": "object",
"additionalProperties": false,
"required": [
"doctype", "name", "title", "label", "public", "is_hidden", "module",
"icon", "indicator_color", "sequence_id", "parent_page", "for_user",
"content", "shortcuts", "links", "roles"
],
"properties": {
"doctype": { "type": "string", "const": "Workspace" },
"name": { "type": "string", "minLength": 1 },
"title": { "type": "string", "minLength": 1 },
"label": { "type": "string", "minLength": 1 },
"public": { "type": "integer", "minimum": 1, "maximum": 1 },
"is_hidden": { "type": "integer", "minimum": 0, "maximum": 0 },
"module": { "type": "null" },
"icon": { "type": "string", "minLength": 1 },
"indicator_color": { "type": "string", "minLength": 1 },
"sequence_id": { "type": "number", "minimum": 1 },
"parent_page": { "type": "string" },
"for_user": { "type": "string" },
"content": { "type": "string", "minLength": 2 },
"shortcuts": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/shortcut" }
},
"links": {
"type": "array",
"minItems": 2,
"items": { "$ref": "#/definitions/link" }
},
"roles": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/has_role" }
}
}
},
"shortcut": {
"type": "object",
"additionalProperties": false,
"required": ["doctype", "parentfield", "parenttype", "type", "link_to", "label", "color", "doc_view"],
"properties": {
"doctype": { "type": "string", "const": "Workspace Shortcut" },
"parentfield": { "type": "string", "const": "shortcuts" },
"parenttype": { "type": "string", "const": "Workspace" },
"type": { "type": "string", "const": "DocType" },
"link_to": { "type": "string", "minLength": 1 },
"label": { "type": "string", "minLength": 1 },
"color": { "type": "string", "minLength": 1 },
"doc_view": { "type": "string", "const": "List" }
}
},
"link": {
"type": "object",
"additionalProperties": false,
"required": ["doctype", "parentfield", "parenttype", "type", "label", "onboard", "hidden"],
"properties": {
"doctype": { "type": "string", "const": "Workspace Link" },
"parentfield": { "type": "string", "const": "links" },
"parenttype": { "type": "string", "const": "Workspace" },
"type": { "type": "string", "enum": ["Card Break", "Link"] },
"label": { "type": "string", "minLength": 1 },
"link_count": { "type": "integer", "minimum": 0 },
"link_type": { "type": "string", "const": "DocType" },
"link_to": { "type": "string", "minLength": 1 },
"is_query_report": { "type": "integer", "minimum": 0, "maximum": 0 },
"dependencies": { "type": "string" },
"onboard": { "type": "integer", "minimum": 0, "maximum": 0 },
"hidden": { "type": "integer", "minimum": 0, "maximum": 0 }
}
},
"has_role": {
"type": "object",
"additionalProperties": false,
"required": ["doctype", "parentfield", "parenttype", "role"],
"properties": {
"doctype": { "type": "string", "const": "Has Role" },
"parentfield": { "type": "string", "const": "roles" },
"parenttype": { "type": "string", "const": "Workspace" },
"role": { "type": "string", "minLength": 1 }
}
}
}
}