Commit Graph
100 Commits
Author SHA1 Message Date
csh 1ae798bcaa feat(tsl-codegen): support file and directory inputs 2026-07-30 13:44:50 +08:00
csh aa8a3e73a8 🐛 fix(tsl-codegen): make TSF conversion best effort
Recover recognizable function, procedure, class, and unit structure from
nonstandard TSF input while preserving strict parsing for compliant files.

Keep STANDARD.md limited to published format requirements and cover
recovery paths with regression tests.
2026-07-30 09:20:18 +08:00
csh 13be5ea0aa feat(tsl-api-reference): index class and unit APIs
Migrate reference pages to declaration-line storage and rebuild the
13-column index.

Add qualified member lookup plus regression and end-to-end coverage.
2026-07-29 15:47:46 +08:00
csh 9edc8fc868 feat(tsl-codegen): support unified API declarations
Add TSF conversion and shared Markdown recognition for mixed
function, class, and unit declarations.

Extend generation, linting, indexing, examples, and tests around
the unified declaration model.
2026-07-29 15:45:50 +08:00
csh bd25835d2d 🗑️ remove(test): drop skill regression suites
- delete the gitea-fix-ci credential suite (13 cases covering secret
  redaction, cross-origin redirect refusal and header injection); the
  script keeps those behaviours but nothing guards them now
- stop pointing at the tsl-syntax lookup recall suite from data/README.md:
  that suite was never committed and is now deleted, leaving --check as the
  only guard for lexicon/page correspondence
2026-07-29 15:45:49 +08:00
csh c6895fe41a 🐛 fix(tsl-syntax-reference): require exact long options in lookup cli
- drop the -h short option and disable long-option abbreviation: `--che`
  used to run `--check` and exit 0, so a misspelled argument silently
  performed a different action instead of failing
- document the lexicon/page alias validation under --check, now the only
  guard against a renamed page silently losing its natural language entry
- state that --query takes terms rather than the user's own words, and
  describe the weak-hit marker and its rc=2 in both --query help and epilog
2026-07-29 15:45:49 +08:00
csh 9ef45155dd 🔧 chore(cpp): trim clang-format to intentional google deviations
- keep only the options that differ from Google style, each annotated with
  the Google default, so every override carries its own rationale
- switch to Allman braces and a 120 column limit; short functions now
  collapse only when declared inline
- dropped overrides fall back to Google behaviour, which turns include
  sorting, argument binpacking, comment reflow and namespace comment
  fixing back on
- drop a stray trailing blank line in .clangd
2026-07-29 15:45:48 +08:00
csh 40a9885eb4 feat(tsl-syntax-reference): harden retrieval and restructure pages
- flag weak candidates (no intent/heading/identifier/tag hit) and exit 2
  when every candidate is weak: mis-hits used to be indistinguishable
  from real hits, so the retry-with-better-terms loop never fired
- accept multiple ids per --section for batch fetch, failing atomically
  on any unknown id so a partial fetch cannot pass as complete
- move query synonyms and page intent aliases to data/lexicon.json and
  enforce alias/page correspondence in --check; curation data no longer
  lives in the engine
- document the weak-hit rule, batch fetch and prelude-once guidance in
  SKILL.md, with curation discipline in data/README.md
- drop 11_pitfalls.md, renumber the trailing pages and spread retrieval
  tags across topics; lexicon keys are page filenames, so the renumbering
  and the new --check rule cannot land in separate commits
