skills/sync-docs/SKILL.md
<agentic_guild_skill> <skill_definition> <name>sync-docs</name> <description>Keeps project docs in sync with branch changes and with task memory. Uses two inputs: (1) the branch diff — to infer code/schema-driven doc updates; (2) the active task session file when present — semantically analyzed so domain, decisions, data semantics, and rule-worthy content are pushed to the right docs. Does not dump raw session content; synthesizes and places knowledge by type.</description> </skill_d
npx skillsauth add jdugarte/agentcore skills/sync-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<agentic_guild_skill> <skill_definition> <name>sync-docs</name> <description>Keeps project docs in sync with branch changes and with task memory. Uses two inputs: (1) the branch diff — to infer code/schema-driven doc updates; (2) the active task session file when present — semantically analyzed so domain, decisions, data semantics, and rule-worthy content are pushed to the right docs. Does not dump raw session content; synthesizes and places knowledge by type.</description> </skill_definition>
<state_machine_directives> 1. NEVER execute more than ONE <step> per response. 2. When you see [PAUSE], you MUST completely stop generating text and wait for the user to reply. 3. Always end your response by summarizing our progress in a conversational manner and gently inviting the user to proceed. </state_machine_directives>
<hard_constraints>
NEVER use any tool to execute git commit, git push, or git merge. These commands are STRICTLY FORBIDDEN.
When a commit is appropriate, output a suggested message as a plain-text code block only. The user runs all git commands themselves.
</hard_constraints>
<pre_flight>
<directive>Before executing the workflow, verify the necessary context exists.</directive>
<check>Verify docs/core/SYSTEM_ARCHITECTURE.md and docs/core/SPEC.md exist.</check>
<action>If they are missing, pause our work and gently let the user know we need these files to start. Offer to gracefully initialize the project templates for them. If the user says yes, run sync.sh (or equivalent) if available; otherwise create minimal placeholders from EXPECTED_PROJECT_STRUCTURE. Do NOT hallucinate contents without user confirmation.</action>
</pre_flight>
<session_to_docs> <directive>When an active session file exists, semantically analyze its full content (any structure). Classify fragments by knowledge type and map to the doc(s) below. Do not dump raw session text; synthesize and place. Session structure is free-form; analysis is semantic.</directive> <knowledge_type_map> Domain, entities, invariants, value objects, glossary → SPEC.md; optionally DATA_FLOW_MAP.md (lifecycles). Architectural decisions, path not taken, rejections and rationale → ADRs/. Stack, boundaries, "must not use X", constraints → SYSTEM_ARCHITECTURE.md, .cursorrules. Conventions, patterns, anti-patterns (harvest-worthy rules) → .cursorrules, docs/core/SYSTEM_ARCHITECTURE.md. Data semantics: why and when of data (tables, columns, entities) → SCHEMA_REFERENCE.md (enrichment; structure still from schema file). Testing approach, mocking strategy → TESTING_STRATEGY_MATRIX.md or project testing doc if present. Risks, assumptions, trade-offs → SPEC or ADRs. Open questions, future work → ROADMAP, SPEC, or ADRs. </knowledge_type_map> </session_to_docs>
<workflow> <phase id="1" name="Impact Analysis"> <step id="1.1"> <action> 1. Read the git diff of the current branch against the default branch (e.g. `main`). 2. Use the `view_file` tool to read the "Docs to Sync" table in `docs/ai/EXPECTED_PROJECT_STRUCTURE.md` (or `playbooks/EXPECTED_PROJECT_STRUCTURE.md` if the former is missing) to get the list of docs and their update conditions. 3. Resolve and read session: Use the `view_file` tool to read `.agenticguild/current_state.md` and parse `<active_task_pointer>`. If the pointer contains a session filename (e.g. `task_foo.md`) and the file exists at `.agenticguild/active_sessions/` + that filename, read the entire session file. If no pointer or file is missing, continue with diff-only. 4. Diff-based analysis: For each doc in the table that exists in the project, determine whether the branch diff requires updates based on the condition. Build a diff-derived list: [Doc] → needs update (Yes/No) + reason. 5. Session-based analysis: If a session file was read, semantically analyze the whole session (all sections, any structure). Classify meaningful fragments using the <knowledge_type_map> (domain, decisions, data semantics, conventions/patterns, testing, risks, etc.). For each classified fragment, determine which doc(s) should receive content. Build a session-derived list: [Doc] ← [knowledge type]: brief description of what to add (do not dump raw session text). Include SCHEMA_REFERENCE when the session discusses data (why/when of tables/columns). Include .cursorrules and SYSTEM_ARCHITECTURE for conventions, patterns, anti-patterns. 6. Merge: Combine the two lists. If a doc is touched by both diff and session, mark source "both" and merge reasons. Result: one list per doc with source (diff | session | both) and reason. 7. Report: Output a neat, conversational report: [Doc] → [Needs update: Yes/No] [Source: diff | session | both] + brief reason. Ask the user if they'd like you to proceed with these updates. </action> <yield>[PAUSE - AWAIT USER CONFIRMATION TO PROCEED OR SKIP]</yield> </step> </phase><phase id="2" name="Schema Path Resolution">
<step id="2.1">
<action>
If SCHEMA_REFERENCE.md does NOT need update: [AUTO-TRANSITION TO 3.1]. Otherwise: Resolve the schema file path. Use the `view_file` tool to read `.cursorrules` and look for the `<project_config>` block, specifically "Schema path:".
- If filled in with a valid path: use it and [AUTO-TRANSITION TO 3.1].
- If not filled in: Conversationally suggest the user fill in "Schema path:" in the `<project_config>` block of `.cursorrules` for future runs (see `docs/ai/EXPECTED_PROJECT_STRUCTURE.md` § 5.1). Infer the schema path from common locations (e.g. `db/schema.rb`, `prisma/schema.prisma`, `db/schema.ts`). Output your inferred path.
</action>
<yield>
If schema path was resolved (from project_config or not needed): [AUTO-TRANSITION TO 3.1].
If you inferred the path: [PAUSE] Ask conversationally: "I inferred the schema is at [path]. Does that look right, or is there a different path we should use? We can also skip this for now."
</yield>
</step>
<step id="2.2">
<action>
Parse the user's reply from Step 2.1 to determine their intent. If they confirmed the path or provided a new one: use that path and proceed to 3.1. If they chose to skip: note that SCHEMA_REFERENCE will be skipped for this run; proceed to 3.1.
</action>
<yield>[AUTO-TRANSITION TO 3.1]</yield>
</step>
</phase>
<phase id="3" name="Apply Updates">
<step id="3.1">
<action>
For each doc that needs updates, apply the changes in a single batch using the `replace_file_content` or `write_to_file` tools. Use the merged list from Step 1.1 (source: diff, session, or both).
- **SCHEMA_REFERENCE.md**: Use the schema path resolved in Phase 2 (or skip if user refused). Read the raw schema file and generate the structure (tables, columns, mapping to SPEC). If the session was read and contains data semantics (why and when of data, tables, columns), add those as short semantic notes in the appropriate places (e.g. per table or section). Do not replace structure with session content; enrich the generated doc with session-derived "why/when" where relevant.
- **SPEC.md**: Update domain logic, entities, glossary, or REQ-IDs from the diff and/or session. When source is "both", merge into one coherent update (session gives domain/entities/glossary; diff may add code-implied details). Use session metadata (req_id, roadmap_item) when present. Synthesize; do not paste raw session text.
- **DATA_FLOW_MAP.md**: Update entity lifecycles or side-effects from diff and/or session.
- **ADRs/**: Add or update ADRs from diff and/or session (decisions, path not taken, rationale). Synthesize into concise ADR prose; do not dump raw session.
- **SYSTEM_ARCHITECTURE.md**: Update stack, boundaries, forbidden libs, and conventions/patterns from diff and/or session. Session-derived rules (conventions, anti-patterns) go here.
- **.cursorrules**: When session (or diff) yields conventions, patterns, or anti-patterns, add them in the appropriate project rules section. Align with harvest-rules targets.
Output a helpful summary of what was updated and whether each came from diff, session, or both.
Remind the user conversationally: "Just a heads up, to have more docs updated automatically, you can add them to the 'Docs to Sync' table in EXPECTED_PROJECT_STRUCTURE."
</action>
<yield>[PAUSE - DOCS SYNCED. SKILL COMPLETE]</yield>
</step>
</phase>
</workflow>
</agentic_guild_skill>data-ai
<agentic_guild_skill> <skill_definition> <name>update-agentic-guild</name> <description>Intelligently synchronizes and updates agentic:guild OS components (skills, rules, templates) from the global repository, using AI to merge changes gracefully. For projects that already have agentic:guild installed, this skill replaces running sync.sh manually.</description> </skill_definition> <state_machine_directives> 1. NEVER execute more than ONE <step> per response. 2. When you se
tools
<agentic_guild_skill> <skill_definition> <name>status-check</name> <description>Rehydrates project context and acts as the GPS for agentic:guild execution state.</description> </skill_definition> <state_machine_directives> 1. NEVER generate or modify application code during this skill. 2. Your ONLY job is diagnosis and context rehydration. </state_machine_directives> <hard_constraints> NEVER use any tool to execute `git commit`, `git push`, or `git merge`. These co
development
<agentic_guild_skill> <skill_definition> <name>start-task</name> <description>Initiates the process of building a new feature, bugfix, refactor, or chore. Enforces strict QA discovery, implementation planning, and TDD.</description> </skill_definition> <state_machine_directives> 1. NEVER execute more than ONE <step> per response. 2. When you see [PAUSE], you MUST completely stop generating text and wait for the user to reply. 3. Always end your response by summarizing
data-ai
<agentic_guild_skill> <skill_definition> <name>roadmap-manage</name> <description>Add, prioritize, catalog, and update items in the project roadmap.</description> </skill_definition> <state_machine_directives> 1. NEVER execute more than ONE <step> per response. 2. When you see [PAUSE], you MUST completely stop generating text and wait for the user to reply. 3. Always end your response by summarizing our progress in a conversational manner and gently inviting the user t