Project Context Skill
Maintains docs/ai-context/PROJECT_CONTEXT.md in the target app
repository: a concise map
that prevents future agents from rereading the whole repository. It is not
a code dump, not a Git history, not a feature archive, not a task tracker.
When to Use
- During
initwhendocs/ai-context/PROJECT_CONTEXT.mdis missing → first-time analysis (references/full-project-analysis.md). - During
initorstartwhen it exists → incremental analysis (references/incremental-analysis.md). - During finalization when the approved task changed architecture or navigation → content update per (references/context-update-rules.md).
Inputs
- Target app repository root (from
bin/frappe-workflow detect --json). - Template:
templates/project/PROJECT_CONTEXT.md(plugin repository). - Current HEAD (
git rev-parse HEAD) and, for incremental runs, the recordedanalyzed_commit.
Outputs
docs/ai-context/PROJECT_CONTEXT.mdin the app repository, passingbin/frappe-workflow validate project-context.- Frontmatter with
analyzed_commitset to the commit that was analyzed.
Preconditions
- Detection succeeded; the app root is a Git repository.
- For incremental runs: existing file parses (frontmatter present).
Stopping Conditions
- Validation passes and
analyzed_commitequals current HEAD → done. - The repository has no commits yet → record that, produce the structural
sections from the working tree, set
analyzed_commitafter the first commit exists. - Existing file invalid/obsolete beyond repair → report it and perform one full re-analysis (this is the only case that rereads everything).
Prohibited
- Copying implementation details that reading the referenced file provides.
- Binding the app to a Site here (Site choice is task-level state).
- Updating content when the update-decision question answers "no"
(bumping
analyzed_commitalone is allowed after confirming no content change is needed). - Inventing versions:
frappe_version/erpnext_versioncome from the bench (apps.txt,__init__.pyversions) or are recorded asUnknown.
Shared Rules
shared-workflow-rules.md, frappe-project-detection.md, file-lifecycle.md.