Skip to content
This repository was archived by the owner on Oct 5, 2026. It is now read-only.

Release v0.1.1 - #1

Merged
xycld merged 11 commits into
mainfrom
dev
Mar 18, 2026
Merged

xycld merged 11 commits into
mainfrom
dev

Conversation

@xycld

@xycld xycld commented Mar 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Add npm trusted publishing with OIDC (no token needed)
  • Add CI auto-publish workflow triggered on v* tags
  • Add GitHub Copilot adapter
  • Remove old compiler/orchestrator, consolidate core modules
  • Add examples, docs, and publishing config

After merge

git checkout main && git pull
git tag v0.1.1 && git push --tags

xycld added 11 commits March 14, 2026 18:41
The previous implementation only sorted top-level keys, causing
unstable hashes when nested objects had non-deterministic key order.
Add new test suites for orchestrator, result, E2E integration,
CLI commands (init, link, rehash, load), and design prompts.
Enhance existing tests for hash, check, compile-plan, computed,
store, view, compiler, and skills modules.
Remove unused imports and function, fix import ordering.
Replace the standalone compiler package with core/compile-plan.
Remove orchestrator and adapter abstractions in favor of the new
adapter system. Add i18n support, fix command, complexity headers,
and update all prompt generators for the new architecture.
Skill dir: .github/prompts (svp.prompt.md)
Context file: .github/copilot-instructions.md
Detection: checks for copilot-instructions.md file specifically
(not bare .github/ dir) to avoid false positives.
- Add L5 blueprints to hello-world and order-service
- Add L1 source files and L2 code block mappings to hello-world
  (first example demonstrating all five layers end-to-end)
- Add cockatiel-resilience example (complex multi-flow project)
- Add docs.md supplementary documentation for order-service nodes
- All examples pass svp check with zero errors
- Add publishConfig with public access to package.json
- Add publish.yml workflow triggered on v* tags using OIDC trusted publishing
- Whitelist .github/ in gitignore re-ignore rule
Copilot AI review requested due to automatic review settings March 18, 2026 03:33
@xycld
xycld merged commit 170a8ee into main Mar 18, 2026
6 of 13 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release prep for v0.1.1, focused on publishing automation and a restructured “skills/adapters” system to support multiple AI coding hosts, plus prompt i18n/complexity metadata and expanded examples/docs.

Changes:

  • Add multi-host HostAdapter system (Claude Code, Cursor, Windsurf, Kimi Code, Codex, GitHub Copilot) + auto-detection and init-time file generation.
  • Add prompt enhancements: complexity YAML front-matter, language directives/i18n, and optional docs.md injection into compile/recompile/review prompts.
  • Add npm OIDC trusted publishing workflow and update package metadata for publishing.

Reviewed changes

