# PromptWorks Design ## Purpose PromptWorks is a private Git mirror of Daniel's custom Microsoft Scout skills. It provides version history, a portable backup, and a readable index without copying runtime state or credentials. ## Source and destination - Source: `C:\Users\dkucinski\.scout\m-skills` - Destination: `D:\Repos\PromptWorks` - Remote: `https://git.wucinski.duckdns.org/Daniel/PromptWorks.git` ## Repository layout Each custom skill has a top-level directory named after the skill. It contains `SKILL.md` and any source-controlled helpers it requires, such as PowerShell or JavaScript files and npm manifests/lockfiles. The root contains: - `README.md`: generated table of contents with skill names and descriptions. - `sync-skills.ps1`: repeatable mirror, index-generation, commit, and push operation. - `.gitignore`: defense-in-depth exclusions for generated files and secrets. - `logs\sync.log`: local timestamped sync history, ignored by Git. - `docs\plans\`: design and implementation documentation. ## Sync behavior `sync-skills.ps1` mirrors only approved source file types and paths into the repository. It removes destination files that no longer exist in the allowed source set, regenerates the README, stages changes, and creates a dated sync commit only when the working tree has changes. It then pushes the current branch to `origin`. Every run appends timestamped informational, warning, and error messages to `logs\sync.log`, including its final outcome. The source is authoritative; manual changes inside mirrored skill folders are overwritten on the next scheduled sync. Repository documentation and sync infrastructure are not overwritten. ## Exclusions The mirror excludes generated state and private data, including `skills-metadata.json`, `node_modules`, `.git`, `.pw-profile*`, `.token-cache.json`, browser/cache data, and log files. npm dependencies are reproducible from tracked `package.json` and `package-lock.json` files. ## Scheduling A Windows Task Scheduler task runs the sync script every Sunday at 10:00 AM in the America/Los_Angeles time zone as the built-in `LocalSystem` account, whether or not Daniel is signed in. The task runs independently of the Scout application. Task Scheduler history provides run-level status; `logs\sync.log` provides the detailed local record. The task pushes over HTTPS with a dedicated deploy token that has write access only to PromptWorks. The token is stored in the Windows Credential Manager context for `LocalSystem`, keyed to `git.wucinski.duckdns.org`; it is not stored in the repository, script, task arguments, environment variables, or log. A one-time elevated setup action provisions this machine-local credential before the scheduled task is enabled. ## Validation Implementation validation will confirm that the repository contains all custom skills and intended helpers, excluded paths are absent, the generated README includes every skill, `origin` matches the approved URL, the task runs as `LocalSystem`, each run writes an ignored log entry, and a no-op rerun produces no commit.