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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
PR_BODY.md
.coding_workflow/diffs/
.coding_workflow/skill_results/
.coding_workflow/skill_runtime/

.DS_Store
__pycache__/
Expand Down
89 changes: 0 additions & 89 deletions PR_BODY.md

This file was deleted.

62 changes: 19 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,35 @@

[中文](zh/README.md) | English

This repository root is the English public entrypoint for workflow templates,
user-facing docs, and operations runbooks. After choosing English, stay inside
the `en/` tree except for the shared implementation at
`scripts/sync_coding_workflow.py` and repository-level tests.
This repository publishes bilingual workflow-document templates and the
`workflow-docs-sync` Skill that specializes them against a real target repository.

## Quick Start

Run English workflow docs sync from the target repository root:
Invoke the Skill once. Provide only the target repository, optional language
(`zh` or `en`), and whether to create a draft PR after successful validation.

```bash
curl -fsSL https://raw.githubusercontent.com/wlvh/coding-workflow/main/en/scripts/sync.sh | bash
```text
Use $workflow-docs-sync for /absolute/path/to/repository in English.
Do not create a draft PR.
```

Then follow PASS 1 through PASS 4 in
[en/scripts/OPERATIONS.md](en/scripts/OPERATIONS.md). English sync uses source
templates under `en/`, but installs them into the target repository's canonical
root paths.
The main agent is the only workspace writer. Four domain analyses and the
adversarial audit are read-only; the final checker validates repository state,
not execution history. Upstream checkout and commit resolution are internal.

## Directory Map

- [en/AGENTS.md](en/AGENTS.md): agent entrypoint, file map, coding rules, and document relationships.
- [en/architecture.md](en/architecture.md): architecture, module boundaries, data flow, and invariants.
- [en/capability_contract.json](en/capability_contract.json): machine-readable capability and behavior contract.
- [en/interact.md](en/interact.md): user-visible behavior and acceptance invariants.
- [en/TESTING.md](en/TESTING.md): testing strategy and evidence rules.
- [en/PR_Checklist.md](en/PR_Checklist.md): PR submission, commit, push, and PR body rules.
- [en/SOP.md](en/SOP.md): standard process entrypoints.
- [en/.github/pull_request_template.md](en/.github/pull_request_template.md): English downstream PR body template.
- [en/docs/business_user_guide.md](en/docs/business_user_guide.md): business-user guide.
- [en/docs/development_workflow/README.md](en/docs/development_workflow/README.md): English workflow overview.
- [en/prompts/](en/prompts/): English prompt catalog status.
- [en/scripts/OPERATIONS.md](en/scripts/OPERATIONS.md): English workflow docs sync runbook.
- [en/scripts/sync.sh](en/scripts/sync.sh): English template sync launcher.
- [en/scripts/sync_pr_review_system.md](en/scripts/sync_pr_review_system.md): English independent reviewer prompt.
- [en/](en/): English templates and workflow documentation.
- [zh/](zh/): Chinese source templates, prompts, decisions, and Skill implementation.
- [zh/skills/workflow-docs-sync/](zh/skills/workflow-docs-sync/): single-session orchestration, read-only analysis references, and the deterministic checker.
- [tests/test_workflow_docs_sync.py](tests/test_workflow_docs_sync.py): sync and installer regression tests.

## Install Path Rule

`en/` is an upstream source prefix; it is not installed into the target project.
Sync strips only the leading `en/` and writes the remaining path as-is:
The `zh/` and `en/` directories are upstream source prefixes. The Skill strips
only the selected leading language directory and installs the remaining paths at
the target repository root. Inner paths such as `.github/` remain unchanged.

- `en/AGENTS.md` -> `<target>/AGENTS.md`
- `en/docs/business_user_guide.md` -> `<target>/docs/business_user_guide.md`
- `en/.github/pull_request_template.md` -> `<target>/.github/pull_request_template.md`

The inner `.github` layout is preserved. The rule is prefix stripping only, not
special-case path rewriting.

## Language Policy

Chinese remains the source of truth. English is derived from the Chinese
workflow. When English coverage is pending, mark `en-pending` in the PR body and
avoid exposing untranslated flows as English-ready.

Root `README.md` intentionally mirrors the English entrypoint with
root-relative links, so the repository homepage stays useful without depending
on symlink rendering behavior.
Chinese remains the source-of-truth workflow. English is its derived language
path; unfinished English coverage must be identified explicitly as `en-pending`.
62 changes: 25 additions & 37 deletions en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,45 @@

[中文](../zh/README.md) | English

This directory is the English entrypoint for workflow templates, user-facing
docs, and operations runbooks. After choosing English, stay inside the `en/`
tree except for the shared implementation at `../scripts/sync_coding_workflow.py`
and repository-level tests.
This directory contains the English workflow-document templates. The canonical
single-session Skill is shared from `zh/skills/workflow-docs-sync/` and reads the
selected English templates from the pinned upstream commit.

## Quick Start

Run English workflow docs sync from the target repository root:
Invoke the Skill once and provide only the target repository, optional language,
and optional draft-PR intent:

```bash
curl -fsSL https://raw.githubusercontent.com/wlvh/coding-workflow/main/en/scripts/sync.sh | bash
```text
Use $workflow-docs-sync for `/absolute/path/to/repository` in English.
Do not create a draft PR.
```

