✅ MVP
The Artifact Engine is responsible for generating and recommending cognitive artifacts. It leverages the Context Analyzer’s output and the Recommendation Algorithm to determine the most suitable artifact type, then constructs the artifact using the CADSL Runtime.
| Direction | Description | Format |
|---|---|---|
| Input | Analyzed context | JSON |
| Input | Recommended artifact type | String |
| Input | User preferences | JSON |
| Output | Cognitive Artifact | CADSL (JSON/YAML) |
Refer to SDS-001: Data Model Schemas for:
CognitiveArtifact schema| Endpoint | Method | Description |
|---|---|---|
/artifact/generate |
POST | Generate artifact from context |
/artifact/recommend |
GET | Get artifact type recommendations |
Generate Artifact
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
POST /artifact/generate
{
"context": {...},
"artifactType": "checklist",
"userId": "user-123",
"preferences": {
"theme": "dark",
"complexity": "detailed"
}
}
// Response
{
"artifact": {
"id": "artifact-uuid",
"name": "Project Review Checklist",
"type": "checklist",
"canvas": [
{
"type": "Section",
"title": "Code Quality",
"children": [
{"type": "Checkbox", "label": "Unit tests passing", "checked": false},
{"type": "Checkbox", "label": "Code reviewed", "checked": false}
]
}
]
}
}
Get Recommendations
1
2
3
4
5
6
7
8
9
10
GET /artifact/recommend?sessionId=abc&context=encoded-context
// Response
{
"recommendations": [
{"type": "checklist", "score": 0.92, "reason": "Task requires tracking multiple items"},
{"type": "mind-map", "score": 0.78, "reason": "Topic exploration detected"},
{"type": "flowchart", "score": 0.65, "reason": "Process discussion ongoing"}
]
}
| Code | Description |
|---|---|
400 Bad Request |
Invalid context or parameters |
404 Not Found |
No suitable artifact type found |