intent-archaeology
Skill9 starsChanged 6 months agoApache-2.0View on GitHub
Trace the why behind a code-observable fact through git history, PR descriptions, and linked tickets before escalating it to a human. Use at brownfield Stage 1b, and whenever SA brownfield extract or BA Mode E is about to tag an item Confidence: inferred. Produces docs/archaeology-reports/<slug>.intent.md — the evidence that shrinks the Stage 4 human confirmation gate.
In this repository61 other files it gives its agents.
- rules/CLAUDE.mdCLAUDE.md
- acceptance-criteria-authorSkill
- adr-authorSkill
- api-contract-authorSkill
- backend-logging-traceabilitySkill
- ba-design-completenessSkill
- ba-ingestion-pipelineSkill
- ba-iteration-planningSkill
- ba-mode-augmentSkill
- ba-mode-external-sourceSkill
- ba-mode-multi-docSkill
- ba-mode-requirements-folderSkill
- ba-mode-reverse-engineerSkill
- ba-mode-single-docSkill
- ba-post-implementationSkill
- be-framework-coding-standardSkill
- c4-authorSkill
- codebase-inventorySkill
- data-lifecycle-contractsSkill
- design-system-authorSkill
- docker-deploymentSkill
- external-integration-adequacySkill
- fe-framework-coding-standardSkill
- figma-canvas-layoutSkill
- figma-design-handoffSkill
- figma-requirements-extractionSkill
- figma-srs-mappingSkill
- flutter-implementationSkill
- flutter-performanceSkill
- flutter-platform-integrationSkill
- format-boundary-contractsSkill
- git-commitSkill
- incident-debuggingSkill
- kubernetes-deploymentSkill
- local-deploymentSkill
- migration-safetySkill
- observability-readinessSkill
- playwright-authorSkill
- qa-author-by-taskSkill
- qa-author-by-usSkill
- qa-execution-runnerSkill
- react-native-implementationSkill
- react-native-performanceSkill
- react-native-platform-integrationSkill
- release-readinessSkill
- rollback-readinessSkill
- sa-architecture-designSkill
- sa-brownfield-extractSkill
- secrets-config-auditSkill
- security-compliance-checklistSkill
- solution-defaultsSkill
- ssh-remote-operationsSkill
- staging-deploymentSkill
- task-sizingSkill
- <kebab-case-name-matching-folder>Skill
- test-case-authorSkill
- third-party-dependency-evaluationSkill
- ui-test-executionSkill
- ui-ux-page-scopingSkill
- user-story-authorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Use when about to write Confidence: inferred or TODO: <team must confirm> against something observable in code but unexplained by it.
- Distinctive: line 24
When reachable: the PR/MR host and the issue tracker
- Distinctive: line 54
Never write to the codebase or to kit-canonical artifacts.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intent Archaeology (brownfield Stage 1b)
Use
Use when about to write Confidence: inferred or TODO: <team must confirm> against something observable in code but unexplained by it.
.claude/rules/brownfield-onboarding.md §12 names three things code cannot reveal alone — value, intent-vs-accident, and tribal knowledge. Two of the three are frequently in the commit that introduced the line, the PR that merged it, or the ticket it referenced. The code is silent; the history usually is not.
This matters for one reason: the Stage 4 human gate is the binding constraint on brownfield adoption. It consumes senior attention and does not scale with codebase size. Every item resolved here is an item nobody has to be interviewed about, and it converts the expensive question ("explain this to us") into a cheap one ("does this reason still hold").
Inputs
- A probe list: items about to be tagged
inferred, each with a file:line and a searchable literal - Full git history (not a shallow clone)
- When reachable: the PR/MR host and the issue tracker
Outputs
docs/archaeology-reports/<slug>.intent.md— one row per probe: item, file:line, probe literal, verdict, verbatim evidence, reference, date, commands run
Procedure
- Build the probe list. Probe only what would otherwise reach a human: magic constants (timeouts, retry counts, page sizes, thresholds), non-obvious conditional branches, retry/fallback/compensation paths, hard-coded exceptions and allow-lists, idempotency and dedup keys, and public surfaces whose business value is not self-evident.
- Verify history depth.
git rev-parse --is-shallow-repository. A shallow clone returns "not found" for everything — record the limitation in the header rather than emitting a page of false negatives. - Trace the literal, in order until something lands:
git log -S'<literal>' --oneline --all -- <path>(the highest-yield single command in brownfield work);git log -L <start>,<end>:<path>;git blame -L→git show --stat --format=full <SHA>, reading the full commit body, not the subject. Use--followwhere the file has moved; a rename otherwise truncates the trail. - Widen to merge context.
git log --merges --ancestry-path <SHA>..HEAD | head -1yields the merge commit and usually the PR number. Fetch the PR description and linked ticket when the host is reachable — the PR is where a reviewer asked "why this way" and someone answered. - Classify the verdict.
| Verdict | Meaning | Effect on the Stage 4 gate |
documented | a commit body, PR, or ticket states the reason | item becomes "confirm this still holds" |
circumstantial | strongly implied — fix/hotfix typing, an incident reference, an adjacent revert | item reaches the human with a hypothesis attached |
accidental | positive evidence of accident (step 6) | item is proposed for deprecated, not confirmed |
not-found | history silent or unavailable | escalates unchanged; this is the honest outcome and it is common |
- Look for accident markers — the positive signals that let a team prune rather than enshrine: introduced in a
fix/hotfix/revertcommit with no test and no follow-up; an adjacentTODO/HACK/XXX/WORKAROUNDcomment, especially naming a system that no longer exists; untouched since introduction while neighbours moved on; an introducing commit that references an incident; a value changed repeatedly in quick succession and then never again — the signature of tuning under pressure, not a chosen SLA. - Record verbatim with the reference (
<SHA>, PR number, ticket ID, date). Do not paraphrase into a polished value statement. - Write the report, including
not-foundrows — a probed-and-silent item is evidence that the interview question is real, which is worth knowing before the interview is booked.
Hard Rules
- A commit message is not a product owner.
documentedlowers the cost of the human question; it never replaces it. The common failure is a reason that was true in 2021 and quietly stopped being true. Never flipSource: extractedtoconfirmedon history evidence alone. - Verbatim or nothing. A summarized "why" is an inference wearing evidence's clothes, and downstream it is indistinguishable from fabrication.
not-foundis a result, not a failure. Suppressing silent probes makes the gate look smaller than it is.- Never write to the codebase or to kit-canonical artifacts. This skill reads history and writes one audit-trail report.
- Probe selectively. Running this across a whole codebase burns budget on questions nobody was going to ask.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

