Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Update them using ./build.ps1 Update -WhatIf, then ./build.ps1 Update on a revie
For first installation, use the remote bootstrap command documented in the platform README.

Shared skills are in .agents/skills. To load the installed Core module in PowerShell:
$platform = ./.OpenGuidePlatform/Resolve-OpenGuidePlatform.ps1 -WorkspaceRoot $PWD
$platform = ./.OpenGuidePlatform/Resolve-OpenGuidePlatform.ps1 -WorkspaceRoot $PWD -UseInstalled
Import-Module "$platform/system/OpenGuidePlatform.PowerShell.Core/OpenGuidePlatform.PowerShell.Core.psd1"
Run Prepare and use its generated discovered-site.json inventory for Core operations. Review any intended publishing change before applying it.
For source-language guide body corrections, use Get-GuideContent to select the discovered guide, edition and its source language; use Set-GuideContent with the reviewed SHA-256 and candidate body. For translated documents, including typo fixes, use Set-GuideTranslation with that edition's reviewed source and target hashes. Translation availability is per edition: never infer, create or require a translation in another version merely because it exists in the selected version. Front matter and protected resources must remain intact. Follow the complete human-operated workflow in the installed Core README; the same commands and build checks apply with or without an agent.

These instructions guide Codex, Claude and GitHub Copilot; they do not enforce permissions.
Independent managed agent controls remain an explicit adoption blocker.
16 changes: 9 additions & 7 deletions system/OpenGuidePlatform.Agents.Integration/skills/USAGE.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# Using the shared publishing commands

Preview installation distributes these skills through bootstrap.ps1. In the consumer root, run $platform = ./Resolve-OpenGuidePlatform.ps1 -WorkspaceRoot $PWD and import "$platform/system/OpenGuidePlatform.PowerShell.Core/OpenGuidePlatform.PowerShell.Core.psd1". Stable adoption and independent agent controls remain unfinished in E07/E08. Do not import an arbitrary globally installed Core version or invent policy from test fixtures.
Installation and Update distribute these skills and the matching Core module. Follow the "Correct an existing guide" workflow in the resolved package's `system/OpenGuidePlatform.PowerShell.Core/README.md` for module loading, discovery, exact selection, editing and verification. The same commands work without an agent. Do not import an arbitrary globally installed Core version or invent inventory from test fixtures.

In the platform development checkout, load `system/OpenGuidePlatform.PowerShell.Core/OpenGuidePlatform.PowerShell.Core.psd1`. In an adopted site, load Core through its version-locked bootstrap. Set WorkspaceRoot to the consumer repository root and load its reviewed site policy with `Import-GuidePolicy -Path $PolicyPath`.
In an adopted site, resolve `$platform` through `./.OpenGuidePlatform/Resolve-OpenGuidePlatform.ps1 -WorkspaceRoot $PWD -UseInstalled`, then import Core from that package. Run Prepare with a fresh output directory and `-PlatformSource Path -PlatformPath $platform` to use that same version. Load `<output>/discovered-site.json` with Import-GuidePolicy. Keep WorkspaceRoot set to the consumer repository root. Explicit policy inputs remain supported for callers that use them; ordinary contributors use discovery.

Site policy describes an unrestricted collection of guides; counts in fixtures are examples. Core decisions have no agent dependency. Agent instructions do not grant write authority or replace the independent E06 gate. Mutation commands support WhatIf and refuse protected resources under the supplied policy.
The discovered inventory describes an unrestricted collection of guides; counts in fixtures are examples. Core decisions have no agent dependency. Agent instructions do not grant write authority. Independent enforcement requires an externally configured AgentControls evaluator or managed client; installation alone does not enable it. Mutation commands support WhatIf and refuse protected resources under the supplied policy.

Use the shared Prepare report for readiness. Core supports reviewed wrapper Markdown, YAML catalogue and language-configuration edits; preserve the consumer's multilingual structure and bespoke wrapper. Build wiring for PDF environment receipts belongs to E04.
Use the shared Prepare report for readiness. Core supports reviewed wrapper Markdown, YAML catalogue and language-configuration edits; preserve the consumer's multilingual structure and bespoke wrapper. Prepare validates declared generated-PDF receipts; generation and receipt recording are explicit operations.

## Readiness shared with Prepare

For translation status, creation and reconciliation, run the installed consumer entry point and read its report. This uses exactly the same effective Hugo catalogues, fallback observations and Core decisions as CI:

```powershell
$readinessOutput = '.processing/translation-status/' + [guid]::NewGuid().ToString('N')
./build.ps1 -Stage Prepare -Target preview -OutputPath $readinessOutput
./build.ps1 -Stage Prepare -Target preview -OutputPath $readinessOutput -PlatformSource Path -PlatformPath $platform
```

