marcusrbrown/copiloting

This repository is archived and no longer surveyed; its page is kept for reference.

Polyglot AI/LLM experimentation monorepo. LangChain-based copilot experiments, a Flask + SvelteKit PDF chat application, and standalone tutorial scripts. Course/exploration code, not a shipped product.

Overview

  • Purpose: AI copilot experimentation and LangChain learning
  • Default branch: main
  • License: MIT
  • Created: 2021-07-02
  • Last push: 2026-04-20
  • Primary language: Python
  • Topics: copilot, langchain, llm, ai, flask, openai, pnpm, poetry, python, sveltekit, typescript

Stack

LayerTechnologyVersion
Python runtimePython^3.14
Python package managerPoetry2.3.4
Python LLM frameworkLangChain^1.2 (langchain-openai ^1.1, langchain-community >=0.3)
Python LLM clientOpenAI^2.0
Python data validationPydantic^2.10
Python web frameworkFlask(via pdf-dist sub-package)
Node.js runtimeNode.js24.15.0
JS package managerpnpm10.33.0
JS LLM frameworklangchain (JS)0.0.212 (root dep, older)
Frontend frameworkSvelteKit(pdf-dist/client workspace)
TypeScriptTypeScript5.9.3
Test (JS)Vitest^2.1.9
Test (Python)pytest^9.0.2
Tool version managermisemanages python, node, pnpm, poetry
LintingESLint (@bfra.me/eslint-config)0.51.0
Linting runnereslint10.2.1 (upgraded from unrecorded; security + compatibility)
FormattingPrettier (@bfra.me/prettier-config)0.16.8
HTTP clientaxiossecurity patch applied 2026-04-18 (PR #727)

Repository Structure

copiloting/
├── tutorials/           # TS LangChain tutorial scripts (pnpm workspace)
│   └── quickstart-llms.ts
├── course/
│   ├── sections/        # Python AI modules: agents, chains, facts, tchat (Poetry pkg)
│   ├── pdf-dist/        # Flask PDF chat app + SvelteKit frontend
│   │   ├── app/         # Python backend (chat/, web/)
│   │   └── client/      # SvelteKit frontend (pnpm workspace)
│   └── local-do/        # Minimal Flask PDF upload server (separate Poetry project)
├── copiloting/          # Empty Python stub (ignore)
├── tests/               # Python (pytest) + TypeScript (vitest) tests
├── package.json         # Root pnpm workspace
├── pyproject.toml        # Root Poetry config with CLI entry points
├── pnpm-workspace.yaml  # JS workspaces + pnpm settings
├── mise.toml            # Tool versions
├── AGENTS.md            # Full project conventions doc
└── vitest.config.ts     # TS test config

Workspace Layout

pnpm workspaces: course/pdf-dist/client, tutorials

Poetry path deps: course/pdf-dist (group: pdf-dist), course/sections (group: sections)

Python CLI Entry Points

Defined in pyproject.toml under [tool.poetry.scripts]:

  • agents — course.sections.agents:main
  • course — course.sections.chain:main
  • facts / facts-create-embeddings — course.sections.facts:main / create_embeddings
  • tchat — course.sections.tchat:main

CI/CD Pipeline

Workflows

WorkflowFileTriggerPurpose
CIci.yamlpush/PR to main, dispatchLint + build + test (Node.js and Python, path-filtered)
Fro Botfro-bot.yamlPR events, issue events, comments (@fro-bot), daily schedule, dispatchAutomated PR review, triage, daily maintenance
Fro Bot Autohealfro-bot-autoheal.yamlDaily cron (03:30 UTC), dispatchAutomated repo healing: fix errored PRs, security, code quality, stale imports
Copilot Setup Stepscopilot-setup-steps.yamlpush/PR touching itself, dispatchGitHub Copilot agent environment bootstrap
Renovaterenovate.yamlissue/PR edits, push, dispatch, CI completionDependency updates
Update Repo Settingsupdate-repo-settings.yamlpush to main, daily cron, dispatchProbot settings sync

CI Jobs (ci.yaml)

Uses dorny/paths-filter to detect changed file types and skip unnecessary jobs:

  1. Build Node.js — pnpm install -> pnpm lint -> pnpm build -> pnpm test (vitest). Caches pnpm store, ESLint cache, and SvelteKit build.
  2. Build Python — poetry install -> poetry run pytest. Caches .venv.

Branch Protection

Required status checks on main: Fro Bot, Build Node.js, Build Python, Renovate / Renovate. Strict merge queue, linear history enforced, admin enforcement enabled, no required PR reviews.

Shared Workflows

renovate.yaml and update-repo-settings.yaml reference reusable workflows from bfra-me/.github (v4.16.8; updated from v4.16.7 on 2026-04-22, SHA updated via Renovate). Authentication uses APPLICATION_ID and APPLICATION_PRIVATE_KEY secrets (GitHub App).

Fro Bot Integration

Fro Bot workflow is present (fro-bot.yaml). Uses fro-bot/agent@v0.41.4 (SHA-pinned: 36c9850c2ac6e6d4d532662fca2ca89bd2bc559d). Updated from v0.40.2 → v0.41.0 → v0.41.1 → v0.41.2 → v0.41.3 → v0.41.4 between 2026-04-18 and 2026-04-22.

Fro Bot Capabilities in This Repo

  • PR Review: Triggered on PR open/sync/reopen/ready_for_review/review_requested. Structured review with Verdict (PASS/CONDITIONAL/REJECT), blocking issues, risk assessment. Focuses on correctness, Python import compatibility (stale APIs), TS strictness, security.
  • Issue Triage: Triggered on issue open/edit by non-bot users.
  • Comment Interaction: Triggered by @fro-bot mentions from OWNER/MEMBER/COLLABORATOR.
  • Daily Maintenance: Scheduled at 15:30 UTC. Updates a rolling “Daily Maintenance Report” issue with metrics, stale issues/PRs, recommendations.
  • Custom Prompts: Supports workflow_dispatch with custom prompt input.

Fro Bot Autoheal

Daily automated healing (fro-bot-autoheal.yaml) at 03:30 UTC:

  1. Errored PRs — diagnoses and fixes CI failures on trusted PR branches
  2. Security — remediates critical/high advisories, fixes failing security update PRs
  3. Code Quality — migrates stale Python imports (one file per run), checks convention compliance, validates AGENTS.md accuracy
  4. Developer Experience — fixes lint/format issues, opens PRs for fixes
  5. Produces a daily “Daily Autohealing Report” issue

Concurrency and Filtering

Fro Bot runs are grouped by issue/PR number, cancel-in-progress disabled. Filters out forks, bot-authored PRs, and bot-authored issues. Comment triggers require OWNER/MEMBER/COLLABORATOR association.

Developer Tooling

  • mise: Manages Python 3.14, Node.js 24.15.0, pnpm 10.33.0, Poetry 2.3.4. Adds node_modules/.bin to PATH and creates .venv automatically.
  • Renovate: Extends marcusrbrown/renovate-config#v4. Python constrained to <=3.14. Rebases behind base branch. Post-upgrade runs poetry lock for Python deps.
  • Probot Settings: Extends fro-bot/.github:common-settings.yaml (.github/settings.yml).
  • AGENTS.md: Comprehensive project conventions doc at repo root. Also has a tutorials/AGENTS.md.
  • Copilot Instructions: .github/copilot-instructions.md supplements AGENTS.md with hard rules for TypeScript strictness, Python conventions, package managers, and formatting.
  • VS Code: .vscode/ configuration for Python interpreter, Pylance path resolution (course/pdf-dist imports).
  • EditorConfig: LF line endings enforced.

Known Issues and Anti-Patterns

Per AGENTS.md (self-documented):

  • Stale Python imports: Dependencies upgraded to langchain ^1.2/0.3, openai ^2.0, pydantic ^2.10, but application code still uses old import paths. The autoheal workflow progressively migrates these one file at a time.
  • copiloting/__init__.py is an empty stub — not a real importable package.
  • .env risk: .env may contain committed secrets historically. Template at .env.template is the safe reference.
  • JS langchain version mismatch: Root package.json pins langchain at 0.0.212 (very old) while Python side uses

Conventions

  • TypeScript: Extends @tsconfig/strictest — no any, no @ts-ignore, no @ts-expect-error. ESM only, .js extensions in imports, nodenext module system.
  • Python: ^3.14, Poetry-managed. Each subdirectory is an independent Poetry project.
  • Package managers: pnpm 10 only (JS/TS), Poetry only (Python). Never npm/yarn/pip.
  • Formatting: Prettier with singleQuote: true, bracketSpacing: false, tabWidth: 2. Svelte files use svelte parser.
  • Actions: Pinned by full SHA hash, Renovate updates them.
  • SvelteKit aliases: $c -> src/components, $s -> src/store, $api -> src/api/axios.js.

Testing

  • Python tests (tests/): pytest. Tests cover app factory, auth views, config, health views, hooks, DB models.
  • TypeScript tests (tests/ts/): vitest. Config at vitest.config.ts, includes tests/**/*.test.ts.
  • pyproject.toml sets pythonpath = ["course/pdf-dist"] so tests can import the Flask application.

Survey History

DateSHADelta
2026-04-18cfc8bb6Initial survey. Created repo page, langchain topic, polyglot-monorepo topic.
2026-04-219043529Fro Bot agent v0.40.2 → v0.41.3. bfra-me/.github v4.16.6 → v4.16.7. eslint 10.2.1, axios security patch. No structural changes.
2026-04-23dcd661fFro Bot agent v0.41.3 → v0.41.4. bfra-me/.github v4.16.7 → v4.16.8. uuid security update to v14 (PR #777). click updated to v8.3.3 (PR #774). No structural changes.