Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
75f67e7
feat: add versioned PHP tutorials with interactive WASM examples
glassmonkey Oct 28, 2026
976ff68
ci: verify tutorial PR against master
glassmonkey Oct 28, 2026
d9a6b2f
style: align tutorial controls and colors with Playground
glassmonkey Oct 28, 2026
9439080
feat: generate tutorial sitemap and canonical page metadata
glassmonkey Oct 28, 2026
6491e53
style: link tutorial from Playground introduction
glassmonkey Oct 28, 2026
feefc61
fix: serve sitemap in development and align tutorial navigation
glassmonkey Oct 30, 2026
4712d35
style: invite readers to learn PHP in navigation
glassmonkey Oct 30, 2026
562e9af
docs: introduce interactive tutorials in About section
glassmonkey Oct 30, 2026
e0b9824
fix: render tutorial canonical and metadata in development HTML
glassmonkey Oct 30, 2026
f96a2f0
feat: build tutorial OGP images from structured lesson data
glassmonkey Oct 30, 2026
d758718
style: highlight hands-on learning in tutorial share images
glassmonkey Oct 30, 2026
1897400
fix: report PHP runtime failures in tutorial runs
glassmonkey Oct 30, 2026
18c1662
fix: preserve authoring harness and align tutorial version guidance
glassmonkey Oct 30, 2026
bc662dd
feat: structure tutorial learning intent and authoring review
glassmonkey Oct 30, 2026
6af4618
docs: split PHP tutorial skills by authoring workflow
glassmonkey Oct 30, 2026
c19bc87
docs: use English for PHP tutorial skill instructions
glassmonkey Oct 30, 2026
0c06dc6
test: verify tutorial contracts with independent expected behavior
glassmonkey Oct 30, 2026
7df2bb8
test: verify complete tutorial contracts across every runtime
glassmonkey Oct 30, 2026
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
20 changes: 20 additions & 0 deletions .agents/skills/php-tutorial-authoring/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: php-tutorial-authoring
description: Add or revise PHP tutorial lessons within the existing chapter design, including examples, experiments, learning notes and fixtures. Use for lesson writing, not curriculum redesign or read-only review.
---

# Add and revise lessons

Use this skill for requests such as “add a lesson to the existing variables chapter” or “revise an Experiment and its learning notes.”

Add or revise learner-facing explanations, Examples, Experiments, learning notes, references, and required fixtures. A lesson that fits the existing chapter criteria can be completed here. If the task requires changing chapter boundaries or learning order, report the need and impact for a curriculum decision.

## Workflow

Read the [shared contract](../../tutorial/contract.md), then follow [lesson authoring](../../tutorial/lesson-authoring.md). Use [learning design](../../tutorial/learning-design.md) for educational information and [validation](../../tutorial/validation.md) for checks and generated assets. Read conditional details, such as checker evaluation or compatibility, only when the linked procedure applies.

## Deliverables and completion

Deliver the lesson, program, learning-note, and required per-version fixture changes. Complete the task when they fit the existing chapter boundaries and prerequisites, and structural, WASM, semantic, and generated-asset checks cover the target versions. Report affected versions/slugs, primary sources, execution results, and unverified scope.

Use the [lesson prompt](prompts/add-lesson.md) for request examples. Only when switching to another task, select its skill from the [entry-point list](../../../doc/tutorial/README.md).
3 changes: 3 additions & 0 deletions .agents/skills/php-tutorial-authoring/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface:
display_name: "PHP Tutorial Authoring"
short_description: "Write and revise PHP tutorial lessons"
9 changes: 9 additions & 0 deletions .agents/skills/php-tutorial-authoring/prompts/add-lesson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Add or revise a lesson

Use `$php-tutorial-authoring` for a lesson within the existing chapter design.

- Topic / existing slug: `<scope>`
- Target versions: `<from the code registry>`
- Prerequisites and observable learning goal: `<intent>`

Follow this skill's [entry point](../SKILL.md) and its relevant shared references. Deliver the lesson/program/learning-note changes, required fixtures and validation evidence. Report if the task requires changing chapter boundaries rather than silently expanding the scope.
20 changes: 20 additions & 0 deletions .agents/skills/php-tutorial-curriculum/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: php-tutorial-curriculum
description: Design PHP tutorial chapters, learning order, lesson splits or relocation, with prerequisite and URL impact analysis. Use when chapter boundaries or sequence change, not routine lesson additions.
---

# Design the curriculum

Use this skill for requests such as “reconsider the chapter structure,” “split an overloaded lesson,” or “change the learning order.” It handles decisions about chapter boundaries and placement.

Define what each chapter includes and excludes, its prerequisites, what it enables next, lesson placement, and effects on existing URLs. Follow the request's scope for design-only work versus implementation. Do not turn an ordinary lesson addition within an existing chapter into mandatory curriculum redesign.

## Workflow

Read the [shared contract](../../tutorial/contract.md) and [curriculum design](../../tutorial/curriculum.md). Read [learning design](../../tutorial/learning-design.md) when evaluating lesson goals/prerequisites and [validation](../../tutorial/validation.md) when implementing changes. Do not load every other task's SKILL.md.

