Skip to content

ci: NO-JIRA add doc cleanup tools, sync enforcer, and edit tracker hooks#1125

Open
belumontoya wants to merge 2 commits intostagingfrom
ci/doc-cleanup-tools
Open

ci: NO-JIRA add doc cleanup tools, sync enforcer, and edit tracker hooks#1125
belumontoya wants to merge 2 commits intostagingfrom
ci/doc-cleanup-tools

Conversation

@belumontoya
Copy link
Contributor

🛠️ Type Of Change

  • CI
  • Other (chore)

📖 Jira Ticket

N/A

📖 Description

Adds documentation cleanup and sync tooling for the Dialtone monorepo — a CI workflow, two Claude Code hooks, two commands, one agent, and one skill.

CI Workflow:

  • cleanup-plan-docs.yml — auto-deletes PLAN-*.md and docs/plans/ after a PR merges to staging

Hooks:

  • post-tool-use-tracker.sh (PostToolUse) — silently logs every file edit to .claude/tsc-cache/<session>/, tracks affected packages and their NX build/test commands
  • pre-push-pr-guard.sh (PreToolUse on Bash) — fires on git push or gh pr create, reads the edit log, maps source packages to dialtone-docs content files, runs the doc-sync-enforcer automatically if docs are missing, suggests /doc-janitor on PR creation

Skills/Agents/Commands:

  • doc-sync-enforcer skill + /doc-sync-enforcer command — reads source code changes, maps them to packages/dialtone-docs/src/content/ files, updates the docs to reflect what changed
  • doc-janitor agent + /doc-janitor command — sweeps stale artifacts (session files, backups, done plans) before merging

Other:

  • .gitignore — added work artifact patterns (PLAN-*.md, SESSION_*.md, *.backup, etc.) and .claude/tsc-cache/
  • settings.json — wired both hooks, added Skill(doc-sync-enforcer) and Skill(doc-janitor) to permissions allow list
  • pr-fill.md — added step to suggest /doc-janitor during PR creation

💡 Context

Dialtone is getting a new dialtone-docs package (PR #1051) with AI-discoverable documentation. This tooling ensures those docs stay in sync with source code changes automatically — the hooks detect gaps and the enforcer fixes them before code is pushed.

📝 Checklist

  • I have ensured no private Dialpad links or info are in the code or pull request description (Dialtone is a public repo!).
  • I have reviewed my changes.

🔮 Next Steps

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb8b532e9a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "codex (@codex) address that feedback".

@belumontoya
Copy link
Contributor Author

Ignacio Ropolo (@iropolo) here is the doc tools automation 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant