Skip to content

Commit 7f7f749

Browse files
committed
fix: track quarantine/deadcode in git so contributors see quarantined symbols
The quarantine/ directory was gitignored, hiding 38 dead-code files from other contributors. These are symbols identified by TestNoDeadExports and moved out of active code with .dead extension. Contributors need visibility into what was quarantined to decide whether to delete permanently or resurrect. Spec: specs/architecture-refresh-2026-04.md Signed-off-by: Jose Alekhinne <jose@ctx.ist>
1 parent 49229a7 commit 7f7f749

39 files changed

Lines changed: 570 additions & 3 deletions

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,3 @@ ideas
8181
# Generated skills
8282
.claude/skills/generated
8383
.claude/skills/gitnexus
84-
85-
# Dead code quarantine
86-
quarantine/
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Orphan YAML entries removed from errors.yaml — no corresponding DescKey constant in Go code.
2+
# Quarantined: 2026-04-02
3+
4+
err.add.missing-decision:
5+
short: |-
6+
decisions require complete ADR format
7+
8+
Missing required flags: %s
9+
10+
Usage:
11+
ctx add decision "Decision title" \
12+
--context "What prompted this decision" \
13+
--rationale "Why this choice over alternatives" \
14+
--consequence "What changes as a result"
15+
16+
Example:
17+
ctx add decision "Use PostgreSQL for primary database" \
18+
--context "Need a reliable database for production workloads" \
19+
--rationale "PostgreSQL offers ACID compliance, JSON support, and team familiarity" \
20+
--consequence "Team needs PostgreSQL training; must set up replication"
21+
err.add.missing-learning:
22+
short: |-
23+
learnings require complete format
24+
25+
Missing required flags: %s
26+
27+
Usage:
28+
ctx add learning "Learning title" \
29+
--context "What prompted this learning" \
30+
--lesson "The key insight" \
31+
--application "How to apply this going forward"
32+
33+
Example:
34+
ctx add learning "Go embed requires files in same package" \
35+
--context "Tried to embed files from parent directory, got compile error" \
36+
--lesson "go:embed only works with files in same or child directories" \
37+
--application "Keep embedded files in internal/templates/, not project root"
38+
err.backup.create-backup-generic:
39+
short: 'failed to create backup: %w'
40+
err.deps.cargo-not-found:
41+
short: 'cargo not found in PATH: install Rust toolchain to analyze Cargo projects'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Orphan YAML entries removed from hooks.yaml — no corresponding DescKey constant in Go code.
2+
# Quarantined: 2026-04-02
3+
4+
skill-discovery.relay-message:
5+
short: Skill discovery nudge
6+
context-load-gate.index-fallback:
7+
short: (no index entries)
8+
context-load-gate.index-header:
9+
short: |+
10+
--- %s (index - read full entries by date when relevant) ---
11+
%s
12+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Orphan YAML entries removed from ui.yaml — no corresponding DescKey constant in Go code.
2+
# Quarantined: 2026-04-02
3+
4+
pad.key-created:
5+
short: Scratchpad key created at %s
6+
rc.parse_warning:
7+
short: 'ctx: warning: failed to parse %s: %v (using defaults)'
8+
time.commit:
9+
short: commit
10+
time.commits:
11+
short: commits
12+
time.day:
13+
short: day
14+
time.days:
15+
short: days
16+
time.hour:
17+
short: hour
18+
time.hours:
19+
short: hours
20+
time.minute:
21+
short: minute
22+
time.minutes:
23+
short: minutes
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Orphan YAML entries removed from write.yaml — no corresponding DescKey constant in Go code.
2+
# Quarantined: 2026-04-02
3+
4+
write.init-created-with:
5+
short: ' ✓ %s%s'
6+
write.journal-source-bullet-item:
7+
short: '- %s'
8+
write.notify-close-response:
9+
short: "ctx: close response body: %v"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Dead exports quarantined from internal/assets/hooks/messages/registry.go
2+
// Quarantined: 2026-04-02
3+
// Restore from git history if needed.
4+
5+
package messages
6+
7+
// CategoryCustomizable marks messages intended for
8+
// project-specific customization.
9+
const CategoryCustomizable = "customizable"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Dead exports quarantined from internal/assets/read/hook/hook.go
2+
// Quarantined: 2026-04-02
3+
// Restore from git history if needed.
4+
5+
package hook
6+
7+
// MessageList returns available hook message directory names.
8+
//
9+
// Each hook is a directory under hooks/messages/ containing one or
10+
// more variant .txt template files.
11+
//
12+
// Returns:
13+
// - []string: List of hook directory names
14+
// - error: Non-nil if directory read fails
15+
func MessageList() ([]string, error) {
16+
entries, readErr := assets.FS.ReadDir(asset.DirHooksMessages)
17+
if readErr != nil {
18+
return nil, readErr
19+
}
20+
21+
names := make([]string, 0, len(entries))
22+
for _, entry := range entries {
23+
if entry.IsDir() {
24+
names = append(names, entry.Name())
25+
}
26+
}
27+
return names, nil
28+
}
29+
30+
// VariantList returns available variant filenames for a hook.
31+
//
32+
// Parameters:
33+
// - hook: Hook directory name (e.g., "qa-reminder")
34+
//
35+
// Returns:
36+
// - []string: List of variant filenames (e.g., "gate.txt")
37+
// - error: Non-nil if the hook directory is not found or read fails
38+
func VariantList(hook string) ([]string, error) {
39+
entries, readErr := assets.FS.ReadDir(path.Join(asset.DirHooksMessages, hook))
40+
if readErr != nil {
41+
return nil, readErr
42+
}
43+
44+
names := make([]string, 0, len(entries))
45+
for _, entry := range entries {
46+
if !entry.IsDir() {
47+
names = append(names, entry.Name())
48+
}
49+
}
50+
return names, nil
51+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Dead exports quarantined from internal/assets/read/project/project.go
2+
// Quarantined: 2026-04-02
3+
// Restore from git history if needed.
4+
5+
package project
6+
7+
// File reads a project-root file by name from the embedded filesystem.
8+
//
9+
// These files are deployed to the project root (not .context/) by dedicated
10+
// handlers during initialization.
11+
//
12+
// Parameters:
13+
// - name: Filename (e.g., "Makefile.ctx")
14+
//
15+
// Returns:
16+
// - []byte: File content
17+
// - error: Non-nil if the file is not found or read fails
18+
func File(name string) ([]byte, error) {
19+
return assets.FS.ReadFile(path.Join(asset.DirProject, name))
20+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Dead exports quarantined from internal/assets/tpl/tpl_recall.go
2+
// Quarantined: 2026-04-02
3+
// Restore from git history if needed.
4+
5+
package tpl
6+
7+
// RecallTokens formats the token stats line.
8+
// Args: total, in, out.
9+
//
10+
//nolint:gosec // G101: display template, not a credential
11+
const RecallTokens = "**Tokens**: %s (in: %s, out: %s)"
12+
13+
// RecallSummaryPlaceholder is the placeholder text in the summary section.
14+
const RecallSummaryPlaceholder = "[Add your summary of this session]"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Dead exports quarantined from internal/cli/system/core/journal/types.go
2+
// Quarantined: 2026-04-02
3+
// Restore from git history if needed.
4+
5+
package journal
6+
7+
// MarkResult holds the outcome of marking a stage.
8+
type MarkResult struct {
9+
Marked bool
10+
}

0 commit comments

Comments
 (0)