@aisdlc/core 2.0.1 → 2.0.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/dist/index.cjs +98 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +98 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2826,10 +2826,10 @@ var SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON = '{\r\n "$schema": "h
|
|
|
2826
2826
|
var SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/ide/mcp-config.schema.json",\r\n "title": "IDE MCP Configuration Schema (Cursor, Antigravity, VS Code)",\r\n "type": "object",\r\n "properties": {\r\n "$schema": {\r\n "type": "string"\r\n },\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(MCP-CFG|IDE-MCP|MCP)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Optional identifier for MCP configuration artifact."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "mcp-config"\r\n },\r\n "mcpServers": {\r\n "type": "object",\r\n "additionalProperties": {\r\n "type": "object",\r\n "required": ["command"],\r\n "properties": {\r\n "command": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "args": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "env": {\r\n "type": "object"\r\n },\r\n "disabled": {\r\n "type": "boolean"\r\n },\r\n "alwaysAllow": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "description": "MCP server registry format for Cursor and Antigravity."\r\n },\r\n "servers": {\r\n "type": "object",\r\n "additionalProperties": {\r\n "type": "object",\r\n "required": ["command"],\r\n "properties": {\r\n "command": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "args": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "env": {\r\n "type": "object"\r\n },\r\n "disabled": {\r\n "type": "boolean"\r\n },\r\n "alwaysAllow": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "description": "MCP server registry format for VS Code."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2827
2827
|
var SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/manuals/production-manual.schema.json",\r\n "title": "AI-SDLC Production & Operations Manual Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "applies-to-version",\r\n "target-audience"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Immutable production manual identifier (e.g. MAN-PROD-SENTINELCORE)."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "production-manual"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Document semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string",\r\n "description": "Template schema version."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3,\r\n "description": "Descriptive title of the production manual."\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "applies-to-version": {\r\n "type": "string",\r\n "description": "Software version or release this production manual applies to (e.g. v1.0.0)."\r\n },\r\n "target-audience": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "minItems": 1,\r\n "description": "Target technical profiles (e.g. DevOps, SRE, Release Manager, SecOps)."\r\n },\r\n "components-covered": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Architecture components (CMP-*) deployed and covered by the manual."\r\n },\r\n "enclaves-involved": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Security enclaves (SEC-ENC-*) in which deployment executes."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2828
2828
|
var SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/manuals/user-manual.schema.json",\r\n "title": "AI-SDLC User Manual Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "target-audience",\r\n "allowed-roles",\r\n "applies-to-version"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Immutable user manual identifier (e.g. MAN-USER-SENTINELCORE)."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "user-manual"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Document semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string",\r\n "description": "Template schema version."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3,\r\n "description": "Descriptive title of the user manual."\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "applies-to-version": {\r\n "type": "string",\r\n "description": "Software version or release this manual applies to (e.g. v1.0.0)."\r\n },\r\n "target-audience": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "minItems": 1,\r\n "description": "Target user profiles or roles for the manual."\r\n },\r\n "allowed-roles": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "minItems": 1,\r\n "description": "Formal catalog of authorized roles to operate the application (linked to ACT-*)."\r\n },\r\n "journeys-covered": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Product journey identifiers (JRN-*) covered in the manual."\r\n },\r\n "use-cases-covered": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Use case identifiers (UC-*) implemented across journeys."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2829
|
-
var SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/data-asset.schema.json",\n "title": "Personal Data Asset & PII Inventory Schema (DATA-ASSET-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "classification",\n "pii-categories",\n "data-subjects",\n "retention-period",\n "erasure-method"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "data-asset"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Data asset semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": ["draft", "active", "deprecated", "retired"]\n },\n "classification": {\n "type": "string",\n "enum": [\n "public",\n "internal",\n "confidential-pii",\n "special-category-sensitive"\n ],\n "description": "Data sensitivity classification aligned with privacy-policy.yaml."\n },\n "pii-categories": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "enum": [\n "identifiers",\n "contact",\n "authentication",\n "financial",\n "location",\n "behavioral",\n "biometric",\n "health",\n "telemetry-operator"\n ]\n }\n },\n "data-subjects": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Product actors (ACT-*) whose personal data is stored or processed."\n },\n "fields": {\n "type": "array",\n "items": {\n "type": "object",\n "required": ["name", "sensitivity", "masking-strategy"],\n "properties": {\n "name": {\n "type": "string",\n "minLength": 1\n },\n "sensitivity": {\n "type": "string",\n "enum": ["public", "internal", "pii", "special-category"]\n },\n "masking-strategy": {\n "type": "string",\n "enum": [\n "none",\n "redact",\n "sha256-salt",\n "tokenize",\n "aes-256-gcm",\n "truncate"\n ]\n }\n },\n "additionalProperties": false\n }\n },\n "retention-period": {\n "type": "string",\n "pattern": "^([0-9]+(d|m|y)|session-only|indefinite-anonymized)$",\n "description": "Maximum retention TTL (e.g. 30d, 12m, 5y, session-only, indefinite-anonymized)."\n },\n "erasure-method": {\n "type": "string",\n "enum": [\n "hard-delete",\n "crypto-shredding",\n "irreversible-anonymization"\n ]\n },\n "owner-bounded-context": {\n "type": "string",\n "pattern": "^(BC|CMP)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "supersedes": {\n "type": ["string", "null"],\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": ["string", "null"],\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}\n';
|
|
2830
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-policy.schema.json",\n "title": "Privacy-by-Design as Code Governance Policy Schema",\n "type": "object",\n "required": [\n "version",\n "project",\n "regulatory_frameworks",\n "default_action",\n "classifications",\n "agent_guardrails",\n "ci_gates"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(PRIV-POL|POL-PRIV)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "privacy-policy"\n },\n "version": {\n "type": "string",\n "minLength": 1\n },\n "project": {\n "type": "string",\n "minLength": 1\n },\n "regulatory_frameworks": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "enum": ["GDPR", "LOPDGDD", "ISO-27701", "CCPA", "HIPAA", "LGPD"]\n }\n },\n "default_action": {\n "type": "string",\n "enum": ["DENY_UNREGISTERED_PII", "ALLOW", "REVIEW_REQUIRED"]\n },\n "classifications": {\n "type": "object",\n "required": ["public", "internal", "confidential_pii", "special_category_sensitive"],\n "additionalProperties": {\n "type": "object",\n "required": ["action", "encryption_at_rest", "encryption_in_transit", "allow_in_logs", "allow_in_ai_prompts"],\n "properties": {\n "action": {\n "type": "string",\n "enum": ["ALLOW", "STRICT_GOVERNANCE", "DPIA_APPROVAL_REQUIRED", "DENY"]\n },\n "description": { "type": "string" },\n "exception_requires": { "type": "string" },\n "require_ropa_entry": { "type": "boolean" },\n "require_dpia_artifact": { "type": "boolean" },\n "encryption_at_rest": { "type": "boolean" },\n "encryption_in_transit": { "type": "boolean" },\n "require_field_level_encryption": { "type": "boolean" },\n "allow_in_logs": { "type": "boolean" },\n "log_masking_strategy": { "type": "string" },\n "allow_in_ai_prompts": { "type": "boolean" },\n "max_retention_days": { "type": "integer", "minimum": 1 },\n "require_right_to_erasure": { "type": "boolean" }\n },\n "additionalProperties": false\n }\n },\n "cross_border_transfers": {\n "type": "object",\n "properties": {\n "allowed_regions": {\n "type": "array",\n "items": { "type": "string" }\n },\n "require_scc_for_third_countries": { "type": "boolean" },\n "approved_subprocessors": {\n "type": "array",\n "items": { "type": "string" }\n }\n },\n "additionalProperties": false\n },\n "agent_guardrails": {\n "type": "object",\n "required": [\n "forbid_real_pii_in_tests",\n "forbid_pii_in_console_or_logger",\n "require_dto_projection_for_pii"\n ],\n "properties": {\n "forbid_real_pii_in_tests": { "type": "boolean" },\n "forbid_pii_in_console_or_logger": { "type": "boolean" },\n "require_dto_projection_for_pii": { "type": "boolean" },\n "on_special_category_detected": {\n "type": "object",\n "required": ["action", "notification_tag", "message"],\n "properties": {\n "action": { "type": "string" },\n "notification_tag": { "type": "string" },\n "message": { "type": "string" }\n },\n "additionalProperties": false\n }\n },\n "additionalProperties": false\n },\n "ci_gates": {\n "type": "object",\n "required": [\n "fail_on_unregistered_pii",\n "fail_on_pii_in_logs",\n "fail_on_missing_retention_policy",\n "generate_ropa_inventory",\n "output_ropa_file",\n "output_privacy_report"\n ],\n "properties": {\n "fail_on_unregistered_pii": { "type": "boolean" },\n "fail_on_pii_in_logs": { "type": "boolean" },\n "fail_on_missing_retention_policy": { "type": "boolean" },\n "fail_on_unapproved_subprocessor": { "type": "boolean" },\n "generate_ropa_inventory": { "type": "boolean" },\n "output_ropa_file": { "type": "string" },\n "output_privacy_report": { "type": "string" }\n },\n "additionalProperties": false\n }\n },\n "additionalProperties": false\n}\n';
|
|
2831
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-req.schema.json",\n "title": "Privacy Requirement & Technical Control Schema (PRIV-REQ-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "privacy-principle",\n "linddun-category",\n "governs-ropa"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "privacy-requirement"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Privacy requirement semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": ["draft", "active", "deprecated", "retired"]\n },\n "privacy-principle": {\n "type": "string",\n "enum": [\n "data-minimization",\n "purpose-limitation",\n "storage-limitation",\n "accuracy",\n "integrity-and-confidentiality",\n "transparency-and-consent",\n "data-subject-rights-arco",\n "pseudonymization-anonymization"\n ]\n },\n "linddun-category": {\n "type": "string",\n "enum": [\n "linkability",\n "identifiability",\n "non-repudiation",\n "detectability",\n "disclosure-of-information",\n "unawareness",\n "non-compliance"\n ],\n "description": "LINDDUN privacy threat category mitigated by this control."\n },\n "governs-ropa": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Upstream ROPA records (PRIV-ROPA-*) governed by this privacy requirement."\n },\n "protects-data-assets": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "enforced-in-enclave": {\n "type": "string",\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "compliance-references": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "acceptance-format": {\n "type": "string",\n "enum": ["gherkin", "declarative-prose"]\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^@[a-zA-Z0-9_-]+$"\n }\n },\n "supersedes": {\n "type": ["string", "null"],\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": ["string", "null"],\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}\n';
|
|
2832
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-ropa.schema.json",\n "title": "Record of Processing Activities Schema (PRIV-ROPA-* / GDPR Art. 30)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "lawful-basis",\n "processing-purpose",\n "use-cases",\n "data-assets",\n "data-subjects",\n "retention-ttl"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "privacy-ropa"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "ROPA record semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": ["draft", "active", "deprecated", "retired"]\n },\n "lawful-basis": {\n "type": "string",\n "enum": [\n "consent",\n "contract",\n "legal-obligation",\n "vital-interests",\n "public-task",\n "legitimate-interests"\n ],\n "description": "Lawful basis for processing under GDPR Art. 6.1."\n },\n "special-category-condition": {\n "type": ["string", "null"],\n "enum": [\n null,\n "explicit-consent",\n "employment-social-security",\n "vital-interests",\n "public-interest",\n "preventive-medicine",\n "public-health"\n ],\n "description": "GDPR Art. 9.2 condition when processing special category data."\n },\n "processing-purpose": {\n "type": "string",\n "minLength": 10\n },\n "use-cases": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Upstream Use Cases (UC-*) that trigger this data processing activity."\n },\n "data-assets": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Personal Data Assets (DATA-ASSET-*) processed in this activity."\n },\n "data-subjects": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "retention-ttl": {\n "type": "string",\n "pattern": "^([0-9]+(d|m|y)|session-only|indefinite-anonymized)$"\n },\n "cross-border-transfer": {\n "type": "boolean"\n },\n "transfer-safeguards": {\n "type": ["string", "null"],\n "enum": [null, "adequacy-decision", "scc", "bcr", "derogation"]\n },\n "subprocessors": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "dpia-required": {\n "type": "boolean"\n },\n "dpia-reference": {\n "type": ["string", "null"],\n "pattern": "^DPIA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "mitigated-by": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Privacy requirements (PRIV-REQ-*) governing and enforcing this processing activity."\n },\n "supersedes": {\n "type": ["string", "null"],\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": ["string", "null"],\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}\n';
|
|
2829
|
+
var SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/privacy/data-asset.schema.json",\r\n "title": "Personal Data Asset & PII Inventory Schema (DATA-ASSET-*)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "classification",\r\n "pii-categories",\r\n "data-subjects",\r\n "retention-period",\r\n "erasure-method"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "data-asset"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Data asset semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "classification": {\r\n "type": "string",\r\n "enum": [\r\n "public",\r\n "internal",\r\n "confidential-pii",\r\n "special-category-sensitive"\r\n ],\r\n "description": "Data sensitivity classification aligned with privacy-policy.yaml."\r\n },\r\n "pii-categories": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "enum": [\r\n "identifiers",\r\n "contact",\r\n "authentication",\r\n "financial",\r\n "location",\r\n "behavioral",\r\n "biometric",\r\n "health",\r\n "telemetry-operator"\r\n ]\r\n }\r\n },\r\n "data-subjects": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Product actors (ACT-*) whose personal data is stored or processed."\r\n },\r\n "fields": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["name", "sensitivity", "masking-strategy"],\r\n "properties": {\r\n "name": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "sensitivity": {\r\n "type": "string",\r\n "enum": ["public", "internal", "pii", "special-category"]\r\n },\r\n "masking-strategy": {\r\n "type": "string",\r\n "enum": [\r\n "none",\r\n "redact",\r\n "sha256-salt",\r\n "tokenize",\r\n "aes-256-gcm",\r\n "truncate"\r\n ]\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "retention-period": {\r\n "type": "string",\r\n "pattern": "^([0-9]+(d|m|y)|session-only|indefinite-anonymized)$",\r\n "description": "Maximum retention TTL (e.g. 30d, 12m, 5y, session-only, indefinite-anonymized)."\r\n },\r\n "erasure-method": {\r\n "type": "string",\r\n "enum": [\r\n "hard-delete",\r\n "crypto-shredding",\r\n "irreversible-anonymization"\r\n ]\r\n },\r\n "owner-bounded-context": {\r\n "type": "string",\r\n "pattern": "^(BC|CMP)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2830
|
+
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-policy.schema.json",\r\n "title": "Privacy-by-Design as Code Governance Policy Schema",\r\n "type": "object",\r\n "required": [\r\n "version",\r\n "project",\r\n "regulatory_frameworks",\r\n "default_action",\r\n "classifications",\r\n "agent_guardrails",\r\n "ci_gates"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(PRIV-POL|POL-PRIV)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "privacy-policy"\r\n },\r\n "version": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "project": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "regulatory_frameworks": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "enum": ["GDPR", "LOPDGDD", "ISO-27701", "CCPA", "HIPAA", "LGPD"]\r\n }\r\n },\r\n "default_action": {\r\n "type": "string",\r\n "enum": ["DENY_UNREGISTERED_PII", "ALLOW", "REVIEW_REQUIRED"]\r\n },\r\n "classifications": {\r\n "type": "object",\r\n "required": ["public", "internal", "confidential_pii", "special_category_sensitive"],\r\n "additionalProperties": {\r\n "type": "object",\r\n "required": ["action", "encryption_at_rest", "encryption_in_transit", "allow_in_logs", "allow_in_ai_prompts"],\r\n "properties": {\r\n "action": {\r\n "type": "string",\r\n "enum": ["ALLOW", "STRICT_GOVERNANCE", "DPIA_APPROVAL_REQUIRED", "DENY"]\r\n },\r\n "description": { "type": "string" },\r\n "exception_requires": { "type": "string" },\r\n "require_ropa_entry": { "type": "boolean" },\r\n "require_dpia_artifact": { "type": "boolean" },\r\n "encryption_at_rest": { "type": "boolean" },\r\n "encryption_in_transit": { "type": "boolean" },\r\n "require_field_level_encryption": { "type": "boolean" },\r\n "allow_in_logs": { "type": "boolean" },\r\n "log_masking_strategy": { "type": "string" },\r\n "allow_in_ai_prompts": { "type": "boolean" },\r\n "max_retention_days": { "type": "integer", "minimum": 1 },\r\n "require_right_to_erasure": { "type": "boolean" }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "cross_border_transfers": {\r\n "type": "object",\r\n "properties": {\r\n "allowed_regions": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "require_scc_for_third_countries": { "type": "boolean" },\r\n "approved_subprocessors": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "agent_guardrails": {\r\n "type": "object",\r\n "required": [\r\n "forbid_real_pii_in_tests",\r\n "forbid_pii_in_console_or_logger",\r\n "require_dto_projection_for_pii"\r\n ],\r\n "properties": {\r\n "forbid_real_pii_in_tests": { "type": "boolean" },\r\n "forbid_pii_in_console_or_logger": { "type": "boolean" },\r\n "require_dto_projection_for_pii": { "type": "boolean" },\r\n "on_special_category_detected": {\r\n "type": "object",\r\n "required": ["action", "notification_tag", "message"],\r\n "properties": {\r\n "action": { "type": "string" },\r\n "notification_tag": { "type": "string" },\r\n "message": { "type": "string" }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "ci_gates": {\r\n "type": "object",\r\n "required": [\r\n "fail_on_unregistered_pii",\r\n "fail_on_pii_in_logs",\r\n "fail_on_missing_retention_policy",\r\n "generate_ropa_inventory",\r\n "output_ropa_file",\r\n "output_privacy_report"\r\n ],\r\n "properties": {\r\n "fail_on_unregistered_pii": { "type": "boolean" },\r\n "fail_on_pii_in_logs": { "type": "boolean" },\r\n "fail_on_missing_retention_policy": { "type": "boolean" },\r\n "fail_on_unapproved_subprocessor": { "type": "boolean" },\r\n "generate_ropa_inventory": { "type": "boolean" },\r\n "output_ropa_file": { "type": "string" },\r\n "output_privacy_report": { "type": "string" }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2831
|
+
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-req.schema.json",\r\n "title": "Privacy Requirement & Technical Control Schema (PRIV-REQ-*)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "privacy-principle",\r\n "linddun-category",\r\n "governs-ropa"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "privacy-requirement"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Privacy requirement semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "privacy-principle": {\r\n "type": "string",\r\n "enum": [\r\n "data-minimization",\r\n "purpose-limitation",\r\n "storage-limitation",\r\n "accuracy",\r\n "integrity-and-confidentiality",\r\n "transparency-and-consent",\r\n "data-subject-rights-arco",\r\n "pseudonymization-anonymization"\r\n ]\r\n },\r\n "linddun-category": {\r\n "type": "string",\r\n "enum": [\r\n "linkability",\r\n "identifiability",\r\n "non-repudiation",\r\n "detectability",\r\n "disclosure-of-information",\r\n "unawareness",\r\n "non-compliance"\r\n ],\r\n "description": "LINDDUN privacy threat category mitigated by this control."\r\n },\r\n "governs-ropa": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Upstream ROPA records (PRIV-ROPA-*) governed by this privacy requirement."\r\n },\r\n "protects-data-assets": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "enforced-in-enclave": {\r\n "type": "string",\r\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "compliance-references": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "acceptance-format": {\r\n "type": "string",\r\n "enum": ["gherkin", "declarative-prose"]\r\n },\r\n "cucumber-tags": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^@[a-zA-Z0-9_-]+$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2832
|
+
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-ropa.schema.json",\r\n "title": "Record of Processing Activities Schema (PRIV-ROPA-* / GDPR Art. 30)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "lawful-basis",\r\n "processing-purpose",\r\n "use-cases",\r\n "data-assets",\r\n "data-subjects",\r\n "retention-ttl"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "privacy-ropa"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "ROPA record semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "lawful-basis": {\r\n "type": "string",\r\n "enum": [\r\n "consent",\r\n "contract",\r\n "legal-obligation",\r\n "vital-interests",\r\n "public-task",\r\n "legitimate-interests"\r\n ],\r\n "description": "Lawful basis for processing under GDPR Art. 6.1."\r\n },\r\n "special-category-condition": {\r\n "type": ["string", "null"],\r\n "enum": [\r\n null,\r\n "explicit-consent",\r\n "employment-social-security",\r\n "vital-interests",\r\n "public-interest",\r\n "preventive-medicine",\r\n "public-health"\r\n ],\r\n "description": "GDPR Art. 9.2 condition when processing special category data."\r\n },\r\n "processing-purpose": {\r\n "type": "string",\r\n "minLength": 10\r\n },\r\n "use-cases": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Upstream Use Cases (UC-*) that trigger this data processing activity."\r\n },\r\n "data-assets": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Personal Data Assets (DATA-ASSET-*) processed in this activity."\r\n },\r\n "data-subjects": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "retention-ttl": {\r\n "type": "string",\r\n "pattern": "^([0-9]+(d|m|y)|session-only|indefinite-anonymized)$"\r\n },\r\n "cross-border-transfer": {\r\n "type": "boolean"\r\n },\r\n "transfer-safeguards": {\r\n "type": ["string", "null"],\r\n "enum": [null, "adequacy-decision", "scc", "bcr", "derogation"]\r\n },\r\n "subprocessors": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "dpia-required": {\r\n "type": "boolean"\r\n },\r\n "dpia-reference": {\r\n "type": ["string", "null"],\r\n "pattern": "^DPIA-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "mitigated-by": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Privacy requirements (PRIV-REQ-*) governing and enforcing this processing activity."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2833
2833
|
var SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/product/actor.schema.json",\r\n "title": "ProductShape Actor Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "role-type"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "actor"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Artifact semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string",\r\n "description": "Schema specification version used."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "role-type": {\r\n "type": "string",\r\n "enum": ["human-user", "ai-agent", "external-system", "sensor-iot"]\r\n },\r\n "description": {\r\n "type": "string"\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Identifier of the actor superseded by this version or artifact."\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Identifier of the new actor superseding this one upon deprecation/retirement."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2834
2834
|
var SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/product/business-rule.schema.json",\r\n "title": "ProductShape Business Rule Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "enforcement-level"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "business-rule"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Business rule semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "enforcement-level": {\r\n "type": "string",\r\n "enum": ["strict-invariant", "override-with-approval", "guideline"]\r\n },\r\n "defined-in": {\r\n "type": "string",\r\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "uses-terms": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2835
2835
|
var SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/product/journey.schema.json",\r\n "title": "Customer / Operator Journey Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "persona",\r\n "stages",\r\n "touchpoints"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "journey"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Journey semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "persona": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Actor (persona) starring in this journey."\r\n },\r\n "stages": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Sequential journey stages (e.g. Awareness, Onboarding, Activation, Retention)."\r\n },\r\n "touchpoints": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Touchpoints between persona and system at each stage."\r\n },\r\n "related-use-cases": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "System use cases related to this journey."\r\n },\r\n "pain-points": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Frictions or issues detected along the user journey."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"]\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"]\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
@@ -9782,14 +9782,28 @@ function registerScannedArtifactNodes(scannedMap, nodeMap) {
|
|
|
9782
9782
|
}
|
|
9783
9783
|
}
|
|
9784
9784
|
}
|
|
9785
|
+
function ensureNodeExists(id, nodeMap, fallbackType, fallbackLayer = "product") {
|
|
9786
|
+
if (!nodeMap.has(id)) {
|
|
9787
|
+
const classification = classifyArtifactLayerAndType(id, fallbackType || "");
|
|
9788
|
+
const type = classification?.type || fallbackType || "product";
|
|
9789
|
+
const layer = classification?.layer || fallbackLayer;
|
|
9790
|
+
nodeMap.set(id, {
|
|
9791
|
+
id,
|
|
9792
|
+
label: id,
|
|
9793
|
+
title: id,
|
|
9794
|
+
type,
|
|
9795
|
+
layer,
|
|
9796
|
+
status: "COMPLIANT"
|
|
9797
|
+
});
|
|
9798
|
+
}
|
|
9799
|
+
}
|
|
9785
9800
|
function connectTargets(sourceId, rawTargets, relation, nodeMap, addEdge, defaultType, defaultLayer = "product") {
|
|
9786
9801
|
const list = Array.isArray(rawTargets) ? rawTargets : typeof rawTargets === "string" ? [rawTargets] : [];
|
|
9787
9802
|
for (const item of list) {
|
|
9788
9803
|
if (typeof item === "string" && item.trim()) {
|
|
9789
9804
|
const targetId = item.trim();
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
}
|
|
9805
|
+
ensureNodeExists(sourceId, nodeMap, defaultType, defaultLayer);
|
|
9806
|
+
ensureNodeExists(targetId, nodeMap, defaultType, defaultLayer);
|
|
9793
9807
|
addEdge({ id: `edge-${sourceId}-${targetId}`, source: sourceId, target: targetId, label: relation, relation, status: "COMPLIANT" });
|
|
9794
9808
|
}
|
|
9795
9809
|
}
|
|
@@ -9963,14 +9977,11 @@ function connectArtifactRelationships(scannedMap, nodeMap, addEdge) {
|
|
|
9963
9977
|
function updateTracesForEdge(e, nodeMap) {
|
|
9964
9978
|
const srcNode = nodeMap.get(e.source);
|
|
9965
9979
|
const tgtNode = nodeMap.get(e.target);
|
|
9966
|
-
if (srcNode)
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
if (tgtNode)
|
|
9971
|
-
tgtNode.upstream = tgtNode.upstream || [];
|
|
9972
|
-
if (!tgtNode.upstream.includes(e.source)) tgtNode.upstream.push(e.source);
|
|
9973
|
-
}
|
|
9980
|
+
if (!srcNode || !tgtNode) return;
|
|
9981
|
+
srcNode.downstream = srcNode.downstream || [];
|
|
9982
|
+
if (!srcNode.downstream.includes(e.target)) srcNode.downstream.push(e.target);
|
|
9983
|
+
tgtNode.upstream = tgtNode.upstream || [];
|
|
9984
|
+
if (!tgtNode.upstream.includes(e.source)) tgtNode.upstream.push(e.source);
|
|
9974
9985
|
}
|
|
9975
9986
|
function buildNodeElements(nodeMap, nodesByLayer) {
|
|
9976
9987
|
let conformingCount = 0;
|
|
@@ -9987,8 +9998,8 @@ function buildNodeElements(nodeMap, nodesByLayer) {
|
|
|
9987
9998
|
}
|
|
9988
9999
|
return { elements, conformingCount, issueCount };
|
|
9989
10000
|
}
|
|
9990
|
-
function buildEdgeElements(edges) {
|
|
9991
|
-
return edges.map((e) => ({
|
|
10001
|
+
function buildEdgeElements(edges, nodeMap) {
|
|
10002
|
+
return edges.filter((e) => nodeMap.has(e.source) && nodeMap.has(e.target)).map((e) => ({
|
|
9992
10003
|
group: "edges",
|
|
9993
10004
|
data: e,
|
|
9994
10005
|
classes: `relation-${e.relation} status-${e.status?.toLowerCase() || "compliant"}`
|
|
@@ -9998,12 +10009,13 @@ function assembleGraphElementsResult(nodeMap, edges, driftTargets) {
|
|
|
9998
10009
|
for (const [id, node] of nodeMap.entries()) {
|
|
9999
10010
|
if (driftTargets.has(id)) node.status = "DRIFT";
|
|
10000
10011
|
}
|
|
10001
|
-
|
|
10012
|
+
const validEdges = edges.filter((e) => nodeMap.has(e.source) && nodeMap.has(e.target));
|
|
10013
|
+
for (const e of validEdges) {
|
|
10002
10014
|
updateTracesForEdge(e, nodeMap);
|
|
10003
10015
|
}
|
|
10004
10016
|
const nodesByLayer = { product: 0, requirement: 0, architecture: 0, test: 0 };
|
|
10005
10017
|
const { elements: nodeElements, conformingCount, issueCount } = buildNodeElements(nodeMap, nodesByLayer);
|
|
10006
|
-
const edgeElements = buildEdgeElements(
|
|
10018
|
+
const edgeElements = buildEdgeElements(validEdges, nodeMap);
|
|
10007
10019
|
return {
|
|
10008
10020
|
elements: [...nodeElements, ...edgeElements],
|
|
10009
10021
|
nodesByLayer,
|
|
@@ -10464,9 +10476,24 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10464
10476
|
console.error('Cytoscape library not loaded');
|
|
10465
10477
|
return;
|
|
10466
10478
|
}
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
elements
|
|
10479
|
+
try {
|
|
10480
|
+
var validNodeIds = new Set();
|
|
10481
|
+
(elements || []).forEach(function(el) {
|
|
10482
|
+
if (el && el.group === 'nodes' && el.data && el.data.id) {
|
|
10483
|
+
validNodeIds.add(el.data.id);
|
|
10484
|
+
}
|
|
10485
|
+
});
|
|
10486
|
+
var safeElements = (elements || []).filter(function(el) {
|
|
10487
|
+
if (!el || !el.data) return false;
|
|
10488
|
+
if (el.group === 'edges') {
|
|
10489
|
+
return validNodeIds.has(el.data.source) && validNodeIds.has(el.data.target);
|
|
10490
|
+
}
|
|
10491
|
+
return true;
|
|
10492
|
+
});
|
|
10493
|
+
|
|
10494
|
+
cy = cytoscape({
|
|
10495
|
+
container: document.getElementById('cy'),
|
|
10496
|
+
elements: safeElements,
|
|
10470
10497
|
boxSelectionEnabled: false,
|
|
10471
10498
|
autoungrabify: true,
|
|
10472
10499
|
style: [
|
|
@@ -10487,6 +10514,14 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10487
10514
|
'text-max-width': '65px'
|
|
10488
10515
|
}
|
|
10489
10516
|
},
|
|
10517
|
+
{
|
|
10518
|
+
selector: 'node.layer-product',
|
|
10519
|
+
style: { 'shape': 'diamond', 'background-color': '#0e7490', 'border-color': '#38bdf8', 'width': 50, 'height': 50 }
|
|
10520
|
+
},
|
|
10521
|
+
{
|
|
10522
|
+
selector: 'node.layer-architecture',
|
|
10523
|
+
style: { 'shape': 'hexagon', 'background-color': '#4338ca', 'border-color': '#818cf8', 'width': 60, 'height': 45 }
|
|
10524
|
+
},
|
|
10490
10525
|
{
|
|
10491
10526
|
selector: 'node.type-architecture-introduction',
|
|
10492
10527
|
style: {
|
|
@@ -10636,20 +10671,12 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10636
10671
|
'height': 32
|
|
10637
10672
|
}
|
|
10638
10673
|
},
|
|
10639
|
-
{
|
|
10640
|
-
selector: 'node.layer-product:not(.type-architecture-introduction):not(.type-journey):not(.type-actor):not(.type-use-case):not(.type-usecase):not(.type-business-rule):not(.type-rule):not(.type-abuse-case):not(.type-threat-actor):not(.type-data-asset):not(.type-privacy-ropa)',
|
|
10641
|
-
style: { 'shape': 'diamond', 'background-color': '#0e7490', 'border-color': '#38bdf8', 'width': 50, 'height': 50 }
|
|
10642
|
-
},
|
|
10643
|
-
{
|
|
10644
|
-
selector: 'node.layer-architecture:not(.type-component):not(.type-adr):not(.type-security-enclave)',
|
|
10645
|
-
style: { 'shape': 'hexagon', 'background-color': '#4338ca', 'border-color': '#818cf8', 'width': 60, 'height': 45 }
|
|
10646
|
-
},
|
|
10647
10674
|
{
|
|
10648
10675
|
selector: 'node.status-conforme, node.status-compliant',
|
|
10649
10676
|
style: { 'border-color': '#10b981' }
|
|
10650
10677
|
},
|
|
10651
10678
|
{
|
|
10652
|
-
selector: 'node.status-
|
|
10679
|
+
selector: 'node.status-orphan, node.status-drift, node.status-huerfano',
|
|
10653
10680
|
style: { 'border-color': '#ef4444', 'background-color': '#7f1d1d' }
|
|
10654
10681
|
},
|
|
10655
10682
|
{
|
|
@@ -10708,9 +10735,9 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10708
10735
|
style: {
|
|
10709
10736
|
'border-width': 4,
|
|
10710
10737
|
'border-color': '#38bdf8',
|
|
10711
|
-
'
|
|
10712
|
-
'
|
|
10713
|
-
'
|
|
10738
|
+
'underlay-color': '#38bdf8',
|
|
10739
|
+
'underlay-padding': 4,
|
|
10740
|
+
'underlay-opacity': 0.4
|
|
10714
10741
|
}
|
|
10715
10742
|
},
|
|
10716
10743
|
{
|
|
@@ -10779,7 +10806,10 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10779
10806
|
currentHoverNodeId = null;
|
|
10780
10807
|
hideTooltip();
|
|
10781
10808
|
});
|
|
10809
|
+
} catch (err) {
|
|
10810
|
+
console.error('Error initializing Cytoscape:', err);
|
|
10782
10811
|
}
|
|
10812
|
+
}
|
|
10783
10813
|
|
|
10784
10814
|
function highlightCriticalPath(node) {
|
|
10785
10815
|
cy.elements().removeClass('highlighted dimmed');
|
|
@@ -11003,7 +11033,7 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
11003
11033
|
nodes.connectedEdges().show();
|
|
11004
11034
|
} else {
|
|
11005
11035
|
cy.elements().hide();
|
|
11006
|
-
var nodes = cy.nodes('.status-orphan, .status-
|
|
11036
|
+
var nodes = cy.nodes('.status-orphan, .status-huerfano, .status-drift');
|
|
11007
11037
|
nodes.show();
|
|
11008
11038
|
nodes.connectedEdges().show();
|
|
11009
11039
|
}
|
|
@@ -14075,17 +14105,17 @@ pipelines:\r
|
|
|
14075
14105
|
- step: *build-and-verify\r
|
|
14076
14106
|
- step: *sdd-integrate\r
|
|
14077
14107
|
`;
|
|
14078
|
-
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML = "name: CI - AI-SDLC Quality Gates & Testing\n\non:\n push:\n branches: [ main ]\n pull_request:\n branches: [ main ]\n\njobs:\n verify-and-test:\n runs-on: ubuntu-latest\n strategy:\n matrix:\n node-version: [ 18.x, 20.x, 22.x ]\n\n steps:\n - name: Checkout Code\n uses: actions/checkout@v4\n\n - name: Install pnpm\n uses: pnpm/action-setup@v4\n with:\n version: 10\n\n - name: Setup Node.js ${{ matrix.node-version }}\n uses: actions/setup-node@v4\n with:\n node-version: ${{ matrix.node-version }}\n\n - name: Install Dependencies\n run: |\n pnpm install --frozen-lockfile\n pnpm approve-builds --all\n\n - name: Build Packages\n run: pnpm run build\n\n - name: Run Vitest Unit & Integration Suites\n run: pnpm test\n\n - name: AI-SDLC Quality Gate & Full Verification\n run: npx @aisdlc/cli verify all\n";
|
|
14079
|
-
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML = 'name: Deploy AI-SDLC Dashboard to GitHub Pages\n\non:\n push:\n branches:\n - main\n workflow_dispatch:\n\npermissions:\n contents: read\n pages: write\n id-token: write\n\nconcurrency:\n group: pages\n cancel-in-progress: false\n\njobs:\n deploy-dashboard:\n name: Build & Publish Interactive Dashboard\n runs-on: ubuntu-latest\n environment:\n name: github-pages\n url: ${{ steps.deployment.outputs.page_url }}\n\n steps:\n - name: Checkout Code\n uses: actions/checkout@v4\n with:\n fetch-depth: 0 # Full git history required for historical KPIs and telemetry\n\n - name: Setup Node.js\n uses: actions/setup-node@v4\n with:\n node-version: 20\n\n - name: Generate AI-SDLC Interactive Dashboard\n run: |\n mkdir -p reports\n npx --yes @aisdlc/cli report dashboard --output reports/index.html\n cp reports/index.html reports/dashboard.html\n touch reports/.nojekyll\n\n - name: Setup GitHub Pages\n uses: actions/configure-pages@v5\n\n - name: Upload Pages Artifact\n uses: actions/upload-pages-artifact@v3\n with:\n path: reports\n\n - name: Deploy to GitHub Pages\n id: deployment\n uses: actions/deploy-pages@v4\n\n - name: Emit Summary to GitHub Actions\n if: always() && steps.deployment.outcome == \'success\'\n run: |\n echo "### \u{1F310} AI-SDLC Interactive Dashboard Published" >> $GITHUB_STEP_SUMMARY\n echo "" >> $GITHUB_STEP_SUMMARY\n echo "The interactive PDaC / RTM graph, Quality Gate telemetry, and release metrics are live at:" >> $GITHUB_STEP_SUMMARY\n echo "" >> $GITHUB_STEP_SUMMARY\n echo "\u{1F449} **[Open Live Dashboard](${{ steps.deployment.outputs.page_url }})**" >> $GITHUB_STEP_SUMMARY\n';
|
|
14080
|
-
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML = "name: AI-SDLC PR KPI Aggregator\n\non:\n pull_request:\n types: [opened, synchronize, reopened]\n\npermissions:\n contents: read\n pull-requests: write\n\njobs:\n aggregate-kpis:\n name: Aggregate PR KPIs & Telemetry\n runs-on: ubuntu-latest\n\n steps:\n - name: Checkout Repository\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n - name: Install pnpm\n uses: pnpm/action-setup@v4\n with:\n version: 10\n\n - name: Setup Node.js\n uses: actions/setup-node@v4\n with:\n node-version: 20\n\n - name: Install Dependencies\n run: |\n pnpm install --frozen-lockfile\n\n - name: Calculate and Emit PR KPIs\n id: kpi\n run: |\n npx @aisdlc/cli kpi pr --base origin/${{ github.base_ref }} --head HEAD >> $GITHUB_STEP_SUMMARY\n";
|
|
14081
|
-
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML = 'name: SDD Canonical Integration on Merge\
|
|
14108
|
+
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML = "name: CI - AI-SDLC Quality Gates & Testing\r\n\r\non:\r\n push:\r\n branches: [ main ]\r\n pull_request:\r\n branches: [ main ]\r\n\r\njobs:\r\n verify-and-test:\r\n runs-on: ubuntu-latest\r\n strategy:\r\n matrix:\r\n node-version: [ 18.x, 20.x, 22.x ]\r\n\r\n steps:\r\n - name: Checkout Code\r\n uses: actions/checkout@v4\r\n\r\n - name: Install pnpm\r\n uses: pnpm/action-setup@v4\r\n with:\r\n version: 10\r\n\r\n - name: Setup Node.js ${{ matrix.node-version }}\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: ${{ matrix.node-version }}\r\n\r\n - name: Install Dependencies\r\n run: |\r\n pnpm install --frozen-lockfile\r\n pnpm approve-builds --all\r\n\r\n - name: Build Packages\r\n run: pnpm run build\r\n\r\n - name: Run Vitest Unit & Integration Suites\r\n run: pnpm test\r\n\r\n - name: AI-SDLC Quality Gate & Full Verification\r\n run: npx @aisdlc/cli verify all\r\n";
|
|
14109
|
+
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML = 'name: Deploy AI-SDLC Dashboard to GitHub Pages\r\n\r\non:\r\n push:\r\n branches:\r\n - main\r\n workflow_dispatch:\r\n\r\npermissions:\r\n contents: read\r\n pages: write\r\n id-token: write\r\n\r\nconcurrency:\r\n group: pages\r\n cancel-in-progress: false\r\n\r\njobs:\r\n deploy-dashboard:\r\n name: Build & Publish Interactive Dashboard\r\n runs-on: ubuntu-latest\r\n environment:\r\n name: github-pages\r\n url: ${{ steps.deployment.outputs.page_url }}\r\n\r\n steps:\r\n - name: Checkout Code\r\n uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0 # Full git history required for historical KPIs and telemetry\r\n\r\n - name: Setup Node.js\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: 20\r\n\r\n - name: Generate AI-SDLC Interactive Dashboard\r\n run: |\r\n mkdir -p reports\r\n npx --yes @aisdlc/cli report dashboard --output reports/index.html\r\n cp reports/index.html reports/dashboard.html\r\n touch reports/.nojekyll\r\n\r\n - name: Setup GitHub Pages\r\n uses: actions/configure-pages@v5\r\n\r\n - name: Upload Pages Artifact\r\n uses: actions/upload-pages-artifact@v3\r\n with:\r\n path: reports\r\n\r\n - name: Deploy to GitHub Pages\r\n id: deployment\r\n uses: actions/deploy-pages@v4\r\n\r\n - name: Emit Summary to GitHub Actions\r\n if: always() && steps.deployment.outcome == \'success\'\r\n run: |\r\n echo "### \u{1F310} AI-SDLC Interactive Dashboard Published" >> $GITHUB_STEP_SUMMARY\r\n echo "" >> $GITHUB_STEP_SUMMARY\r\n echo "The interactive PDaC / RTM graph, Quality Gate telemetry, and release metrics are live at:" >> $GITHUB_STEP_SUMMARY\r\n echo "" >> $GITHUB_STEP_SUMMARY\r\n echo "\u{1F449} **[Open Live Dashboard](${{ steps.deployment.outputs.page_url }})**" >> $GITHUB_STEP_SUMMARY\r\n';
|
|
14110
|
+
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML = "name: AI-SDLC PR KPI Aggregator\r\n\r\non:\r\n pull_request:\r\n types: [opened, synchronize, reopened]\r\n\r\npermissions:\r\n contents: read\r\n pull-requests: write\r\n\r\njobs:\r\n aggregate-kpis:\r\n name: Aggregate PR KPIs & Telemetry\r\n runs-on: ubuntu-latest\r\n\r\n steps:\r\n - name: Checkout Repository\r\n uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0\r\n\r\n - name: Install pnpm\r\n uses: pnpm/action-setup@v4\r\n with:\r\n version: 10\r\n\r\n - name: Setup Node.js\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: 20\r\n\r\n - name: Install Dependencies\r\n run: |\r\n pnpm install --frozen-lockfile\r\n\r\n - name: Calculate and Emit PR KPIs\r\n id: kpi\r\n run: |\r\n npx @aisdlc/cli kpi pr --base origin/${{ github.base_ref }} --head HEAD >> $GITHUB_STEP_SUMMARY\r\n";
|
|
14111
|
+
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML = 'name: SDD Canonical Integration on Merge\n\non:\n pull_request:\n types: [closed]\n branches:\n - main\n - \'release/**\'\n workflow_dispatch:\n inputs:\n change_id:\n description: \'SDD change ID to integrate manually (e.g. chg-001-telemetry)\'\n required: false\n type: string\n\npermissions:\n contents: write\n pull-requests: read\n\nconcurrency:\n group: sdd-integrate-${{ github.event.pull_request.base.ref || github.ref_name }}\n cancel-in-progress: false\n\njobs:\n integrate-sdd:\n name: SDD Canonical Integration\n if: github.event.pull_request.merged == true || github.event_name == \'workflow_dispatch\'\n runs-on: ubuntu-latest\n\n steps:\n - name: Checkout Repository\n uses: actions/checkout@v4\n with:\n ref: ${{ github.event.pull_request.base.ref || github.ref_name }}\n fetch-depth: 0\n token: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Install pnpm\n uses: pnpm/action-setup@v4\n with:\n version: 10\n\n - name: Setup Node.js\n uses: actions/setup-node@v4\n with:\n node-version: 20\n\n - name: Install Dependencies\n run: |\n pnpm install --frozen-lockfile\n pnpm approve-builds --all\n\n - name: Build Packages\n run: pnpm run build\n\n - name: Detect and Integrate SDD Change\n id: integrate\n env:\n PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}\n PR_TITLE: ${{ github.event.pull_request.title }}\n PR_BODY: ${{ github.event.pull_request.body }}\n MANUAL_CHANGE_ID: ${{ github.event.inputs.change_id }}\n run: |\n npx @aisdlc/cli sdd integrate --auto || true\n\n - name: Commit and Push Canonical Baseline Changes\n run: |\n git config user.name "github-actions[bot]"\n git config user.email "github-actions[bot]@users.noreply.github.com"\n git add -A\n if ! git diff --cached --quiet; then\n git commit -m "chore(sdd): integrate changes into canonical baseline [skip ci]"\n TARGET_BRANCH="${{ github.event.pull_request.base.ref || github.ref_name }}"\n MAX_RETRIES=3\n RETRY_COUNT=0\n DELAY=2\n\n while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do\n echo "Synchronizing with remote branch $TARGET_BRANCH (pull --rebase)..."\n git pull --rebase origin "$TARGET_BRANCH"\n if git push origin "$TARGET_BRANCH"; then\n echo "\u2714 Canonical integration committed and synchronized to repository."\n exit 0\n fi\n RETRY_COUNT=$((RETRY_COUNT + 1))\n if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then\n echo "\u26A0 Push rejected (concurrency detected). Retrying in ${DELAY}s (attempt $RETRY_COUNT/$MAX_RETRIES)..."\n sleep $DELAY\n DELAY=$((DELAY * 2))\n fi\n done\n\n echo "\u274C Error: Failed to push canonical integration after $MAX_RETRIES attempts."\n exit 1\n else\n echo "\u2139 No pending changes generated in working tree."\n fi\n';
|
|
14082
14112
|
var STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD = '---\r\nid: REQ-LIC-ACQUISITION-001\r\ntype: license-acquisition-request\r\ntitle: Commercial License Acquisition Request for [Library]\r\nstatus: pending-approval # pending-approval, approved, rejected\r\nrequested-package: "@vendor/commercial-package"\r\nspdx-license: "BSL-1.1" # or Commercial, SSPL-1.0\r\nlicense-category: commercial_acquisition_required\r\nestimated-cost: "$1,200 / year"\r\nbusiness-justification: "Accelerates critical telemetry module development avoiding 4 months of in-house implementation."\r\n---\r\n\r\n# Commercial License Acquisition Request\r\n\r\n## 1. Package and Vendor\r\n- **Package**: `@vendor/commercial-package`\r\n- **Version**: `2.4.0`\r\n- **License Type**: BSL 1.1 / Commercial\r\n- **Official Website**: `https://vendor.example.com`\r\n\r\n## 2. Technical Justification and Evaluated Alternatives\r\n- **Why a permissive alternative (MIT/Apache 2.0) is not used**:\r\n - Open-source alternatives lack required hardware encryption protocol support.\r\n- **Impact of not acquiring the license**:\r\n - 4-month delay on product delivery milestone.\r\n\r\n## 3. Human Authorization Signatures\r\n- [ ] Tech Lead: Technical approval\r\n- [ ] Legal / IP Counsel: EULA clauses validation\r\n- [ ] Procurement / Budget Owner: Payment authorization\r\n';
|
|
14083
14113
|
var STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD = '---\r\nid: MAN-PROD-001\r\ntype: production-manual\r\ntitle: "Production & Operations Manual: Application Name"\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\napplies-to-version: "v1.0.0"\r\ntarget-audience:\r\n - devops-engineer\r\n - sre-engineer\r\n - release-manager\r\n - secops\r\ncomponents-covered:\r\n - CMP-NAME-001\r\nenclaves-involved:\r\n - SEC-ENC-DMZ-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# MAN-PROD-001: Production & Operations Manual - Application Name\r\n\r\n## 1. Deterministic Release Regeneration (Reproducible Builds)\r\n\r\nThis section contains the specifications and directives required to deterministically reproduce identical bit-by-bit application artifacts or releases from their Git tag.\r\n\r\n### 1.1 Source Code Baseline\r\n\r\n- **Canonical Repository**: `https://github.com/organization/repo-name.git`\r\n- **Immutable Git Release Tag**: `v1.0.0`\r\n- **Commit SHA-256 / SHA-1**: `[VERIFIED_HEXADECIMAL_COMMIT_SHA]`\r\n- **Clean Checkout Command**:\r\n ```bash\r\n git clone --recurse-submodules https://github.com/organization/repo-name.git\r\n cd repo-name\r\n git checkout tags/v1.0.0\r\n git submodule update --init --recursive\r\n ```\r\n\r\n### 1.2 Frozen Toolchains and Build Tool Matrix\r\n\r\nTo prevent discrepancies in binary or package generation, strict usage of pinned versions of the following utilities is enforced:\r\n\r\n| Tool / Runtime | Exact Version | Toolchain Checksum / Digest | Purpose |\r\n| :--- | :--- | :--- | :--- |\r\n| **Node.js LTS** | `v22.12.0` | `sha256:node-v22.12.0-linux-x64.tar.xz` | Execution and transpilation runtime |\r\n| **pnpm** | `9.15.0` | `sha256:pnpm-v9.15.0` | Deterministic monorepo package manager |\r\n| **TypeScript (tsc)** | `5.7.2` | Pinned in `devDependencies` | Strict ECMAScript compiler |\r\n| **Docker BuildKit** | `v0.18.0` | `moby/buildkit:v0.18.0` | Hermetic OCI packaging engine |\r\n\r\n### 1.3 Libraries, Dependencies, and Vertex Graph\r\n\r\n- **Immutable Lockfile**: `pnpm-lock.yaml` (or `Cargo.lock`, `go.sum`, `requirements.lock`). Installations with open resolution are forbidden (`pnpm install --frozen-lockfile` mandatory).\r\n- **SBOM (Software Bill of Materials) Inventory**:\r\n - Format: CycloneDX JSON v1.5 / SPDX v2.3.\r\n - Compiled SBOM path: `reports/sbom-cyclonedx.json`.\r\n- **OSS License Governance**:\r\n - Binding policy: `license-policy.yaml`.\r\n - Library vertex pre-verification:\r\n ```bash\r\n pnpm verify:licenses\r\n ```\r\n\r\n### 1.4 Step-by-Step Deterministic Build Procedure\r\n\r\n1. **Step 1: Hermetic Dependency Installation**\r\n ```bash\r\n pnpm install --frozen-lockfile --ignore-scripts\r\n ```\r\n\r\n2. **Step 2: Integrity and Strict Type Checking**\r\n ```bash\r\n pnpm typecheck\r\n ```\r\n\r\n3. **Step 3: Artifact Compilation**\r\n ```bash\r\n export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)\r\n pnpm build\r\n ```\r\n\r\n4. **Step 4: Cryptographic Verification of Generated Artifact**\r\n ```bash\r\n sha256sum dist/app.bundle.js\r\n # Compare against the canonical checksum registered in official release:\r\n # Expected: [CANONICAL_SHA256_CHECKSUM]\r\n ```\r\n\r\n---\r\n\r\n## 2. Version, Infrastructure, and Migration Compatibility Matrix\r\n\r\nThis section defines technical interoperability boundaries between the release version and the deployment ecosystem, ensuring safe Zero-Downtime transitions.\r\n\r\n### 2.1 Platform and Execution Runtime Compatibility\r\n\r\n| Infrastructure Component | Approved Version Range | Recommended Version | Support Status |\r\n| :--- | :--- | :--- | :---: |\r\n| **Kubernetes Cluster (K8s)** | `>= 1.28` and `<= 1.31` | `1.30.2` | \u2705 Certified |\r\n| **Container Runtime (CRI)** | containerd `>= 1.7` / CRI-O `>= 1.28` | containerd `1.7.15` | \u2705 Certified |\r\n| **Base Operating System (Host)** | Ubuntu 22.04 LTS / RHEL 9.2+ | Ubuntu 22.04 LTS (Kernel 6.x) | \u2705 Homologated |\r\n| **Language Runtime (Production)** | Node.js `>= 20.x` and `<= 22.x` | `v22.12.0 LTS` | \u2705 Hermetic |\r\n\r\n### 2.2 Data Schema and Migration Compatibility (N-1 Support)\r\n\r\nTo enable Canary or Blue-Green continuous deployments without transaction loss:\r\n\r\n| Release Version | DB Schema Version | Compatible with $N-1$ Code | Schema Migration Status |\r\n| :---: | :---: | :---: | :--- |\r\n| **`v1.0.0`** (Current) | `SCHEMA-v1.0` | \u2705 Yes (supports `v0.9.x` code) | Non-destructive additive migration (no column renaming). |\r\n| **`v0.9.x`** | `SCHEMA-v0.9` | \u2705 Previous baseline | Fully compatible during Canary drain period. |\r\n\r\n### 2.3 Interoperability Between Architecture Components (`CMP-*`)\r\n\r\n| Dependent Component | Consumed Component | Minimum Compatible Versions | Binding Protocol / Contract |\r\n| :--- | :--- | :---: | :--- |\r\n| `CMP-NAME-001` (Gateway) | `CMP-NAME-002` (Backend) | `>= v1.0.0` | gRPC / Protobuf v3 (`contract_spec.proto`) |\r\n| `CMP-NAME-001` (Gateway) | Messaging Bus / Kafka | `>= 3.5.0` | Kafka v2 Protocol with TLS mTLS |\r\n\r\n### 2.4 Homologated Upgrade & Rollback Paths\r\n\r\n| Source Version | Direct Jump to `v1.0.0` | Intermediate Migration Required | Direct Rollback Procedure |\r\n| :---: | :---: | :---: | :---: |\r\n| **`v0.9.1`** | \u2705 Allowed | \u274C Not required | `kubectl rollout undo` without data loss. |\r\n| **`v0.9.0`** | \u2705 Allowed | \u274C Not required | `kubectl rollout undo` without data loss. |\r\n| **`< v0.9.0`** | \u274C Blocked | \u2705 Must upgrade to `v0.9.1` first | Requires restore from backup snapshot. |\r\n\r\n---\r\n\r\n## 3. CI/CD Architecture and Pipelines\r\n\r\n### 3.1 Hierarchical Branching Model and Integration Triggers\r\n\r\nFollowing the AI-SDLC 4-tier standard:\r\n\r\n```text\r\nTIER 1: main (Production)\r\n \u25B2\r\n \u2514\u2500\u2500 PR Release Gate (Manual Tech Lead / Release Manager Approval)\r\n \u2502\r\nTIER 2: release/v1.0.0 (Open Version Branch)\r\n \u25B2\r\n \u2514\u2500\u2500 PR Feature Gate (Lint + Tests + Quality Gate + SAST + SBOM)\r\n \u2502\r\nTIER 3: feat/CHG-001-* (Feature / Bug)\r\n```\r\n\r\n- **Pull Request Trigger**: Executes linters, full test battery, and governance verifications without deployment.\r\n- **Release Tag Trigger (`v*.*.*`)**: Executes the full hermetic build pipeline, image signing, and continuous deployment.\r\n\r\n### 3.2 CI/CD Pipeline Flowchart\r\n\r\n```mermaid\r\nflowchart LR\r\n A["Git Push / Tag v1.0.0"] --> B["Hermetic Checkout"]\r\n B --> C["Linters & Typecheck"]\r\n C --> D["Vitest: Unit & BDD"]\r\n D --> E["Quality Gate: CC & MI"]\r\n E --> F["SAST & Secret Scan"]\r\n F --> G["SBOM & License Gate"]\r\n G --> H["Deterministic Build"]\r\n H --> I["Cosign / SLSA Signing"]\r\n I --> J["Push to OCI Registry"]\r\n J --> K["Deploy to DMZ Enclave"]\r\n```\r\n\r\n### 3.3 Release Gate Contracts and Thresholds\r\n\r\n| Quality Gate | Tool / Command | Required Threshold | Action on Non-Compliance |\r\n| :--- | :--- | :--- | :--- |\r\n| **Lint & Typecheck** | `pnpm typecheck` | Zero errors, zero `any` | **Immediate failure** |\r\n| **Automated Tests** | `pnpm test:all` | 100% passed, Coverage >= 85% | **Immediate failure** |\r\n| **Cyclomatic Complexity** | `aisdlc verify quality` | CC <= 10 per function | **Release blocked** |\r\n| **Maintainability Index** | `aisdlc verify quality` | MI >= 50.0 / 100 | **Release blocked** |\r\n| **360\xB0 Traceability** | `aisdlc verify traceability` | 100% of requirements linked | **Release blocked** |\r\n| **OSS Licenses** | `aisdlc verify licenses` | Zero forbidden/viral licenses | **Release blocked** |\r\n| **Cryptographic Signature** | `cosign verify` | Valid signature from Corporate CA | **Deployment rejected** |\r\n\r\n---\r\n\r\n## 4. Production Deployment Strategy and Procedure\r\n\r\n### 4.1 Infrastructure Prerequisites and Network Enclaves\r\n\r\n- **Target Enclave**: `SEC-ENC-DMZ-001` (Strict segmentation without direct uncontrolled outbound internet access).\r\n- **Enabled Network Ports**:\r\n - Port `8443/TCP`: Secure WebSocket ingestion with mutual TLS (mTLS) authentication.\r\n - Port `9090/TCP`: Prometheus metrics (internal management network only).\r\n- **Secrets and Certificate Management**:\r\n - Server TLS and client root CA certificates mounted via immutable secret at `/etc/pki/tls/`.\r\n - Embedding cryptographic keys in environment variables or images is strictly forbidden.\r\n\r\n### 4.2 Rollout Strategy\r\n\r\nA **Canary strategy with progressive telemetry metrics analysis** is utilized:\r\n1. 10% of traffic is routed to the new version for 15 minutes.\r\n2. If the 5xx error rate is `<= 0.01%` and p99 latency is `<= 50ms`, traffic is promoted to 100%.\r\n\r\n### 4.3 Step-by-Step Deployment Procedure\r\n\r\n1. **Step 1: Pre-deployment and State Snapshot**\r\n ```bash\r\n # Check cluster health and record baseline\r\n kubectl get pods -n production -l app=system\r\n kubectl exec -it system-db-0 -- /backup/create-snapshot.sh\r\n ```\r\n\r\n2. **Step 2: Deployment Manifest Application**\r\n ```bash\r\n kubectl apply -f deploy/production/canary-deployment.yaml\r\n kubectl rollout status deployment/system-service -n production --timeout=180s\r\n ```\r\n\r\n3. **Step 3: Health Verification and Smoke Tests**\r\n ```bash\r\n curl -f --cacert /etc/pki/tls/ca.crt https://127.0.0.1:8443/healthz\r\n curl -f --cacert /etc/pki/tls/ca.crt https://127.0.0.1:8443/readyz\r\n pnpm test:example\r\n ```\r\n\r\n### 4.4 Rollback Plan (Immediate Rollback)\r\n\r\n- **Objective Rollback Activation Criteria**:\r\n - mTLS handshake failure rate `> 1.0%`.\r\n - Ingestion p99 latency `> 100ms` for 2 continuous minutes.\r\n - Critical `CrashLoopBackOff` alert on more than 20% of instances.\r\n- **Rollback Execution Command**:\r\n ```bash\r\n kubectl rollout undo deployment/system-service -n production\r\n kubectl rollout status deployment/system-service -n production\r\n ```\r\n\r\n---\r\n\r\n## 5. Likely Errors Resolution and Troubleshooting (Runbooks)\r\n\r\nThis section documents the most frequent runtime and deployment failures along with diagnosis and immediate mitigation procedures.\r\n\r\n### 5.1 Frequent Incidents and Solutions Matrix\r\n\r\n#### Incident 1: Dependency Vertex Inconsistency or Drift (Build Failure)\r\n- **Symptom**: `pnpm install --frozen-lockfile` command fails in CI with error `ERR_PNPM_LOCKFILE_OUTDATED`.\r\n- **Root Cause**: `package.json` was modified without updating `pnpm-lock.yaml`.\r\n- **Diagnosis**:\r\n ```bash\r\n git diff HEAD^ package.json pnpm-lock.yaml\r\n ```\r\n- **Mitigation**:\r\n 1. On the feature branch, run `pnpm install` locally to regenerate the deterministic lockfile.\r\n 2. Verify no restricted-license dependencies were introduced via `pnpm verify:licenses`.\r\n 3. Commit both files together in an atomic commit.\r\n\r\n---\r\n\r\n#### Incident 2: mTLS Handshake Failure or Enclave Certificate Rejected\r\n- **Symptom**: Clients receive error `ERR_TLS_CERT_ALTNAME_INVALID` or connection closed with TLS alert `certificate_unknown (46)`.\r\n- **Root Cause**: Internal root CA mounted on server does not match the client certificate issuer CA, or certificate expired.\r\n- **Diagnosis**:\r\n ```bash\r\n openssl s_client -connect 127.0.0.1:8443 -CAfile /etc/pki/tls/ca.crt -cert /etc/pki/tls/client.crt -key /etc/pki/tls/client.key\r\n openssl x509 -in /etc/pki/tls/ca.crt -noout -dates -issuer -subject\r\n ```\r\n- **Mitigation**:\r\n 1. Verify expiration date of certificate mounted in cluster Secret.\r\n 2. If expired, rotate the certificate by injecting the new pair from HSM / Vault storage.\r\n 3. Orderly restart pods with `kubectl rollout restart deployment/system-service`.\r\n\r\n---\r\n\r\n#### Incident 3: Release Gate Rejection in CI/CD Due to Quality Metrics\r\n- **Symptom**: Pipeline aborts with verdict `Quality Gate REJECTED` (Cyclomatic Complexity > 10 or Maintainability < 50).\r\n- **Root Cause**: Introduction of complex nested logic (multiple `if/else`, extensive `switch`, or branching loops).\r\n- **Diagnosis**:\r\n ```bash\r\n pnpm verify:quality\r\n ```\r\n- **Mitigation**:\r\n 1. Inspect the violation report in `reports/QUALITY_GATE_REPORT.md` to identify the offending function.\r\n 2. Decompose function into cohesive private helper methods following the rule of maximum 40 lines per function.\r\n 3. Re-run `pnpm verify:quality` until green verdict is confirmed. Adding suppression comments (`// @ts-ignore`) is forbidden.\r\n\r\n---\r\n\r\n#### Incident 4: CrashLoopBackOff Due to Memory Leak or Connection Limit\r\n- **Symptom**: Pod is terminated with exit code `ExitCode: 137` (`OOMKilled`) after a load spike.\r\n- **Root Cause**: Undrained socket buffer accumulation during high-frequency bursts.\r\n- **Diagnosis**:\r\n ```bash\r\n kubectl describe pod system-service-xxx -n production | grep -i oom\r\n kubectl logs system-service-xxx -n production --previous\r\n ```\r\n- **Mitigation**:\r\n 1. Temporarily adjust memory limits in Kubernetes manifest (`resources.limits.memory`) if the load burst is legitimate.\r\n 2. Apply backpressure or discard expired packets in accordance with business rules (`BR-*`).\r\n 3. Run local benchmark with `pnpm test:all` to audit memory consumption.\r\n\r\n---\r\n\r\n### 5.2 Escalation Protocol and Critical Incident Management\r\n\r\n| Severity Level | Impact Criterion | Maximum Response Time | Roles Involved |\r\n| :--- | :--- | :---: | :--- |\r\n| **SEV-1 (Critical)** | Complete service outage or security breach in enclave. | 15 minutes | On-call SRE + Lead Architect + SecOps |\r\n| **SEV-2 (Major)** | Severe service degradation, massive retries without outage. | 1 hour | On-call SRE + Tech Lead |\r\n| **SEV-3 (Minor)** | Isolated node incident without global SLA impact. | 4 hours | Support Engineer / DevOps |\r\n\r\n---\r\n\r\n## 6. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-15 | Operations & DevOps Team | Initial Production Manual generation | CHG-009 |\r\n';
|
|
14084
14114
|
var STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD = '---\r\nid: MAN-USER-001\r\ntype: user-manual\r\ntitle: "User Manual: Application Name"\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\napplies-to-version: "v1.0.0"\r\ntarget-audience:\r\n - ACT-ROLE-USER-001\r\n - ACT-OPERATOR-002\r\nallowed-roles:\r\n - ACT-ROLE-USER-001\r\n - ACT-OPERATOR-002\r\njourneys-covered:\r\n - JRN-JOURNEY-001\r\nuse-cases-covered:\r\n - UC-ACTION-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# MAN-USER-001: User Manual - Application Name\r\n\r\n## 1. System Purpose and Audience\r\n\r\nConcisely describes the software\'s purpose, the operational value it delivers to end users, and the general context in which it operates.\r\n\r\n- **Application / System**: `[System Name or Bounded Context]`\r\n- **Software Version**: `v1.0.0`\r\n- **Target Audience**: `[Functional roles and user profiles addressed]`\r\n\r\n---\r\n\r\n## 2. User Role Catalog and Permissions Matrix (RBAC)\r\n\r\nThis section formally defines the roles authorized to access and operate the application, as well as the privileges assigned to each.\r\n\r\n### 2.1 Authorized Role Catalog\r\n\r\n| Role Identifier | Role Name | Associated Actor | Description & Responsibility | Enclave / Access Level |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **`ROLE_USER`** | Standard User | `ACT-ROLE-USER-001` | Data queries and nominal business flow execution. | Corporate Network / Web UI |\r\n| **`ROLE_OPERATOR`** | System Operator | `ACT-OPERATOR-002` | Streaming supervision, alert management, and command control. | DMZ Enclave / Operational Console |\r\n\r\n### 2.2 Access and Capabilities Matrix by Role\r\n\r\n| Application Capability / Module | `ROLE_USER` | `ROLE_OPERATOR` | Authentication Mode |\r\n| :--- | :---: | :---: | :--- |\r\n| Status Query and Dashboard Visualizations | \u2705 Allowed | \u2705 Allowed | Bearer Token (OIDC/JWT) |\r\n| Business Journey Execution (`JRN-JOURNEY-001`) | \u2705 Allowed | \u2705 Allowed | Bearer Token (OIDC/JWT) |\r\n| Real-Time Streaming and Operational Control | \u274C Denied | \u2705 Allowed | mTLS + Device X.509 Certificate |\r\n| Global Parameters Configuration & Connectivity | \u274C Denied | \u2705 Allowed | Administrator Credential |\r\n\r\n---\r\n\r\n## 3. Version and User Platform Compatibility Matrix\r\n\r\nThis section specifies cross-compatibility between the current application version and user environments, clients, and formats.\r\n\r\n### 3.1 Client-Server Compatibility (APIs and SDKs)\r\n\r\n| Application Version (Backend) | Compatible CLI Version | Compatible SDK Version | Compatibility Status | Migration Notes |\r\n| :---: | :---: | :---: | :---: | :--- |\r\n| **`v1.0.0`** (Current) | `>= v1.0.0` | `>= v1.0.0` | \u2705 Fully Supported | Active canonical version. |\r\n| **`v1.0.0`** (Current) | `v0.9.x` | `v0.9.x` | \u26A0\uFE0F Degraded Mode | Requires upgrade before next minor. |\r\n| **`v1.0.0`** (Current) | `< v0.9.0` | `< v0.9.0` | \u274C Incompatible / Deprecated | Legacy endpoints decommissioned. |\r\n\r\n### 3.2 Homologated Browsers and Client Platforms\r\n\r\n| Platform / Environment | Minimum Supported Versions | Support Level | Known Constraints |\r\n| :--- | :--- | :---: | :--- |\r\n| **Google Chrome / Chromium** | Version `>= 120` | Tier 1 (Official) | Optimal WebSockets and WebGL performance. |\r\n| **Mozilla Firefox** | Version `>= 115 ESR` | Tier 1 (Official) | Full client certificate support. |\r\n| **Safari / WebKit** | Version `>= 17.0` | Tier 2 (Functional) | Requires explicit mTLS enablement in macOS Keychain. |\r\n| **Terminal / CLI (Linux / macOS / Windows)** | Node.js `>= 18` or Bash `>= 5.0` | Tier 1 (Official) | Full support on PowerShell 7+ and bash. |\r\n\r\n### 3.3 Configuration Files and Data Formats Compatibility\r\n\r\n| Format / Artifact | Source Version Supported | Automatic Conversion | User Action Required |\r\n| :--- | :---: | :---: | :--- |\r\n| **`config.yaml`** | `v0.9.x` | \u2705 Yes | None. Application migrates deprecated keys on startup. |\r\n| **Export Profiles (`.json`)** | `v0.9.x` | \u2705 Yes | 100% backward compatible. |\r\n\r\n---\r\n\r\n## 4. Application Installation, Access, and Configuration\r\n\r\n### 4.1 Access Channels and Prerequisites\r\n\r\n- **Web Portal / UI**: Access URL (e.g., `https://app.system.internal`).\r\n- **Command Line (CLI)**: Executable binary or package (e.g., `npx system-cli` or `./system-client`).\r\n- **Supported Browsers or Platforms**: Chrome >= 120, Firefox >= 120, Linux/macOS/Windows terminal.\r\n\r\n### 4.2 Client Configuration and Environment Variables\r\n\r\nThe application allows parameterizing its behavior via environment variables or local configuration files:\r\n\r\n| Parameter / Variable | Type | Default Value | Required | Description |\r\n| :--- | :--- | :--- | :---: | :--- |\r\n| `API_ENDPOINT` | URL | `https://api.system.internal/v1` | Yes | Base backend API endpoint. |\r\n| `WS_STREAM_URL` | WSS URL | `wss://stream.system.internal/telemetry` | No | Real-time telemetry or notifications socket. |\r\n| `CLIENT_TIMEOUT_MS` | Integer | `5000` | No | Network response timeout in milliseconds. |\r\n| `AUTH_PROFILE` | String | `production` | No | Active authentication profile (`development`, `staging`, `production`). |\r\n\r\n### 4.3 Local Configuration File (`config.yaml` / `.env`)\r\n\r\nExample recommended configuration for operator workstations:\r\n\r\n```yaml\r\n# Client configuration file: config.yaml\r\nprofile: production\r\nnetwork:\r\n api_endpoint: "https://api.system.internal/v1"\r\n stream_url: "wss://stream.system.internal/telemetry"\r\n timeout_ms: 5000\r\n retry_attempts: 3\r\n\r\nsecurity:\r\n tls_verify: true\r\n client_cert_path: "/etc/pki/client/operator.crt"\r\n client_key_path: "/etc/pki/client/operator.key"\r\n\r\nui:\r\n theme: "dark"\r\n refresh_interval_sec: 1\r\n```\r\n\r\n---\r\n\r\n## 5. Step-by-Step Journey Execution Guide (`JRN-*`)\r\n\r\nEach subsection documents an end-to-end Journey, specifying authorized execution roles, starting conditions, and the step-by-step operating procedure.\r\n\r\n### 5.1 `JRN-JOURNEY-001`: User Journey Name\r\n\r\n- **Linked Use Case**: `UC-ACTION-001`\r\n- **Primary Actor**: `ACT-ROLE-USER-001`\r\n- **Authorized Roles**: `ROLE_USER`, `ROLE_OPERATOR`\r\n- **Required Execution Enclave**: Corporate Intranet or VPN access\r\n\r\n#### A. Preconditions\r\n1. User must have an active and authenticated session with their authorized role.\r\n2. The base entity or resource must be in `ACTIVE` state.\r\n\r\n#### B. Step-by-Step Procedure\r\n\r\n1. **Step 1: Operation Initiation**\r\n - **Action**: User navigates to the execution section or invokes the corresponding command:\r\n ```bash\r\n system-cli execute --journey JRN-JOURNEY-001 --input payload.json\r\n ```\r\n - **Required Input**: Resource identifier and validated parameters.\r\n - **Expected On-Screen Response**: System displays confirmation dialog with operation summary.\r\n\r\n2. **Step 2: Validation and Submission**\r\n - **Action**: User reviews parameters and confirms execution.\r\n - **System Behavior**: Client locally validates data schema and transmits signed request.\r\n\r\n3. **Step 3: Observable Outcome Verification**\r\n - **Success Outcome**: Console / interface displays success message `MSG-SUCCESS-001` with generated unique transaction ID.\r\n - **Final State**: Resource transitions to `PROCESSED` state.\r\n\r\n#### C. Alternative Flows and Exception Handling\r\n- **Unauthorized Access**: If an unauthorized role attempts to invoke the journey, the system blocks the action, outputs code `MSG-ERR-AUTH-403`, and records the access attempt in the audit trail.\r\n- **Connection Loss in Transit**: If connection is lost during step 2, client retries with exponential backoff up to 3 times before notifying user.\r\n\r\n---\r\n\r\n## 6. System Messages Catalog and Response Codes\r\n\r\nStructured matrix of key informational, warning, and error messages emitted by the application during its operational lifecycle:\r\n\r\n| Code | Severity | Literal Screen Message | Trigger / Context | Meaning for User | Recommended Corrective Action |\r\n| :--- | :--- | :--- | :--- | :--- | :--- |\r\n| **`MSG-SYS-100`** | `INFO` | `"Connection established successfully with server"` | Successful network handshake upon initializing session. | Application is online and ready to process commands. | None. Normal operation. |\r\n| **`MSG-SYS-200`** | `INFO` | `"Operation completed successfully. Transaction ID: [TX-ID]"` | Successful completion of a Journey or Use Case. | Transaction was persisted and acknowledged by backend. | Save `TX-ID` for tracking if required. |\r\n| **`MSG-WARN-301`** | `WARN` | `"High link latency (>500ms). Degraded mode active"` | Response metric exceeds real-time threshold. | Screen data may experience slight refresh delays. | Check network connection quality or bandwidth. |\r\n| **`MSG-WARN-302`** | `WARN` | `"Session expiring in 5 minutes"` | Authentication token approaching TTL expiry. | User will be logged out unless credential is refreshed. | Renew session by clicking alert or re-authenticating. |\r\n| **`MSG-ERR-401`** | `ERR-USER` | `"Invalid credentials or expired token. Access denied"` | Login authentication failure or expired token. | User identity could not be validated. | Re-enter credentials or request a new token. |\r\n| **`MSG-ERR-403`** | `ERR-USER` | `"Unauthorized action for assigned role [ROLE]"` | Attempted execution of Journey or command outside RBAC. | User role lacks permissions for this resource. | Contact administrator to request permission expansion. |\r\n| **`MSG-ERR-422`** | `ERR-USER` | `"Invalid payload: field [FIELD] does not match schema"` | Syntactic validation or business rule (`BR-*`) failure. | User-supplied data is invalid. | Correct indicated fields according to business rule. |\r\n| **`MSG-ERR-503`** | `ERR-SYS` | `"Service temporarily unavailable. Retrying..."` | Backend gateway unreachable or under scheduled maintenance. | Central server is not responding to requests. | Await automatic retries or check system status page. |\r\n\r\n---\r\n\r\n## 7. Frequently Asked Questions (FAQ) and Support\r\n\r\n- **What should I do if I lose connectivity while executing a Journey?** \r\n The application implements idempotency mechanisms. Once network connectivity is restored, verify resource status before retrying to prevent duplicate transactions.\r\n- **How do I request a user role change?** \r\n Contact the Security Administrator (`SecOps`) referencing your user ID and operational justification for the role change.\r\n\r\n---\r\n\r\n## 8. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-15 | Documentation & Product Team | Initial User Manual generation | CHG-009 |\r\n';
|
|
14085
|
-
var STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD = '---\nid: DATA-ASSET-USER-PROFILE-001\ntype: data-asset\ntitle: User Profile & Identity Personal Data Asset\nstatus: draft\nversion: "1.0.0"\nschema-version: "1.0"\nclassification: confidential-pii # public, internal, confidential-pii, special-category-sensitive\npii-categories:\n - identifiers\n - contact\ndata-subjects:\n - ACT-USER-001\nfields:\n - name: email\n sensitivity: pii\n masking-strategy: sha256-salt\n - name: phone_number\n sensitivity: pii\n masking-strategy: redact\n - name: operator_callsign\n sensitivity: internal\n masking-strategy: none\nretention-period: 365d\nerasure-method: crypto-shredding\nowner-bounded-context: CMP-IDENTITY-SERVICE-001\nsupersedes: null\nsuperseded-by: null\n---\n\n# DATA-ASSET-USER-PROFILE-001: User Profile & Identity Personal Data Asset\n\n## 1. Data Asset Inventory & Purpose\nDescribes the structure, storage medium, and operational boundary of the personal data asset governed under GDPR / ISO 27701.\n\n## 2. Field-Level Sensitivity & Masking Policy\n\n| Field Name | Sensitivity | Masking / Pseudonymization Strategy | Allowed in Logs | Allowed in AI Prompts |\n| :--- | :--- | :--- | :---: | :---: |\n| `email` | `pii` | `sha256-salt` | \u274C No | \u274C No |\n| `phone_number` | `pii` | `redact` | \u274C No | \u274C No |\n| `operator_callsign` | `internal` | `none` | \u2705 Yes | \u2705 Yes |\n\n## 3. Storage Limitation & Right to Erasure (GDPR Art. 17)\n- **Maximum Retention TTL**: `365d` after account deactivation.\n- **Erasure Mechanism**: `crypto-shredding` (destruction of per-subject encryption key and PII column purge).\n\n---\n\n## 4. Revision History and Version Control\n\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\n| :--- | :--- | :--- | :--- | :--- |\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial personal data asset inventory | CHG-PRIV-001 |\n';
|
|
14086
|
-
var STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD = '---\nid: DPIA-ASSESSMENT-001\ntype: dpia-request\ntitle: Data Protection Impact Assessment (DPIA / EIPD) Request\nstatus: pending-dpo-approval # pending-dpo-approval, approved, rejected\nversion: "1.0.0"\nschema-version: "1.0"\nropa-reference: PRIV-ROPA-USER-AUTH-001\ndata-assets:\n - DATA-ASSET-USER-PROFILE-001\nspecial-category-triggers:\n - "GDPR Art. 9 Special Category Data or Automated Profiling"\nresidual-risk-level: MEDIUM # LOW, MEDIUM, HIGH\n---\n\n# Data Protection Impact Assessment (DPIA / EIPD \u2014 GDPR Art. 35)\n\n## 1. Trigger & Necessity Assessment\n- **Associated ROPA**: `PRIV-ROPA-USER-AUTH-001`\n- **Data Assets Affected**: `DATA-ASSET-USER-PROFILE-001`\n- **Why a DPIA is Mandatory**: Processing involves `special_category_sensitive` data (biometrics, health, precise geolocation) or systematic automated profiling under GDPR Art. 35.\n\n## 2. Necessity, Proportionality & LINDDUN Risk Matrix\n\n| LINDDUN Threat Category | Identified Privacy Risk | Intrinsic Risk | Technical Mitigation (`PRIV-REQ-*`) | Residual Risk |\n| :--- | :--- | :---: | :--- | :---: |\n| **Identifiability** | Re-identification of operator from telemetry streams | HIGH | `PRIV-REQ-MASKING-001` (SHA-256 salted pseudonymization) | LOW |\n| **Disclosure of Information** | Plaintext PII leakage in error logs | HIGH | `PRIV-REQ-MASKING-001` (Redaction middleware) | LOW |\n\n## 3. Mandatory Human Sovereign Signatures (DPO & Legal)\n- [ ] **Data Protection Officer (DPO)**: Necessity, proportionality, and GDPR Art. 35 validation\n- [ ] **Legal / Privacy Counsel**: Lawful basis and cross-border transfer clauses verified\n- [ ] **Security Officer (CISO) / System Architect**: Cryptographic and enclave controls verified\n';
|
|
14087
|
-
var STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD = '---\nid: PRIV-REQ-MASKING-001\ntype: privacy-requirement\ntitle: Mandatory Pseudonymization and Log Redaction of Operator PII\nstatus: draft\nversion: "1.0.0"\nschema-version: "1.0"\nprivacy-principle: data-minimization # data-minimization, purpose-limitation, storage-limitation, accuracy, integrity-and-confidentiality, transparency-and-consent, data-subject-rights-arco, pseudonymization-anonymization\nlinddun-category: identifiability # linkability, identifiability, non-repudiation, detectability, disclosure-of-information, unawareness, non-compliance\ngoverns-ropa:\n - PRIV-ROPA-USER-AUTH-001\nprotects-data-assets:\n - DATA-ASSET-USER-PROFILE-001\nenforced-in-enclave: SEC-ENC-DMZ-001\ncompliance-references:\n - "GDPR-Art-25-Privacy-by-Design"\n - "GDPR-Art-32-Pseudonymization"\n - "ISO-27701-A.7.4"\nacceptance-format: gherkin\ncucumber-tags:\n - "@PRIV-REQ-MASKING-001"\n - "@privacy"\n - "@linddun"\nsupersedes: null\nsuperseded-by: null\n---\n\n# PRIV-REQ-MASKING-001: Mandatory Pseudonymization and Log Redaction of Operator PII\n\n## 1. Technical Privacy Control Statement\nThe system MUST pseudonymize or redact all `confidential-pii` fields (`email`, `phone_number`) prior to emitting structured application logs, telemetry traces, or external AI prompts, and MUST enforce automated TTL purge after `365d`.\n\n---\n\n## 2. Upstream Privacy Traceability (PDaC)\n\n| Dimension | Link / Artifact | Relationship Type | Status |\n| :--- | :--- | :--- | :--- |\n| **Record of Processing (ROPA)** | `PRIV-ROPA-USER-AUTH-001` | Governs Processing Activity | Validated |\n| **Protected Data Asset** | `DATA-ASSET-USER-PROFILE-001` | Enforces Field Masking & TTL | Validated |\n\n---\n\n## 3. Privacy Verification Criteria in Gherkin Format (Cucumber Privacy Tests)\n\n```gherkin\n@PRIV-REQ-MASKING-001 @privacy @linddun\nFeature: Personal Data Pseudonymization and Zero-PII Telemetry Logging\n As a Data Protection Officer (DPO)\n I want all personal identifiers to be redacted or salted-hashed before logging\n So that application logs and telemetry never expose raw personal data\n\n Scenario: Structured logger redacts PII fields automatically (Nominal Privacy Control)\n Given an authenticated operator session with email "operator@example.com" and phone "+34600112233"\n When the telemetry ingestion service emits an audit log entry\n Then the serialized log payload must not contain the literal string "operator@example.com"\n And the serialized log payload must not contain the literal string "+34600112233"\n And the email field must be replaced by a deterministic SHA-256 salted pseudonym\n\n Scenario: Right to erasure purges expired or revoked subject records\n Given a personal data record for subject "ACT-USER-001" exceeding the "365d" retention TTL\n When the automated retention enforcement job executes\n Then the personal data fields must be irreversibly erased via crypto-shredding\n```\n\n---\n\n## 4. Revision History and Version Control\n\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\n| :--- | :--- | :--- | :--- | :--- |\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial privacy control specification | CHG-PRIV-001 |\n';
|
|
14088
|
-
var STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD = '---\nid: PRIV-ROPA-USER-AUTH-001\ntype: privacy-ropa\ntitle: Record of Processing Activity for Operator Authentication and Session Audit\nstatus: draft\nversion: "1.0.0"\nschema-version: "1.0"\nlawful-basis: contract # consent, contract, legal-obligation, vital-interests, public-task, legitimate-interests\nspecial-category-condition: null\nprocessing-purpose: "Authenticate authorized operators and maintain tamper-evident operational session audit trails."\nuse-cases:\n - UC-ACTION-001\ndata-assets:\n - DATA-ASSET-USER-PROFILE-001\ndata-subjects:\n - ACT-USER-001\nretention-ttl: 365d\ncross-border-transfer: false\ntransfer-safeguards: null\nsubprocessors: []\ndpia-required: false\ndpia-reference: null\nmitigated-by:\n - PRIV-REQ-MASKING-001\nsupersedes: null\nsuperseded-by: null\n---\n\n# PRIV-ROPA-USER-AUTH-001: Record of Processing Activity (GDPR Art. 30)\n\n## 1. Processing Activity Summary & Lawful Basis\n- **Lawful Basis (GDPR Art. 6.1)**: `contract` \u2014 Necessary for the performance of the operator service agreement.\n- **Purpose of Processing**: Authenticate authorized operators and maintain tamper-evident operational session audit trails.\n\n## 2. Linked Product & Data Artifacts\n\n| Dimension | Artifact ID | Relationship |\n| :--- | :--- | :--- |\n| **Triggering Use Cases** | `UC-ACTION-001` | Initiates personal data collection/processing |\n| **Data Assets Processed** | `DATA-ASSET-USER-PROFILE-001` | Personal data fields subject to minimization |\n| **Data Subjects** | `ACT-USER-001` | Natural persons whose data is processed |\n| **Governing Privacy Controls** | `PRIV-REQ-MASKING-001` | Technical privacy-by-design controls |\n\n## 3. International Transfers & Subprocessors\n- **Cross-Border Transfer Outside EEA**: `false`\n- **Authorized Subprocessors**: None (In-house processing within `SEC-ENC-DMZ-001`).\n\n---\n\n## 4. Revision History and Version Control\n\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\n| :--- | :--- | :--- | :--- | :--- |\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial GDPR Art. 30 ROPA entry | CHG-PRIV-001 |\n';
|
|
14115
|
+
var STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD = '---\r\nid: DATA-ASSET-USER-PROFILE-001\r\ntype: data-asset\r\ntitle: User Profile & Identity Personal Data Asset\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nclassification: confidential-pii # public, internal, confidential-pii, special-category-sensitive\r\npii-categories:\r\n - identifiers\r\n - contact\r\ndata-subjects:\r\n - ACT-USER-001\r\nfields:\r\n - name: email\r\n sensitivity: pii\r\n masking-strategy: sha256-salt\r\n - name: phone_number\r\n sensitivity: pii\r\n masking-strategy: redact\r\n - name: operator_callsign\r\n sensitivity: internal\r\n masking-strategy: none\r\nretention-period: 365d\r\nerasure-method: crypto-shredding\r\nowner-bounded-context: CMP-IDENTITY-SERVICE-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# DATA-ASSET-USER-PROFILE-001: User Profile & Identity Personal Data Asset\r\n\r\n## 1. Data Asset Inventory & Purpose\r\nDescribes the structure, storage medium, and operational boundary of the personal data asset governed under GDPR / ISO 27701.\r\n\r\n## 2. Field-Level Sensitivity & Masking Policy\r\n\r\n| Field Name | Sensitivity | Masking / Pseudonymization Strategy | Allowed in Logs | Allowed in AI Prompts |\r\n| :--- | :--- | :--- | :---: | :---: |\r\n| `email` | `pii` | `sha256-salt` | \u274C No | \u274C No |\r\n| `phone_number` | `pii` | `redact` | \u274C No | \u274C No |\r\n| `operator_callsign` | `internal` | `none` | \u2705 Yes | \u2705 Yes |\r\n\r\n## 3. Storage Limitation & Right to Erasure (GDPR Art. 17)\r\n- **Maximum Retention TTL**: `365d` after account deactivation.\r\n- **Erasure Mechanism**: `crypto-shredding` (destruction of per-subject encryption key and PII column purge).\r\n\r\n---\r\n\r\n## 4. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial personal data asset inventory | CHG-PRIV-001 |\r\n';
|
|
14116
|
+
var STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD = '---\r\nid: DPIA-ASSESSMENT-001\r\ntype: dpia-request\r\ntitle: Data Protection Impact Assessment (DPIA / EIPD) Request\r\nstatus: pending-dpo-approval # pending-dpo-approval, approved, rejected\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nropa-reference: PRIV-ROPA-USER-AUTH-001\r\ndata-assets:\r\n - DATA-ASSET-USER-PROFILE-001\r\nspecial-category-triggers:\r\n - "GDPR Art. 9 Special Category Data or Automated Profiling"\r\nresidual-risk-level: MEDIUM # LOW, MEDIUM, HIGH\r\n---\r\n\r\n# Data Protection Impact Assessment (DPIA / EIPD \u2014 GDPR Art. 35)\r\n\r\n## 1. Trigger & Necessity Assessment\r\n- **Associated ROPA**: `PRIV-ROPA-USER-AUTH-001`\r\n- **Data Assets Affected**: `DATA-ASSET-USER-PROFILE-001`\r\n- **Why a DPIA is Mandatory**: Processing involves `special_category_sensitive` data (biometrics, health, precise geolocation) or systematic automated profiling under GDPR Art. 35.\r\n\r\n## 2. Necessity, Proportionality & LINDDUN Risk Matrix\r\n\r\n| LINDDUN Threat Category | Identified Privacy Risk | Intrinsic Risk | Technical Mitigation (`PRIV-REQ-*`) | Residual Risk |\r\n| :--- | :--- | :---: | :--- | :---: |\r\n| **Identifiability** | Re-identification of operator from telemetry streams | HIGH | `PRIV-REQ-MASKING-001` (SHA-256 salted pseudonymization) | LOW |\r\n| **Disclosure of Information** | Plaintext PII leakage in error logs | HIGH | `PRIV-REQ-MASKING-001` (Redaction middleware) | LOW |\r\n\r\n## 3. Mandatory Human Sovereign Signatures (DPO & Legal)\r\n- [ ] **Data Protection Officer (DPO)**: Necessity, proportionality, and GDPR Art. 35 validation\r\n- [ ] **Legal / Privacy Counsel**: Lawful basis and cross-border transfer clauses verified\r\n- [ ] **Security Officer (CISO) / System Architect**: Cryptographic and enclave controls verified\r\n';
|
|
14117
|
+
var STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD = '---\r\nid: PRIV-REQ-MASKING-001\r\ntype: privacy-requirement\r\ntitle: Mandatory Pseudonymization and Log Redaction of Operator PII\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nprivacy-principle: data-minimization # data-minimization, purpose-limitation, storage-limitation, accuracy, integrity-and-confidentiality, transparency-and-consent, data-subject-rights-arco, pseudonymization-anonymization\r\nlinddun-category: identifiability # linkability, identifiability, non-repudiation, detectability, disclosure-of-information, unawareness, non-compliance\r\ngoverns-ropa:\r\n - PRIV-ROPA-USER-AUTH-001\r\nprotects-data-assets:\r\n - DATA-ASSET-USER-PROFILE-001\r\nenforced-in-enclave: SEC-ENC-DMZ-001\r\ncompliance-references:\r\n - "GDPR-Art-25-Privacy-by-Design"\r\n - "GDPR-Art-32-Pseudonymization"\r\n - "ISO-27701-A.7.4"\r\nacceptance-format: gherkin\r\ncucumber-tags:\r\n - "@PRIV-REQ-MASKING-001"\r\n - "@privacy"\r\n - "@linddun"\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# PRIV-REQ-MASKING-001: Mandatory Pseudonymization and Log Redaction of Operator PII\r\n\r\n## 1. Technical Privacy Control Statement\r\nThe system MUST pseudonymize or redact all `confidential-pii` fields (`email`, `phone_number`) prior to emitting structured application logs, telemetry traces, or external AI prompts, and MUST enforce automated TTL purge after `365d`.\r\n\r\n---\r\n\r\n## 2. Upstream Privacy Traceability (PDaC)\r\n\r\n| Dimension | Link / Artifact | Relationship Type | Status |\r\n| :--- | :--- | :--- | :--- |\r\n| **Record of Processing (ROPA)** | `PRIV-ROPA-USER-AUTH-001` | Governs Processing Activity | Validated |\r\n| **Protected Data Asset** | `DATA-ASSET-USER-PROFILE-001` | Enforces Field Masking & TTL | Validated |\r\n\r\n---\r\n\r\n## 3. Privacy Verification Criteria in Gherkin Format (Cucumber Privacy Tests)\r\n\r\n```gherkin\r\n@PRIV-REQ-MASKING-001 @privacy @linddun\r\nFeature: Personal Data Pseudonymization and Zero-PII Telemetry Logging\r\n As a Data Protection Officer (DPO)\r\n I want all personal identifiers to be redacted or salted-hashed before logging\r\n So that application logs and telemetry never expose raw personal data\r\n\r\n Scenario: Structured logger redacts PII fields automatically (Nominal Privacy Control)\r\n Given an authenticated operator session with email "operator@example.com" and phone "+34600112233"\r\n When the telemetry ingestion service emits an audit log entry\r\n Then the serialized log payload must not contain the literal string "operator@example.com"\r\n And the serialized log payload must not contain the literal string "+34600112233"\r\n And the email field must be replaced by a deterministic SHA-256 salted pseudonym\r\n\r\n Scenario: Right to erasure purges expired or revoked subject records\r\n Given a personal data record for subject "ACT-USER-001" exceeding the "365d" retention TTL\r\n When the automated retention enforcement job executes\r\n Then the personal data fields must be irreversibly erased via crypto-shredding\r\n```\r\n\r\n---\r\n\r\n## 4. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial privacy control specification | CHG-PRIV-001 |\r\n';
|
|
14118
|
+
var STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD = '---\r\nid: PRIV-ROPA-USER-AUTH-001\r\ntype: privacy-ropa\r\ntitle: Record of Processing Activity for Operator Authentication and Session Audit\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nlawful-basis: contract # consent, contract, legal-obligation, vital-interests, public-task, legitimate-interests\r\nspecial-category-condition: null\r\nprocessing-purpose: "Authenticate authorized operators and maintain tamper-evident operational session audit trails."\r\nuse-cases:\r\n - UC-ACTION-001\r\ndata-assets:\r\n - DATA-ASSET-USER-PROFILE-001\r\ndata-subjects:\r\n - ACT-USER-001\r\nretention-ttl: 365d\r\ncross-border-transfer: false\r\ntransfer-safeguards: null\r\nsubprocessors: []\r\ndpia-required: false\r\ndpia-reference: null\r\nmitigated-by:\r\n - PRIV-REQ-MASKING-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# PRIV-ROPA-USER-AUTH-001: Record of Processing Activity (GDPR Art. 30)\r\n\r\n## 1. Processing Activity Summary & Lawful Basis\r\n- **Lawful Basis (GDPR Art. 6.1)**: `contract` \u2014 Necessary for the performance of the operator service agreement.\r\n- **Purpose of Processing**: Authenticate authorized operators and maintain tamper-evident operational session audit trails.\r\n\r\n## 2. Linked Product & Data Artifacts\r\n\r\n| Dimension | Artifact ID | Relationship |\r\n| :--- | :--- | :--- |\r\n| **Triggering Use Cases** | `UC-ACTION-001` | Initiates personal data collection/processing |\r\n| **Data Assets Processed** | `DATA-ASSET-USER-PROFILE-001` | Personal data fields subject to minimization |\r\n| **Data Subjects** | `ACT-USER-001` | Natural persons whose data is processed |\r\n| **Governing Privacy Controls** | `PRIV-REQ-MASKING-001` | Technical privacy-by-design controls |\r\n\r\n## 3. International Transfers & Subprocessors\r\n- **Cross-Border Transfer Outside EEA**: `false`\r\n- **Authorized Subprocessors**: None (In-house processing within `SEC-ENC-DMZ-001`).\r\n\r\n---\r\n\r\n## 4. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial GDPR Art. 30 ROPA entry | CHG-PRIV-001 |\r\n';
|
|
14089
14119
|
var STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD = '---\r\nid: ACT-NAME-001\r\ntype: actor\r\ntitle: Descriptive Actor Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nrole-type: human-user # human-user, ai-agent, external-system, sensor-iot\r\ndescription: One-sentence summary of the role this actor performs in the system.\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# ACT-NAME-001: Descriptive Actor Title\r\n\r\n## 1. Profile and Responsibility\r\nDescribes who this actor is, their operational context, and what goals they pursue when interacting with the product.\r\n\r\n## 2. System Touchpoints\r\n- Interaction channels (Web UI, REST API, WebSocket, Messaging).\r\n- Privilege level and latency/availability expectations.\r\n\r\n---\r\n\r\n## 3. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-03 | Product Owner / Analyst | Initial actor profile creation | CHG-INIT-001 |\r\n';
|
|
14090
14120
|
var STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD = '---\r\nid: BR-DOMAIN-001\r\ntype: business-rule\r\ntitle: Business Rule Name\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nenforcement-level: strict-invariant # strict-invariant, override-with-approval, guideline\r\ndefined-in: BC-CONTEXT-001\r\nuses-terms:\r\n - TERM-TERM-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# BR-DOMAIN-001: Business Rule Name\r\n\r\n## 1. Rule Definition\r\nFormally establishes the business invariant that must not be violated under any circumstance.\r\n\r\n## 2. Business Rationale and Consequences\r\n- **Why it exists**: Economic, regulatory, or technical justification for the constraint.\r\n- **Action upon violation**: Immediate transaction rejection with a formal error code.\r\n\r\n---\r\n\r\n## 3. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-03 | Product Owner / Analyst | Initial business rule definition | CHG-INIT-001 |\r\n';
|
|
14091
14121
|
var STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD = '---\r\nid: JRN-NAME-001\r\ntype: journey\r\ntitle: Descriptive User or Operator Journey Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\npersona: ACT-OPERATOR-001\r\nstages:\r\n - "Discovery and Planning"\r\n - "Configuration and Pre-flight"\r\n - "Mission Execution"\r\n - "Post-Analysis and Wrap-up"\r\ntouchpoints:\r\n - "Mission planning web portal"\r\n - "Ground control station (GCS)"\r\n - "Real-time telemetry dashboard"\r\n - "Flight report exporter"\r\nrelated-use-cases:\r\n - UC-PLAN-MISSION-001\r\n - UC-MONITOR-FLIGHT-001\r\npain-points:\r\n - "Latency when loading offline navigation maps"\r\n - "Complexity in manual flight plan reconciliation"\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# JRN-NAME-001: Descriptive User or Operator Journey Title\r\n\r\n## 1. Actor / Primary Persona Profile\r\n- **Protagonist Actor**: `ACT-OPERATOR-001`\r\n- **Main Goal**: Complete operational workflow with high efficiency, safety, and real-time visibility.\r\n\r\n---\r\n\r\n## 2. Journey Stages Map\r\n\r\n| Stage | User Goal | Touchpoints | Frictions / Pain Points |\r\n| :--- | :--- | :--- | :--- |\r\n| **1. Discovery and Planning** | Design route and validate operational constraints | Mission planning web portal | Complexity in manual flight plan reconciliation |\r\n| **2. Configuration and Pre-flight** | Verify subsystem health and link integrity | Ground control station (GCS) | Latency when loading offline navigation maps |\r\n| **3. Mission Execution** | Supervise telemetry and respond to alerts | Real-time telemetry dashboard | None detected in nominal flow |\r\n| **4. Post-Analysis and Wrap-up** | Export mission logs and performance metrics | Flight report exporter | Telemetry consolidation latency |\r\n\r\n---\r\n\r\n## 3. Traceability to Use Cases and Product\r\n\r\n- `UC-PLAN-MISSION-001`: Planning and validation of safe corridors.\r\n- `UC-MONITOR-FLIGHT-001`: Ingestion and visualization of real-time telemetry.\r\n\r\n---\r\n\r\n## 4. Revision History\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-23 | Product Manager / UX Lead | Initial operator journey definition | CHG-INIT-001 |\r\n';
|
|
@@ -14096,10 +14126,10 @@ var STARTER_TEMPLATES_PRODUCT_USER_DESIGN_FEEDBACK_TEMPLATE_MD = '---\r\nid: UFB
|
|
|
14096
14126
|
var STARTER_TEMPLATES_SAFETY_HAZARD_TEMPLATE_MD = '---\r\nid: HAZ-NAME-001\r\ntype: hazard\r\ntitle: Descriptive Operational Hazard Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nseverity: critical # catastrophic, critical, major, minor, negligible\r\nprobability: remote # frequent, probable, occasional, remote, improbable, extremely-improbable\r\nfault-tolerance-time-ms: 250 # FTTI: Fault tolerance time interval in milliseconds\r\n\r\n# Safety requirements mitigating this hazard (Downstream)\r\nmitigated-by:\r\n - SAF-REQ-NAME-001\r\n\r\nhazardous-condition: "Description of the anomalous operational condition or failure generating the hazard."\r\npotential-effect: "Loss of operational control, structural damage, or unintended collision."\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# HAZ-NAME-001: Descriptive Operational Hazard Title\r\n\r\n## 1. Operational Hazard Definition\r\nDetailed and concise description of the unintended operational condition representing a risk to the mission, the system, or the physical environment.\r\n\r\n## 2. Severity and Probability Classification\r\n\r\n| Parameter | Classification | Technical Justification |\r\n| :--- | :--- | :--- |\r\n| **Severity** | `critical` | Potential significant damage to aircraft or mission without direct human casualty. |\r\n| **Probability** | `remote` | Estimated failure rate $< 10^{-5}$ per nominal operating hour. |\r\n| **FTTI (Fault Tolerance)** | `250 ms` | Maximum time window to transition to safe state prior to adverse effects. |\r\n\r\n## 3. Triggering Conditions and Effects\r\n\r\n### Anomalous Condition\r\nDetail the initiating event (sensor failure, link loss, CAN bus freeze, or actuator degradation).\r\n\r\n### Potential Effect\r\nDirect consequence if the failure is not detected and mitigated within the FTTI interval.\r\n\r\n---\r\n\r\n## 4. Mitigation Traceability (Downstream Safety Requirements)\r\n\r\n| Safety Requirement | Fail-Safe Action | Mitigation Status |\r\n| :--- | :--- | :--- |\r\n| `SAF-REQ-NAME-001` | Contingency maneuver or transition to safe state | Designed |\r\n\r\n---\r\n\r\n## 5. Revision History\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-23 | Safety Engineer | Initial hazard definition creation | CHG-INIT-001 |\r\n';
|
|
14097
14127
|
var STARTER_TEMPLATES_SAFETY_SAFETY_REQ_TEMPLATE_MD = '---\r\n# Valid prefixes: SAF-REQ- (Safety Requirement / Operational Safety)\r\nid: SAF-REQ-NAME-001\r\ntype: safety-requirement\r\ntitle: Concise Safety Requirement Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nsafety-domain: flight-control # flight-control, collision-avoidance, energy-management, emergency-recovery, sensor-integrity\r\nsafety-integrity-level: "DAL-B" # DO-178C (DAL-A/B/C/D), ISO 26262 (ASIL-A/B/C/D), IEC 61508 (SIL-1/2/3/4)\r\n\r\n# 1. HAZARD AND RISK ANALYSIS TRACEABILITY (Upstream)\r\nmitigates-hazard:\r\n - HAZ-DESCRIPTION-001\r\n\r\nfail-safe-action: "SAFE_STATE_ACTION" # e.g. RETURN_TO_HOME, CONTROLLED_LANDING, MOTOR_CUTOFF\r\nfault-tolerance-time-ms: 100 # Maximum fault tolerance time interval (FTTI) before entering safe state\r\n\r\n# 2. VERIFICATION METHOD AND CRITERIA\r\nacceptance-format: gherkin\r\ncucumber-tags:\r\n - "@SAF-REQ-NAME-001"\r\n - "@safety"\r\n - "@failsafe"\r\n\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# SAF-REQ-NAME-001: Concise Safety Requirement Title\r\n\r\n## 1. Normative Operational Safety Statement\r\nThe system MUST [unambiguous description of defensive behavior preventing a hazard or mitigating unintended loss of control]. If [anomalous condition or hardware/sensor failure], the system MUST transition to safe state `SAFE_STATE_ACTION` within [X] milliseconds.\r\n\r\n---\r\n\r\n## 2. Hazard Mitigation and Fault Tolerance Matrix\r\n\r\n| Dimension | Link / Artifact | Relationship Type | Status |\r\n| :--- | :--- | :--- | :--- |\r\n| **Hazard Analysis (Upstream)** | `HAZ-DESCRIPTION-001` | Loss / Accident Mitigation | Validated |\r\n| **Integrity Level (SIL/DAL)** | `DAL-B` | Critical Software Level | Compliant |\r\n| **Fail-Safe Action** | `SAFE_STATE_ACTION` | Emergency Transition | Verified |\r\n\r\n---\r\n\r\n## 3. Mitigation Criteria in Gherkin Format (Safety & Fail-Safe Tests)\r\n\r\n```gherkin\r\n@SAF-REQ-NAME-001 @safety @failsafe\r\nFeature: Operational Failure Mitigation and Safe State Transition\r\n As an Autonomous Flight Control System\r\n I want to detect critical anomalies and execute contingency maneuvers\r\n So that I prevent accidents, collisions, and safeguard physical safety\r\n\r\n Scenario: Anomalous condition detection and safe state activation\r\n Given the system is in nominal operation\r\n When an unrecoverable failure condition occurs\r\n Then the system must detect the anomaly in less than 100 milliseconds\r\n And abort the current trajectory\r\n And execute contingency maneuver "SAFE_STATE_ACTION"\r\n And emit a critical alert to the ground control station\r\n```\r\n\r\n---\r\n\r\n## 4. Revision History\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-15 | Safety Engineer | Initial safety requirement creation | CHG-INIT-001 |\r\n';
|
|
14098
14128
|
var STARTER_TEMPLATES_SDD_DESIGN_TEMPLATE_MD = '---\r\nid: DSG-CHG-NAME-001\r\ntype: spec-design\r\nchange-id: CHG-NAME-001\r\ntitle: "Technical Design: Concise Delivery Increment Title"\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nhandoff: "HOF-CHG-NAME-001"\r\narchitecture-component: "CMP-NAME-001"\r\nenclave: "SEC-ENC-DMZ"\r\nstatus: draft\r\ncontracts:\r\n - component: "CMP-NAME-001"\r\n interface: "FeatureService"\r\n methods:\r\n - "executeAction"\r\n - "validateInput"\r\ncitations:\r\n - id: "UC-ACTION-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Use case driving this increment."\r\n - id: "FR-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Associated functional requirement."\r\n---\r\n\r\n# Technical Design: CHG-NAME-001\r\n\r\n## 1. Architectural Mapping and Zero Trust Enclave\r\nDefines the associated architectural component and corresponding security enclave.\r\n\r\n## 2. Data Contracts and Interfaces\r\nDetails interfaces, DTOs, TypeScript types, or data schemas.\r\n\r\n## 3. Error Handling and Mitigation Protocols\r\nSpecifies exception handling, error codes, and failure responses.\r\n\r\n## 4. License Policy Compliance (`license-policy.yaml`)\r\nLists external libraries or dependencies and confirms compatibility with the license policy.\r\n\r\n## 5. Revision History\r\n\r\n| Version | Date | Author | Change Description | Reference |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | YYYY-MM-DD | Author Name | Initial formal technical design | CHG-NAME-001 |\r\n';
|
|
14099
|
-
var STARTER_TEMPLATES_SDD_HANDOFF_TEMPLATE_YAML = '# ==============================================================================\r\n# AI-SDLC: PDaC Handoff Sidecar Template\r\n# Identifier emitted by PDaC for SDD workspace (OpenSpec / Spec Kit)\r\n# ==============================================================================\r\n\r\nid: HOF-CHG-001-FEATURE-NAME\r\ntype: handoff\r\ntitle: "Canonical Product Handoff for Delivery Increment"\r\nchangeId: CHG-001-FEATURE-NAME\r\nversion: "1.0.0"\r\ncreatedAt: "2026-09-14T00:00:00.000Z"\r\n\r\n# Product subgraph formally delivered to the SDD increment\r\nsubgraph:\r\n useCases:\r\n - UC-STREAM-TELEMETRY\r\n requirements:\r\n - FR-TELEMETRY-STREAM-001\r\n - QR-LATENCY-REALTIME\r\n securityRequirements:\r\n - SEC-REQ-MTLS-STREAM\r\n businessRules:\r\n - BR-TELEMETRY-VALIDITY\r\n abuseCases:\r\n - ABUSE-TELEMETRY-SPOOFING\r\n actors:\r\n - ACT-AUTONOMOUS-UAV\r\n - ACT-DRONE-OPERATOR\r\n - ACT-THREAT-SPOOFER\r\n\r\n# Cryptographic citations with immutable digests for drift detection\r\ncitations:\r\n - id: UC-STREAM-TELEMETRY\r\n digest: "sha256:5e5818cf2cc6d489f5d1b23cd4b61afac715cfc57a68fd44915b4adccd569cb8"\r\n comment: "Use case defining the continuous streaming flow"\r\n - id: FR-TELEMETRY-STREAM-001\r\n digest: "sha256:ad9e72840757ec009a610093476ea485c57dbb7cacb515ea27e8c8c153352e27"\r\n comment: "Functional requirement for telemetry ingestion"\r\n - id: SEC-REQ-MTLS-STREAM\r\n digest: "sha256:57f0c2ad1059aafdb6b3c140c074abbe8ee6f6c61e9733c69454f1551ed3397d"\r\n comment: "Mandatory mutual authentication via client certificates"\r\n';
|
|
14129
|
+
var STARTER_TEMPLATES_SDD_HANDOFF_TEMPLATE_YAML = '# ==============================================================================\r\n# AI-SDLC: PDaC Handoff Sidecar Template\r\n# Identifier emitted by PDaC for SDD workspace (OpenSpec / Spec Kit)\r\n# ==============================================================================\r\n\r\nid: HOF-CHG-001-FEATURE-NAME\r\ntype: handoff\r\ntitle: "Canonical Product Handoff for Delivery Increment"\r\nchangeId: CHG-001-FEATURE-NAME\r\nversion: "1.0.0"\r\ncreatedAt: "2026-09-14T00:00:00.000Z"\r\n\r\n# Product subgraph formally delivered to the SDD increment\r\nsubgraph:\r\n useCases:\r\n - UC-STREAM-TELEMETRY\r\n requirements:\r\n - FR-TELEMETRY-STREAM-001\r\n - QR-LATENCY-REALTIME\r\n securityRequirements:\r\n - SEC-REQ-MTLS-STREAM\r\n privacyRequirements:\r\n - PRIV-REQ-MASKING-001\r\n dataAssets:\r\n - DATA-ASSET-PILOT-IDENTITY\r\n privacyRopa:\r\n - PRIV-ROPA-FLIGHT-LOGS\r\n businessRules:\r\n - BR-TELEMETRY-VALIDITY\r\n abuseCases:\r\n - ABUSE-TELEMETRY-SPOOFING\r\n actors:\r\n - ACT-AUTONOMOUS-UAV\r\n - ACT-DRONE-OPERATOR\r\n - ACT-THREAT-SPOOFER\r\n\r\n# Cryptographic citations with immutable digests for drift detection\r\ncitations:\r\n - id: UC-STREAM-TELEMETRY\r\n digest: "sha256:5e5818cf2cc6d489f5d1b23cd4b61afac715cfc57a68fd44915b4adccd569cb8"\r\n comment: "Use case defining the continuous streaming flow"\r\n - id: FR-TELEMETRY-STREAM-001\r\n digest: "sha256:ad9e72840757ec009a610093476ea485c57dbb7cacb515ea27e8c8c153352e27"\r\n comment: "Functional requirement for telemetry ingestion"\r\n - id: SEC-REQ-MTLS-STREAM\r\n digest: "sha256:57f0c2ad1059aafdb6b3c140c074abbe8ee6f6c61e9733c69454f1551ed3397d"\r\n comment: "Mandatory mutual authentication via client certificates"\r\n - id: PRIV-REQ-MASKING-001\r\n digest: "sha256:606e9ec19d675681ce265aa667367de76629ae7067d710e20f121d5c2e276f82"\r\n comment: "Personal data pseudonymization and telemetry redaction"\r\n';
|
|
14100
14130
|
var STARTER_TEMPLATES_SDD_PROPOSAL_TEMPLATE_MD = '---\r\nid: CHG-NAME-001\r\ntype: spec-change-proposal\r\ntitle: Concise Delivery Increment Title\r\nstatus: draft # draft, review, approved, applied\r\nauthor: "agent-developer / human-dev"\r\ncitations:\r\n - id: "UC-ACTION-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Use case driving this increment."\r\n - id: "SEC-REQ-CONTROL-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Mandatory security requirement to implement."\r\n - id: "CMP-NAME-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Architectural component housing the change."\r\n---\r\n\r\n# Change Proposal: CHG-NAME-001\r\n\r\n## 1. Motivation and Scope\r\nExplains the problem solved by this increment and what parts of the codebase will be modified.\r\n\r\n## 2. Evaluated External Dependencies\r\n- List of new dependencies to be added and license verification per `license-policy.yaml`.\r\n';
|
|
14101
14131
|
var STARTER_TEMPLATES_SDD_PULL_REQUEST_TEMPLATE_MD = '---\r\nid: PR-TEMPLATE-SDD-001\r\ntype: pull-request-template\r\ntitle: "Modular AI-SDLC Pull Request Template"\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nstatus: active\r\ndescription: "Institutional template for monitoring weak points and plan balance (X/O) in SDD deliveries"\r\n---\r\n\r\n# Pull Request: [TIER] - [CHANGE-ID] - Brief Title\r\n\r\n## 1. SDD Identification and Traceability\r\n\r\n- **SDD Change Specification**: `specs/changes/active/<change-id>/`\r\n- **PDaC Handoff Sidecar**: `specs/changes/active/<change-id>/handoff.yaml` (ID: `HOF-*`)\r\n- **Git Hierarchy Tier (4 Tiers)**:\r\n - [ ] Tier 4: `task/<PARENT-ID>/<TSK-ID>-<slug>` \u2794 `feat/<PARENT-ID>-<slug>`\r\n - [ ] Tier 3: `feat/<FEAT-ID>-<slug>` \u2794 `release/vX.Y.Z`\r\n - [ ] Tier 2: `release/vX.Y.Z` \u2794 `main`\r\n- **Linked Issues**: Closes #... / Refs #...\r\n\r\n---\r\n\r\n## 2. \u{1F4CB} Plan Execution Matrix and Testing Status (`X` vs `O`)\r\n\r\n> [!IMPORTANT]\r\n> **Non-Negotiable Total Exhaustiveness Rule**:\r\n> This table must include **each and every item identified for implementation** in the delivery plan (originating from `tasks.md`, the SDD specification, or issue criteria), without omitting any or creating abstract groupings.\r\n>\r\n> **Mandatory Marking Convention**:\r\n> - **`[X]` (Completed and Tested)**: Item is 100% implemented and has verifiable automated tests on disk (`tests/` or `.feature`) passing green.\r\n> - **`[O]` (Problem / Blocked)**: If there was any issue, technical limitation, failing test, or deferred scope, it must be marked with `[O]` and **full mandatory justification is required**:\r\n> 1. **Technical root cause** or encountered limitation.\r\n> 2. **Impact** on increment or system.\r\n> 3. **Mitigation** or rationale for deferral.\r\n> 4. **Formal reference** to tracking issue (GitHub Issue or `ADR-TECH-DEBT-*`).\r\n>\r\n> *Any PR with omitted planned items or unjustified `[O]` will be immediately blocked and rejected by the Tech Lead.*\r\n\r\n| Task / Item ID | Planned Description | Status (`[X]` / `[O]`) | Test Evidence on Disk or Mandatory Justification of `[O]` |\r\n| :--- | :--- | :---: | :--- |\r\n| `TSK-001` | <!-- e.g. Contract DTOs and Interfaces Definition --> | **[X]** | Covered in `tests/unit/dto.spec.ts` (100% pass) |\r\n| `TSK-002` | <!-- e.g. Network disconnection resilience --> | **[O]** | **Root cause:** TCP socket mock exhibits race conditions in CI.<br>**Impact:** Low in prod, flaky test.<br>**Mitigation:** Temporary extended timeout; tracked in issue #... |\r\n\r\n---\r\n\r\n## 3. \u{1F5FA}\uFE0F Weak Points Map and Risk Hotspots (Weak Points Hotspots)\r\n\r\n### A. Complexity Hotspots\r\n<!-- Record functions nearing quality-policy.yaml thresholds: CC > 7 (max 10), Cognitive > 10 (max 15), LOC > 30 (max 40), MI < 70 (min 50/65) -->\r\n| File | Function / Module | Metrics (CC / Cognitive / LOC / MI) | Technical Maintainability Justification |\r\n| :--- | :--- | :---: | :--- |\r\n| <!-- e.g. src/engine.ts --> | <!-- parsePayload() --> | CC: 8, Cog: 11, LOC: 32, MI: 72 | Deterministic parser without recursion; exhaustively tested. |\r\n\r\n### B. Edge Cases and Blind Spots\r\n<!-- Scenarios not covered by automated unit tests (concurrency, network timeouts, memory, jitter) -->\r\n- [ ] **Edge Case 1**: <!-- Scenario description, estimated risk, and operational mitigation -->\r\n- [ ] **Edge Case 2**: <!-- Scenario description, estimated risk, and operational mitigation -->\r\n\r\n### C. AI Assumptions\r\n<!-- Behaviors or heuristics assumed by the agent during implementation that require critical human review -->\r\n- [ ] **Assumption 1**: <!-- e.g. Assumed payload always arrives pre-parsed in UTF-8 -->\r\n- [ ] **Assumption 2**: <!-- e.g. Default timeout set to 5000ms as not stipulated in spec -->\r\n\r\n---\r\n\r\n## 4. \u{1F6E1}\uFE0F Attack Surface and Cybersecurity (STRIDE / Zero Trust)\r\n\r\n- [ ] **New External Channels**: Does it introduce HTTP endpoints, sockets, IPC channels, or brokers?\r\n- [ ] **Sanitization and Inputs**: Are all external inputs validated with strict typing schemas (Zod/JSON Schema)?\r\n- [ ] **Insecure Serialization**: Is polymorphic deserialization or dynamic code evaluation avoided?\r\n- [ ] **Secrets and Enclaves**: Are cryptographic keys, credentials, sensitive env vars, or enclaves (`SEC-ENC-*`) handled?\r\n- [ ] **Mitigated Security Requirements**: Implemented IDs (e.g. `SEC-REQ-*`) and associated tests (`SEC-TEST-*` or `.feature`).\r\n\r\n---\r\n\r\n## 5. \u{1F4E6} Dependencies and Licenses Inspection\r\n\r\n- **New Dependencies Added**:\r\n | Package | Version | License Type | `license-policy.yaml` Verification |\r\n | :--- | :---: | :---: | :---: |\r\n | <!-- e.g. zod --> | <!-- ^3.22.4 --> | <!-- MIT --> | <!-- \u2714 Compliant (Permissive) --> |\r\n- [ ] Zero dependencies with prohibited licenses (GPLv3/AGPL/unapproved commercial).\r\n- [ ] Verification executed successfully (`pnpm run verify:licenses`).\r\n\r\n---\r\n\r\n## 6. \u2705 Deterministic Pre-Flight Checklist (Release Gates)\r\n\r\n- [ ] **Strict Typing and Linter**: `pnpm run typecheck` (zero errors, zero unjustified suppressions).\r\n- [ ] **Quality Gate**: `pnpm run verify:quality` (CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$).\r\n- [ ] **BDD / Unit Tests**: `pnpm run verify:testing` (Gherkin scenarios synchronized and 100% passing).\r\n- [ ] **360\xB0 Traceability**: `pnpm run verify:traceability` (no orphan requirements).\r\n- [ ] **Open Source Licenses**: `pnpm run verify:licenses` (strict policy compliance).\r\n- [ ] **Schema Compliance**: `pnpm run verify:schemas` (100% of artifacts conform to JSON Schema).\r\n- [ ] **Full Test Suite**: `pnpm run test:all` / `pnpm run verify:all` (general green CI approval).\r\n\r\n---\r\n\r\n## 7. \u{1F6A8} Contingency Plan, Observability, and Rollback\r\n\r\n- **Observability Metrics and Alarms**: <!-- What metrics (p99 latency, 5xx error rate, memory) or logs should be monitored post-deployment? -->\r\n- **Rollback Procedure**: <!-- Exact command or procedure to revert change without collateral impact (e.g. git revert -m 1 <sha>) -->\r\n\r\n---\r\n\r\n## 8. \u{1F4CA} AI-SDLC: Aggregated KPIs Summary\r\n\r\n<!-- AI-SDLC-KPI-SUMMARY-START -->\r\n| Metric | Human | Total PR |\r\n| :--- | :---: | :---: |\r\n| **Commits Made** | - | **-** |\r\n| **Lines Added / Modif.** | - | **-** |\r\n| **Active Development Time** | - | **-** |\r\n| **Consumed Tokens (In+Out)** | - | **-** |\r\n| **Estimated Cost (\u20AC/$)** | \u2014 (Labor) | **-** |\r\n\r\n> *This block is updated automatically via `aisdlc kpi pr` or the CI workflow.*\r\n<!-- AI-SDLC-KPI-SUMMARY-END -->\r\n';
|
|
14102
|
-
var STARTER_TEMPLATES_SDD_SPEC_TEMPLATE_MD = '---\r\nid: SPEC-CHG-NAME-001\r\ntype: delivery-spec\r\nchange-id: CHG-NAME-001\r\nprofile: standard # standard, patch, critical\r\nhandoff: HOF-CHG-NAME-001\r\nacceptance-format: gherkin\r\ncucumber-tags:\r\n - "@CHG-NAME-001"\r\n - "@automated"\r\ncitations:\r\n - id: "UC-ACTION-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Canonical use case driving or impacted by this increment."\r\n - id: "FR-NAME-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Formal functional requirement in canonical catalog."\r\n - id: "ACT-ACTOR-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Primary actor participating in the capability."\r\n - id: "CMP-NAME-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Architectural component implementing the specification."\r\n - id: "SEC-REQ-CONTROL-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Mandatory security requirement to implement."\r\n---\r\n\r\n# Delivery Specification: CHG-NAME-001\r\n\r\n## 1. Catalog Scope and Traceability (Canonical Alignment)\r\n\r\n> **MANDATORY SPECIFICATION RULE (ZERO AMBIGUITY / 360\xB0 TRACEABILITY):** \r\n> Every delivery increment (`spec.md`) MUST explicitly declare the exact boundaries of its impact across the canonical catalog (`product/`, `security/`, and `architecture/`). \r\n> An increment cannot author code or tests for unmapped behaviors. It must explicitly declare:\r\n> - **Affected Existing Catalog Items:** Existing functional requirements (`FR-*`), use cases (`UC-*`), actors (`ACT-*`), business rules (`BR-*`), security requirements (`SEC-REQ-*`), or architecture components/ADRs (`CMP-*`, `ADR-*`, `SRV-*`) whose behavior, contracts, or constraints are modified or deprecated.\r\n> - **New Catalog Items Introduced:** Any new functional requirements, use cases, actors, architecture decisions,
|
|
14132
|
+
var STARTER_TEMPLATES_SDD_SPEC_TEMPLATE_MD = '---\r\nid: SPEC-CHG-NAME-001\r\ntype: delivery-spec\r\nchange-id: CHG-NAME-001\r\nprofile: standard # standard, patch, critical\r\nhandoff: HOF-CHG-NAME-001\r\nacceptance-format: gherkin\r\ncucumber-tags:\r\n - "@CHG-NAME-001"\r\n - "@automated"\r\ncitations:\r\n - id: "UC-ACTION-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Canonical use case driving or impacted by this increment."\r\n - id: "FR-NAME-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Formal functional requirement in canonical catalog."\r\n - id: "ACT-ACTOR-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Primary actor participating in the capability."\r\n - id: "CMP-NAME-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Architectural component implementing the specification."\r\n - id: "SEC-REQ-CONTROL-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Mandatory security requirement to implement."\r\n - id: "PRIV-REQ-MASKING-001"\r\n digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"\r\n comment: "Mandatory privacy control for PII pseudonymization and data minimization."\r\n---\r\n\r\n# Delivery Specification: CHG-NAME-001\r\n\r\n## 1. Catalog Scope and Traceability (Canonical Alignment)\r\n\r\n> **MANDATORY SPECIFICATION RULE (ZERO AMBIGUITY / 360\xB0 TRACEABILITY):** \r\n> Every delivery increment (`spec.md`) MUST explicitly declare the exact boundaries of its impact across the canonical catalog (`product/`, `security/`, `privacy/`, and `architecture/`). \r\n> An increment cannot author code or tests for unmapped behaviors. It must explicitly declare:\r\n> - **Affected Existing Catalog Items:** Existing functional requirements (`FR-*`), use cases (`UC-*`), actors (`ACT-*`), business rules (`BR-*`), security requirements (`SEC-REQ-*`), privacy requirements (`PRIV-REQ-*`), data assets (`DATA-ASSET-*`), ROPA entries (`PRIV-ROPA-*`), or architecture components/ADRs (`CMP-*`, `ADR-*`, `SRV-*`) whose behavior, contracts, or constraints are modified or deprecated.\r\n> - **New Catalog Items Introduced:** Any new functional requirements, use cases, actors, architecture decisions, security rules, or privacy controls created by this increment, identifying their proposed IDs and target catalog destination.\r\n\r\n### 1.1 Affected Existing Catalog Items (Modifications / Deprecations)\r\n\r\n| Catalog Category | Catalog ID | Action (`MODIFIED` / `DEPRECATED`) | Description of Delta & Behavioral Impact |\r\n| :--- | :--- | :--- | :--- |\r\n| Functional Requirement | `FR-EXISTING-001` | `MODIFIED` | Extends validation rules to support batch payload ingestion |\r\n| Use Case | `UC-EXISTING-001` | `MODIFIED` | Adds alternative execution path for handling throttling limits |\r\n| Actor / Persona | `ACT-EXISTING-001` | `MODIFIED` | Expands authorization scope to access batch processing endpoints |\r\n| Architecture / Component | `CMP-CORE-001` | `MODIFIED` | Ingestion pipeline updated to support non-blocking asynchronous dispatch |\r\n| Privacy Requirement | `PRIV-REQ-EXISTING-001` | `MODIFIED` | Restricts telemetry retention period from 730d to 365d |\r\n\r\n### 1.2 New Catalog Items Introduced (Additions)\r\n\r\n| Catalog Category | Proposed ID | Target Catalog Location | Formal Scope & Functional Contract |\r\n| :--- | :--- | :--- | :--- |\r\n| Functional Requirement | `FR-NEW-001` | `product/requirements/` | Automated cryptographic signature verification for incoming telemetry |\r\n| Use Case | `UC-NEW-001` | `product/use-cases/` | End-to-end telemetry subscription and streaming workflow |\r\n| Actor / Persona | `ACT-NEW-001` | `product/actors/` | External third-party auditor agent role |\r\n| Architecture Decision / Component | `ADR-005` / `CMP-NEW-001` | `architecture/` | Token bucket sliding-window rate limiting engine |\r\n| Security Requirement | `SEC-REQ-NEW-001` | `security/requirements/` | Enforce mutual TLS (mTLS) with client certificate validation |\r\n| Privacy Requirement | `PRIV-REQ-NEW-001` | `privacy/requirements/` | Mandatory pseudonymization of pilot operator personal identifiers |\r\n| Personal Data Asset | `DATA-ASSET-NEW-001` | `privacy/assets/` | Inventory record for operator session tokens and geolocation |\r\n\r\n---\r\n\r\n## 2. Requirement Deltas and Formal Contracts\r\n\r\nFor each affected or new catalog item declared above, define the concrete functional delta:\r\n\r\n### [FR-NAME-001 / FR-NEW-001]: [Requirement Title]\r\n* **Operation:** `[ADDED | MODIFIED | DEPRECATED]`\r\n* **Primary Actor(s):** `ACT-ACTOR-001`\r\n* **Associated Use Case(s):** `UC-ACTION-001`\r\n* **Architectural Scope:** `CMP-NAME-001` (Security Enclave: `SEC-ENC-DMZ`)\r\n* **Behavioral Contract (Delta Specification):**\r\n * **Baseline (Before):** Describes previous behavior or states "None (New requirement)".\r\n * **Target Delta (After):** Explicit behavioral specification of the new or altered behavior.\r\n\r\n---\r\n\r\n## 3. Functional Behavior Scenarios (BDD Gherkin)\r\n\r\n```gherkin\r\n@CHG-NAME-001 @FR-NAME-001 @UC-ACTION-001 @functional @automated\r\nFeature: Delivery Specification CHG-NAME-001\r\n As a [primary actor / system role: ACT-ACTOR-001]\r\n I want [functional capability delivered by this change: FR-NAME-001]\r\n So that [expected business value or outcome]\r\n\r\n Background:\r\n Given the system is in a nominal operational state\r\n And dependent services are available\r\n\r\n Scenario: Nominal successful flow\r\n Given the client has established an authenticated session for "ACT-ACTOR-001"\r\n When valid payload is submitted according to specification\r\n Then the server responds with status 200 OK and persists state\r\n\r\n Scenario Outline: Parameter and edge case validation\r\n Given an input with parameter "<param>"\r\n When the request is processed\r\n Then the system returns status "<status>"\r\n\r\n Examples:\r\n | param | status |\r\n | nominal | 200 |\r\n | invalid | 400 |\r\n```\r\n\r\n---\r\n\r\n## 4. Cybersecurity and Mitigation Scenarios (Abuse Scenarios)\r\n\r\n```gherkin\r\n@CHG-NAME-001 @security @mitigation @SEC-REQ-CONTROL-001\r\nFeature: Threat Mitigation and Abuse Scenarios\r\n Scenario: Unauthorized access or unauthenticated payload attempt\r\n Given a malicious actor attempts to send data without valid credentials\r\n When connection attempts to reach protected enclaves "SEC-ENC-DMZ"\r\n Then handshake is aborted immediately and security alert SEC-TEST-001 is emitted\r\n```\r\n\r\n---\r\n\r\n## 5. Data Protection and Privacy Scenarios (Privacy Acceptance)\r\n\r\n```gherkin\r\n@CHG-NAME-001 @privacy @PRIV-REQ-NEW-001\r\nFeature: Privacy and Data Protection Controls\r\n Scenario: Verification of PII pseudonymization and zero-leakage telemetry\r\n Given payload containing personal data classification "confidential-pii"\r\n When event is serialized and dispatched to telemetry collector\r\n Then sensitive personal identifiers are redacted or salted-hashed\r\n And data retention TTL is enforced\r\n```\r\n\r\n';
|
|
14103
14133
|
var STARTER_TEMPLATES_SDD_TASKS_TEMPLATE_MD = '---\r\nid: TSK-PLAN-CHG-001\r\ntype: task-plan\r\nchange-id: CHG-001-FEATURE-NAME\r\ntitle: Verifiable Tasks Breakdown and Autonomy Governance\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nstatus: draft\r\ngovernance-summary:\r\n autonomous-tasks-count: 2\r\n human-review-plan-count: 1\r\n ambiguous-count: 0\r\n high-risk-manual-count: 0\r\ntasks:\r\n - id: "TSK-001"\r\n title: "Contract DTOs and Interfaces Definition"\r\n complexity: "LOW"\r\n risk-level: "LOW"\r\n autonomy-mode: "AUTONOMOUS"\r\n implements-components:\r\n - "CMP-NAME-001"\r\n satisfies-requirements:\r\n - "FR-001"\r\n verification:\r\n method: "quality-gate"\r\n command-or-criteria: "npx tsc --noEmit && node packages/cli/bin/aisdlc.js verify quality"\r\n assigned-to: "agent-developer"\r\n status: "PENDING"\r\n\r\n - id: "TSK-002"\r\n title: "Core Business Logic and Algorithm Implementation"\r\n complexity: "MEDIUM"\r\n risk-level: "MEDIUM"\r\n autonomy-mode: "HUMAN_REVIEW_PLAN"\r\n implements-components:\r\n - "CMP-NAME-001"\r\n satisfies-requirements:\r\n - "FR-001"\r\n verification:\r\n method: "automated-unit-test"\r\n command-or-criteria: "npm test -- tests/unit/feature_core.spec.ts"\r\n assigned-to: "agent-developer"\r\n status: "PENDING"\r\n\r\n - id: "TSK-003"\r\n title: "Database Schema Migration / Critical Credentials"\r\n complexity: "HIGH"\r\n risk-level: "CRITICAL"\r\n autonomy-mode: "HIGH_RISK_MANUAL"\r\n verification:\r\n method: "manual-inspection"\r\n command-or-criteria: "DBA review + manual execution with verified idempotent script"\r\n assigned-to: "human-engineer"\r\n status: "PENDING"\r\n\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# Verifiable Tasks Breakdown: CHG-001-FEATURE-NAME\r\n\r\n## 1. Autonomy Classification and Human Supervision Matrix\r\n\r\nEach task is rigorously classified according to its complexity and risk level to determine the level of delegation to AI agents:\r\n\r\n| Autonomy Mode | Traffic Light | Activation Criterion | Agent and Human Behavior |\r\n| :--- | :---: | :--- | :--- |\r\n| **`AUTONOMOUS`** | \u{1F7E2} | Low risk, isolated and well-specified task with immediate tests. | **Autonomous Plan + Execution**. Agent creates plan and writes code without interruption. Human validates final PR. |\r\n| **`HUMAN_REVIEW_PLAN`** | \u{1F7E1} | Medium risk, architectural changes, API contracts, or critical business rules. | **Mandatory Plan Review**. Agent designs detailed plan, but halts. **Human must approve plan before coding.** |\r\n| **`AMBIGUOUS`** | \u{1F7E0} | Vague requirements, incomplete criteria, or conflicting business logic. | **Blocked for Implementation**. Agent is forbidden to guess. Requires prior interview and refinement with user. |\r\n| **`HIGH_RISK_MANUAL`** | \u{1F534} | Critical risk (destructive DB migrations, cryptographic keys, production infra). | **Autonomous Execution Forbidden**. Direct human execution or assisted mode with command-by-command confirmation. |\r\n\r\n---\r\n\r\n## 2. Detailed Task Plan and Verification Criteria\r\n\r\n### Phase 1: Types and Contracts (TSK-001)\r\n- **ID**: `TSK-001`\r\n- **Description**: Create interfaces and data structures stipulated in `design.md`.\r\n- **Mode**: `AUTONOMOUS` \u{1F7E2}\r\n- **Verification**: `npx tsc --noEmit && node packages/cli/bin/aisdlc.js verify quality`\r\n\r\n### Phase 2: Implementation and BDD Tests (TSK-002)\r\n- **ID**: `TSK-002`\r\n- **Description**: Implement business logic and pass Cucumber scenarios.\r\n- **Mode**: `HUMAN_REVIEW_PLAN` \u{1F7E1}\r\n- **Verification**: `npx cucumber-js tests/features/feature.feature`\r\n\r\n### Phase 3: Critical Operations / Deployment (TSK-003)\r\n- **ID**: `TSK-003`\r\n- **Description**: Apply migrations or perimeter enclave configurations.\r\n- **Mode**: `HIGH_RISK_MANUAL` \u{1F534}\r\n- **Verification**: Manual approval checklists and smoke tests (`smoke-test`).\r\n\r\n---\r\n\r\n## 3. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-03 | Lead Engineer | Plan creation with risk classification and 360\xB0 verification | CHG-INIT-001 |\r\n';
|
|
14104
14134
|
var STARTER_TEMPLATES_SECURITY_ABUSE_CASE_TEMPLATE_MD = '---\r\nid: ABUSE-NAME-001\r\ntype: abuse-case\r\ntitle: Attack or Abuse Scenario Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nprimary-threat-actor: ACT-THREAT-NAME-001\r\ntargets-use-case: UC-ACTION-001\r\nstride-category: spoofing # spoofing, tampering, repudiation, information-disclosure, denial-of-service, elevation-of-privilege\r\nmitigated-by:\r\n - SEC-REQ-CONTROL-001\r\nasvs-controls:\r\n - "V2.1.1" # Reference to OWASP Application Security Verification Standard\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# ABUSE-NAME-001: Attack or Abuse Scenario Title\r\n\r\n## 1. Attack Vector and Exploitation Mechanics\r\nDescribes step-by-step how the malicious actor attempts to force, bypass, or abuse the legitimate use case.\r\n\r\n## 2. Attack Preconditions\r\n- What access or prior knowledge the attacker requires (expired tokens, intercepted network, payload injection).\r\n\r\n## 3. Potential Impact\r\n- Personal data exposure, telemetry corruption, denial of service, or identity spoofing.\r\n\r\n---\r\n\r\n## 4. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-03 | Security Officer / Threat Modeler | Initial abuse case threat modeling | CHG-SEC-001 |\r\n';
|
|
14105
14135
|
var STARTER_TEMPLATES_SECURITY_ENCLAVE_TEMPLATE_MD = '---\r\nid: SEC-ENC-NAME-001\r\ntype: security-enclave\r\ntitle: Zero Trust Security Enclave Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\ntrust-zone: trusted # untrusted, semi-trusted, trusted, highly-trusted, dmz, zero-trust-boundary\r\nperimeter-rules:\r\n - "Mandatory mutual authentication via TLS 1.3 (mTLS)"\r\n - "Cryptographic token validation with maximum 5-minute expiry"\r\n - "Network isolation via firewall rules and restricted namespaces"\r\nallowed-inbound:\r\n - CMP-GATEWAY-001\r\nallowed-outbound:\r\n - CMP-DATABASE-001\r\nenforced-by:\r\n - SEC-REQ-AUTH-001\r\nauthentication-mechanism: mtls # mtls, jwt, api-key, oauth2, none\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# SEC-ENC-NAME-001: Zero Trust Security Enclave Title\r\n\r\n## 1. Enclave Definition and Purpose\r\nDescription of trust boundary, assets protected inside the enclave, and applied least-privilege principle.\r\n\r\n## 2. Trust Zone and Perimeter Rules\r\n\r\n| Parameter | Value | Security Justification |\r\n| :--- | :--- | :--- |\r\n| **Trust Zone** | `trusted` | Segment with access to sensitive data and critical logic services. |\r\n| **Authentication** | `mtls` | Mandatory asymmetric cryptography at all ingress points. |\r\n\r\n### Perimeter Rules\r\n1. **Inbound Flow Control**: Only explicitly authorized components may initiate connections.\r\n2. **Outbound Flow Control**: Outbound traffic restricted exclusively to dependencies required for operation.\r\n3. **Continuous Validation**: Every incoming request is cryptographically verified regardless of network origin.\r\n\r\n---\r\n\r\n## 3. Authorized Connectivity Matrix\r\n\r\n| Direction | Entity Identifier | Type | Protocol / Channel |\r\n| :--- | :--- | :--- | :--- |\r\n| **Inbound** | `CMP-GATEWAY-001` | Component | gRPC over mTLS (secure port) |\r\n| **Outbound** | `CMP-DATABASE-001` | Component | TCP encrypted with enclave credentials |\r\n\r\n---\r\n\r\n## 4. Linked Security Requirements\r\n\r\n- `SEC-REQ-AUTH-001`: Access control and perimeter encryption.\r\n\r\n---\r\n\r\n## 5. Revision History\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-23 | Security Architect | Initial Zero Trust security enclave creation | CHG-INIT-001 |\r\n';
|
|
@@ -14767,7 +14797,7 @@ permissions:
|
|
|
14767
14797
|
pull-requests: read
|
|
14768
14798
|
|
|
14769
14799
|
concurrency:
|
|
14770
|
-
group: sdd-integrate-\${{ github.ref }}
|
|
14800
|
+
group: sdd-integrate-\${{ github.event.pull_request.base.ref || github.ref_name }}
|
|
14771
14801
|
cancel-in-progress: false
|
|
14772
14802
|
|
|
14773
14803
|
jobs:
|
|
@@ -14819,8 +14849,28 @@ jobs:
|
|
|
14819
14849
|
git add -A
|
|
14820
14850
|
if ! git diff --cached --quiet; then
|
|
14821
14851
|
git commit -m "chore(sdd): integrate changes into canonical baseline [skip ci]"
|
|
14822
|
-
|
|
14823
|
-
|
|
14852
|
+
TARGET_BRANCH="\${{ github.event.pull_request.base.ref || github.ref_name }}"
|
|
14853
|
+
MAX_RETRIES=3
|
|
14854
|
+
RETRY_COUNT=0
|
|
14855
|
+
DELAY=2
|
|
14856
|
+
|
|
14857
|
+
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
|
14858
|
+
echo "Synchronizing with remote branch $TARGET_BRANCH (pull --rebase)..."
|
|
14859
|
+
git pull --rebase origin "$TARGET_BRANCH"
|
|
14860
|
+
if git push origin "$TARGET_BRANCH"; then
|
|
14861
|
+
echo "\u2714 Canonical integration committed and synchronized in repository."
|
|
14862
|
+
exit 0
|
|
14863
|
+
fi
|
|
14864
|
+
RETRY_COUNT=$((RETRY_COUNT + 1))
|
|
14865
|
+
if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
|
|
14866
|
+
echo "\u26A0 Push rejected (concurrency detected). Retrying in \${DELAY}s (attempt $RETRY_COUNT/$MAX_RETRIES)..."
|
|
14867
|
+
sleep $DELAY
|
|
14868
|
+
DELAY=$((DELAY * 2))
|
|
14869
|
+
fi
|
|
14870
|
+
done
|
|
14871
|
+
|
|
14872
|
+
echo "\u274C Error: Failed to push canonical integration after $MAX_RETRIES attempts."
|
|
14873
|
+
exit 1
|
|
14824
14874
|
else
|
|
14825
14875
|
echo "\u2139 No pending modifications generated in working tree."
|
|
14826
14876
|
fi
|