Publish DevRunbook source
Managed validation / full (push) Successful in 3m18s

This commit is contained in:
DevRunbook release export
2026-09-03 04:09:17 +02:00
commit cfd2804e27
928 changed files with 161642 additions and 0 deletions
+69
View File
@@ -0,0 +1,69 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/condition.schema.json",
"title": "DevRunbook Condition",
"$ref": "#/$defs/condition",
"$defs": {
"condition": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["fact"],
"properties": {
"fact": {
"type": "object",
"additionalProperties": false,
"required": ["path", "operator"],
"properties": {
"path": {
"type": "string",
"pattern": "^(inputs|repository|composition|platform)(?:\\.[A-Za-z][A-Za-z0-9_-]*)+$",
"maxLength": 240
},
"operator": {
"enum": ["exists", "truthy", "falsy", "eq", "neq", "in", "not-in", "contains", "gt", "gte", "lt", "lte"]
},
"value": {}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["all"],
"properties": {
"all": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {"$ref": "#/$defs/condition"}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["any"],
"properties": {
"any": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {"$ref": "#/$defs/condition"}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["not"],
"properties": {
"not": {"$ref": "#/$defs/condition"}
}
}
]
}
}
}
+35
View File
@@ -0,0 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/evaluation-case.schema.json",
"title": "DevRunbook Evaluation Case",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "metadata", "spec"],
"properties": {
"apiVersion": {"const": "devrunbook.io/v1alpha1"},
"kind": {"const": "EvaluationCase"},
"metadata": {
"type": "object",
"additionalProperties": false,
"required": ["id", "version"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z0-9]+(?:[.-][a-z0-9]+)*$", "maxLength": 160},
"version": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"}
}
},
"spec": {
"type": "object",
"additionalProperties": false,
"required": ["playbookVersion", "inputFile", "expectedHeadings", "prohibitedPatterns", "deterministic"],
"properties": {
"playbookVersion": {"type": "string", "minLength": 5, "maxLength": 50},
"inputFile": {"type": "string", "minLength": 3, "maxLength": 500},
"expectedHeadings": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 2, "maxLength": 160}},
"prohibitedPatterns": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 2, "maxLength": 300}},
"requiredPatterns": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 2, "maxLength": 300}},
"deterministic": {"type": "boolean"},
"expectedLintStatus": {"enum": ["ready", "warning", "blocked"]}
}
}
}
}
+61
View File
@@ -0,0 +1,61 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/instance-config.schema.json",
"title": "DevRunbook Non-Secret Instance Configuration",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "instance", "limits", "retention", "integrations", "telemetry"],
"properties": {
"apiVersion": {"const": "devrunbook.io/v1alpha1"},
"kind": {"const": "InstanceConfig"},
"instance": {
"type": "object",
"additionalProperties": false,
"required": ["name", "publicBaseUrl", "registrationMode"],
"properties": {
"name": {"type": "string", "minLength": 1, "maxLength": 120},
"publicBaseUrl": {"type": "string", "format": "uri"},
"registrationMode": {"enum": ["closed", "admin-invite"]}
}
},
"limits": {
"type": "object",
"additionalProperties": false,
"required": ["maxImportBytes", "maxExpandedArchiveBytes", "maxArchiveFiles", "maxSingleFileBytes", "maxPromptBytes", "maxEvidenceBytes"],
"properties": {
"maxImportBytes": {"type": "integer", "minimum": 1048576, "maximum": 1073741824},
"maxExpandedArchiveBytes": {"type": "integer", "minimum": 1048576, "maximum": 2147483648},
"maxArchiveFiles": {"type": "integer", "minimum": 10, "maximum": 10000},
"maxSingleFileBytes": {"type": "integer", "minimum": 1024, "maximum": 536870912},
"maxPromptBytes": {"type": "integer", "minimum": 65536, "maximum": 104857600},
"maxEvidenceBytes": {"type": "integer", "minimum": 1024, "maximum": 10485760}
}
},
"retention": {
"type": "object",
"additionalProperties": false,
"required": ["artifactDays", "snapshotCountPerRepository", "auditEventDays", "operationalLogDays"],
"properties": {
"artifactDays": {"type": "integer", "minimum": 1, "maximum": 3650},
"snapshotCountPerRepository": {"type": "integer", "minimum": 1, "maximum": 1000},
"auditEventDays": {"type": "integer", "minimum": 30, "maximum": 3650},
"operationalLogDays": {"type": "integer", "minimum": 1, "maximum": 365}
}
},
"integrations": {
"type": "object",
"additionalProperties": false,
"required": ["giteaPrivateNetworkPolicy", "allowedGiteaHosts"],
"properties": {
"giteaPrivateNetworkPolicy": {"enum": ["deny", "allow-explicit-hosts"]},
"allowedGiteaHosts": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 253}}
}
},
"telemetry": {
"type": "object",
"additionalProperties": false,
"required": ["enabled"],
"properties": {"enabled": {"const": false}}
}
}
}
+291
View File
@@ -0,0 +1,291 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/playbook.schema.json",
"title": "DevRunbook Playbook Package Manifest",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "metadata", "package", "spec", "quality"],
"properties": {
"apiVersion": {"const": "devrunbook.io/v1alpha1"},
"kind": {"const": "Playbook"},
"metadata": {
"type": "object",
"additionalProperties": false,
"required": ["id", "slug", "version", "title", "summary", "category", "tags", "lifecycle", "riskTier", "authors"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$", "maxLength": 120},
"slug": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 100},
"version": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"},
"title": {"type": "string", "minLength": 3, "maxLength": 120},
"summary": {"type": "string", "minLength": 20, "maxLength": 320},
"category": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
"tags": {"type": "array", "minItems": 1, "maxItems": 20, "uniqueItems": true, "items": {"type": "string", "pattern": "^[a-z0-9+#.]+(?:-[a-z0-9+#.]+)*$"}},
"lifecycle": {"enum": ["draft", "reviewed", "validated", "battle-tested", "deprecated"]},
"riskTier": {"enum": ["low", "moderate", "high", "critical"]},
"authors": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {"type": "string", "minLength": 1, "maxLength": 120},
"url": {"type": "string", "format": "uri"}
}
}
},
"license": {"type": "string", "maxLength": 80},
"replacement": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"}
}
},
"package": {
"type": "object",
"additionalProperties": false,
"required": ["files"],
"properties": {
"files": {
"type": "array",
"minItems": 3,
"maxItems": 200,
"items": {"$ref": "#/$defs/packageFile"}
}
}
},
"spec": {
"type": "object",
"additionalProperties": false,
"required": ["type", "intent", "modes", "defaultMode", "autonomy", "inputs", "compatibility", "guardrails", "workflow", "validation", "completion", "failurePolicy", "reporting", "template", "exports"],
"properties": {
"type": {"enum": ["quick", "guided", "run-pack"]},
"intent": {
"type": "object",
"additionalProperties": false,
"required": ["problem", "outcome", "whenToUse", "whenNotToUse"],
"properties": {
"problem": {"type": "string", "minLength": 20, "maxLength": 1000},
"outcome": {"type": "string", "minLength": 20, "maxLength": 1000},
"whenToUse": {"type": "array", "minItems": 1, "maxItems": 12, "items": {"type": "string", "minLength": 5, "maxLength": 300}},
"whenNotToUse": {"type": "array", "minItems": 1, "maxItems": 12, "items": {"type": "string", "minLength": 5, "maxLength": 300}}
}
},
"modes": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/$defs/workMode"}},
"defaultMode": {"$ref": "#/$defs/workMode"},
"autonomy": {
"type": "object",
"additionalProperties": false,
"required": ["min", "max", "default"],
"properties": {
"min": {"$ref": "#/$defs/autonomyLevel"},
"max": {"$ref": "#/$defs/autonomyLevel"},
"default": {"$ref": "#/$defs/autonomyLevel"}
}
},
"inputs": {
"type": "array",
"maxItems": 40,
"items": {"$ref": "#/$defs/input"}
},
"compatibility": {
"type": "object",
"additionalProperties": false,
"required": ["repositoryRequired", "languages", "frameworks", "packageManagers", "databases", "deploymentTypes", "requiredProfileCapabilities", "incompatibleConditions"],
"properties": {
"repositoryRequired": {"type": "boolean"},
"languages": {"$ref": "#/$defs/stringSet"},
"frameworks": {"$ref": "#/$defs/stringSet"},
"packageManagers": {"$ref": "#/$defs/stringSet"},
"databases": {"$ref": "#/$defs/stringSet"},
"deploymentTypes": {"$ref": "#/$defs/stringSet"},
"requiredProfileCapabilities": {"type": "array", "uniqueItems": true, "maxItems": 30, "items": {"$ref": "#/$defs/profileCapability"}},
"incompatibleConditions": {"type": "array", "maxItems": 20, "items": {"$ref": "#/$defs/condition"}}
}
},
"guardrails": {"type": "array", "minItems": 1, "maxItems": 40, "items": {"$ref": "#/$defs/guardrail"}},
"workflow": {"type": "array", "minItems": 1, "maxItems": 40, "items": {"$ref": "#/$defs/workflowStep"}},
"validation": {
"type": "object",
"additionalProperties": false,
"required": ["commandRoles", "checks"],
"properties": {
"commandRoles": {"type": "array", "uniqueItems": true, "items": {"$ref": "#/$defs/commandRole"}},
"checks": {"type": "array", "minItems": 1, "maxItems": 40, "items": {"$ref": "#/$defs/check"}}
}
},
"completion": {
"type": "object",
"additionalProperties": false,
"required": ["criteria"],
"properties": {
"criteria": {"type": "array", "minItems": 1, "maxItems": 30, "items": {"type": "string", "minLength": 8, "maxLength": 500}}
}
},
"failurePolicy": {
"type": "object",
"additionalProperties": false,
"required": ["onValidationFailure", "onAmbiguity", "onMissingContext", "onOutOfScopeCause", "onExternalDependencyUnavailable", "onUnableToReproduce"],
"properties": {
"onValidationFailure": {"type": "string", "minLength": 20, "maxLength": 1000},
"onAmbiguity": {"type": "string", "minLength": 20, "maxLength": 1000},
"onMissingContext": {"type": "string", "minLength": 20, "maxLength": 1000},
"onOutOfScopeCause": {"type": "string", "minLength": 20, "maxLength": 1000},
"onExternalDependencyUnavailable": {"type": "string", "minLength": 20, "maxLength": 1000},
"onUnableToReproduce": {"type": "string", "minLength": 20, "maxLength": 1000}
}
},
"reporting": {
"type": "object",
"additionalProperties": false,
"required": ["sections"],
"properties": {
"sections": {"type": "array", "minItems": 1, "maxItems": 20, "items": {"$ref": "#/$defs/reportSection"}}
}
},
"template": {
"type": "object",
"additionalProperties": false,
"required": ["main", "partials"],
"properties": {
"main": {"$ref": "#/$defs/packagePath"},
"partials": {"type": "array", "uniqueItems": true, "items": {"$ref": "#/$defs/packagePath"}}
}
},
"exports": {
"type": "object",
"additionalProperties": false,
"required": ["prompt", "markdown", "runPack", "agentsSuggestion"],
"properties": {
"prompt": {"type": "boolean"},
"markdown": {"type": "boolean"},
"runPack": {"type": "boolean"},
"agentsSuggestion": {"type": "boolean"}
}
}
}
},
"quality": {
"type": "object",
"additionalProperties": false,
"required": ["reviewStatus", "testedStacks", "knownLimitations", "evaluationCaseIds"],
"properties": {
"reviewStatus": {"enum": ["unreviewed", "editorial-reviewed", "technical-reviewed", "evaluation-backed"]},
"testedStacks": {"$ref": "#/$defs/stringSet"},
"knownLimitations": {"type": "array", "maxItems": 20, "items": {"type": "string", "minLength": 5, "maxLength": 500}},
"evaluationCaseIds": {"type": "array", "uniqueItems": true, "items": {"type": "string", "pattern": "^[a-z0-9]+(?:[.-][a-z0-9]+)*$"}}
}
}
},
"$defs": {
"workMode": {"enum": ["inspect", "plan", "guided", "execute", "recovery"]},
"autonomyLevel": {"enum": ["observe", "diagnose", "plan", "implement", "verify", "repair"]},
"commandRole": {"enum": ["install", "format", "format-check", "lint", "typecheck", "unit-test", "integration-test", "end-to-end-test", "build", "dev-start", "smoke-test", "migration-status", "migration-apply", "security-scan", "dependency-audit"]},
"profileCapability": {"enum": ["install-command", "format-command", "lint-command", "typecheck-command", "test-command", "unit-test-command", "integration-test-command", "end-to-end-test-command", "build-command", "dev-start-command", "smoke-test-command", "migration-command", "security-scan-command", "dependency-audit-command", "default-branch", "protected-paths"]},
"stringSet": {"type": "array", "uniqueItems": true, "maxItems": 50, "items": {"type": "string", "minLength": 1, "maxLength": 80}},
"packagePath": {"type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))[A-Za-z0-9._/-]+$", "maxLength": 500},
"packageFile": {
"type": "object",
"additionalProperties": false,
"required": ["path", "role", "digest", "exportByDefault"],
"properties": {
"path": {"$ref": "#/$defs/packagePath"},
"role": {"enum": ["template", "partial", "documentation", "changelog", "example", "evaluation", "resource", "run-pack-resource"]},
"digest": {"type": "boolean"},
"exportByDefault": {"type": "boolean"}
}
},
"condition": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["fact"],
"properties": {
"fact": {
"type": "object",
"additionalProperties": false,
"required": ["path", "operator"],
"properties": {
"path": {"type": "string", "pattern": "^(inputs|repository|composition|platform)(?:\\.[A-Za-z][A-Za-z0-9_-]*)+$", "maxLength": 240},
"operator": {"enum": ["exists", "truthy", "falsy", "eq", "neq", "in", "not-in", "contains", "gt", "gte", "lt", "lte"]},
"value": {}
}
}
}
},
{"type": "object", "additionalProperties": false, "required": ["all"], "properties": {"all": {"type": "array", "minItems": 1, "maxItems": 20, "items": {"$ref": "#/$defs/condition"}}}},
{"type": "object", "additionalProperties": false, "required": ["any"], "properties": {"any": {"type": "array", "minItems": 1, "maxItems": 20, "items": {"$ref": "#/$defs/condition"}}}},
{"type": "object", "additionalProperties": false, "required": ["not"], "properties": {"not": {"$ref": "#/$defs/condition"}}}
]
},
"input": {
"type": "object",
"additionalProperties": false,
"required": ["key", "label", "description", "type", "required", "sensitive", "includeInOutput"],
"properties": {
"key": {"type": "string", "pattern": "^[a-z][A-Za-z0-9]*$", "maxLength": 80},
"label": {"type": "string", "minLength": 2, "maxLength": 120},
"description": {"type": "string", "minLength": 10, "maxLength": 500},
"type": {"enum": ["string", "multiline", "boolean", "integer", "enum", "multiselect", "path", "command", "string-list", "key-value-list"]},
"required": {"type": "boolean"},
"sensitive": {"type": "boolean"},
"includeInOutput": {"type": "boolean"},
"default": {},
"options": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "maxLength": 120}},
"minLength": {"type": "integer", "minimum": 0},
"maxLength": {"type": "integer", "minimum": 1},
"minimum": {"type": "integer"},
"maximum": {"type": "integer"},
"visibleWhen": {"$ref": "#/$defs/condition"}
}
},
"guardrail": {
"type": "object",
"additionalProperties": false,
"required": ["id", "severity", "text"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"},
"severity": {"enum": ["info", "warning", "blocking"]},
"text": {"type": "string", "minLength": 10, "maxLength": 1000},
"rationale": {"type": "string", "maxLength": 500},
"when": {"$ref": "#/$defs/condition"}
}
},
"workflowStep": {
"type": "object",
"additionalProperties": false,
"required": ["id", "title", "instruction", "required"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"},
"title": {"type": "string", "minLength": 3, "maxLength": 120},
"instruction": {"type": "string", "minLength": 20, "maxLength": 2000},
"required": {"type": "boolean"},
"when": {"$ref": "#/$defs/condition"}
}
},
"check": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "description", "blocking", "evidence"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"},
"type": {"enum": ["command", "manual", "artifact", "assertion"]},
"description": {"type": "string", "minLength": 10, "maxLength": 1000},
"blocking": {"type": "boolean"},
"evidence": {"type": "string", "minLength": 5, "maxLength": 500},
"when": {"$ref": "#/$defs/condition"}
}
},
"reportSection": {
"type": "object",
"additionalProperties": false,
"required": ["id", "title", "required", "description"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"},
"title": {"type": "string", "minLength": 2, "maxLength": 120},
"required": {"type": "boolean"},
"description": {"type": "string", "minLength": 10, "maxLength": 500}
}
}
}
}
+79
View File
@@ -0,0 +1,79 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/release-evidence.schema.json",
"title": "DevRunbook Release Evidence Matrix",
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "product", "release", "summary", "requirements", "gates", "artifacts"],
"properties": {
"schemaVersion": {"const": 1},
"product": {"const": "DevRunbook"},
"release": {
"type": "object",
"additionalProperties": false,
"required": ["version", "commit", "generatedAt", "overallStatus"],
"properties": {
"version": {"type": "string", "minLength": 1, "maxLength": 80},
"commit": {"type": "string", "minLength": 7, "maxLength": 80},
"generatedAt": {"type": "string", "format": "date-time"},
"overallStatus": {"enum": ["passed", "failed", "blocked", "accepted-exception"]}
}
},
"summary": {
"type": "object",
"additionalProperties": false,
"required": ["passed", "failed", "blocked", "notApplicable", "acceptedExceptions"],
"properties": {
"passed": {"type": "integer", "minimum": 0},
"failed": {"type": "integer", "minimum": 0},
"blocked": {"type": "integer", "minimum": 0},
"notApplicable": {"type": "integer", "minimum": 0},
"acceptedExceptions": {"type": "integer", "minimum": 0}
}
},
"requirements": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["requirementId", "status", "commit", "testEvidence", "browserEvidence", "exceptionId", "notes"],
"properties": {
"requirementId": {"type": "string", "pattern": "^(FR|NFR)-[A-Z]+-[0-9]{3}$"},
"status": {"enum": ["passed", "failed", "blocked", "not-applicable", "accepted-exception"]},
"commit": {"type": ["string", "null"], "maxLength": 80},
"testEvidence": {"type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 1000}},
"browserEvidence": {"type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 1000}},
"exceptionId": {"type": ["string", "null"], "maxLength": 100},
"notes": {"type": "string", "maxLength": 5000}
}
}
},
"gates": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "status", "evidence"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"},
"status": {"enum": ["passed", "failed", "blocked", "not-applicable", "accepted-exception"]},
"evidence": {"type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 1000}}
}
}
},
"artifacts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "path", "sha256"],
"properties": {
"name": {"type": "string", "minLength": 1, "maxLength": 200},
"path": {"type": "string", "minLength": 1, "maxLength": 1000},
"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
}
}
}
}
}
@@ -0,0 +1,36 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/rendered-prompt-manifest.schema.json",
"title": "DevRunbook Rendered Prompt Fixture Manifest",
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "generatorVersion", "canonicalHeadings", "count", "fixtures"],
"properties": {
"schemaVersion": {"const": 1},
"generatorVersion": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"},
"canonicalHeadings": {
"type": "array",
"minItems": 11,
"uniqueItems": true,
"items": {"type": "string", "minLength": 1}
},
"count": {"type": "integer", "minimum": 1},
"fixtures": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["slug", "playbookVersion", "exampleFile", "repositoryProfileFile", "generatorVersion", "sizeBytes", "sha256"],
"properties": {
"slug": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"},
"playbookVersion": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"},
"exampleFile": {"type": "string", "minLength": 1},
"repositoryProfileFile": {"type": ["string", "null"]},
"generatorVersion": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"},
"sizeBytes": {"type": "integer", "minimum": 1},
"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
}
}
}
}
}
+156
View File
@@ -0,0 +1,156 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/repository-profile.schema.json",
"title": "DevRunbook Repository Profile",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "metadata", "spec"],
"properties": {
"apiVersion": {"const": "devrunbook.io/v1alpha1"},
"kind": {"const": "RepositoryProfile"},
"metadata": {
"type": "object",
"additionalProperties": false,
"required": ["name", "revision", "source"],
"properties": {
"name": {"type": "string", "minLength": 1, "maxLength": 120},
"revision": {"type": "integer", "minimum": 1},
"source": {"enum": ["manual", "gitea", "imported", "mixed"]},
"capturedAt": {"type": "string", "format": "date-time"},
"sourceReference": {"type": "string", "maxLength": 300},
"contentDigest": {"$ref": "#/$defs/sha256"}
}
},
"spec": {
"type": "object",
"additionalProperties": false,
"required": ["repositoryType", "stack", "commands", "paths", "policies"],
"properties": {
"repositoryType": {"enum": ["single-app", "monorepo", "library", "infrastructure", "mixed", "unknown"]},
"defaultBranch": {"type": "string", "maxLength": 200},
"stack": {
"type": "object",
"additionalProperties": false,
"required": ["languages", "frameworks", "packageManagers", "databases", "deploymentTypes", "testFrameworks"],
"properties": {
"languages": {"$ref": "#/$defs/stringSet"},
"frameworks": {"$ref": "#/$defs/stringSet"},
"packageManagers": {"$ref": "#/$defs/stringSet"},
"databases": {"$ref": "#/$defs/stringSet"},
"deploymentTypes": {"$ref": "#/$defs/stringSet"},
"testFrameworks": {"$ref": "#/$defs/stringSet"},
"services": {"$ref": "#/$defs/stringSet"},
"runtimes": {"$ref": "#/$defs/stringSet"},
"queues": {"$ref": "#/$defs/stringSet"},
"ciSystems": {"$ref": "#/$defs/stringSet"}
}
},
"commands": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "role", "command", "workingDirectory", "platform", "shell", "source", "confirmed", "safeForAgentSuggestion"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*$", "maxLength": 80},
"role": {"$ref": "#/$defs/commandRole"},
"command": {"type": "string", "minLength": 1, "maxLength": 1000},
"workingDirectory": {"type": "string", "minLength": 1, "maxLength": 500},
"platform": {"enum": ["any", "linux", "windows", "macos", "container"]},
"shell": {"enum": ["auto", "sh", "bash", "pwsh", "cmd"]},
"source": {"enum": ["manual", "manifest", "documentation", "gitea", "inferred"]},
"confirmed": {"type": "boolean"},
"safeForAgentSuggestion": {"type": "boolean"},
"timeoutSeconds": {"type": "integer", "minimum": 1, "maximum": 86400},
"notes": {"type": "string", "maxLength": 500},
"confidence": {"enum": ["low", "medium", "high"]},
"evidence": {"$ref": "#/$defs/stringSet"},
"observedCommand": {"type": "string", "minLength": 1, "maxLength": 1000},
"confirmedAt": {"type": "string", "format": "date-time"}
}
}
},
"paths": {
"type": "object",
"additionalProperties": false,
"required": ["applicationRoots", "testRoots", "documentationRoots", "generated", "protected", "excluded"],
"properties": {
"applicationRoots": {"$ref": "#/$defs/pathSet"},
"testRoots": {"$ref": "#/$defs/pathSet"},
"documentationRoots": {"$ref": "#/$defs/pathSet"},
"generated": {"$ref": "#/$defs/pathSet"},
"protected": {"$ref": "#/$defs/pathSet"},
"excluded": {"$ref": "#/$defs/pathSet"},
"packageRoots": {"$ref": "#/$defs/pathSet"},
"serviceRoots": {"$ref": "#/$defs/pathSet"},
"dataRuntime": {"$ref": "#/$defs/pathSet"},
"ignored": {"$ref": "#/$defs/pathSet"}
}
},
"policies": {
"type": "object",
"additionalProperties": false,
"required": ["preserveBackwardCompatibility", "newDependencies", "gitWrite", "migrations", "documentationRequired", "networkAccess", "productionDataAccess"],
"properties": {
"preserveBackwardCompatibility": {"type": "boolean"},
"newDependencies": {"enum": ["allowed", "justify", "approval-required", "forbidden"]},
"gitWrite": {"enum": ["none", "local-commit", "push-with-approval"]},
"migrations": {"enum": ["forbidden", "plan-only", "reversible-only", "allowed-with-backup"]},
"documentationRequired": {"type": "boolean"},
"networkAccess": {"enum": ["forbidden", "read-only-approved-hosts", "allowed-with-approval"]},
"productionDataAccess": {"enum": ["forbidden", "read-only-redacted", "approval-required"]},
"requiredValidationRoles": {"type": "array", "uniqueItems": true, "maxItems": 30, "items": {"$ref": "#/$defs/commandRole"}},
"branchConventions": {"$ref": "#/$defs/stringSet"},
"environmentConstraints": {"$ref": "#/$defs/stringSet"}
}
},
"sourceFacts": {
"type": "array",
"maxItems": 500,
"items": {"$ref": "#/$defs/sourceFact"}
},
"manualOverrides": {
"type": "array",
"maxItems": 200,
"items": {"$ref": "#/$defs/manualOverride"}
},
"notes": {"type": "string", "maxLength": 5000}
}
}
},
"$defs": {
"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
"commandRole": {"enum": ["install", "format", "format-check", "lint", "typecheck", "unit-test", "integration-test", "end-to-end-test", "build", "dev-start", "smoke-test", "migration-status", "migration-apply", "security-scan", "dependency-audit"]},
"stringSet": {"type": "array", "uniqueItems": true, "maxItems": 100, "items": {"type": "string", "minLength": 1, "maxLength": 120}},
"pathSet": {"type": "array", "uniqueItems": true, "maxItems": 200, "items": {"type": "string", "minLength": 1, "maxLength": 500}},
"sourceFact": {
"type": "object",
"additionalProperties": false,
"required": ["path", "value", "source", "evidence"],
"properties": {
"path": {"$ref": "#/$defs/jsonPointer"},
"value": {},
"source": {"enum": ["manual", "manifest", "documentation", "gitea", "inferred", "prior-profile"]},
"evidence": {"$ref": "#/$defs/evidenceSet"},
"confidence": {"enum": ["low", "medium", "high"]},
"observedAt": {"type": "string", "format": "date-time"}
}
},
"manualOverride": {
"type": "object",
"additionalProperties": false,
"required": ["path", "value", "observedValue", "evidence", "confirmedAt"],
"properties": {
"path": {"$ref": "#/$defs/jsonPointer"},
"value": {},
"observedValue": {},
"evidence": {"$ref": "#/$defs/evidenceSet"},
"confirmedAt": {"type": "string", "format": "date-time"},
"note": {"type": "string", "maxLength": 500}
}
},
"jsonPointer": {"type": "string", "pattern": "^(?:/(?:[^~/]|~0|~1)*)+$", "maxLength": 500},
"evidenceSet": {"type": "array", "minItems": 1, "maxItems": 100, "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 120}}
}
}
+51
View File
@@ -0,0 +1,51 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/run-pack-manifest.schema.json",
"title": "DevRunbook Run Pack Manifest",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "run", "files", "manifestDigest"],
"properties": {
"apiVersion": {"const": "devrunbook.io/v1alpha1"},
"kind": {"const": "RunPackManifest"},
"run": {
"type": "object",
"additionalProperties": false,
"required": ["id", "playbookId", "playbookVersion", "playbookDigest", "renderDigest", "generatedAt", "platformVersion"],
"properties": {
"id": {"type": "string", "minLength": 8, "maxLength": 100},
"playbookId": {"type": "string", "minLength": 3, "maxLength": 120},
"playbookVersion": {"type": "string", "minLength": 5, "maxLength": 50},
"playbookDigest": {"$ref": "#/$defs/sha256"},
"repositoryProfileDigest": {"oneOf": [{"$ref": "#/$defs/sha256"}, {"type": "null"}]},
"renderDigest": {"$ref": "#/$defs/sha256"},
"generatedAt": {"type": "string", "format": "date-time"},
"platformVersion": {"type": "string", "minLength": 1, "maxLength": 80}
}
},
"files": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["path", "mediaType", "sizeBytes", "sha256"],
"properties": {
"path": {"$ref": "#/$defs/safePath"},
"mediaType": {"type": "string", "minLength": 3, "maxLength": 120},
"sizeBytes": {"type": "integer", "minimum": 0},
"sha256": {"$ref": "#/$defs/sha256"}
}
}
},
"manifestDigest": {
"description": "SHA-256 of the RFC 8785 canonical JSON bytes of this manifest with manifestDigest omitted.",
"$ref": "#/$defs/sha256"
}
},
"$defs": {
"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
"safePath": {"type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)[A-Za-z0-9._/-]+$", "maxLength": 500}
}
}
+49
View File
@@ -0,0 +1,49 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devrunbook.local/schemas/seed-catalog.schema.json",
"title": "DevRunbook Seed Catalog",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "metadata", "playbooks"],
"properties": {
"apiVersion": {"const": "devrunbook.io/v1alpha1"},
"kind": {"const": "SeedCatalog"},
"metadata": {
"type": "object",
"additionalProperties": false,
"required": ["name", "version", "count", "publishableCount", "notes"],
"properties": {
"name": {"type": "string", "minLength": 3, "maxLength": 160},
"version": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"},
"count": {"type": "integer", "minimum": 1},
"publishableCount": {"type": "integer", "minimum": 0},
"notes": {"type": "string", "minLength": 10, "maxLength": 1000}
}
},
"playbooks": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "slug", "title", "category", "summary", "type", "defaultMode", "riskTier", "defaultAutonomy", "priority", "deliveryStatus", "tags", "keyInputs", "doneWhen"],
"properties": {
"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$", "maxLength": 120},
"slug": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 100},
"title": {"type": "string", "minLength": 3, "maxLength": 120},
"category": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
"summary": {"type": "string", "minLength": 20, "maxLength": 400},
"type": {"enum": ["quick", "guided", "run-pack"]},
"defaultMode": {"enum": ["inspect", "plan", "guided", "execute", "recovery"]},
"riskTier": {"enum": ["low", "moderate", "high", "critical"]},
"defaultAutonomy": {"enum": ["observe", "diagnose", "plan", "implement", "verify", "repair"]},
"priority": {"enum": ["P0", "P1", "P2"]},
"deliveryStatus": {"enum": ["publishable-package", "authored-backlog", "concept-backlog"]},
"tags": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 80}},
"keyInputs": {"type": "array", "minItems": 1, "maxItems": 10, "items": {"type": "string", "minLength": 2, "maxLength": 100}},
"doneWhen": {"type": "array", "minItems": 1, "maxItems": 12, "items": {"type": "string", "minLength": 8, "maxLength": 500}}
}
}
}
}
}