Then follow PASS 1 through PASS 4 in
[en/scripts/OPERATIONS.md](scripts/OPERATIONS.md). English sync uses source
templates under `en/`, but installs them into the target repository's canonical
root paths.
The main agent is the only target-workspace writer. Architecture, capability and
user behavior, testing, governance, and adversarial audit analysis are read-only.

## Directory Map

- [en/AGENTS.md](AGENTS.md): agent entrypoint, file map, coding rules, and document relationships.
- [en/architecture.md](architecture.md): architecture, module boundaries, data flow, and invariants.
- [en/capability_contract.json](capability_contract.json): machine-readable capability and behavior contract.
- [en/interact.md](interact.md): user-visible behavior and acceptance invariants.
- [en/TESTING.md](TESTING.md): testing strategy and evidence rules.
- [en/PR_Checklist.md](PR_Checklist.md): PR submission, commit, push, and PR body rules.
- [en/SOP.md](SOP.md): standard process entrypoints.
- [en/.github/pull_request_template.md](.github/pull_request_template.md): English downstream PR body template.
- [en/docs/business_user_guide.md](docs/business_user_guide.md): business-user guide.
- [en/docs/development_workflow/README.md](docs/development_workflow/README.md): English workflow overview.
- [en/prompts/](prompts/): English prompt catalog status.
- [en/scripts/OPERATIONS.md](scripts/OPERATIONS.md): English workflow docs sync runbook.
- [en/scripts/sync.sh](scripts/sync.sh): English template sync launcher.
- [en/scripts/sync_pr_review_system.md](scripts/sync_pr_review_system.md): English independent reviewer prompt.
- [AGENTS.md](AGENTS.md): agent entrypoint, rules, and document relationships.
- [architecture.md](architecture.md): architecture and system-boundary template.
- [capability_contract.json](capability_contract.json): machine-readable capability contract.
- [interact.md](interact.md): user-visible behavior and acceptance template.
- [TESTING.md](TESTING.md): testing strategy and evidence template.
- [PR_Checklist.md](PR_Checklist.md): general PR submission template.
- [SOP.md](SOP.md): standard-process entrypoint template.
- [.github/pull_request_template.md](.github/pull_request_template.md): downstream PR body template.
- [docs/business_user_guide.md](docs/business_user_guide.md): business-user teaching template.
- [docs/development_workflow/README.md](docs/development_workflow/README.md): English workflow overview.
- [../zh/skills/workflow-docs-sync/](../zh/skills/workflow-docs-sync/): canonical Skill implementation.

