Skip to content

feat(candidate-db)!: give each kind of Candidate information one home - #28

Merged
codeotter0201 merged 1 commit into
mainfrom
feat/issue-26-one-home
Nov 12, 2026
Merged

codeotter0201 merged 1 commit into
mainfrom
feat/issue-26-one-home

Conversation

@codeotter0201

Copy link
Copy Markdown
Owner

Summary

Every kind of Candidate information now has one home that SKILL.md names. Each layer refers to the others by id and never copies them, so every session, whichever agent runs it, reads the same evidence and the same rules.

SKILL.md

  • A new Where information lives section with a table of homes and the precedence: Strategy, then Role profile, then Master resume, then Tailored resume. Facts and Sources are the evidence for every layer.
  • Rule 13: agents record Candidate decisions only in the Data folder, never only in their own memory.

Sources stay raw; Import reports hold the analysis

  • Import reports now start with an Analysis section. It holds summaries, timelines, and the arithmetic behind any converted number, together with the Fact that states it.
  • A saved Source is never edited.
  • A Fact is one claim. Implementation details stay in the Source and are reached through at.
  • source github <id> <owner/repo> --issue N --pr N saves issue and pull request text, with their comments and reviews, as GitHub returns them, without summarizing. --issue and --pr repeat, and each refuses the wrong kind of number. A Fact then cites the raw material, such as at: Pull request #12.
  • Commit records are saved as git log output through source add.

Role profiles follow the Strategy

  • role build records a digest of the Strategy's guidance in built_from.
  • role stale and candidate show report strategy.md changed and give the reason. Lines in the Roles section, which the script keeps, do not count.
  • Roles step 3 says the positioning follows the Strategy.

Critiques go through Feedback

  • Tailored resumes: a critique is logged as Feedback with from: user and cause resume-presentation. Its Fix direction is the Strategy change it calls for, and the new rule cites the entry.
  • Master resume: feedback add <id> master and feedback update <id> master <entry> write master-feedback.md.
    • It needs a Master resume and refuses a company_note.
    • It shows in feedback list (as · Master resume) and in candidate show.
    • feedback patterns and Company notes leave it out, because they are about Applications.

Write resumes

  • The Strategy wins over the Role profile's positioning; when they disagree, the agent rebuilds the profile before writing.
  • A bullet may tell one story about one event, and it never joins Facts from different events.
  • The Job's wording may only rename what that event's Facts say.
  • Resumes are written only through resume save.

validate now reports:

  • a Source that has no Import report and answers no follow-up question (— answered in s-…);
  • an Application whose resume exists in one language only;
  • a resume without its PDF.

CONTEXT.md updates Source, Fact, Import report, Strategy and Feedback. README.md and README.zh-TW.md describe the same behavior.

Related Issues

Fixes #26

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Data layout change (existing data folders need migration)
  • Documentation update
  • Refactoring (no functional changes)

Migration of existing Data folders. Nothing is deleted. Run validate <id> and role stale <id>; together they list what a folder still needs.

  1. Sources with no Import report: run import-report and fill it in. For a Source that answers follow-up questions, mark those questions — answered in s-… instead.

  2. Agent-written Sources, such as summaries of a repository:

    • save the raw material they summarize, with source github --issue/--pr or git log through source add;
    • move the analysis into the new Sources' Import reports under Analysis;
    • point the Facts at the raw Sources with fact update.

    The old file stays.

  3. Agent text appended to the user's Source: move it into that Source's Import report under Analysis, so the Source holds only the user's words.

  4. Critiques saved as interview Sources: they stay, and Strategy rules may keep citing them. New critiques go through Feedback.

  5. Resume rules kept in an agent's memory: move them into strategy.md, each citing the Feedback or Source it came from. Leave at most a pointer in memory.

  6. Role profiles: every profile built before this change reports strategy.md changed. Check each positioning against the Strategy and rebuild it with role build.

  7. Resumes in one language or without a PDF: write them again with resume save --replace, or print them with resume pdf.

  8. Import reports without an Analysis section stay valid. Add the section the next time the report is edited.

Validation