## Deliverables and completion

Deliver chapter boundaries, prerequisite order, split/placement options, URL impact, and the reasoning for the decision. If implementation is requested, include catalog/dependency changes, required route changes, and checks for affected versions. Complete the task when the requested proposal or implementation is ready and URL preservation/migration and unverified scope are explained.

Use the [curriculum prompt](prompts/plan-curriculum.md) for request examples. Only when switching to another task, select its skill from the [entry-point list](../../../doc/tutorial/README.md).
3 changes: 3 additions & 0 deletions .agents/skills/php-tutorial-curriculum/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface:
display_name: "PHP Tutorial Curriculum"
short_description: "Design PHP chapters and learning progression"
10 changes: 10 additions & 0 deletions .agents/skills/php-tutorial-curriculum/prompts/plan-curriculum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Plan the curriculum

Use `$php-tutorial-curriculum` to review chapter boundaries, learning sequence or a lesson split.

- Target topics and learner prerequisites: `<scope>`
- Problem with the present sequence: `<evidence>`
- Requested deliverable: `<design proposal / implementation scope>`
- URL constraints: `<existing links to preserve>`

Follow the common references linked from this skill's SKILL.md. Report chapter inclusion/exclusion, prerequisites, subsequent learning, placement alternatives, version impact and URL preservation/redirect implications. Change chapters, lessons or routes only within the requested implementation scope.
20 changes: 20 additions & 0 deletions .agents/skills/php-tutorial-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: php-tutorial-review
description: Review PHP tutorial PRs, content and reference consistency read-only; report evidence-based findings about goals, prerequisites, versions, sources and runtime verification. Do not implement fixes implicitly.
---

# Review content without editing

Use this skill for requests such as “review this tutorial PR” or “check that the explanations match their references.” It returns evidence-based feedback.

Inspect content, code, references, and verification evidence read-only, and return findings and recommended corrections. Do not edit content/fixtures/configuration, rewrite solutions, commit, or push. If the user explicitly changes the role to implementation, establish the scope as the corresponding production task.

## Workflow

Read the [shared contract](../../tutorial/contract.md) and [review criteria](../../tutorial/review.md). Follow their links only for details relevant to the diff; do not load all authoring, versioning, and curriculum SKILL.md files.

## Deliverables and completion

Deliver findings with severity, affected location/version, evidence, impact, and recommended correction. Complete the review by distinguishing confirmed findings from unverified candidates and stating the checked scope and unperformed work. If there are no concrete findings, say so; implementing corrections is not a review completion condition. Evaluating skill generation performance is a separate task.

Use the [review prompt](prompts/review.md) for request examples. Only when switching to another task, select its skill from the [entry-point list](../../../doc/tutorial/README.md).
3 changes: 3 additions & 0 deletions .agents/skills/php-tutorial-review/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface:
display_name: "PHP Tutorial Review"
short_description: "Review PHP tutorial changes without editing"
8 changes: 8 additions & 0 deletions .agents/skills/php-tutorial-review/prompts/review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Review tutorial content

Use `$php-tutorial-review` to review the change read-only and return feedback.

- PR / diff / branch: `<target>`
- Affected versions, lessons and review focus: `<scope>`

Follow this skill's [entry point](../SKILL.md) and only the shared references relevant to the diff. Report actionable findings with severity, file/version, evidence, impact and recommended corrections. Distinguish unverified behavior from confirmed problems; do not implement corrections.
20 changes: 20 additions & 0 deletions .agents/skills/php-tutorial-versioning/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: php-tutorial-versioning
description: Adapt PHP tutorial content to a new PHP version or fix compatibility in existing versions; update latest only when requested. Use for curriculum compatibility, not automatic runtime infrastructure changes.
---

# Support PHP versions

Use this skill for requests such as “support the new PHP version,” “repair compatibility with an older version,” or “update latest after verification.” It covers version-specific availability and behavior.

Check and revise lesson availability, syntax, explanations/learning notes, expected output, and effects on existing versions. Do not automatically expand a content-compatibility request into runtime infrastructure changes. Handle a latest update only when explicitly requested.

## Workflow

Read the [shared contract](../../tutorial/contract.md), [versioning](../../tutorial/versioning.md), and [validation](../../tutorial/validation.md). Read [learning design](../../tutorial/learning-design.md) when revising learning notes and [exercise evaluation](../../tutorial/exercise-evaluation.md) when changing checkers.

## Deliverables and completion

Deliver availability/compatibility changes, resolved explanations/code/notes, per-version fixtures, and evidence for existing-version checks. Complete the task when every generated lesson for the target version and the required assets have been checked, and the report states whether latest changed and which infrastructure or behavior remains unavailable/unverified.

Use the [version prompt](prompts/update-version.md) for request examples. Only when switching to another task, select its skill from the [entry-point list](../../../doc/tutorial/README.md).
3 changes: 3 additions & 0 deletions .agents/skills/php-tutorial-versioning/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface:
display_name: "PHP Tutorial Versioning"
short_description: "Adapt PHP lessons and verify version compatibility"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Add or update PHP tutorial version coverage

