AIPM
Theme

AIPM package

Grounding Before Coding

@riekelt/grounding-before-coding@1.0.0

Investigating a bug, or working in unfamiliar code - before the first line is written.

Scanned · no issues · Nov 28, 2026

GitHub stars: ★ 6

LinkedInPost

Install Skill

Pins this version in aipm.package.json and aipm-lock.json.

aipm add @riekelt/grounding-before-coding@1.0.0

Without project tracking

Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.

aipm add @riekelt/grounding-before-coding@1.0.0 --no-init

How to use

Install the skill above, then run this in your AI tool:

/grounding-before-coding <your description>

About

**REQUIRED BACKGROUND:** the `principal-engineering` skill.

Source

What gets added to your project

Preview every file this package writes on install before you run the command above.

Summary

Use when starting any non-trivial change, investigating a bug, or working in unfamiliar code - before the first line is written. Also use for pure investigation with no change planned yet - \"dig into this\", \"figure out why\", \"someti...

Skill instructions

Grounding before coding

REQUIRED BACKGROUND: the principal-engineering skill.

Overview

Before writing a spec, a fix, or a first line: map the real code and data. Quote file:line and run the query behind every number you rely on.

The discipline

  1. Read the implementations, not the names. A method called validate that does not validate is the default assumption. Verify what a thing does before building on what it is called.
  2. Quote your evidence. Every load-bearing claim in your plan gets a file:line, an exact query result, or a command output. When you cannot back a claim, say so out loud instead of assuming it.
  3. Never guess conventions. How this repo names things, wires dependencies, handles errors, or runs tests is discoverable in minutes.
  4. Trust code, not status. A document's or ticket's self-reported state is not evidence of execution state; adjudicate with the code and the history (git log -S <symbol>, grep the tree) before building on it.
  5. Reproduce before fixing. For bugs: see the failure happen before changing anything.
  6. Fix where the callers converge. A bug report names one symptom on one path; before editing, find every route into the code you are about to touch. When the defect lives in something shared, the guard belongs in the shared place: it is the smaller diff AND the fix that covers the sibling paths the ticket never mentioned. Patching only the reported path repairs the report, not the bug.
  7. Map the invariants a change must not break. The output of grounding is a map: the touchpoints, the current behavior (quoted), and those invariants. Tests named after old bugs, guards with explanatory comments, and constants encoding hard-won thresholds mark earlier incidents.

Limits of grounding

  • Not reading everything: map what the change touches plus one ring around it, at the depth the risk demands.
  • Not a substitute for asking: when the code cannot answer an intent question (why is this threshold 7?), the history or the owner can. An unanswerable question becomes a named assumption, never a silent one.
  • Not re-grounding what this session already established: ground once, cite it after.

Common mistakes

  • Theorizing from the framework's documentation about what the project's code does. The project forked, wrapped, or misused the framework; the tree tells you which.
  • Grounding the happy path only. The invariants live in the error paths and the edge-case guards.
  • Trusting a prior session's summary of the code over the code. Open the files the summary names before building on it.
  • Skipping grounding because the task "looks like" a previous one. The signal that pattern-matches a known case may have a different cause; check that the evidence supports this case.

Loading package files…

Share this package

Add an Install with AIPM badge

Add this badge to a GitHub README so readers can open the package page and install the same version.

Install with AIPM
[![Install with AIPM](https://www.aipm-registry.com/install-with-aipm.svg)](https://www.aipm-registry.com/skills/riekelt/grounding-before-coding/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)

Publisher

riekelt

This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.

AI assistant context

What this skill is for

@riekelt/grounding-before-coding@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: Use when starting any non-trivial change, investigating a bug, or working in unfamiliar code - before the first line is written. Also use for pure investigation with no change planned yet - \"dig into this\", \"figure out why\", \"someti...

Install
aipm add @riekelt/grounding-before-coding@1.0.0
Use after install
/grounding-before-coding <your description>

Tool targets

Install command by target

Add --no-init to any of these when you want the skill files without aipm.package.json or aipm-lock.json.

cursor

Run this variant when you want to install the package into cursor.

aipm add @riekelt/grounding-before-coding@1.0.0 --target cursor --ci

claude

Run this variant when you want to install the package into claude.

aipm add @riekelt/grounding-before-coding@1.0.0 --target claude --ci

Discussion

Comments (0)

Loading comments…

Keep exploring

riekelt/writing-issues

Load when writing or refining tracker items: epics, stories, tasks, bug reports, spikes, or acceptance criteria, including breaking a request, discussion, or plan into tickets. Builds on technical-writing: load both.

Published by @riekelt

skillScanned · no issues★ 43Imported · UnverifiedAll toolsDec 2, 2026, 12:22 AM3.28 KBMIT

riekelt/documenting-contracts

Load when documenting an interface other systems depend on: HTTP or RPC endpoints, webhooks, event and message payloads, or file formats, for the callers who integrate with it. Not for internal code interfaces. Builds on technical-writin...

Published by @riekelt

skillScanned · no issues★ 43Imported · UnverifiedAll toolsDec 2, 2026, 12:22 AM3.35 KBMIT

riekelt/recording-decisions

Load when a decision already made needs a durable record: an ADR, a decision log entry, why one option beat the alternatives, or a reversal of an earlier decision. Not for a choice still under debate. Builds on technical-writing: load both.

Published by @riekelt

skillScanned · no issues★ 43Imported · UnverifiedAll toolsDec 2, 2026, 12:22 AM2.46 KBMIT

Package FAQ

Install and compatibility

How to install
Run aipm add @riekelt/grounding-before-coding@1.0.0 in a project that has AIPM initialized.
Supported tools
@riekelt/grounding-before-coding@1.0.0 supports All tools.

Before installing

AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.