Copilot reviewed 118 out of 119 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/e2e/helpers.ts Adds shared E2E utilities (CLI runner, Claude runner, report rendering).
packages/skills/templates/slash-commands.ts Deprecates legacy template generator and forwards to Claude adapter skill files.
packages/skills/templates/claude-md.ts Deprecates legacy CLAUDE.md section generator; forwards to Claude adapter context section.
packages/skills/prompts/update-ref.ts Adds language-aware prompt builder + backward-compatible constant export.
packages/skills/prompts/review.ts Adds language-aware prompt builder + backward-compatible constant export.
packages/skills/prompts/recompile.ts Adds language-aware prompt builder + backward-compatible constant export.
packages/skills/prompts/design-l5.ts Adds complexity header + language directive support.
packages/skills/prompts/design-l4.ts Adds complexity header + language directive support.
packages/skills/prompts/design-l4-state-machine.ts Adds complexity header + language directive support.
packages/skills/prompts/design-l4-event-graph.ts Adds complexity header + language directive support.
packages/skills/prompts/design-l3.ts Generalizes L3 design prompt context to all L4 variants + adds complexity/language.
packages/skills/prompts/complexity-header.ts Introduces shared YAML front-matter generator for complexity tier.
packages/skills/prompts/compile.ts Adds language-aware compile instructions + backward-compatible constant export.
packages/skills/prompt-builder.ts Adds complexity to structured prompt, YAML front-matter, language directive, and docs injection.
packages/skills/index.ts Re-exports adapter registry API (getAdapter/getAllAdapterIds) and adjusts public surface.
packages/skills/adapters/windsurf.ts Adds Windsurf host adapter implementation.
packages/skills/adapters/types.ts Defines HostId/HostAdapter/SkillFile interfaces for multi-host system.
packages/skills/adapters/kimi-code.ts Adds Kimi Code host adapter implementation (skills + AGENTS.md context).
packages/skills/adapters/index.ts Adds adapter registry and exports detection helpers.
packages/skills/adapters/github-copilot.ts Adds GitHub Copilot adapter (.github/prompts + copilot instructions).
packages/skills/adapters/detect.ts Adds marker-based host auto-detection logic.
packages/skills/adapters/cursor.ts Adds Cursor adapter (.cursor/commands + rules file).
packages/skills/adapters/codex.ts Adds Codex adapter (.codex/skills + AGENTS.md context).
packages/skills/adapters/claude-code.ts Replaces prior “skill registry” adapter with HostAdapter-based Claude Code integration.
packages/skills/tests/rehash.test.ts Extends rehash tests for EventGraph/StateMachine + revision semantics + unicode cases.
packages/skills/tests/prompt-builder.test.ts Adds tests for docs injection, complexity propagation, YAML front-matter, and language directive.
packages/skills/tests/link.test.ts Adds additional unit tests for create/relink L2 behavior.
packages/skills/tests/adapters/claude-code.test.ts Removes old adapter tests tied to the removed SkillRegistry/CodeCLIAdapter path.
packages/skills/tests/adapters.test.ts Adds adapter registry/detection tests and cross-adapter content consistency checks.
packages/core/store.ts Adds APIs to read modular docs (nodes//docs.md and graphs/.docs.md).
packages/core/skill.ts Extends ResolvedContext with docs and removes old Skill/registry definitions.
packages/core/result.test.ts Adds unit tests for Result helpers (ok/err/unwrap).
packages/core/orchestrator.ts Removes convergence-loop orchestrator implementation.
packages/core/l5.ts Adds optional L5 language field for i18n preference.
packages/core/l4.ts Adds BlockContext and findBlockContext() to locate block usage across L4 variants.
packages/core/init.ts Adds language detection/setting during init and relaxes host option typing.
packages/core/index.ts Updates exports for new APIs (docs readers, BlockContext/findBlockContext, i18n helpers).
packages/core/i18n.test.ts Adds unit tests for i18n helpers (t/getLanguage/languageName/languageDirective).
packages/core/hash.ts Changes hashing to stable recursive key-sorted stringify for nested objects.
packages/core/computed.test.ts Adds coverage for signature generation and data-flow type resolution helpers.
packages/core/compile-plan.ts Adds task complexity, i18n’d reasons/labels, and language parameter plumbing.
packages/core/adapter.ts Removes old CodeCLIAdapter interface.
packages/compiler/types.ts Removes legacy compiler IR types.
packages/compiler/parse-node.ts Removes legacy YAML node parser.
packages/compiler/parse-node.test.ts Removes legacy parser tests.
packages/compiler/parse-graph.ts Removes legacy YAML graph parser.
packages/compiler/parse-graph.test.ts Removes legacy graph parser tests.
packages/compiler/index.ts Removes legacy compiler public API exports.
packages/compiler/compile.ts Removes legacy blueprint compilation pipeline.
packages/compiler/compile.test.ts Removes legacy blueprint E2E tests.
packages/compiler/compile-node.ts Removes legacy node→L3 compilation.
packages/compiler/compile-node.test.ts Removes legacy node compiler tests.
packages/compiler/compile-graph.ts Removes legacy graph→L4 compilation.
packages/compiler/compile-graph.test.ts Removes legacy graph compiler tests.
packages/cli/resolve.ts Adds docs loading into resolved prompt context; defines local ContextResolver type.
packages/cli/load.test.ts Adds tests for loading .svp state into check input.
packages/cli/index.ts Removes adapter injection; adds fix command and simplifies CLI bootstrap.
packages/cli/commands/prompt.ts Adds complexity defaulting, language plumbing, generalized design-l3 for non-flow L4 kinds.
packages/cli/commands/prompt.test.ts Updates expected error wording (“L4 artifact” vs “L4 flow”).
packages/cli/commands/link.test.ts Adds integration tests for svp link command.
packages/cli/commands/init.ts Adds host auto-detection, multi-host file generation, and i18n’d output.
packages/cli/commands/fix.ts Adds svp fix to generate prompts for all compile-plan tasks.
packages/cli/commands/compile.ts Removes old convergence-loop svp compile command.
packages/cli/commands/compile-blueprint.ts Removes old YAML→.svp compiler command.
packages/cli/commands/check.test.ts Updates fixtures to include L5 language field.
packages/cli/apply.ts Removes old “apply skill results to disk” implementation.
package.json Updates package name/version/bin, adds publishConfig/files/license/description, and prepublish build.
examples/order-service/nodes/validate-order/docs.md Adds modular node documentation example.
examples/order-service/nodes/process-order/docs.md Adds modular node documentation example.
examples/order-service/.svp/l5.json Adds L5 language field and updated hashes/timestamps for example.
examples/order-service/.svp/l4/order-service.json Updates example artifact hash/timestamp.
examples/order-service/.svp/l4/order-pipeline.json Updates example artifact hash/timestamp and dataFlows ordering.
examples/order-service/.svp/l3/validate-order.json Updates example artifact hash/timestamp.
examples/order-service/.svp/l3/process-order.json Updates example artifact hash/timestamp.
examples/order-service/.svp/l3/check-inventory.json Updates example artifact hash/timestamp.
examples/hello-world/src/uppercase.ts Adds generated L1 example source.
examples/hello-world/src/greet.ts Adds generated L1 example source.
examples/hello-world/.svp/l5.json Adds L5 language field and example hashes.
examples/hello-world/.svp/l4/hello-world.json Updates example artifact hash/timestamp.
examples/hello-world/.svp/l3/uppercase.json Updates example artifact hash/timestamp.
examples/hello-world/.svp/l3/greet.json Updates example artifact hash/timestamp.
examples/hello-world/.svp/l2/uppercase.json Adds L2 mapping example for uppercase.
examples/hello-world/.svp/l2/greet.json Adds L2 mapping example for greet.
examples/cockatiel-resilience/.svp/l5.json Adds example L5 (zh) showing i18n usage and placeholders.
examples/cockatiel-resilience/.svp/l4/retry-execution.json Adds EventGraph example artifact.
examples/cockatiel-resilience/.svp/l4/policy-wrap.json Adds Flow example artifact.
examples/cockatiel-resilience/.svp/l4/circuit-breaker-lifecycle.json Adds StateMachine example artifact.
examples/cockatiel-resilience/.svp/l3/reset-breaker-counters.json Adds L3 example block.
examples/cockatiel-resilience/.svp/l3/emit-isolate-event.json Adds L3 example block.
examples/cockatiel-resilience/.svp/l3/emit-half-open-event.json Adds L3 example block.
examples/cockatiel-resilience/.svp/l3/emit-break-event.json Adds L3 example block.
examples/cockatiel-resilience/.svp/l3/check-breaker-threshold.json Adds L3 example block.
examples/cockatiel-resilience/.svp/l3/check-backoff-duration.json Adds L3 example block.
examples/cockatiel-resilience/.svp/l3/apply-error-filter.json Adds L3 example block.
docs/phase2-plan.md Adds note clarifying doc is historical and architecture is now multi-host adapters.
docs/node-spec.md Formatting cleanup and adds modular docs.md spec + loading behavior.
docs/design.md Adds blueprint viewer section (design note).
README.md Updates supported host list, repo structure section, and removes older blueprint-focused references.
LICENSE Adds MIT license text.
.gitignore Whitelists LICENSE, tests/, .github/ and adjusts hidden-dir ignore rules; ignores e2e reports.
.github/workflows/publish.yml Adds tag-triggered publish workflow using npm trusted publishing (OIDC).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread packages/core/hash.ts
Comment on lines +20 to +28
/** 递归排序所有嵌套对象的 key,保证序列化稳定且不丢失嵌套属性 */
function sortedStringify(value: unknown): string {
if (value === null || value === undefined) return JSON.stringify(value);
if (typeof value !== "object") return JSON.stringify(value);
if (Array.isArray(value)) return "[" + value.map((v) => sortedStringify(v)).join(",") + "]";
const record = value as Record<string, unknown>;
const keys = Object.keys(record).toSorted();
const entries = keys.map((k) => JSON.stringify(k) + ":" + sortedStringify(record[k]));
return "{" + entries.join(",") + "}";
Comment on lines 5 to +8
import { init } from "../../core/init.js";
import { generateClaudeMdSection } from "../../skills/templates/claude-md.js";
import { generateSlashCommands } from "../../skills/templates/slash-commands.js";
import { t, getLanguage } from "../../core/i18n.js";
import { getAdapter, getAllAdapterIds, detectHosts } from "../../skills/adapters/index.js";
import type { HostId, HostAdapter } from "../../skills/adapters/index.js";
Comment on lines +18 to +22
.description("Auto-detect issues and generate fix prompts for all compile tasks")
.option("-r, --root <path>", "Project root directory", ".")
.option("--severity <level>", "Minimum severity: error (default) or warning", "error")
.option("--action <type>", "Only generate prompts for this action (compile/recompile/update-ref/review)")
.option("--dry-run", "Print compile-plan summary only, do not generate prompts")
Comment on lines +39 to +47
let tasks = plan.tasks as CompileTask[];
if (options.action !== undefined) {
const action = options.action as TaskAction;
tasks = tasks.filter((t) => t.action === action);
}

if (tasks.length === 0) {
console.log("All checks passed — no fix tasks generated.");
return;
Comment on lines +4 to 18
//
// DEPRECATED: This module is a backward-compatible re-export.
// New code should use adapters/claude-code.ts directly.

import { claudeCodeAdapter } from "../adapters/claude-code.js";

export interface SlashCommandTemplate {
readonly filename: string;
readonly content: string;
}

export function generateSlashCommands(): readonly SlashCommandTemplate[] {
return [svpBuild, svpAdd, svpChange, svpFix];
export function generateSlashCommands(language = "en"): readonly SlashCommandTemplate[] {
const files = claudeCodeAdapter.generateSkillFiles(language);
return files.map((f) => ({ filename: f.relativePath, content: f.content }));
}
xycld added a commit that referenced this pull request Mar 18, 2026

This branch was previously deployed

1 inactive deployment
npm — 36150608 Deployed Mar 18, 2026 by xycld via publish #1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants