---
id: TASK-5
title: Add configurable build-phase args (global + profile)
status: Done
assignee: []
created_date: '2026-02-03 12:16'
updated_date: '2026-02-03 12:49'
labels: []
dependencies: []
references:
  - lua/zync
  - bin/zync
  - spec
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Allow `zconf.lua` to specify additional command arguments for build phases (e.g., `build`, `run`, `flash`) at the global level and per-profile. When a phase is executed, zync should append the configured args to the underlying command, combining global and profile args in a predictable order to enable profile-specific overrides/augmentations.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 All subtasks (TASK-5.1, TASK-5.2, TASK-5.3) are completed.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
Subtasks:
1. TASK-5.1 Implement config merge and arg normalization (owner: codex).
2. TASK-5.2 Add tests for global/profile args and ordering.
3. TASK-5.3 Update docs/examples for args configuration.
Sequence: implementation (5.1) -> tests (5.2) -> docs/examples (5.3).
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Subtasks complete: TASK-5.1 implemented config merge/normalization; TASK-5.2 added manager tests; TASK-5.3 updated README docs/examples.
<!-- SECTION:NOTES:END -->