2026-07-29 15:45:47 +08:00
csh 31bcd80d3f 🗑️ remove(superpowers): delete obsolete plans and specs 2026-07-22 17:45:43 +08:00
csh ef1ea20f62 🗑️ remove(templates): drop unsupported Gitea CI templates 2026-07-22 17:43:47 +08:00
csh 67cab60a9f 🗑️ remove(skills): retire unsupported skill entries 2026-07-22 17:41:37 +08:00
csh 736663a0b0 🐛 fix(thirdparty): expose main in mirror fixture 2026-07-22 17:31:55 +08:00
csh 09314a2bdb 📝 docs(tsl-api-reference): localize skill guidance 2026-07-22 17:30:00 +08:00
csh 3117ca5ae4 feat(gitea-fix-ci): add authenticated log collector 2026-07-22 17:28:22 +08:00
csh 38ea8caaeb feat(commit-message): bundle policy and validator 2026-07-22 17:26:20 +08:00
csh d83707de23 🔧 chore(workflows): migrate to prepare + worktree model and merge checks
- add prepare.yml: install tools + maintain shared bare repo, anchors the workflow_run chain
- add checks.yml: merge lint + full test suite into a single workflow_run consumer job
- remove standards-check.yml and test.yml (superseded by checks.yml)
- convert sync-tsl-playbook and update-thirdparty-skills to worktree-model consumers
- unify workflow/job/step display names and emoji
2026-07-21 17:29:24 +08:00
csh 49e6dadc60 🔧 chore(repo): ignore local agent instructions 2026-07-20 09:08:40 +08:00
csh 1f19954dd7 ♻️ refactor(tsl-api-reference): reorganize function reference pages
Move runtime and document pages into their correct scope, remove obsolete pending entries, and regenerate the function index.\nUpdate agent test guidance and API skill routing to match the new reference layout.
2026-07-20 09:08:38 +08:00
csh c69278283f feat(tsl-codegen): add decoupled documentation toolkit
Generate TSL API Markdown from YAML or JSON into a configurable project scope.\nAdd file and directory lint modes, tags-aware indexing, and keyword search across tags and descriptions.\nBundle the toolkit through the playbook build and sync workflows.
2026-07-20 09:08:38 +08:00
csh 1d5304e7b6 🔧 chore(cpp): align conventions and formatter config 2026-07-20 09:08:37 +08:00
csh 502e1321c1 🐛 fix(style-cleanup): preserve scope and git state 2026-07-20 09:08:37 +08:00
csh 034b562e70 🐛 fix(commit-message): resolve policy and staged boundaries 2026-07-20 09:08:37 +08:00
csh fd63164328 🔧 chore(ci): inline skill sync and standardize git identity 2026-07-20 09:08:36 +08:00
csh ff07c79818 ♻️ refactor(test): consolidate repository checks 2026-07-20 09:08:36 +08:00
cshandClaude Fable 5 bb8bc6dff9 ♻️ refactor(tsl): decouple skill routing from static docs
删除静态文档中对 tsl-syntax-reference / tsl-api-reference 的导航路由,
改由运行时按需自动触发;语法/API 事实的所有权与 fail-closed 约束
只保留在 rulesets/tsl/index.md 这一唯一权威载体。