Use `$php-tutorial-versioning` to add `<version>` or repair its compatibility.

- Target version and affected lessons: `<scope>`
- Available runtime / known limitations: `<context>`
- Latest update explicitly requested: `<yes / no>`

Follow this skill's [entry point](../SKILL.md) and versioning/validation references. Report resolved content compatibility, per-version runtime evidence, existing-version impact and unverified prerequisites. Do not infer runtime infrastructure work from a content-only request.
26 changes: 26 additions & 0 deletions .agents/tutorial/contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Shared PHP tutorial contract

This document is the canonical shared rule set directly referenced by the four tutorial skills. Read only the details needed for the task; another task's SKILL.md is not the gateway to shared knowledge. A skill's scope and read-only instructions take precedence over repair examples in shared procedures.

## Sources of truth and execution environment

- The schema and Program contract are in `src/tutorial/types.ts`, structural validation in `validate-content.ts`, resolved lessons in `content.ts` (`lessonsByVersion`), and author learning notes in `learning-notes.ts`.
- Learning chapter order and boundaries are in `chapters.ts`; specification categories are in `reference-chapters.ts`. Resolve display order with `groupLessons`. Read [specification mapping](language-reference-map.md) when comparing these classifications.
- Supported versions and the explicit latest selection are defined by `tutorialVersions` / `latestTutorialVersion` in `config.ts` and its runtime registry source. Do not duplicate the schema, current chapter/slug/version inventories, version counts, or the latest value in documentation.
- Lessons run PHP/WASM inside the browser. The project does not provide HTTP servers, databases, Composer, or framework operations/security environments; do not imply that support or coverage. Additional infrastructure needs its own design within the requested scope, rather than following automatically from a lesson request.

## Content invariants

Write repository instructions and learner-facing content in English. Use the existing sections/blocks presentation and shared programs; do not create per-lesson JSX branches or separate copies of code and expected output. Check goals, changes/observations/reasons, and misconceptions using [learning design](learning-design.md). Reasons are author/reviewer information; adding them does not authorize learner-facing answer displays.

Example and Experiment are siblings. Selection switches code/input/draft and clears output; execution starts only after Run. Show output in one lab, without handwritten fixed output in the prose. Set Program.input only when the code reads `$input`. Evaluate grading through the author-only harness; do not add a learner-facing Check operation.

Use the official PHP Manual/release notes as primary sources for PHP behavior and feature introduction. Store links that directly support claims in each Lesson's references. A link's existence or chapter classification does not establish semantic agreement. Review resolved prose, Example/Experiment code, goals, learning notes, and sources together.

Use book tables of contents only as input for topic/prerequisite discussions; do not copy their chapter structure, order, headings, prose, or examples. Independently design the sequence even when consulting the publisher's official table of contents for [Dokushu PHP, 4th edition (独習PHP 第4版)](https://www.shoeisha.co.jp/book/detail/9784798168494).

## Verification and published assets

Separate structural/reference checks, actual WASM execution, and semantic/educational review. Read [validation and generated assets](validation.md) for commands, fixture limitations, and SEO/OGP checks. Runnable code and populated learning notes do not guarantee semantic correctness.

Preserve existing fixed-version URLs. Change latest only after an explicit request and verification of the target curriculum. A content-compatibility request does not automatically authorize runtime infrastructure changes. Detailed procedures are centralized in [versioning](versioning.md).
18 changes: 18 additions & 0 deletions .agents/tutorial/curriculum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Curriculum design

Use these criteria for chapter additions, learning-order changes, lesson splits, or relocation. An ordinary lesson addition within existing boundaries uses the criteria in `chapters.ts`; it does not require chapter redesign.

## Decision inputs and deliverables

Resolve target versions' `lessonsByVersion` through `groupLessons` and inspect each chapter's included/excluded scope, assumptions, and subsequent learning. Code owns the actual chapter/slug/version inventories. Read [specification mapping](language-reference-map.md) only when comparing learning chapters with PHP specification categories.

For each addition, split, or relocation option, identify:

- What learners already know, what they can do afterward, and how the Example/Experiments demonstrate it.
- Whether it fits an existing chapter; if a new chapter is needed, what it includes/excludes. Do not use vague Projects or Supplemental chapters as catch-all categories.
- Untaught syntax, dependencies on version-limited lessons that would break older versions, and prerequisite order in each version.
- For an overloaded lesson, the responsibilities after splitting, moved prerequisites, and preservation of existing URLs or explicit destinations/redirects.

Do not change placement just for visual organization. Explain alternatives, tradeoffs, and changes within the requested implementation scope. A design-only request does not authorize chapter or URL changes. When implementation is requested, update catalogs, lesson dependencies, required version-specific notes/prose, and routes together, then check structure, WASM behavior, meaning, and assets for all affected versions using [validation](validation.md).

Complete the task when chapter boundaries, prerequisites, subsequent learning, and URL effects are explained, and the requested implementation scope and checks are complete. Do not automatically change latest as part of learning-order design.
Loading
Loading