Even when Prepare fails, inspect `$readinessOutput/prepare/assessment.json` and `assessment.md` if they exist. Report the outcome, wrapper findings and the selected guide/edition/language inventory. Missing reports or effective evidence are blocked/unknown, never a substitute local-only pass. Required runtime routes/integration points remain pending Build/Validate; text resolution is not translation quality or complete plural-form coverage.

Get-GuideInventory and Get-GuideWrapperStatus are useful detailed diagnostics. A local catalogue-only observation must not replace the effective readiness result above. The platform development equivalent is `./build.ps1 -Product GuideSite -PolicyPath <reviewed-policy> -Stage Prepare -Target preview -OutputPath <fresh-output>`.
Get-GuideInventory and Get-GuideWrapperStatus are useful detailed diagnostics. Get-GuideContent provides exact guide/edition/language selection for content corrections. A local catalogue-only observation must not replace the effective readiness result above. The platform development equivalent is `./build.ps1 -Product GuideSite -SourcePath examples/reference-guide-site -Stage Prepare -Target preview -OutputPath <fresh-output>`.

## Reviewed wrapper translation edits

For guide translation creation and reconciliation, read `system/OpenGuidePlatform.PowerShell.Core/TranslationReadiness/README.md` in the resolved package. Get-GuideTranslationWork reports source/target content and optional explicit Git comparisons; New-GuideTranslation starts scaffolding; Test-GuideTranslation checks candidates; Set-GuideTranslation applies against reviewed source/target hashes. Both humans and skills use these commands. Refresh Prepare after scaffolding rather than editing discovered inventory. Source comparisons are review evidence, not inferred translator provenance.

Use Set-GuideWrapperTranslation for exact candidate text in a language-specific wrapper Markdown file, its i18n YAML catalogue, or a selected language entry in hugo.yaml/hugo.production.yaml. Supply WorkspaceRoot, Policy, Language, RelativePath and CandidateContent. Existing files require their reviewed ExpectedSha256; scaffolding never silently replaces a populated file. The command checks supplied protected-path policy and refuses guide content.

For a new language, first apply a reviewed production configuration candidate with that language disabled, then its main language configuration and wrapper/catalogue files. Configuration edits preserve all unrelated settings and other languages. Preserve the site's existing wrapper paths, metadata, rendering conventions and existing legacy aliases; do not create new shared download aliases. Translate the candidate text within the requested scope rather than inventing a universal wrapper layout.

Each file operation supports WhatIf and publishes through a staged write. Several files are not one transaction: inspect partial progress if an operation fails and rerun Prepare before claiming readiness. Resolved hashes prevent observed stale edits; cooperative locks are not independent enforcement. Run Build/Validate after the complete reviewed change.
Each file operation supports WhatIf and publishes through a staged write. Several files are not one transaction: inspect partial progress if an operation fails and rerun Prepare before claiming readiness. Resolved hashes prevent observed stale edits; cooperative locks are not independent enforcement. Run Build/Validate after the complete reviewed change.
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
name: guide.transcreate
description: "Scaffold an empty guide translation while preserving existing content and production exclusion."
description: "Create a guide translation from discovered source content, or create only an empty scaffold when requested, using shared PowerShell checks and publishing workflows."
---

Read [Core usage](../USAGE.md). Select the consumer's declared guide and edition and the requested language; do not assume English or a latest/ directory.
Read [Core usage](../USAGE.md). Follow the resolved package's `system/OpenGuidePlatform.PowerShell.Core/TranslationReadiness/README.md` for the same complete procedure available without an agent.

Run `New-GuideTranslationScaffold -WorkspaceRoot $WorkspaceRoot -Policy $policy -GuideId $GuideId -EditionId $EditionId -Language $Language` for the explicitly selected editions. Existing files are preserved. The operation requires an explicit disabled production language entry before it creates anything. If that prerequisite is missing, report the exact configuration change needed; never enable production as a workaround.
Select the actual guide, edition and requested language from discovery and user intent. Use Get-GuideTranslationWork to inspect the source, existing target, wrapper observations, downloads and remaining work. Never assume English, a latest/ directory or a fixed guide count.