- docs/tsl/index.md:删 4 行 skill 路由及重复的所有权/fail-closed 段,回归纯分流
- docs/tsl/modules/index.md:删 API 路由及指向已删 syntax 的 3 处回跳
- docs/index.md:删 skill 导航行及 2 条指向不存在文件的死 catalog 链
- docs/tsl/syntax/index.md:删除旧路径兼容 stub,不再保留任何兼容
- rulesets/tsl/index.md:删首跳 2 条 skill 导航,保留事实边界与 Fail closed
- 同步修正相关测试断言

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 15:26:25 +08:00
cshandClaude Fable 5 3efd9abc11 🐛 fix(test): pin REPO_DIR in sync integration test env
run_sync copied os.environ but never set REPO_DIR. In CI, test.yml
exports REPO_DIR (the real checkout) via GITHUB_ENV, so the inherited
value made the sync operate on the real CI checkout instead of the temp
fixture, deleting dirs later tests need. Pin REPO_DIR to the passed repo
and add a regression test proving an inherited REPO_DIR does not leak.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 11:23:06 +08:00
cshandClaude Fable 5 265c891e19 🐛 fix(ci): allow kebab-case commit scopes
The scope regex only accepted [a-z0-9_], rejecting hyphenated scopes
like tsl-syntax that dominate the history (12x vs 4x underscore form).
Align both linter copies and the spec doc to accept lower-kebab-case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 11:22:50 +08:00
csh df8c402afb 🔧 chore(ci): scope tsl playbook sync paths 2026-07-13 10:29:23 +08:00
csh a32dd5dd3c 📝 docs(ci): plan scoped tsl playbook sync 2026-07-13 10:12:36 +08:00
csh 9fc823d893 📝 docs(ci): design scoped tsl playbook sync 2026-07-13 09:56:25 +08:00
csh e7110bd3b1 🗑️ remove(tsl_syntax): drop platform-specific agent metadata 2026-07-13 09:17:01 +08:00
csh d663c2dae5 🐛 fix(tsl-syntax): close lookup review gaps 2026-07-13 09:17:00 +08:00
csh 455661c936 📝 docs(tsl-syntax): enforce two-stage fact ownership workflow 2026-07-13 09:17:00 +08:00
csh 4076682895 feat(tsl-syntax): improve natural language topic routing 2026-07-13 09:16:59 +08:00
csh 4a84dbae3a 🐛 fix(tsl-syntax): index precise sections and enforce map integrity 2026-07-13 09:16:59 +08:00
csh 6728ed070e ♻️ refactor(tsl-syntax): make query output compact and safe 2026-07-13 09:16:58 +08:00
csh 0ace66571f 📝 docs(tsl-syntax): plan lookup logic hardening 2026-07-13 09:16:58 +08:00
csh da72d3f28c 📝 docs(tsl-syntax): design lookup logic hardening 2026-07-13 09:16:57 +08:00
cshandClaude Fable 5 59fe4eb83d feat(tsl_syntax): add concept map to lookup
新增 --map 模式,扫描 24 页「本篇职责」段实时生成 TSL 概念地图,
帮助从零写代码时把自然语言需求映射到该查的 TSL 概念(property、
unit、operator 重载等),随后仍用 --query 取精确语法。地图从
references 实时生成,零漂移;--check 增加护栏,职责段被清空即报错。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 09:16:57 +08:00
cshandClaude Fable 5 b597edfc70 🐛 fix(tsl_syntax): repair lookup engine and reconcile reference facts
lookup.py: exempt code-anchored ASCII identifiers from the mixed
zh/en gate so exact hits are no longer dropped; dedup parent/child
sections in results; validate write-prelude anchors in --check.

references: correct interpreter-verified facts (case-as-expression,
control-flow semicolons, __line__/__stack_frame, tslObjects order,
destroy timing, ErrDefine, truncated outputs), fix headings, scope
qualifiers and reversed quotes; strip dead preamble metadata from all
24 pages.

