I have a solution for your problem and I hope it can help you.
First, I made three list for your senerio.
1. Team list
id member
1 abc
2 def
3 ghi
2. Secretary list
id member team(lookup field)
1 a 1
2 b 1
3 c 1
4 d 2
5 e 2
6 f 2
3. Assignment list
id task secretary team
1 write a document a 1
2 fix a bug d 2
so, I think you want to control item permission for Assignment list.
What you need is to make [team]column have permission to the item it
resides, is that right? when a user join in a team or leave a team,
he will auto have permision or lose permission to the item which his
team resides.
Fortunately, SharePoint Permission Workflow resolve this problem,
because workflow is the best way to make all the things auto run.
You could download and try the free version of Permission workflow at
www.sharepointboost.com/permissionworkflow.html
and set condition like this:
select column [team] have one permission(which in your case it should
be design) to items.