-
Notifications
You must be signed in to change notification settings - Fork 0
Enhance configuration management and synchronization features #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1b14c3e
feat(sync): enhance configuration management and platform synchroniza…
i-stack 014be6f
refactor(sync): streamline secrets management and configuration checks
i-stack bcbbd86
feat: restructure config, add sub-READMEs, use ~/ paths
i-stack 3048fd7
feat(config): enhance codex configuration and synchronization features
i-stack 7e2383d
feat(config): expand codex.json with new configuration options
i-stack 6dfd3ca
feat(sync): enhance environment variable synchronization for platforms
i-stack 86d441e
refactor(sync): simplify environment variable handling and improve co…
i-stack d1b3927
docs(README): add platform support section for macOS and Windows users
i-stack 39dee36
feat(config): update Claude configuration and sync logic
i-stack 3fc357b
feat(sync): enhance Xcode Claude Agent settings synchronization
i-stack 46229af
feat(gemini): enhance Gemini platform configuration and synchronization
i-stack de636c9
fix(gemini): update fileName and sandbox settings in configuration
i-stack 9c9a87f
feat(sync): improve MCP server handling and enhance model synchroniza…
i-stack 23d891d
feat(skills-engineering): align with mattpocock/skills structure & fi…
i-stack 160ac75
chore(skills-engineering): remove obsolete CHANGELOG, CONTEXT, and CO…
i-stack abcbcdd
feat(ios-engineer): 架构扩展 — 新增场景模块、进化机制与参考文档
i-stack 38e740a
feat(ios-engineer): gc_evolution_history.sh 增加删除前预数提示并执行历史快照 GC
i-stack 208258d
fix: 完善 iOS Engineer skill 的自我进化机制 & 新增重复分析工具
i-stack 67753b0
refactor: update duplication analysis tool and tests for improved pat…
i-stack a28e813
refactor: improve duplication analysis tool and enhance test coverage
i-stack ad0ba24
feat: 添加贡献指南、代码所有者和工作流配置
i-stack f5d422a
refactor(tests): update project paths in ClaudeSyncTests for consistency
i-stack 42eb6d4
feat: add validation and hardcoded paths badges to README
i-stack dfd9d1d
fix: update validation badge link in README to reflect feature branch
i-stack f841c03
ref: i18n 分层 — SKILL.md 英文元指令 + en-US 治理层镜像 + IR-001 语言匹配
i-stack 237e282
chore: v3.0.0 — CHANGELOG + Homebrew Formula + npm package.json
i-stack 5544dbe
docs: VitePress 文档站 + GitHub Pages 自动部署
i-stack 666b76c
fix: Node 22 + package-lock.json + node_modules gitignore
i-stack 5f3bc25
chore: update .gitignore to include usage.jsonl and ignore other file…
i-stack 6c4e07c
chore: add "type" field to package.json for module support
i-stack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # .githooks | ||
|
|
||
| Git 钩子目录,通过 `install-hooks.sh` 注册为仓库的 `core.hooksPath`。 | ||
|
|
||
| ## 安装 | ||
|
|
||
| ```bash | ||
| bash install-hooks.sh | ||
| ``` | ||
|
|
||
| 会将 `core.hooksPath` 指向此目录,启用以下守卫。 | ||
|
|
||
| ## pre-commit — 规则变更必须绑定治理记录 | ||
|
|
||
| 拦截对以下文件的未治理变更: | ||
| - `skills-engineering/ios-engineer/SKILL.md` | ||
| - `skills-engineering/ios-engineer/references/*.md` | ||
|
|
||
| 如果这些文件被 staged,同一个 commit 必须包含对应的 proposal 和 approval 记录。 | ||
|
|
||
| ## pre-push — 推送前强制同步并校验 | ||
|
|
||
| 推送前顺序执行: | ||
| 1. `sync-skills.sh` — 同步 skill 到各 Agent 目录 | ||
| 2. `sync-agent-preamble.sh` — 重写 preamble 托管块 | ||
| 3. `verify-sync.sh` — 校验同步结果 | ||
| 4. `sync_all.sh` — 同步 MCP 配置到所有平台 | ||
|
|
||
| 任一步骤失败则阻止推送。 | ||
|
|
||
| ## 紧急绕过 | ||
|
|
||
| ```bash | ||
| SKILL_BYPASS=1 git commit -m "..." # 跳过 skill 治理检查 | ||
| SKILL_BYPASS=1 git push # 跳过 skill-sync 段 | ||
| git push --no-verify # 跳过所有 hooks | ||
| ``` | ||
|
|
||
| 绕过仅限紧急修复,需在 commit message 中说明原因。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # iOS Engineer Skill — 核心治理文件 | ||
| skills-engineering/ios-engineer/SKILL.md @i-stack/core | ||
| skills-engineering/ios-engineer/references/ @i-stack/core | ||
| skills-engineering/ios-engineer/scripts/ @i-stack/core | ||
| skills-engineering/ios-engineer/evolution/ @i-stack/core | ||
|
|
||
| # 技能工程基础设施 | ||
| skills-engineering/scripts/ @i-stack/core | ||
| env/platforms/ @i-stack/core | ||
|
|
||
| # CI / 治理自动化 | ||
| .github/workflows/ @i-stack/core | ||
| .githooks/ @i-stack/core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Deploy Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, feature_3.0.0] | ||
| paths: | ||
| - 'docs/**' | ||
| - 'package.json' | ||
| - '.github/workflows/deploy-docs.yml' | ||
|
|
||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build VitePress | ||
| run: npm run docs:build | ||
|
|
||
| - name: Upload Pages artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: docs/.vitepress/dist | ||
|
|
||
| deploy: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Check Hardcoded Paths | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main, feature_*] | ||
|
|
||
| concurrency: | ||
| group: hardcoded-paths-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| hardcoded-paths: | ||
| name: Check hardcoded paths | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Scan for hardcoded personal paths | ||
| run: | | ||
| echo "Scanning committed files for hardcoded personal paths..." | ||
| RESULT_FILE=$(mktemp) | ||
| trap 'rm -f "$RESULT_FILE"' EXIT | ||
|
|
||
| find . -type f \ | ||
| -not -path './.git/*' \ | ||
| -not -path './node_modules/*' \ | ||
| -print0 | while IFS= read -r -d '' f; do | ||
| matches=$(grep -In '/Users/' "$f" 2>/dev/null | grep -v '/Users/you/' | grep -v '/Users/YourName/' || true) | ||
| if [ -n "$matches" ]; then | ||
| echo "::error file=$f::Hardcoded personal path found" | ||
| echo "$matches" | ||
| echo "VIOLATION" >> "$RESULT_FILE" | ||
| fi | ||
| done | ||
|
|
||
| if grep -q "VIOLATION" "$RESULT_FILE" 2>/dev/null; then | ||
| echo "" | ||
| echo "::error::Hardcoded personal paths detected. Replace with placeholders like '~/path/to/your/project' or '/Users/you/...'" | ||
| exit 1 | ||
| fi | ||
| echo "No hardcoded personal paths found" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Validate Skills | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'skills-engineering/ios-engineer/**' | ||
| push: | ||
| branches: [main, feature_*] | ||
| paths: | ||
| - 'skills-engineering/ios-engineer/**' | ||
|
|
||
| concurrency: | ||
| group: validate-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| validate: | ||
| name: Validate ios-engineer | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: skills-engineering/ios-engineer | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo apt-get install -y -qq ripgrep ruby > /dev/null | ||
|
|
||
| - name: Validate Rule IDs | ||
| run: bash scripts/validate_rule_ids.sh | ||
|
|
||
| - name: Validate Scenario Specs | ||
| run: bash scripts/validate_scenario_specs.sh | ||
|
|
||
| - name: Audit Reference Freshness | ||
| run: | | ||
| STALE_MONTHS=12 CRITICAL_MONTHS=18 bash scripts/audit_ref_freshness.sh | ||
|
|
||
| - name: Validate Usage Ledger | ||
| run: bash scripts/validate_usage_ledger.sh | ||
|
|
||
| - name: Run full skill evolution validation | ||
| run: | | ||
| SKIP_SNAPSHOT_CONSISTENCY=1 \ | ||
| SKIP_BEHAVIOR_VALIDATION=1 \ | ||
| bash scripts/validate_skill_evolution.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to ai-coding-kit will be documented in this file. | ||
|
|
||
| --- | ||
|
|
||
| ## [3.0.0] — 2026-07-05 | ||
|
|
||
| ### Added | ||
| - **i18n 分层**: SKILL.md 英文元指令 + en-US 治理层镜像(rule_index / cognitive_adversary_mode / self_evolution),IR-001 从"强制中文"改为"语言匹配用户输入" | ||
| - **CI 自动验证**: `.github/workflows/validate.yml` 在每次 PR / push 时自动校验 Rule IDs、Scenario Specs、Ref 新鲜度、Usage Ledger、演进流水线,并扫查硬编码路径 | ||
| - **CODEOWNERS**: ios-engineer 核心文件自动指定 reviewer | ||
| - **CONTRIBUTING.md**: 贡献指南(proposal 驱动演进、翻译贡献、平台支持新增) | ||
|
|
||
| ### Changed | ||
| - **IR-001 语义变更**: 从"始终使用简体中文"→"输出语言与用户输入语言一致" | ||
|
|
||
| --- | ||
|
|
||
| ## [2.0.0] — 2026-02-15 | ||
|
|
||
| ### Added | ||
| - skills-engineering 模块:Agent Skill 多平台统一同步(Claude Code / Codex CLI / Cursor / Gemini CLI / CodeBuddy / Continue / Cline / Xcode) | ||
| - ios-engineer skill:完整的 iOS 工程规则体系(Swift / SwiftUI / UIKit / 并发 / 测试 / 迁移),含 40+ 规则 ID 和自演进机制 | ||
| - 5 个全局工程技能:工程纪律、认知拓展、真值接地、论证纪律、问题分析 | ||
| - sync 模块:MCP 配置同步引擎,从单一数据源渲染到 8 个平台原生格式 | ||
| - env 模块:统一配置数据源(secrets + MCP + 平台) | ||
| - rag-gateway:TypeScript / Fastify 通用 RAG 网关(OpenAI 兼容 API) | ||
| - Git hooks:pre-commit 规则变更治理 + pre-push 同步校验 | ||
|
|
||
| --- | ||
|
|
||
| ## [1.0.0] — 2025-10-01 | ||
|
|
||
| ### Added | ||
| - 初始版本:MCP 配置同步核心引擎 | ||
| - 基础平台支持(Cursor / Claude Code) | ||
| - env/ 配置分层(secrets.json + mcp/ + platforms/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # 贡献指南 | ||
|
|
||
| 感谢你对 ai-coding-kit 的关注!本文档说明如何参与贡献。 | ||
|
|
||
| --- | ||
|
|
||
| ## 开发环境 | ||
|
|
||
| ```bash | ||
| git clone https://github.com/i-stack/ai-coding-kit.git | ||
| cd ai-coding-kit | ||
| cp env/secrets.json.example env/secrets.json | ||
| # 编辑 env/secrets.json 填入你的 API keys | ||
| ``` | ||
|
|
||
| 运行验证: | ||
|
|
||
| ```bash | ||
| cd skills-engineering/ios-engineer | ||
| bash scripts/validate.sh | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 贡献 Reference(新增 / 修改知识条目) | ||
|
|
||
| ios-engineer 采用**提案驱动**的演进流程,所有对 reference 或 SKILL.md 的变更必须先创建提案: | ||
|
|
||
| ```bash | ||
| # 1. 创建提案骨架 | ||
| bash skills-engineering/ios-engineer/scripts/create_skill_proposal.sh \ | ||
| "feat: 新增 CarPlay 适配参考" | ||
|
|
||
| # 2. 编辑 evolution/proposals/<id>.md,填写动机、变更范围、影响分析 | ||
|
|
||
| # 3. 实现变更(修改 references/ 或 SKILL.md) | ||
|
|
||
| # 4. 运行完整验证 | ||
| bash skills-engineering/ios-engineer/scripts/validate_skill_evolution.sh | ||
|
|
||
| # 5. 提交 PR,proposal 和变更一起提交 | ||
| ``` | ||
|
|
||
| ### Reference 编写规范 | ||
|
|
||
| - 每个 reference 文件首行必须包含 `<!-- last-verified: YYYY-MM -->` | ||
| - 所有规则 ID(如 `IR-001`、`ROUTE-005`)必须在 `rule_index.md` 中注册 | ||
| - 禁止跨文件重复定义核心概念(unique ownership 原则) | ||
| - 退役术语不得在任何 reference 中重新出现(retired term regression 检查) | ||
|
|
||
| --- | ||
|
|
||
| ## 翻译贡献 | ||
|
|
||
| 1. 在 `i18n/en-US/references/` 创建与 `references/` 同名的文件 | ||
| 2. 保持结构一致,标题层级不变 | ||
| 3. 规则 ID(如 `IR-001`)不翻译,保持原样 | ||
| 4. 代码示例中的注释可以翻译 | ||
|
|
||
| --- | ||
|
|
||
| ## 新增平台支持 | ||
|
|
||
| 1. 在 `env/platforms/` 添加平台配置 JSON | ||
| 2. 更新 `skills-engineering/scripts/sync-skills.sh` 添加新的同步目标 | ||
| 3. 更新 `skills-engineering/scripts/verify-sync.sh` 添加校验逻辑 | ||
| 4. 更新根目录 `README.md` 列出新平台 | ||
|
|
||
| --- | ||
|
|
||
| ## Commit 规范 | ||
|
|
||
| ``` | ||
| <type>: <简短描述> | ||
|
|
||
| type 取值: | ||
| feat: 新功能 | ||
| fix: 修复 | ||
| ref: 新增/修改 reference | ||
| evolve: 技能演进(proposal → implementation → promotion) | ||
| chore: 工程基础设施(CI / 脚本 / 配置) | ||
| docs: 文档 | ||
| ``` | ||
|
|
||
| 示例: | ||
| ``` | ||
| ref: 新增 CarPlay 场景适配 reference | ||
| evolve: promote v74 — 修复 concurrency reference 中版本前提缺失 | ||
| chore: CI 加入 rule_id 双向一致性检查 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## PR 要求 | ||
|
|
||
| - 涉及 `SKILL.md` 或 `references/*.md` 的变更必须绑定 `evolution/proposals/` 中的 proposal | ||
| - CI 必须全部通过(Rule IDs / Scenario Specs / Ref Freshness / Snapshot Consistency) | ||
| - 至少 1 位 [CODEOWNERS](./.github/CODEOWNERS) 批准 | ||
|
|
||
| --- | ||
|
|
||
| ## 治理体系速览 | ||
|
|
||
| | 组件 | 文件 | 用途 | | ||
| |------|------|------| | ||
| | 规则注册表 | `rule_index.md` | 所有规则 ID 的单一事实来源 | | ||
| | 自进化 | `self_evolution.md` | 技能演进闭环流程 | | ||
| | Usage Ledger | `usage_ledger.md` | 任务命中观测 | | ||
| | 认知对手 | `cognitive_adversary_mode.md` | 反 AI 迎合机制 | | ||
| | 验证场景 | `validation_scenarios.md` + `evolution/scenarios/` | 回归验证集 | |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Deploy Docs workflow, this step runs at the repository root, but this commit adds only a root
package.jsonand no rootpackage-lock.json/npm-shrinkwrap.json(the only lockfile is underrag-gateway/). I checkednpm ci --dry-run, and npm reports thatnpm ci“can only install with an existing package-lock.json or npm-shrinkwrap.json”, so every docs deployment triggered by this workflow will fail beforedocs:buildunless a root lockfile is committed or the workflow uses a non-ciinstall command.Useful? React with 👍 / 👎.