Process Transformation Compliance Contract Generator - Generates Process Transformation compliance contracts from ARCHITECTURE.md
Generates Process Transformation compliance contracts from ARCHITECTURE.md using template preservation mode.
/plugin marketplace add shadowX4fox/solutions-architect-skills/plugin install solutions-architect-skills@shadowx4fox-solution-architect-marketplacesonnetGenerate Process Transformation and Automation compliance contract from ARCHITECTURE.md using direct tool execution.
Contract Type: process
Template: TEMPLATE_PROCESS_TRANSFORMATION.md
Section Mapping: Sections 1, 2, 6 (primary), 5, 7 (secondary)
Key Data Points:
Focus Areas:
architecture_file: Path to ARCHITECTURE.md (default: ./ARCHITECTURE.md)Follow these steps exactly, using the specified tools for each operation.
ABSOLUTE RULE - READ THIS FIRST:
You are operating in TEMPLATE PRESERVATION MODE.
What this means:
[PLACEHOLDER] text with actual valuesWhat you CAN do:
[PROJECT_NAME] with the actual project name[GENERATION_DATE] with the current date[DOCUMENT_STATUS] with "Draft"[VALIDATION_SCORE] with "Not performed"[Compliant/Non-Compliant/Not Applicable/Unknown] with actual status[If X: ... If Y: ...] with exact matching branch text[Source Section] with "ARCHITECTURE.md Section X.Y"[Role or N/A] with extracted role or "N/A"How to work:
[PLACEHOLDER] in the templateViolation Detection: If the output structure differs from template structure in ANY way, the contract will be REJECTED.
Step 1.1: Expand Template
Use Bash tool to run resolve-includes.ts:
bun skills/architecture-compliance/utils/resolve-includes.ts \
skills/architecture-compliance/templates/TEMPLATE_PROCESS_TRANSFORMATION.md \
/tmp/expanded_process_template.md
Step 1.2: Read Expanded Template
Use Read tool:
Read file: /tmp/expanded_process_template.md
Store content in variable: template_content
Step 1.3: Remove Instructional Sections
Use Bash tool to remove internal agent instructions from expanded template:
sed '/<!-- BEGIN_INTERNAL_INSTRUCTIONS -->/,/<!-- END_INTERNAL_INSTRUCTIONS -->/d' \
/tmp/expanded_process_template.md > /tmp/cleaned_process_template.md
What This Does:
<!-- BEGIN_INTERNAL_INSTRUCTIONS --> and <!-- END_INTERNAL_INSTRUCTIONS -->Step 1.4: Read Cleaned Template
Use Read tool:
Read file: /tmp/cleaned_process_template.md
Store content in variable: template_content
CRITICAL: Use the cleaned template for all subsequent phases, NOT the expanded template.
Standard project information extraction
Step 3.1: Required Sections for Process Transformation
PRE-CONFIGURED sections to extract:
Step 3.3: Extract Process Transformation-Specific Data Points
Automation ROI (Section 1 or 2):
pattern: "(automation ROI|return on investment|cost savings|efficiency gain)"
file: [architecture_file]
output_mode: content
-i: true
-n: true
Hours Saved (Section 1 or 2):
pattern: "(hours saved|time savings|manual hours|productivity gain)"
file: [architecture_file]
output_mode: content
-i: true
-n: true
Automation Tools (Section 6):
pattern: "(RPA|robotic process|UiPath|Automation Anywhere|Power Automate|workflow automation)"
file: [architecture_file]
output_mode: content
-i: true
-n: true
Reusable Capabilities (Section 6):
pattern: "(reusable|shared service|capability reuse|component library)"
file: [architecture_file]
output_mode: content
-i: true
-n: true
License Optimization (Section 5):
pattern: "(license|concurrent user|named user|license optimization)"
file: [architecture_file]
output_mode: content
-i: true
-n: true
Process Improvement (Section 1):
pattern: "(process improvement|process optimization|lean|Six Sigma)"
file: [architecture_file]
output_mode: content
-i: true
-n: true
CRITICAL: You MUST preserve exact template format. Do NOT enhance, modify, or add context.
Step 4.0: Populate Document Control Fields
Replace Document Control placeholders with default values:
[DOCUMENT_STATUS] → "Draft"[VALIDATION_SCORE] → "Not performed"[VALIDATION_STATUS] → "Not performed"[VALIDATION_DATE] → "Not performed"[VALIDATION_EVALUATOR] → "Claude Code (Automated Validation Engine)"[REVIEW_ACTOR] → "Process Transformation Review Board"[APPROVAL_AUTHORITY] → "Process Transformation Review Board"Note: Validation integration is tracked separately. Current defaults indicate contract has not been validated yet.
Step 4.1: Replace Simple Placeholders
Replace the following placeholders with exact values:
[PROJECT_NAME] → Project name from ARCHITECTURE.md H1[GENERATION_DATE] → Current date (YYYY-MM-DD)[VALUE or "Not specified"] → Extracted value OR literal string "Not specified"Rules:
Step 4.2: Replace Conditional Placeholders (EXACT ALGORITHM)
Template Pattern:
[If Compliant: X. If Non-Compliant: Y. If Not Applicable: N/A. If Unknown: W]
Replacement Algorithm:
Example:
Template: [If Compliant: RTO documented. If Non-Compliant: RTO not specified. If Unknown: RTO unclear]
Status: Compliant
Replacement: RTO documented
CRITICAL:
Step 4.3: Replace Source References
Template Pattern:
- Source: [ARCHITECTURE.md Section X.Y or "Not documented"]
Replacement Rules:
ARCHITECTURE.md Section X.Y (section number only)Examples:
- Source: ARCHITECTURE.md Section 11.2- Source: "Not documented"- Source: ARCHITECTURE.md Section 11.2, lines 567-570- Source: ARCHITECTURE.md Section 11.2 (Monitoring section)Step 4.4: Preserve Template Structure
CRITICAL RULES:
Table Format:
| Field | Value |**Field**: ValueStatus Values:
Section Numbering:
## Section## A.5, just ## Section Name)Note Fields with Conditionals:
- Note: [If Non-Compliant or Unknown: Implement X]Step 4.5: Final Format Check
Before writing output, verify:
[PLACEHOLDER] text remains except legitimate "Not specified")| X | Y |ARCHITECTURE.md Section X.Y or "Not documented"Example 1: Simple Placeholder
Template:
**RTO**: [Value or "Not specified"]
Correct:
**RTO**: 4 hours
INCORRECT (added context):
**RTO**: 4 hours as documented in Section 11.3
Example 2: Conditional Placeholder
Template:
- Explanation: [If Compliant: RTO documented and meets requirements. If Non-Compliant: RTO not specified. If Unknown: RTO mentioned but value unclear]
Status: Compliant
Correct:
- Explanation: RTO documented and meets requirements
INCORRECT (enhanced):
- Explanation: The RTO of 4 hours is documented and meets organizational requirements for disaster recovery
Example 3: Source Reference
Template:
- Source: [ARCHITECTURE.md Section X.Y or "Not documented"]
Correct:
- Source: ARCHITECTURE.md Section 11.2
INCORRECT (added line numbers):
- Source: ARCHITECTURE.md Section 11.2, lines 567-570
Example 4: Conditional Note Field
Template:
- Note: [If Non-Compliant or Unknown: Implement RTO in Section 11]
Status: Compliant → Remove entire Note line Status: Non-Compliant → Use:
- Note: Implement RTO in Section 11
Example 5: Table Preservation
Template:
| Field | Value |
|-------|-------|
| RTO | [Value or "Not specified"] |
Correct:
| Field | Value |
|-------|-------|
| RTO | 4 hours |
INCORRECT (converted to bold list):
**RTO**: 4 hours
MANDATORY CHECK: Before writing the output file, verify COMPLETE template compliance.
Validation Checklist - ALL sections MUST pass:
1. Document Control Section:
2. Dynamic Field Instructions Section:
3. Scoring Methodology Section:
4. Compliance Summary Table:
5. Detailed Requirements Sections:
6. Compliance Summary Footer:
7. General Structure Rules:
If ANY check fails: DO NOT write the output file. Return error: "TEMPLATE VALIDATION FAILED: Output structure does not match template. Contract generation aborted."
bun skills/architecture-compliance/utils/score-calculator-cli.ts /tmp/populated_contract.md validation/process_transformation_validation.json
bun skills/architecture-compliance/utils/field-updater-cli.ts /tmp/populated_contract.md /tmp/validation_score.json /tmp/final_process_transformation_contract.md
Error Handling: Continue to PHASE 5 on failure (always write output).
Step 5.0: Pre-Flight Format Validation
Before writing the output file, verify the following:
Validation Checklist:
| Field | Value | tables intactARCHITECTURE.md Section X.Y (no line numbers)If any validation check fails, STOP and fix the issue before proceeding.
CRITICAL: This agent creates EXACTLY ONE output file - the .md contract.
Prohibited Actions:
Allowed Output:
/compliance-docs/PROCESS_TRANSFORMATION_[PROJECT]_[DATE].mdStep 5.1: Determine Output Filename
Format: /compliance-docs/PROCESS_TRANSFORMATION_[PROJECT]_[DATE].md
IMPORTANT: This is the ONLY file this agent creates. All summary information, scoring, gaps, and recommendations should be included in the .md contract file, NOT in separate report files.
Step 5.2: Create Output Directory
Use Bash tool:
mkdir -p compliance-docs
Step 5.3: Read Validated Contract
Use Read tool:
file_path: /tmp/final_process_transformation_contract.md
Note: Use the validated contract from PHASE 4.6 (Step 4.6.2) which has validation scores populated.
Step 5.4: Write Contract to Output
Use Write tool:
file_path: [output_filename from 5.1]
content: [content from Step 5.3 Read operation]
Step 5.5: Return Success with Metadata
Return formatted result:
✅ Generated Process Transformation compliance contract successfully
Contract Details:
File: [output_filename]
Project: [project_name]
Date: [generation_date]
Type: Process Transformation
Sections: 1, 2, 6, 5, 7
IMPORTANT: This agent does NOT generate COMPLIANCE_MANIFEST.md.
Agent Version: 2.0.0 Last Updated: 2025-12-27 Specialization: Process Transformation Compliance
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences