Logo di Programming As Theory Building

Programming As Theory Building

Community
AnamKwon
programming-as-theory-building

Use when writing, generating, modifying, debugging, reviewing, or refactoring code. Treat code work as rebuilding and preserving the program theory: how real-world affairs map into program behavior, why the current shape exists, which existing facility the new demand resembles, and what observable behavior proves the change belongs.

Panoramica

AutoreAnamKwon
Repositoryprogramming-as-theory-building-skill
Nome della skillprogramming-as-theory-building
Stelle
33
Fork
2
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da AnamKwon su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Programming As Theory Building in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/AnamKwon/programming-as-theory-building-skill/tree/main/skills/programming-as-theory-building
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnamKwon/programming-as-theory-building-skill.git /tmp/programming-as-theory-building-skill
mkdir -p .claude/skills
cp -r /tmp/programming-as-theory-building-skill/skills/programming-as-theory-building .claude/skills/programming-as-theory-building
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Programming As Theory Building in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Programming As Theory Building non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Programming As Theory Building non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Programming as Theory Building

Operational rules for applying Peter Naur's "Programming as Theory Building" to coding-agent workflows. Use these rules to avoid context-free patches, speculative abstractions, and code that only looks right as text.

Tradeoff: This skill slows down trivial edits. For non-trivial code, pay the small upfront cost so the change fits the program.

Core Idea

Programming is not text production. The useful asset is the theory held by the programmer: how the program execution supports some real-world activity, why the program is shaped this way, and how it should change when the world changes.

Source code, tests, docs, and comments are evidence of that theory, not the theory itself.

Before Coding

Answer these briefly before a non-trivial edit:

  1. World Mapping: What real-world workflow, rule, protocol, or invariant is this code meant to support?
  2. Current Theory: Why is the current code shaped this way? What names, tests, callers, data shapes, or runtime behavior reveal that?
  3. Similarity: Which existing facility is the new demand most similar to? Where would a maintainer who knows the system expect it to live?
  4. Boundary: What real-world cases are intentionally outside this program's scope?
  5. Proof: What behavior, test, command, or review evidence would show the theory is now better supported?

If you cannot answer the first three, inspect more before patching.

Workflow

1. Rebuild Only The Needed Theory

  • Inspect the relevant code path, callers, callees, tests, fixtures, docs, names, and current runtime behavior.
  • Prefer executable behavior over stale comments or stale docs when they conflict.
  • Find at least one concrete example of how the code is used.
  • Keep the theory compact: a few precise sentences, not an architecture essay.
  • State uncertainty instead of hiding it.

2. Judge Similarity Before Placement

Naur's key modification question is not "where can I add this?" but "what existing world-facing capability is this most like?"

  • Put behavior beside the closest existing domain concept.
  • Use existing names, data shapes, validators, repositories, services, routes, UI patterns, and tests when they already encode the idea.
  • Do not duplicate a domain concept under a new name.
  • If the demand does not fit any existing facility, say why before creating one.

3. Keep Changes Surgical

  • Make the smallest coherent change that preserves the theory.
  • Touch only files required by the request.
  • Match local style even if you would design it differently from scratch.
  • Do not reformat, rename, reorganize, or modernize adjacent code as a side effect.
  • Remove only dead code introduced by your change unless cleanup was requested.

4. Avoid Speculative Flexibility

Future flexibility is not free. Every option, config knob, adapter, interface, or abstraction must be designed, implemented, tested, and explained.

  • No abstractions for one caller.
  • No unused hooks, queues, providers, registries, plugins, or settings.
  • No broad "just in case" error handling.
  • Add flexibility only when the present theory already needs it or the local pattern clearly requires it.

5. Preserve Invariants, Not Just Tests

  • Identify the invariant before changing behavior.
  • Do not patch around a broken invariant with a special case.
  • If several implementations pass the same narrow test, choose the one that keeps the design story easiest to explain.
  • Add names, comments, or tests only when they carry theory that would otherwise be hidden.

6. Verify The Theory

  • Bug fix: reproduce the violated invariant, then show it holds.
  • Feature or generated code: verify the user-visible path and one meaningful edge case when practical.
  • Refactor: verify behavior stayed the same.
  • Review: report concrete risks, regressions, and missing tests with file references.

If verification contradicts the theory, rebuild the theory before adding another patch.

Program Life Signals

Treat a program as "alive" when its theory can still be recovered and extended. Treat it as high-risk or "dead" when only text remains.

Stop and gather more context if:

  • the change needs special cases that do not match existing names or boundaries,
  • two areas encode the same domain concept differently,
  • the obvious fix is a broad rewrite or speculative abstraction,
  • the narrow test passes but the design story becomes harder to explain,
  • the code's purpose cannot be mapped back to the real-world activity,
  • the next step requires a product, domain, legal, security, or data decision the code cannot answer.

If the existing text is too far from any recoverable theory, say so. A rewrite may be cheaper than reviving dead code, but only after that risk is explicit.

Review Checklist

When reviewing code, look for:

  • code that satisfies a prompt but not the domain invariant,
  • misplaced behavior that belongs in an existing facility,
  • duplicated domain concepts under different names,
  • speculative flexibility not justified by current requirements,
  • tests that prove syntax or status codes but not the real-world behavior,
  • docs that claim a theory the code does not implement.

Response Shape

For non-trivial work, summarize briefly:

text
Theory: [world rule -> program location]
Changed: [what changed]
Verified: [checks run]
Risk: [meaningful residual risk, if any]

For review-only work, lead with findings and file references. If there are no findings, say so plainly and note remaining test gaps or residual risk.

Domande frequenti

Cosa fa la skill IA Programming As Theory Building?

Use when writing, generating, modifying, debugging, reviewing, or refactoring code. Treat code work as rebuilding and preserving the program theory: how real-world affairs map into program behavior, why the current shape exists, which existing facility the new demand resembles, and what observable behavior proves the change belongs.

Perché usare Programming As Theory Building su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Programming As Theory Building è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Programming As Theory Building in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/AnamKwon/programming-as-theory-building-skill/tree/main/skills/programming-as-theory-building. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Programming As Theory Building?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Programming As Theory Building?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Programming As Theory Building: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Programming As Theory Building è gratuita?

Sì. È pubblicata su GitHub da AnamKwon con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