tapd-story-commit

Finalizes pipeline by reconciling costs, committing code, and updating TAPD story status.

840|261|Updated Apr 18, 2019
One-click install
npx skills add https://github.com/TencentBlueKing/bk-bcs --skill tapd-story-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tapd-story-commit
Source: https://github.com/TencentBlueKing/bk-bcs/tree/main/.agents/skills/tapd-story-pipeline/tapd-story-commit
Command: npx skills add https://github.com/TencentBlueKing/bk-bcs --skill tapd-story-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It closes out a requirement pipeline by aggregating code change statistics and cost metrics, generating a standardized commit message, committing the code to git, and syncing the TAPD story status to "for test".

Core Features & Use Cases

  • Change Statistics: Computes total, added, deleted, logic, test, and documentation line counts via git diff against the implement baseline commit.
  • Cost Reconciliation Gate: Reconciles cost-events.jsonl against meta.yaml per_call entries by ts_event, deduplicating and backfilling any missed subagent cost events before final aggregation.
  • Commit & Status Sync: Builds a conventional commit message with a --story footer, writes a commit.md record, commits the code, and updates the TAPD story status via MCP.
  • Use Case: After a requirement passes architecture, security, code review, and test validation, run this stage to produce an auditable commit with full cost and change metrics recorded in meta.yaml and commit.md.

Quick Start

Run the commit stage for the current validated requirement to reconcile costs, commit the code, and mark the TAPD story as for test.

Frequently Asked Questions about tapd-story-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit code and update a TAPD story status automatically?

Run this commit stage after validation passes. It builds a conventional commit message with a --story footer, commits the code via git, and calls the TAPD MCP stories_update to set v_status to "for test".

How are code change statistics calculated for a requirement?

Statistics use git diff --numstat against the implement_baseline_commit stored in meta.yaml. Lines are categorized by file type into logic code, test code, and documentation, then written to meta.yaml stats.

What happens if the TAPD status update fails during commit?

The TAPD update failure does not block the git commit. The error is logged to process.log and the phase still advances to committed, leaving manual status correction in TAPD for later.

How does cost reconciliation avoid double-counting token events?

Reconciliation deduplicates events by ts_event, comparing cost-events.jsonl against the per_call entries already merged in meta.yaml. Only missing events are appended, so rerunning the stage is idempotent.

Can the commit stage be rerun after a crash or hook failure?

Yes. The stage is idempotent: git add and commit regenerate the same content, cost reconciliation deduplicates by ts_event, and the commit.md gate only fills in missing sections.