Methodology
Automated Governance
How AFOS analyses are generated — rules in code, not in humans
Two ways to interact with the hosted platform
AFOS Analytics has two distinct paths for interacting with the instance at afos-analytics.com. This separation is what lets the project be genuinely open-source in code while maintaining auditable quality on the hosted platform.
| Path | What it is | AFOS involvement | Rules |
|---|---|---|---|
| 🍴 Fork | You copy the code and run your own version | Zero | Just Apache 2.0 (attribution, NOTICE file, no use of the AFOS trademark) |
| 🔌 Country Onboarding | You contribute a configuration that onboards a new country to the hosted platform | Technical PR review, one-time | Integrity rules in code — applied automatically |
Improvements to the code itself (bugs, features, new validators) follow the standard open-source flow via CONTRIBUTING.md — nothing special, it's just a PR.
Fork (Apache 2.0, full stop)
The AFOS codebase is licensed under Apache 2.0. Anyone can fork, modify, run their own instance, change the prompt, remove rules, swap sources, use commercially. This is not a bug — it is the contract of serious open-source.
Forker's responsibility: everything. If you fork and publish biased analyses, that is your operation, not AFOS. If your instance goes down, that is yours. If you monetize, that is your right. The only obligations are the Apache 2.0 license (preserve attribution in NOTICE, cite original copyright) and our trademark policy — the code is free, but the name "AFOS Analytics" and the logo are registered trademarks. Forks operate under their own name.
This model has precedent: Linux kernel, PostgreSQL, React, Kubernetes — all allow forks, none accept responsibility for what happens in third-party instances. AFOS follows the same logic.
Why forks strengthen AFOS rather than weaken it
Forks are not a threat — they are validation. If someone finds enough value in AFOS to replicate it, that proves the method works. PostgreSQL benefits from Supabase, Neon, Aiven existing; Linux benefits from Red Hat, Ubuntu, SUSE; React benefits from Next.js, Remix. Every successful commercial fork expands the upstream market rather than replacing it.
The real moat of AFOS is not in the code (which is free by design). It is in:
- Historical data persisted in Neon since launch — forkers start from zero
- SEO authority built through citations, backlinks and press mentions — takes years to replicate
- Execution speed of a solo founder vs a corporate committee — decisions in minutes, not weeks
- Community of early contributors, reviewers and completed Country Onboardings
- Brand protected by trademark — forcing anyone who copies the code to build reputation from scratch
None of that is forkable. That is precisely why AFOS can be 100% open-source without fear.
Country Onboarding (configuration contribution)
If you want to help expand the AFOS hosted platform to new countries, you contribute a Country Onboarding. It is a configuration, not daily editorial work.
What you submit in a PR:
- Polymarket event mapping relevant to the country
- Poll source map (which institutes matter and why)
- News source map (reference outlets)
- Local political context (actors, recurring themes, glossary)
- Technical scaffolding (routes, translations)
What you do NOT submit: written analyses. The platform generates daily analyses automatically using your configuration + pipeline + integrity rules. Contribute once, impact persists.
Step-by-step technical guide: docs/platform/add-your-country.md — ~2 hours of work, one PR.
Hosted platform (governance in code)
The instance at afos-analytics.com is operated by AFOS. Analyses published under the AFOS brand carry our responsibility. Governance here is enforced in code, not by human editors reviewing each analysis.
Three technical reasons for this:
- Consistency. Rules in code apply identically to 100 analyses or 100,000. Human reviewers vary by day, mood, context.
- Scale. One human editor ≈ 10 analyses/day at the limit. One pipeline ≈ infinite. We want the second.
- Auditability. Rules in code live in git history, versionable, diffable. Human editorial decisions live in the reviewer's head.
The automated validators
Before publishing any analysis, the pipeline runs validators. If any fails, the analysis does not publish until the cause is corrected:
| Validator | What it checks | Action on failure |
|---|---|---|
| Two-source rule | Every factual claim cites ≥ 2 independent sources | Blocks publish, regenerates |
| Partisan-adjective detector | Blocklist scan ("authoritarian", "corrupt", "savior"...) | Blocks, regenerates without the term |
| Symmetry checker | STRENGTHS and WEAKNESSES have comparable depth (character ratio, bullet count) | Blocks if ratio out of range |
| Cross-source triangulation | Analysis references ≥ 2 of the 3 vectors (market, polls, news) | Blocks, requires explicit citation |
| Data freshness | Ingested data ≤ 48h old | Aborts pipeline if data is stale |
Rules in the prompt (LLM calibration)
The LLM prompt that generates analyses explicitly includes: "do not use partisan adjectives", "attribute motivations only when documented", "flag source disagreements rather than manufacture certainty". This calibration is versioned in git — see lib/ai/prompts.ts — any change requires a reviewed PR.
The 3 honest exceptions where humans intervene
Transparency requires naming the ~5% of cases where humans are unavoidable:
- Source drift. A polling institute stops publishing, a news site changes URLs, a Polymarket event resolves. The pipeline flags this via monitoring; a maintainer updates the country configuration.
- Validator bypass. Rare cases where the generated analysis passes all validators but contains factual error or subtle bias. Readers report via GitHub issue; maintainers investigate and correct (by adjusting the prompt or config, not by editing the individual analysis).
- Legal or ethical emergency. Defamation risk, electoral law violation, coordinated manipulation attempt. Channel: contact@afos-analytics.com. Take-down is possible and documented in a public incident log.
These exceptions are the rare case. The normal case is the pipeline running autonomously 24/7.
Why "zero-touch" is a differentiator, not a limitation
Traditional newsrooms sell "human editorial judgment" as quality. AFOS inverts this: rules in code are more honest because they are:
- Auditable. Any reader can open the repo and see exactly which rule was applied. Impossible in a traditional newsroom.
- Reproducible. Same input generates same output. Guarantees no case gets different treatment based on who was on shift.
- Scalable. 14 countries today, 40 tomorrow, without hiring editors. The newsroom model would die at 20 countries.
- Directly attackable. If you think a rule is wrong, open an issue. If you think the prompt is biased, open an issue. Critique is technical, not subjective.
How to contribute
- 📘 Understand the model: CONTRIBUTING.md — 3 roles, responsibilities, rules
- 🌎 Onboard a country: "Add your country" guide — 5 steps, ~2h, 1 PR
- 🔧 Propose before coding: Country Onboarding template
- 💬 Question or bypass report: contact@afos-analytics.com
The name of the game is connected APIs + rules in code + minimum human intervention. That is how AFOS scales from the Brazil Laboratory to dozens of countries without becoming a newsroom.