packaging: exclude __pycache__/*.pyc from playbook and bundle copies;
update build test file-count assertion to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 09:16:57 +08:00
csh 923bce91b0 🐛 fix(tsl-syntax): tighten lookup contracts 2026-07-13 09:16:55 +08:00
csh 9b9e0dfcb7 test(tsl_syntax): enforce lookup packaging contracts 2026-07-13 09:16:54 +08:00
csh 617275e92d 🐛 fix(tsl-syntax): remove body routing instructions 2026-07-13 09:16:53 +08:00
csh b4d2fc8246 ♻️ refactor(tsl-syntax): make reference lookup-only 2026-07-13 09:16:53 +08:00
csh 4558d32043 🐛 fix(tsl-syntax): gate lookup mode boosts 2026-07-13 09:16:52 +08:00
csh 5e31a7ccf6 feat(tsl-syntax): add section lookup core 2026-07-13 09:16:52 +08:00
csh ce1b92bbde feat(skills): add tsl syntax reference skill 2026-07-13 09:16:51 +08:00
csh 1a9a1aeee9 📝 docs(tsl): retarget legacy auth links to local anchors 2026-07-13 09:16:50 +08:00
cshandClaude Opus 4.8 94d968d68d 🔒 security(ci): keep sync token out of remote url via GIT_ASKPASS
- inline .gitea/ci/sync_tsl_playbook.sh into sync-tsl-playbook.yml
- clone over plain repo url; credentials flow through an ephemeral
  GIT_ASKPASS helper removed in cleanup
- rewrite tests to extract and exercise the workflow run block

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 13:11:58 +08:00
csh d0a41380d0 🗑️ remove(tsl): drop duplicate codegen docs 2026-07-08 11:21:28 +08:00
csh 38ccc67238 🐛 fix(tsl): preserve manual files during playbook sync
Limit tsl-playbook publishing to generated bundle paths so existing branch-local files are not removed.

Add tests for preserving non-generated files and for creating a clean orphan target branch.
2026-07-07 17:10:24 +08:00
csh c0bf0358e0 📝 docs(tsl): sync api skill with corrected codegen
Mirror docs/tsl/codegen into the bundled tsl-api-reference skill and rebuild the function index.

Remove invalid duplicate API entries for cb_delistedbydate, createhttpsession, exportJsonString, and Anova_Bartlett so exact lookup returns the canonical entries.
2026-07-07 16:47:03 +08:00
csh bbf6977f57 📝 docs(tsl): complete and lint codegen reference 2026-07-07 16:46:51 +08:00
csh 16e0992dd2 📝 docs(gitea): clarify failing job log lookup 2026-07-07 16:46:42 +08:00
csh 6f94cd3ee4 🔧 chore(tsl): add playbook sync workflow 2026-07-07 16:46:40 +08:00
csh e1f7ce052c feat(skills): add tsl api reference skill
Bundle the TSL API index and markdown references under the skill, route TSL docs to use it, and update the codegen index generator to maintain the bundled data.
2026-07-07 16:36:15 +08:00
csh 4cd6b9410f 📝 docs(agent): require first-principles brainstorming 2026-07-07 16:36:10 +08:00
csh 6b05d97c00 📝 docs(agent): standardize intelligent agent wording 2026-07-07 16:36:10 +08:00
csh e6bde2cf0e 🔧 chore(git): ignore Python cache artifacts 2026-07-07 16:36:09 +08:00
csh b6160676b4 ♻️ refactor(tsl): rebuild codegen taxonomy
Move generated builtin and dotnet function docs into the upgraded taxonomy, remove legacy route pages, and regenerate function_index.tsv from markdown headings.
2026-07-07 16:36:08 +08:00
csh 54c1c11e77 🗑️ remove(tsl): drop special codegen placeholders 2026-07-07 16:35:59 +08:00
csh 14acc39179 🗑️ remove(tsl): delete legacy reference docs 2026-07-07 16:35:58 +08:00
csh 7046f0b60e 📝 docs(tsl): add generated codegen reference 2026-07-07 16:34:27 +08:00
cshandClaude Fable 5 014c23d386 🎨 style(syntax): normalize naming conventions
Align all TSL syntax documentation examples with docs/tsl/naming.md:

- Classes/types: PascalCase, drop Hungarian prefix (THuman→Human)
- Parameters/locals: snake_case with meaningful names (isLeft→is_left, maxb→max_b)
- Private members: snake_case_ with trailing underscore (real_part_, imaginary_part_)
- Public members: PascalCase (value→Value)
- Top-level functions: PascalCase (test→Test)
- Module constants: kPascalCase (kernel_dll→kKernelDll)

Affected: 01-24 syntax docs (23 files)
Verified: 150+ code blocks locally tested, output unchanged
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 16:34:19 +08:00
csh 9efd0a581f 🔧 chore(test): consolidate playbook config tests
Group playbook.toml-driven behavior tests under a single config-actions file and split parser/template contract coverage into focused files.

Remove obsolete PowerShell audit scripts and tracked validation reports; write template validation reports under reports/templates.
2026-06-26 18:08:04 +08:00
csh 1911d2dda3 🗑️ remove(progress): drop workflow state tracking
Use plan-status as the only machine state source for plan queueing, claiming, and finishing.

Route record-plan through queue insertion and update templates/prompts to match the single-state model.

BREAKING CHANGE: playbook.py -record-spec and main_loop.py record are removed.
2026-06-26 17:10:09 +08:00
csh 0f59543409 ♻️ refactor(test): rebuild agent runtime test flow 2026-06-24 11:22:09 +08:00
cshandClaude Opus 4.6 e46a4a192c 🔧 chore(test): fix test directory path references
Fix incorrect test directory references throughout the repository:
- .gitea/workflows/test.yml: tests/ → test/ (5 locations)
- CONTRIBUTING.md: tests/ → test/ (7 locations)
- test/README.md: update directory structure and commands

Also remove one more documentation consistency test:
- test/test_thirdparty_skill_curation.py: checks YAML config for exact text

All 63 functional tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-21 18:14:16 +08:00
cshandClaude Opus 4.6 ecaa8e3593 🗑️ remove(test): remove fragile documentation consistency tests
Remove tests that check exact documentation wording and structure:
- test_tsl_entrypoints_consistency.py (78KB): checked TSL docs for exact text
- test_skills_readme.py: checked skills README for specific phrases
- test_firstparty_skills_quality.py: checked skill docs formatting
- test_playbook_docs_index.py: checked docs index structure

These tests break every time documentation is improved or restructured,
creating maintenance burden without catching real issues.

Retain functional tests:
- CLI behavior (test_main_loop_cli.py)
- Deployment logic (test_deployment_routes_e2e.py)
- Template rendering (test_sync_templates_placeholders.py)
- Third-party skills sync (test_thirdparty_skills_pipeline.py)

Update .gitignore:
- Add node_modules/ and package-lock.json for npm-based tooling

All 64 functional tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-21 18:07:47 +08:00
cshandClaude Opus 4.6 565071c11f 🎨 style(md): lint and format all Markdown files
- Update .markdownlint.json: disable MD024 (duplicate headings) and MD025 (multiple h1)
  - MD024: test cases intentionally use duplicate headings for test IDs
  - MD025: function catalog files use multiple h1 for different function groups
- Fix MD040: add language identifiers to fenced code blocks in test/agent/README.md
- Fix MD031: add blank lines around fenced code blocks
- Run prettier to format all Markdown files consistently
- Fix table alignment and spacing issues

All markdownlint errors are now resolved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-21 17:37:29 +08:00
cshandClaude Opus 4.6 0dc244f1b4 test(tsl): adjust overly strict test assertions
- Remove "当前" from forbidden phrase list (allow technical terms like "当前单元格值")
- Remove outdated assertions about toolchain fact filling requirements in README
- Keep only meaningful assertions that match current documentation structure

These tests were preventing legitimate technical terminology and expecting
documentation patterns that are no longer applicable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-21 17:29:22 +08:00
csh e9ddc1e0b3 Merge branch 'main' of https://git.mytsl.cn/csh/playbook 2026-06-21 17:15:56 +08:00
cshandClaude Opus 4.6 e6b0859a09 🔧 chore(ci): enable cancel-in-progress for update-thirdparty workflow
Change `cancel-in-progress` from false to true to prevent concurrent runs
when multiple triggers (push, schedule, manual) occur simultaneously.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-21 17:15:40 +08:00
csh cfd0d2136a Merge branch 'main' of https://git.mytsl.cn/csh/playbook 2026-06-21 17:09:29 +08:00
cshandClaude Opus 4.6 8b93311cae 📝 docs(tsl): clarify syntax constraints and enhance test infrastructure
- Add TSF file naming constraint to syntax/02_core_model.md
- Clarify semicolon rules: syntax facts vs style preferences
- Separate control flow end semicolon rules (syntax allows both)
- Add function body semicolon requirements to syntax/05_functions_and_calls.md
- Move style preferences to code_style.md (control flow end semicolons)
- Remove cross-references from syntax docs to maintain independence
- Enhance Gitea workflow emoji for better CI output readability
- Fix CI test path from tests/ to test/
- Organize agent test results under test/agent/result/ directory
- Add complete Chinese translation of test cases (test_cases_zh.md)
- Clean up .gitignore to use unified test/agent/result/ directory
- Remove obsolete agent test artifacts (REPORTS_LOCATION.md, old results)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-21 17:04:50 +08:00
csh 6026401907 📝 docs(templates): clarify agent rules bootstrap 2026-06-16 14:05:44 +08:00
csh c0c2ffb6eb 📝 docs(tsl): expand syntax operator and object coverage 2026-06-10 15:25:42 +08:00
csh 540b3c0a1b 📝 docs(tsl): restructure agent-facing reference
Rework TSL syntax, catalog, modules, and routing docs around deterministic agent lookup and generation.

Split large catalog pages into focused function fact pages, remove obsolete pending/verified/unavailable paths, and update consistency tests for the new structure.
2026-06-09 17:24:30 +08:00
csh 9c194170a1 📝 docs(playbook): defer spec plan archival 2026-06-05 09:46:55 +08:00
csh 5d9673cf6e ♻️ refactor(tests): consolidate playbook CLI coverage 2026-06-01 14:22:57 +08:00
csh 02ad5e5f4a feat(playbook): add playbook root boundary placeholder 2026-06-01 14:22:11 +08:00
csh f2ab57b39f feat(playbook): add install_mode deployment config
BREAKING CHANGE: [vendor] and playbook.deploy_root are no longer supported. Use [playbook].install_mode and playbook.playbook_root instead.
2026-06-01 10:49:16 +08:00
csh 2c3a559a30 📦 deps(skills): sync thirdparty skills 2026-05-31 13:44:08 +08:00
csh c35cf841bc 🐛 fix(playbook): add heading to generated CLAUDE.md 2026-05-31 13:43:59 +08:00
csh 7656ee2907 feat(skills): add uncle-bob-craft third-party skill 2026-05-31 13:43:49 +08:00
csh 7db5e4a697 🐛 fix(scripts): force LF for generated text files 2026-05-30 07:59:56 +08:00
csh c1bce2fb72 📦 deps(skills): sync pathfinding dependency for codebase-recon 2026-05-29 23:12:17 +08:00
csh b7eb57f5da 🐛 fix(thirdparty): use awesome master ref
Point codebase-migrate at the actual awesome-codex-skills master branch while keeping the whole-repo clone plus include_skill_dirs sync model.

Add a manifest assertion so the ref does not regress to main.
2026-05-29 16:29:30 +08:00
csh eaa061fd2b feat(main_loop): harden plan execution state
Validate required Plan Meta before claims, record claim ownership, and persist verification evidence on completion.

Document conditional skill triggers without adding them to automatic main-loop dispatch.
2026-05-29 15:42:03 +08:00
csh 3023aef8a0 feat(skills): curate code workflow skills
Add a Gitea CI triage skill with legacy web-log fallback, document first-party and third-party skill roles, and register selected third-party code workflow sources.

Remove the first-party bulk refactor workflow in favor of the registered codebase migration replacement.
2026-05-29 12:55:10 +08:00
csh d8eb418277 📝 docs(tsl): align agent-facing guidance 2026-05-28 19:12:34 +08:00
csh c48354e0cb 📝 docs(main_loop): keep archive contract tool-neutral 2026-05-28 09:02:26 +08:00
csh e87be183bc 📝 docs(main_loop): enforce plan archive completion gate 2026-05-28 08:57:01 +08:00
csh 0093fbf341 📝 docs(main_loop): make plan archive contract tool-neutral 2026-05-27 16:35:31 +08:00
csh 30c1582186 📝 docs(memory): bound context snapshot sections 2026-05-27 14:53:21 +08:00
csh 16287e207f 📝 docs(main_loop): clarify plan commit contents 2026-05-27 14:17:02 +08:00
csh 1a3ea1f425 🐛 fix(main_loop): enforce plan lifecycle ordering
Claim the first executable plan in plan-file order after resuming any in-progress plan, preserve skipped as its own workflow phase, and document the required post-done commit gate in the agent rules.
2026-05-27 14:07:09 +08:00
csh 61afff9d48 📝 docs(templates): refine superpowers prompt boundaries 2026-05-25 15:02:16 +08:00
csh 25d895d8b3 🐛 fix(gitea_workflow): clean up temp repos after job steps 2026-05-22 16:42:08 +08:00
csh 2bc3b115dc 🐛 fix(gitea_workflow): clean up temporary repo dirs in workflows 2026-05-22 16:39:08 +08:00