New files contain source front matter and an empty body. Translate metadata only within the user's requested scope; never copy/translate the guide body as scaffolding. Do not add lang front matter or language-prefix existing aliases. The historical /download/, /downloads/ and /translationsdirectory/ aliases remain only where already implemented; do not copy them into new language scaffolds or require them for new languages. Preserve existing legacy declarations and unrelated guide-specific aliases. Keep structural metadata, fonts, slugs and edition relationships intact. Create and reconcile bespoke-wrapper/catalogue/configuration candidates with Set-GuideWrapperTranslation following [Core usage](../USAGE.md). Keep production disabled and use the existing wrapper conventions; guide scaffolding alone is not a complete wrapper translation.
Use New-GuideTranslation for an absent target. It delegates to the retained New-GuideTranslationScaffold, requires explicit production exclusion and preserves existing content. If the request is only for scaffolding, leave the body empty. If the request authorizes a translation, refresh Prepare, start a candidate from the discovered target and translate against the source. A missing production exclusion requires the scoped configuration prerequisite; never enable production as a workaround.

Run the shared Prepare readiness procedure in Core usage, then Build/Validate after the complete change. Report remaining findings from the same assessment as CI.
The candidate may translate the body, title, description and summary. Preserve structural/custom metadata, aliases, fonts and edition relationships. Do not add lang or extend legacy shared download aliases. Use Test-GuideTranslation and review its findings, source/candidate outlines and the actual language. Preserve links, shortcodes, code examples and deliberate multilingual behavior. Source-identical passages are a review signal, not permission to delete content.

Apply authorized candidates through Set-GuideTranslation using the source and target hashes captured before editing. A stale input requires reconciliation, not a new hash applied to an old candidate. Existing populated translations should be revised only within the user's requested scope; use source comparisons where relevant.

Use Set-GuideWrapperTranslation for authorized wrapper/i18n/configuration work. Preserve supplied/protected PDFs; generated PDFs use the existing explicit plan, generation and receipt workflow. Rerun Prepare and full preview/production builds and inspect rendered output. Report changed files, editorial limitations, verification results and remaining work separately. A candidate check never certifies translation quality or approves publication.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
name: guide.transreconcile
description: "Audit guide translations and optionally create missing scaffolds without replacing populated translations."
description: "Audit translation readiness or reconcile an existing guide translation against an explicitly selected source revision, preserving translated content and publication intent."
---

Read [Core usage](../USAGE.md) and follow its shared Prepare readiness procedure. Default to reporting. An explicit repair request authorizes the scoped repair operations.
Read [Core usage](../USAGE.md). Follow the resolved package's `system/OpenGuidePlatform.PowerShell.Core/TranslationReadiness/README.md`. An audit remains read-only; an explicit repair or translation-update request authorizes scoped edits.

For authorized missing guide scaffolds, use `New-GuideTranslationScaffold` with explicit guide, edition and language. It preserves existing files and requires production to be explicitly disabled for new scaffolds. A populated translation is not an accidental English copy merely because it has text. Do not delete its body.
Use Get-GuideTranslationWork for the selected guide, edition and language. For source-change reconciliation, obtain the user's explicit comparison revision or an already agreed revision from task context and pass SourceRevision. If missing, ask for the comparison point while continuing the readiness audit. Do not infer the last translated source revision from file dates, Git history or a populated body. If the source moved, use its explicitly identified SourcePathAtRevision; do not silently select another guide.

Do not add lang front matter, prefix aliases automatically, reorder languages by global speaker counts, or enable production. Use Set-GuideWrapperTranslation for reviewed wrapper/i18n candidates following Core usage; existing files require the reviewed source hash. Report unresolved findings after Prepare rather than inferring readiness from file creation. Supplied PDFs and declared fallbacks remain valid.
Review the historical/current source diff alongside the existing target. Start the candidate from the target, preserving useful translated passages and incorporating only authorized changes. Use Test-GuideTranslation to check metadata/body constraints and inspect review findings. Heading differences and source-identical passages are not grounds for automatic deletion. The check does not establish semantic accuracy or full Markdown correctness.

Rerun inventory and the consumer build after authorized edits. Report what was created, what was preserved, and what remains unresolved.
Apply with Set-GuideTranslation using the captured source and target hashes and resolved comparison commit/path. Preserve all metadata except authorized title, description and summary translations. Never add lang, prefix aliases automatically, reorder languages by popularity, or enable production. Report the comparison used as evidence of this review, without claiming it was the translation's prior baseline.

Follow Core usage for effective Prepare evidence. Get-GuideWrapperStatus is an additional diagnostic; local-only catalogue findings must not replace the shared assessment.
For an authorized missing translation, use New-GuideTranslation and refresh Prepare before applying content. New-GuideTranslationScaffold remains available for scaffold-only repairs. Existing populated targets are preserved by creation operations.

Review wrapper/i18n and download findings. Use Set-GuideWrapperTranslation for scoped wrapper candidates. Preserve supplied PDFs and declared fallback/PDF-only intent. Rerun Prepare and both target builds after the complete change, inspect rendered output, and report completed changes, unresolved findings and remaining editorial review separately. The commands do not deploy or approve production publication.
Loading
Loading