## Install Path Rule

`en/` is an upstream source prefix; it is not installed into the target project.
Sync strips only the leading `en/` and writes the remaining path as-is:
`en/` is an upstream source prefix, not a target directory. Sync strips only the
leading `en/` and preserves the rest of each path:

- `en/AGENTS.md` -> `<target>/AGENTS.md`
- `en/docs/business_user_guide.md` -> `<target>/docs/business_user_guide.md`
- `en/.github/pull_request_template.md` -> `<target>/.github/pull_request_template.md`

The inner `.github` layout is preserved. The rule is prefix stripping only, not
special-case path rewriting.

## Language Policy

Chinese remains the source of truth. English is derived from the Chinese
workflow. When English coverage is pending, mark `en-pending` in the PR body and
avoid exposing untranslated flows as English-ready.

<!-- en-pending: zh/skills/workflow-docs-sync, zh/skills/workflow-docs-sync-review, zh/scripts/install_skills.py, zh/scripts/OPERATIONS.md, zh/scripts/sync_pr_review_system.md, zh/docs/development_workflow/README.md, zh/docs/development_workflow/decisions.md -->
Chinese remains the workflow source of truth. English is derived; unfinished
coverage must be marked `en-pending` instead of being presented as ready.
30 changes: 20 additions & 10 deletions en/docs/development_workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ only exposes the English path and the current English coverage boundary.
method.
- `Issue`: executable development contract.
- `PR_BODY.md`: local PR body draft generated from `.github/pull_request_template.md`.
- `Workflow Docs Sync`: full reconcile evidence, pass workorder, and sync PR
body skeleton generated by `en/scripts/sync.sh`.
- `Workflow Docs Sync`: one invocation that maps current code, performs four
read-only domain analyses, lets the main agent update documents, runs a
read-only adversarial audit, executes tests, and checks final repository state.

## English Coverage Boundary

Expand All @@ -56,14 +57,23 @@ semantics without updating English, mark `en-pending` in the PR body.

## Workflow Docs Sync

Use [en/scripts/OPERATIONS.md](../../scripts/OPERATIONS.md) for the full sync
runbook. The English launcher uses source files under `en/` and installs them
into canonical target paths by stripping only the leading `en/` prefix.
Invoke `$workflow-docs-sync` once with the target repository, optional `en`
language, and optional draft-PR intent. Upstream checkout and commit resolution
are internal. The main agent is the only workspace writer; domain agents and
the adversarial auditor return read-only findings in the current session.

The deterministic script has only two internal commands: `prepare` installs
missing templates without replacing existing documents, and `check` validates
the final repository state. The entire sync flow neither creates, reads, rewrites,
nor deletes repository-local `PR_BODY.md`. It creates no run records, runs no
target test command, and performs no commit, push, or GitHub operation. If the
user asks for a draft PR, the post-check publishing step uses a temporary
Markdown body outside the repository and the general GitHub publishing ability.

Key implementation files:

- `en/scripts/sync.sh`: English one-shot launcher.
- `en/scripts/OPERATIONS.md`: English runbook and pass prompts.
- `en/scripts/sync_pr_review_system.md`: English reviewer prompt.
- `../../../scripts/sync_coding_workflow.py`: shared implementation.
- `../../../tests/test_sync_coding_workflow.py`: shared regression tests.
- `../../../zh/skills/workflow-docs-sync/SKILL.md`: orchestration contract.
- `../../../zh/skills/workflow-docs-sync/references/sections.md`: four domain analyses.
- `../../../zh/skills/workflow-docs-sync/references/audit.md`: adversarial audit.
- `../../../zh/skills/workflow-docs-sync/scripts/sync_docs.py`: mechanical preparation and check.
- `../../../tests/test_workflow_docs_sync.py`: regression tests.
Loading