π·οΈ Framework Tags Behavioral Triggers Documentation¶
Overview¶
Framework tags in GetCimple are not just visual indicators - they are intelligent triggers that drive automated workflows, notifications, and actions throughout the platform. This document defines how framework tags ([E8], [ACSC], [S180], [Privacy]) trigger specific behaviors based on their status and context.
Core Architecture¶
Behavioral Tag Structure¶
interface BehavioralFrameworkTag {
// Core tag properties
framework: 'E8' | 'ACSC' | 'S180' | 'Privacy'
status: 'compliant' | 'in-progress' | 'at-risk' | 'not-applicable'
// Behavioral properties
triggers: TriggerRule[]
actions: Action[]
conditions: Condition[]
priority: 'critical' | 'high' | 'medium' | 'low'
// Context awareness
context: {
location: 'dashboard' | 'report' | 'task' | 'assessment'
user: UserRole
timing: TimingRule
}
// Visual feedback
animation: AnimationType
notification: NotificationConfig
}
Trigger Definitions¶
Status-Based Triggers¶
const STATUS_TRIGGERS: Record<string, TriggerRule[]> = {
'at-risk': [
{
id: 'RISK_001',
name: 'Compliance Risk Alert',
condition: 'status === "at-risk"',
actions: [
'notifyDirectors',
'createUrgentTask',
'scheduleReview',
'logRiskEvent',
],
priority: 'critical',
},
],
'in-progress': [
{
id: 'PROG_001',
name: 'Progress Tracking',
condition: 'status === "in-progress" && daysSinceUpdate > 7',
actions: ['sendProgressReminder', 'updateTaskPriority', 'notifyAssignee'],
priority: 'medium',
},
],
compliant: [
{
id: 'COMP_001',
name: 'Compliance Maintenance',
condition: 'status === "compliant" && daysUntilExpiry < 30',
actions: [
'scheduleRevalidation',
'prepareRenewalTasks',
'notifyMaintenance',
],
priority: 'low',
},
],
}
Framework-Specific Triggers¶
Essential Eight Triggers¶
const E8_TRIGGERS: BehavioralTrigger[] = [
{
id: 'E8_MAT_001',
name: 'Maturity Level Change',
condition: (tag, previous) => tag.maturityLevel !== previous.maturityLevel,
actions: [
{
type: 'notification',
target: 'board',
template: 'e8-maturity-change',
data: {
from: previous.maturityLevel,
to: tag.maturityLevel,
},
},
{
type: 'report',
action: 'generateMaturityReport',
schedule: 'immediate',
},
{
type: 'task',
action: 'createMaturityTasks',
params: {
targetLevel: tag.maturityLevel + 1,
},
},
],
},
{
id: 'E8_CTRL_001',
name: 'Control Failure',
condition: (tag) => tag.controls.some((c) => c.status === 'failed'),
actions: [
{
type: 'alert',
severity: 'critical',
message: 'E8 control failure detected',
recipients: ['ciso', 'itManager'],
},
{
type: 'workflow',
action: 'initiateIncidentResponse',
params: {
framework: 'E8',
failedControls: tag.controls.filter((c) => c.status === 'failed'),
},
},
],
},
]
ACSC Guidelines Triggers¶
const ACSC_TRIGGERS: BehavioralTrigger[] = [
{
id: 'ACSC_UPDATE_001',
name: 'Guideline Update Alert',
condition: (tag) => tag.guidelineVersion < CURRENT_ACSC_VERSION,
actions: [
{
type: 'notification',
template: 'acsc-update-required',
data: {
current: tag.guidelineVersion,
latest: CURRENT_ACSC_VERSION,
changes: getACSCChanges(tag.guidelineVersion),
},
},
{
type: 'task',
action: 'createUpdateTasks',
assignTo: 'complianceTeam',
},
],
},
{
id: 'ACSC_THREAT_001',
name: 'Threat Alert Response',
condition: (tag, context) => context.acscThreatLevel === 'high',
actions: [
{
type: 'alert',
severity: 'urgent',
message: 'ACSC high threat alert - immediate action required',
},
{
type: 'workflow',
action: 'activateThreatResponse',
params: { threatData: context.threatDetails },
},
],
},
]
Section 180 (S180) Triggers¶
const S180_TRIGGERS: BehavioralTrigger[] = [
{
id: 'S180_BOARD_001',
name: 'Board Meeting Preparation',
condition: (tag, context) => context.daysUntilBoardMeeting <= 7,
actions: [
{
type: 'workflow',
action: 'prepareBoardPack',
params: {
includeCompliance: true,
highlightRisks: tag.status === 'at-risk',
},
},
{
type: 'notification',
target: 'directors',
template: 'board-meeting-reminder',
schedule: 'daily until meeting',
},
],
},
{
id: 'S180_LIABILITY_001',
name: 'Director Liability Alert',
condition: (tag) => tag.liabilityRisk === 'high',
actions: [
{
type: 'alert',
severity: 'critical',
recipients: ['all-directors', 'ceo'],
message: 'Potential director liability issue identified',
},
{
type: 'task',
action: 'createLiabilityMitigation',
priority: 'urgent',
assignTo: 'legalCounsel',
},
],
},
]
Privacy Act Triggers¶
const PRIVACY_TRIGGERS: BehavioralTrigger[] = [
{
id: 'PRIV_BREACH_001',
name: 'Data Breach Response',
condition: (tag, event) => event.type === 'data-breach',
actions: [
{
type: 'workflow',
action: 'initiateBreachResponse',
immediate: true,
params: {
severity: event.severity,
affectedData: event.dataTypes,
recordCount: event.count,
},
},
{
type: 'notification',
target: ['privacyOfficer', 'ciso', 'ceo', 'board'],
template: 'data-breach-alert',
channel: ['email', 'sms', 'whatsapp'],
},
{
type: 'timer',
action: 'startBreachClock',
duration: '72-hours',
alerts: ['24h', '48h', '71h'],
},
],
},
{
id: 'PRIV_CONSENT_001',
name: 'Consent Expiry',
condition: (tag) => tag.consents.some((c) => c.daysUntilExpiry <= 30),
actions: [
{
type: 'task',
action: 'renewConsents',
params: {
expiring: tag.consents.filter((c) => c.daysUntilExpiry <= 30),
},
},
],
},
]
Behavioral Actions¶
Notification Actions¶
class NotificationActions {
async notifyDirectors(tag: BehavioralFrameworkTag, context: TriggerContext) {
const notification = {
type: 'compliance-alert',
severity: this.getSeverity(tag),
framework: tag.framework,
status: tag.status,
message: this.generateMessage(tag, context),
actions: this.getAvailableActions(tag),
channels: this.getNotificationChannels(context.user),
}
// Send through multiple channels
await Promise.all([
this.sendEmail(notification),
this.sendWhatsApp(notification),
this.createDashboardAlert(notification),
])
}
private getNotificationChannels(user: User): Channel[] {
if (user.role === 'director') {
return ['email', 'WhatsApp'] // Directors prefer WhatsApp
} else if (user.role === 'it-manager') {
return ['email', 'dashboard', 'slack']
}
return ['email', 'dashboard']
}
}
Task Creation Actions¶
class TaskActions {
async createUrgentTask(tag: BehavioralFrameworkTag, trigger: Trigger) {
const task = {
title: `Address ${tag.framework} ${tag.status} status`,
description: this.generateTaskDescription(tag, trigger),
priority: 'urgent',
dueDate: this.calculateDueDate(tag.priority),
assignee: this.selectAssignee(tag.framework, tag.context),
framework: tag.framework,
evidence: this.getRequiredEvidence(tag),
subtasks: this.generateSubtasks(tag, trigger),
automations: this.getAvailableAutomations(tag),
}
const created = await this.taskService.create(task)
// Link to framework tag
await this.linkTaskToTag(created.id, tag.id)
// Start monitoring
await this.startTaskMonitoring(created.id, tag.priority)
return created
}
private generateSubtasks(
tag: BehavioralFrameworkTag,
trigger: Trigger
): Subtask[] {
switch (tag.framework) {
case 'E8':
return this.generateE8Subtasks(tag)
case 'Privacy':
return this.generatePrivacySubtasks(tag)
// ... other frameworks
}
}
}
Workflow Automation Actions¶
class WorkflowActions {
async initiateWorkflow(tag: BehavioralFrameworkTag, workflowId: string) {
const workflow = await this.n8n.getWorkflow(workflowId)
const execution = await this.n8n.execute(workflow, {
trigger: {
type: 'framework-tag',
tag: tag,
timestamp: new Date(),
},
context: {
organization: tag.context.organization,
user: tag.context.user,
previousStatus: tag.previousStatus,
},
parameters: this.getWorkflowParameters(tag),
})
// Monitor workflow execution
this.monitorExecution(execution.id, {
onComplete: () => this.updateTagStatus(tag.id, 'workflow-complete'),
onError: (error) => this.handleWorkflowError(tag, error),
})
}
}
Conditional Logic¶
Complex Conditions¶
const COMPLEX_CONDITIONS: ConditionRule[] = [
{
id: 'MULTI_FRAMEWORK_RISK',
name: 'Multiple Framework Risk',
condition: (tags: BehavioralFrameworkTag[]) => {
const atRiskCount = tags.filter((t) => t.status === 'at-risk').length
return atRiskCount >= 2
},
actions: [
{
type: 'escalation',
level: 'board',
message: 'Multiple compliance frameworks at risk',
},
],
},
{
id: 'CASCADING_COMPLIANCE',
name: 'Cascading Compliance Impact',
condition: (tags, context) => {
// E8 failure often impacts Privacy
const e8Failed = tags.find(
(t) => t.framework === 'E8' && t.status === 'at-risk'
)
const privacyOk = tags.find(
(t) => t.framework === 'Privacy' && t.status === 'compliant'
)
return e8Failed && privacyOk && context.dataHandling === 'high'
},
actions: [
{
type: 'warning',
message: 'E8 issues may impact Privacy Act compliance',
frameworks: ['E8', 'Privacy'],
},
],
},
]
Time-Based Conditions¶
interface TimingRule {
type: 'periodic' | 'deadline' | 'event-based'
schedule?: CronExpression
deadline?: Date
event?: string
}
const TIME_BASED_TRIGGERS: TimeTrigger[] = [
{
id: 'QUARTERLY_REVIEW',
schedule: '0 0 1 */3 *', // First day of each quarter
condition: (tag) => tag.lastReview > 90,
actions: ['scheduleQuarterlyReview', 'notifyBoardSecretary'],
},
{
id: 'ANNUAL_ATTESTATION',
schedule: '0 0 1 7 *', // July 1st (Australian FY)
condition: (tag) => tag.framework === 'S180',
actions: ['createAnnualAttestation', 'notifyAllDirectors'],
},
]
Integration Patterns¶
WhatsApp Behavioral Responses¶
class WhatsAppBehaviors {
async handleTagTrigger(tag: BehavioralFrameworkTag, user: User) {
if (tag.status === 'at-risk' && user.preferences.urgentViaWhatsApp) {
await this.whatsApp.send({
to: user.phone,
template: 'urgent-compliance-alert',
params: {
framework: tag.framework,
issue: tag.trigger.reason,
action: tag.actions[0].quickLink,
},
})
// Enable quick responses
await this.enableQuickResponses(user.phone, [
'View details',
'Assign to team',
'Mark as reviewing',
'Set reminder',
])
}
}
}
Dashboard Behavioral Updates¶
class DashboardBehaviors {
renderBehavioralTag(tag: BehavioralFrameworkTag): HTMLElement {
const element = this.createTagElement(tag)
// Add behavioral indicators
if (tag.triggers.some((t) => t.active)) {
element.classList.add('has-active-triggers')
this.addPulseAnimation(element)
}
// Add interaction handlers
element.addEventListener('click', () => {
this.showBehavioralPanel(tag)
})
// Real-time updates
this.subscribeToTagUpdates(tag.id, (update) => {
this.updateTagDisplay(element, update)
this.triggerBehaviors(update)
})
return element
}
}
Report Generation Behaviors¶
class ReportBehaviors {
async generateBehavioralReport(tags: BehavioralFrameworkTag[]) {
const report = {
sections: [],
alerts: [],
recommendations: [],
}
// Check each tag for triggered behaviors
for (const tag of tags) {
const triggered = await this.getTriggeredBehaviors(tag)
if (triggered.length > 0) {
report.alerts.push({
framework: tag.framework,
status: tag.status,
triggers: triggered,
requiredActions: this.getRequiredActions(triggered),
})
}
}
// Add behavioral insights
report.sections.push({
title: 'Compliance Behavior Analysis',
content: this.analyzeBehavioralPatterns(tags),
visualizations: this.createBehavioralCharts(tags),
})
return report
}
}
Animation and Visual Feedback¶
Status Animations¶
const TAG_ANIMATIONS: Record<string, AnimationConfig> = {
'at-risk': {
type: 'pulse',
duration: 1000,
repeat: 'infinite',
easing: 'ease-in-out',
keyframes: [
{ opacity: 1, transform: 'scale(1)' },
{ opacity: 0.7, transform: 'scale(1.05)' },
{ opacity: 1, transform: 'scale(1)' },
],
},
'in-progress': {
type: 'progress',
duration: 2000,
repeat: 1,
easing: 'linear',
keyframes: [
{ backgroundPosition: '0% 50%' },
{ backgroundPosition: '100% 50%' },
],
},
compliant: {
type: 'check',
duration: 500,
repeat: 1,
easing: 'ease-out',
keyframes: [
{ transform: 'scale(0)', opacity: 0 },
{ transform: 'scale(1.2)', opacity: 1 },
{ transform: 'scale(1)', opacity: 1 },
],
},
}
Interactive Behaviors¶
class InteractiveBehaviors {
attachBehaviors(tagElement: HTMLElement, tag: BehavioralFrameworkTag) {
// Hover behavior
tagElement.addEventListener('mouseenter', () => {
this.showTooltip(tagElement, {
status: tag.status,
lastUpdate: tag.lastUpdate,
nextAction: tag.triggers[0]?.actions[0]?.description,
compliance: tag.compliancePercentage,
})
})
// Click behavior
tagElement.addEventListener('click', () => {
this.showBehavioralMenu(tag, {
options: this.getAvailableActions(tag),
quickActions: this.getQuickActions(tag),
details: this.getDetailedView(tag),
})
})
// Long press (mobile)
let pressTimer
tagElement.addEventListener('touchstart', () => {
pressTimer = setTimeout(() => {
this.showQuickActions(tag)
}, 500)
})
tagElement.addEventListener('touchend', () => {
clearTimeout(pressTimer)
})
}
}
Behavioral Analytics¶
Tracking and Measurement¶
interface BehavioralMetrics {
tagId: string
framework: string
triggersActivated: number
actionsExecuted: number
userInteractions: number
averageResolutionTime: number
impactScore: number
}
class BehavioralAnalytics {
async trackBehavior(tag: BehavioralFrameworkTag, event: BehavioralEvent) {
await this.analytics.track({
event: 'framework_tag_behavior',
properties: {
framework: tag.framework,
status: tag.status,
trigger: event.trigger,
action: event.action,
context: event.context,
timestamp: new Date(),
userId: event.userId,
organizationId: event.organizationId,
},
})
// Update behavioral scores
await this.updateBehavioralScore(tag, event)
}
async generateBehavioralInsights(): BehavioralInsights {
const data = await this.analytics.query({
event: 'framework_tag_behavior',
timeframe: 'last_30_days',
groupBy: ['framework', 'trigger', 'action'],
})
return {
mostActiveFramework: this.findMostActive(data),
commonTriggers: this.identifyCommonTriggers(data),
effectiveActions: this.measureActionEffectiveness(data),
recommendations: this.generateRecommendations(data),
}
}
}
Implementation Best Practices¶
Performance Optimization¶
class BehavioralOptimization {
// Debounce rapid status changes
private debouncedTrigger = debounce((tag: BehavioralFrameworkTag) => {
this.processTriggers(tag)
}, 1000)
// Batch similar actions
private actionQueue = new ActionQueue({
batchSize: 10,
flushInterval: 5000,
processor: (actions) => this.processBatch(actions),
})
// Cache trigger evaluations
private triggerCache = new LRUCache<string, boolean>({
max: 1000,
ttl: 60000, // 1 minute
})
}
Error Handling¶
class BehavioralErrorHandler {
async handleTriggerError(tag: BehavioralFrameworkTag, error: Error) {
// Log the error
console.error(`Trigger error for ${tag.framework}:`, error)
// Fallback behavior
if (tag.priority === 'critical') {
// Always notify for critical issues
await this.sendFallbackNotification(tag, error)
}
// Record for analysis
await this.recordBehavioralError({
tag,
error,
context: this.captureContext(),
timestamp: new Date(),
})
// Attempt recovery
if (this.canRecover(error)) {
await this.attemptRecovery(tag)
}
}
}
Testing Behavioral Triggers¶
Test Scenarios¶
describe('Framework Tag Behaviors', () => {
it('should trigger urgent notification when E8 goes at-risk', async () => {
const tag = createTag({ framework: 'E8', status: 'at-risk' })
const triggers = await evaluateTriggers(tag)
expect(triggers).toContain('urgent-notification')
expect(mockNotificationService).toHaveBeenCalledWith({
severity: 'critical',
recipients: ['directors', 'ciso'],
})
})
it('should cascade Privacy warnings when E8 fails', async () => {
const tags = [
createTag({ framework: 'E8', status: 'at-risk' }),
createTag({ framework: 'Privacy', status: 'compliant' }),
]
const cascaded = await evaluateCascadingTriggers(tags)
expect(cascaded).toHaveWarning('privacy-risk-from-e8')
})
})
Conclusion¶
Behavioral framework tags transform static compliance indicators into dynamic, intelligent agents that actively help organizations maintain compliance. By embedding behaviors directly into the tag system, GetCimple provides proactive compliance management that responds to changes in real-time and guides users toward resolution.
Key Principle: Every tag should not just show status, but actively work to improve it.