| name | Knack Goal Tracker |
| description | Tracks HTI's performance against both grant and business development goals in real-time. Provides early warning system for goal attainment risks an... |
| allowed-tools | Edit |
Knack Goal Tracker
Purpose
Tracks HTI's performance against both grant and business development goals in real-time. Provides early warning system for goal attainment risks and generates actionable insights.
Grant Goals (2024-2026)
Primary Grant Commitments
const grant_goals = {
devices: {
acquire: { target: 3500, unit: "laptops", deadline: "2026-12-31" },
convert: { target: 2500, unit: "HTI Chromebooks", deadline: "2026-12-31" },
conversion_rate: { target: 70, unit: "percent", type: "minimum" }
},
training: {
hours: { target: 156, unit: "hours", deadline: "2026-12-31" },
geographic: { target: 15, unit: "counties", type: "coverage" }
},
timeline: {
start: "2024-01-01",
end: "2026-12-31",
duration_months: 24
}
};
2026 Business Development Goals
const business_goals = {
donors: {
unique_orgs: { target: 10, unit: "organizations" },
recurring: { target: 6, unit: "donors", criteria: "50+ laptops annually" },
major: { target: 20, unit: "donations", criteria: ">$500 each" }
},
financial: {
grant_match: { target: 65000, unit: "USD" },
corporate_sponsors: { target: 2, unit: "sponsors" }
},
sustainability: {
recurring_revenue: { target: "sustainable post-grant", type: "qualitative" }
}
};
Core Functions
check_progress
Purpose: Calculate current progress toward all goals
Parameters:
goal_targets (object, required): Goal definitions
live_data (object, optional): Current metrics (default: fetch from Knack)
as_of_date (date, optional): Point-in-time check (default: now)
Example:
const progress = await check_progress({
goal_targets: grant_goals,
live_data: await generate_metrics({ fields: ["acquired", "converted", "train_hours"] })
});
calculate_status
Purpose: Determine if goal is on track based on time elapsed
Logic:
function calculate_status({ current, target, time_elapsed_pct }) {
const progress_pct = (current / target) * 100;
if (progress_pct >= time_elapsed_pct + 10) {
return "ahead";
} else if (progress_pct >= time_elapsed_pct - 5) {
return "on_track";
} else if (progress_pct >= time_elapsed_pct - 15) {
return "behind";
} else {
return "at_risk";
}
}
Example:
const status = calculate_status({
current: 1250,
target: 3500,
time_elapsed_pct: 33.3
});
forecast_completion
Purpose: Predict final values and completion dates
Algorithm:
function forecast_completion({ current, target, time_elapsed_months, time_remaining_months }) {
const rate_per_month = current / time_elapsed_months;
const projected_additional = rate_per_month * time_remaining_months;
const projected_final = current + projected_additional;
const will_meet = projected_final >= target;
const months_to_complete = will_meet
? time_elapsed_months + ((target - current) / rate_per_month)
: null;
return {
projected_final: Math.round(projected_final),
will_meet_goal: will_meet,
estimated_completion: months_to_complete
? addMonths(grant_start_date, months_to_complete)
: "Will not meet at current pace",
confidence: calculate_confidence({ current, time_elapsed_months })
};
}
Example:
const forecast = await forecast_completion({
current: 1250,
target: 3500,
time_elapsed_months: 8,
time_remaining_months: 16
});
generate_dashboard_summary
Purpose: Create visual progress summary for dashboards
Example:
const summary = await generate_dashboard_summary();
identify_risks
Purpose: Flag goals at risk of not being met
Example:
const risks = await identify_risks();
generate_recommendations
Purpose: AI-driven suggestions to get back on track
Example:
const recommendations = await generate_recommendations({
goal: "acquire",
current: 1250,
target: 3500,
time_remaining_months: 16
});
Real-Time Progress Widgets
Progress Bar Component
function render_progress_bar({ current, target, label }) {
const progress_pct = (current / target) * 100;
const status_color = get_status_color(progress_pct);
return {
label: label,
current: current,
target: target,
progress_pct: progress_pct.toFixed(1),
bar: {
width: `${progress_pct}%`,
color: status_color
},
text: `${current.toLocaleString()} / ${target.toLocaleString()}`
};
}
function get_status_color(progress_pct) {
if (progress_pct >= 90) return "#4CAF50";
if (progress_pct >= 70) return "#6FC3DF";
if (progress_pct >= 50) return "#FF9800";
return "#F44336";
}
Circular Progress Indicator
function render_circular_progress({ current, target, label }) {
const progress_pct = (current / target) * 100;
return {
type: "circular",
progress: progress_pct,
center_text: `${progress_pct.toFixed(0)}%`,
label: label,
color: get_status_color(progress_pct),
stroke_width: 10
};
}
Countdown to Goal
function render_countdown({ current, target, rate_per_month }) {
const remaining = target - current;
const months_left = remaining / rate_per_month;
return {
label: "Est. Time to Goal",
value: months_left > 0 ? `${months_left.toFixed(1)} months` : "Goal Met!",
icon: months_left < 12 ? "🚀" : "⏳"
};
}
Alerts & Notifications
Automated Alerts
cron.schedule('0 9 * * *', async () => {
const progress = await check_progress({ goal_targets: grant_goals });
for (const [goal_name, goal_data] of Object.entries(progress)) {
const previous_status = await get_previous_status(goal_name);
if (goal_data.status !== previous_status) {
await notify_team({
channel: "#grant-tracking",
message: `Goal status changed: ${goal_name} is now ${goal_data.status}`,
data: goal_data
});
}
if (goal_data.status === "at_risk") {
await notify_admin({
urgency: "high",
subject: `ACTION REQUIRED: ${goal_name} at risk`,
body: `Current: ${goal_data.current}, Target: ${goal_data.target}`,
recommendations: await generate_recommendations({ goal: goal_name })
});
}
}
});
Quarterly Progress Notifications
cron.schedule('0 9 1 1,4,7,10 *', async () => {
const quarter = getCurrentQuarter();
const progress = await check_progress({ goal_targets: grant_goals });
await sendEmail({
to: "board@hubzonetech.org",
subject: `HTI ${quarter} Goal Progress Update`,
html: render_progress_email(progress)
});
});
Integration Points
- knack_reader: Fetch current metrics
- knack_pagination: Retrieve full datasets for accurate counts
- knack_dashboard_ai: Generate forecasts and recommendations
- knack_reporting_sync: Include in quarterly reports
- knack_cache_optimizer: Cache progress calculations (5-min TTL)
- knack_realtime: Live progress updates on dashboard
Dashboard Views
Executive Goal Dashboard
const executive_dashboard = {
widgets: [
{ type: "kpi_grid", data: await check_progress({ goal_targets: grant_goals }) },
{ type: "progress_bars", data: await generate_dashboard_summary() },
{ type: "forecast_chart", data: await forecast_all_goals() },
{ type: "risk_alerts", data: await identify_risks() }
]
};
Operations Goal Dashboard
const ops_dashboard = {
widgets: [
{ type: "real_time_counter", goal: "acquired", refresh: "live" },
{ type: "pace_indicator", goal: "acquired", unit: "per_month" },
{ type: "action_items", data: await generate_recommendations() },
{ type: "county_coverage_map", data: await county_progress() }
]
};
Best Practices
- Update goals in real-time: Not just quarterly
- Set intermediate milestones: Monthly or quarterly targets
- Track leading indicators: Donor pipeline, not just acquisitions
- Celebrate wins: Alert team when milestones hit
- Course-correct early: Don't wait until quarter-end to act
Grant Compliance
NCDIT Reporting
- Include goal progress in every quarterly report
- Explain variances >10% from target
- Provide remediation plans for at-risk goals
- Document goal achievement at grant completion