All checks ran with a fictional Candidate (Alex Chen, c-001) in a scratch HEADHUNTER_DATA_DIR outside the repository. The GitHub part read this public repository's #24 and #27 with gh. 41 of 41 checks passed:

  • Import and Sources
    • import-report starts with ## Analysis.
    • validate reports source s-001: it has no Import report… before the report exists.
    • An interview Source named by - [x] q-001: … — answered in s-002 passes without a report.
    • An unrelated Source with no report is reported.
    • validate → OK once every Source is processed.
  • source github
    • --pr 24 → is an issue; use --issue. --issue 27 → is a pull request; use --pr. A user target with --issue → need a repository.
    • --issue 24 --pr 27 saved s-004-github-codeotter0201-headhunter-agent-issue-24-pr-27.md as a github Source. It has the ## Issue #24 and ## Pull request #27 headings, the merge date, the description and the comments word for word.
    • A Fact citing at: Pull request #27 was added, and validate → OK.
  • Role profiles
    • profile.md records strategy: in built_from, and a fresh profile is current.
    • A line added to the Roles table leaves it current.
    • A rule added under Resume writing gives strategy.md changed in role stale, and candidate show shows profile stale: strategy.md changed.
    • Rebuilding makes it current again.
  • Master resume Feedback
    • Refused before the Master resume exists.
    • company_note is refused.
    • feedback add c-001 master → fb-001, and master-feedback.md has job: master.
    • feedback list shows master fb-001 … · Master resume, and candidate show lists the open Fix direction.
    • feedback update c-001 master fb-001 sets it to done.
    • validate → OK; with job changed by hand it reports master-feedback.md: job must be master.
  • Application Feedback alongside it: feedback add with a company_note still works. feedback list shows · Fictional Corp, --company Fictional leaves out the Master resume entry, and feedback patterns runs.
  • Resume pairs: a hand-written resume.zh.md alone gives only resume.zh.md exists and resume.zh.pdf missing. With it removed, validate → OK.
  • Regression: the 27 Master resume checks from feat(resume)!: tie the Master resume to Strategy rules and follow-up questions #27 still pass (27 of 27).
  • Other checks
    • claude plugin validate . and claude plugin validate .claude-plugin/plugin.json: passed, with two warnings that were already there: CLAUDE.md is not loaded as plugin context (documented in CONTRIBUTING.md), and the plugin has no icon.
    • python3 -m py_compile skills/headhunter/scripts/hh.py: OK.

Not run:

  • A comparison of Tailored resume output against main. This change does not touch resume save, resume plan or check_resume.
  • A walkthrough through claude --plugin-dir ..
  • validate on a real Data folder, which CONTRIBUTING.md rules out.

Checklist

  • No real candidate data in code, examples, fixtures, screenshots or this PR
  • skills/headhunter/SKILL.md, README.md and README.zh-TW.md updated when behavior or data layout changed
  • Migration for existing data folders described (data layout changes only)
  • Self-review completed
  • Documentation updated (if needed)

🤖 Generated with Claude Code

Every kind of Candidate information now lives in one place that SKILL.md
names, and every layer refers to it by id instead of copying it.

- SKILL.md gains "Where information lives": Sources stay as received,
  analysis goes into Import reports, resume rules into the Strategy,
  critiques into Feedback, and the precedence Strategy, Role profile,
  Master resume, Tailored resume. Agents record Candidate decisions only in
  the Data folder, never only in their own memory (Rule 13).
- Import reports start with an Analysis section for summaries and the
  arithmetic behind converted numbers. A Fact is one claim; implementation
  details stay in the Source and are reached through `at`.
- `source github <id> <owner/repo> --issue N --pr N` saves issue and pull
  request text, comments and reviews as GitHub returns them, so Facts cite
  the raw material, such as `at: Pull request #12`.
- Role profiles record the Strategy they were built from. `role stale` and
  `candidate show` report "strategy.md changed"; the Roles section the
  script keeps does not count. The positioning follows the Strategy.
- Feedback on the Master resume: `feedback add <id> master` writes
  master-feedback.md. It has no company_note, shows in `feedback list`
  and `candidate show`, and stays out of `feedback patterns`.
- Write resumes: the Strategy wins over the Role profile; a bullet may tell
  one story about one event; the Job's wording only renames what that
  event's Facts say. Resume critiques are logged as Feedback, and the
  Strategy rule they lead to cites the entry.
- `validate` reports a Source with no Import report that answers no
  follow-up question, a resume in one language only, and a resume with no
  PDF.

Breaking: existing Data folders may fail `validate`, and every Role profile
built before this change reports "strategy.md changed" until it is rebuilt.
The pull request describes the migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added area/agent-instructions AGENTS.md, CLAUDE.md, CONTEXT.md and skill instructions area/docs README and contributor documentation type/feature New functionality labels Nov 12, 2026
@codeotter0201
codeotter0201 merged commit 994609b into main Nov 12, 2026
1 check passed
@codeotter0201
codeotter0201 deleted the feat/issue-26-one-home branch November 12, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent-instructions AGENTS.md, CLAUDE.md, CONTEXT.md and skill instructions area/docs README and contributor documentation type/feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] One home for each kind of Candidate information

1 participant