Skip to content

refactor: rebuild tinypowers as a clean minimal v1.0 - #51

Merged
Walternater merged 12 commits into
mainfrom
codex/v1.0-clean-rebuild
Apr 15, 2026
Merged

Walternater merged 12 commits into
mainfrom
codex/v1.0-clean-rebuild

Conversation

@Walternater

Copy link
Copy Markdown
Owner

Summary

This PR rebuilds tinypowers from main as a clean, minimal v1.0 workflow instead of layering more changes onto the old runtime-heavy framework.

What Changed

  • removed the old hook/config/context/js runtime stack
  • kept only the core v1.0 shell workflow surface
    • /tech:init
    • /tech:feature
    • /tech:code
    • /tech:commit
  • restored the 5 shell gate/helper scripts
  • restored the core templates and internal specs
  • kept the compliance reviewer agent
  • restored shell-based integration fixtures and tests
  • aligned CHECK-2 output with /tech:commit expectations
  • made integration tests create tests/reports/ automatically

Result

The repository is now a much smaller shell-first v1.0 baseline instead of a mixed old-main plus v1.0 overlay.

Verification

  • ./tests/integration/test-init.sh
  • ./tests/integration/test-feature.sh
  • ./tests/integration/test-code.sh
  • ./tests/integration/test-full-flow.sh

wangchongfei and others added 12 commits April 9, 2026 17:50
- check-gate-2-exit.sh: 用 Python 安全替换消除 heredoc 命令注入风险 (P0)
- check-gate-2-exit.sh: 新增 confirm_prompt(),非 TTY 环境自动回答 yes,修复 agent/CI 挂死 (P0)
- check-gate-2-exit.sh: 修正 compliance report 查找逻辑、BLOCK/WARN 正则、build.gradle.kts 检测、AC 提取 (P1)
- 提取共享验证库 scripts/lib/validate-gate-inputs.sh,消除 gate-1/gate-2-enter 重复代码 (P1)
- pattern-scan.sh: 全部改用 xargs -0 传递文件列表,修复文件名含空格时数据丢失 (P2)
- pattern-scan.sh: 审计字段 grep 收紧、find/grep 增加 BSD/macOS 兼容性处理 (P2)
- 测试脚本: 移除动态 fixture 创建,改用静态 fixture;补全 full-flow skill 检查 (P2)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- check-gate-2-exit.sh: 修复 compliance BLOCK/WARN 回退解析器,支持 5 列和 3 列表格格式
- check-gate-2-exit.sh: Python 替换阶段通过 os.environ 读取 PROJECT_DIR,消除路径注入风险
- check-gate-2-exit.sh: confirm_prompt 用间接扩展 ${!var} + printf -v 替代 eval
- check-gate-2-exit.sh: 决策校验 grep 改用 -qF,避免正则误匹配
- validate-gate-inputs.sh: eval 替换为 printf -v
- doc-sync-checklist.md: 修正 spec.md 路径引用为 feature 根目录格式
- test-code.sh: cp -r 使用 /. 避免空目录时通配符展开失败

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 非 TTY 且无 env var 时默认 FAIL,消除 CI/agent 静默 bypass 风险
- 编译/代码审查/验证三项均改为硬失败,不再是 WARN
- 通过 TINYPOWERS_*_CONFIRM=yes 环境变量显式放行

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
知识初始化 (knowledge:init):
- 归档 6 个验证报告和设计文档到 openspec/changes/archive/
- 新增 CI workflow (test.yml) 覆盖全部集成测试套件
- SKILL.md: HYBRID 占位符拦截、git diff --since bug 修复
- tech-init: 将 knowledge:init 固化为 Step 4

门禁安全加固:
- check-gate-1: validate_prd_content 替换空文件检查(≥100字符)
- validate-gate-inputs: 空白决策/任务检测 + grep -c || true 修复
- pattern-scan: 限定扫描 src/main/java 避免 build/vendor
- detect-stack: FORCE_BUILD_TOOL 实现 + 命令注入防护
- 全部脚本增加 set -u

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
validate_prd_content 要求 ≥100 字符,echo "# PRD" 不足 10 字符。
替换为 cat heredoc 提供足够内容。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Walternater
Walternater merged commit cf16a8d into main Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant