Skip to main content
Jimmy Wang
Back to list

Aug 2024

PnKU Puzzle Archive and Agent Migration Workflows

A Docusaurus archive combining editorial SOPs, a template CLI, and reusable agent skills. Workflow development and migration of 100+ WeChat articles took two days; stakeholder acceptance review remains ongoing.

  • Docusaurus
  • TypeScript
  • MDX
  • CLI
  • Agent Skills

Project background

I began building the PnKU archive with Docusaurus in August 2024 to preserve puzzles and solutions from past events. In January 2025, I began migrating articles from the Peking University Puzzle Club’s WeChat official account.

The account publishes a weekly single-page puzzle series, 《谜色星期五》, and an occasional pencil-and-paper logic puzzle series, 《执笔成谜》. Players verify answers through WeChat auto-replies. As historical puzzles accumulated, the limit on auto-reply entries created a maintenance constraint. The archive provides long-term access and turns answer checking, hints, and solutions into web interactions.

Editorial SOPs and a template CLI

During manual migration, I wrote editorial SOPs and MDX templates defining metadata fields for puzzle numbers, titles, authors, and dates, alongside puzzle, hint, and solution sections. A template CLI initializes an article and its asset directory by series and number, replacing number placeholders automatically. Repeated calls support batch initialization; metadata and content are then filled from the original sources.

This reduced repetitive file creation and page setup while giving agents a consistent format and an existing tool to use.

Agent workflow design

During a two-day upgrade in October 2026, I added AGENTS.md and combined the SOPs, CLI, and series-specific rules into two reusable migration skills. The workflows cover:

  • Source inventory and matching: identify articles using source identifiers, titles, and dates; match later solutions and corrections to original puzzles, including cross-batch cases, collections, and multiple solutions.
  • Page composition: organize metadata and image assets, integrate answer checks, collapsible hints and solutions, and step carousels where applicable, while preserving attribution and answer submission rules.
  • Exceptions and handoff: record missing assets, unconfirmed answers, source mappings, and pending checks so work can resume without guessing missing content.
  • Verification requirements: specify build, resource-reference, interaction, and source-comparison checks, then update the skills when actual failures reveal gaps.

The skills and reference materials live in the repository so other agents can reuse them without relying on a particular conversation. Puzzle content, hints, and solutions come from the original sources; my contributions are archive development, migration tooling, and workflow design.

Migration output and acceptance review

Workflow development and migration of 100+ articles took two days, averaging approximately 50 articles per day compared with about eight per day through the previous manual process. The two days include development and migration, but exclude subsequent stakeholder acceptance review. The comparison measures migration-stage output.

Peking University Puzzle Club members conduct manual review. As of October 8, 2026, they had reported two Markdown syntax issues; both were fixed, and the handling rules were incorporated into the skills. Acceptance review remains ongoing, with more members being recruited to review in parallel. The issues reported so far do not establish an overall accuracy rate or imply completed acceptance.