// STEP 1 · CONNECT WORKSPACE
programAI.connect({
provider: "GitHub",
repo: "org/program-core",
permissions: "read-only"
}).then(() => {
console.log("✅ Repository indexed securely");
});
// STEP 2 · DESCRIBE TASK (NATURAL LANGUAGE)
programAI.request({
task: "Explain this bug and propose a fix",
file: "src/billing/checkout.ts",
context: 120 // lines of context
});
// STEP 3 · CONTEXT-AWARE ANALYSIS
programAI.analyze({
include: ["src/billing/**", "tests/billing/**"],
lookbackCommits: 25
}).on("progress", (event) => {
console.log("📡 scanning:", event.file);
});
// STEP 4 · SUGGESTIONS & EXPLANATIONS
programAI.suggest().then(({ diff, explanation, tests }) => {
ui.showDiff(diff);
ui.showExplanation(explanation);
ui.showTestIdeas(tests);
});
// STEP 5 · APPLY & TEST
editor.apply(diff.approved);
runner.runTests("billing").then(result => {
console.log(result.summary);
if (!result.passed) {
programAI.helpDebug(result);
}
});
// STEP 6 · TRACK IMPACT
analytics.track({
team: "Platform",
metric: "review_time_delta",
value: "-34%"
});
console.log("📊 Program AI: measurable improvement unlocked.");